|
19 | 19 | ''; |
20 | 20 | }; |
21 | 21 |
|
22 | | - cosmwasm-deployer = crane.buildWorkspaceMember { |
23 | | - crateDirFromRoot = "cosmwasm/deployer"; |
24 | | - }; |
| 22 | + inherit |
| 23 | + ((crane.buildWorkspaceMember { |
| 24 | + crateDirFromRoot = "cosmwasm/deployer"; |
| 25 | + }).packages |
| 26 | + ) |
| 27 | + cosmwasm-deployer |
| 28 | + ; |
25 | 29 |
|
26 | 30 | networks = [ |
27 | 31 | { |
|
31 | 35 | private_key = "0xaa820fa947beb242032a41b6dc9a8b9c37d8f5fbcda0966b1ec80335b10a7d6f"; |
32 | 36 | gas_config = { |
33 | 37 | gas_denom = "muno"; |
34 | | - gas_multiplier = "1.1"; |
35 | | - gas_price = "1.0"; |
| 38 | + gas_multiplier = "1.5"; |
| 39 | + gas_price = "1.5"; |
36 | 40 | max_gas = 10000000; |
37 | 41 | }; |
38 | 42 | ucs03_type = "cw20"; |
39 | 43 | bech32_prefix = "union"; |
40 | 44 | apps = { |
41 | | - ucs03 = ucs03-configs.cw20; |
| 45 | + # ucs03 = ucs03-configs.cw20; |
42 | 46 | }; |
43 | 47 | # lightclients = pkgs.lib.lists.remove "cometbls" (builtins.attrNames all-lightclients); |
44 | 48 | lightclients = [ ]; |
|
287 | 291 | }: |
288 | 292 | pkgs.writeShellApplication { |
289 | 293 | name = "${name}-deploy-full"; |
290 | | - runtimeInputs = [ cosmwasm-deployer.packages.cosmwasm-deployer ]; |
| 294 | + runtimeInputs = [ cosmwasm-deployer ]; |
291 | 295 | text = '' |
292 | 296 | RUST_LOG=info \ |
293 | 297 | cosmwasm-deployer \ |
|
303 | 307 | ''; |
304 | 308 | }; |
305 | 309 |
|
| 310 | + # migrate the admin to the multisig address |
| 311 | + finalize-deployment = |
| 312 | + { |
| 313 | + name, |
| 314 | + rpc_url, |
| 315 | + gas_config, |
| 316 | + private_key, |
| 317 | + multisig_address, |
| 318 | + bech32_prefix, |
| 319 | + ... |
| 320 | + }: |
| 321 | + pkgs.writeShellApplication { |
| 322 | + name = "${name}-deploy-full"; |
| 323 | + runtimeInputs = [ |
| 324 | + ibc-union-contract-addresses |
| 325 | + cosmwasm-deployer |
| 326 | + ]; |
| 327 | + text = '' |
| 328 | + DEPLOYER=$(cosmwasm-deployer address-of-private-key --private-key ${private_key} --bech32-prefix ${bech32_prefix}) |
| 329 | + ADDRESSES=$(ibc-union-contract-addresses "$DEPLOYER") |
| 330 | +
|
| 331 | + echo "$DEPLOYER" |
| 332 | + echo "$ADDRESSES" |
| 333 | +
|
| 334 | + RUST_LOG=info \ |
| 335 | + cosmwasm-deployer \ |
| 336 | + migrate-admin \ |
| 337 | + --private-key ${private_key} \ |
| 338 | + --gas-price ${toString gas_config.gas_price} \ |
| 339 | + --gas-denom ${toString gas_config.gas_denom} \ |
| 340 | + --gas-multiplier ${toString gas_config.gas_multiplier} \ |
| 341 | + --max-gas ${toString gas_config.max_gas} \ |
| 342 | + --new-admin ${multisig_address} \ |
| 343 | + --addresses <(echo "$ADDRESSES") \ |
| 344 | + --rpc-url ${rpc_url} |
| 345 | + ''; |
| 346 | + }; |
| 347 | + |
306 | 348 | chain-deployments-json = |
307 | 349 | { lightclients, apps, ... }: |
308 | 350 | pkgs.writeText "contracts.json" ( |
|
343 | 385 | inherit name; |
344 | 386 | runtimeInputs = [ |
345 | 387 | ibc-union-contract-addresses |
346 | | - cosmwasm-deployer.packages.cosmwasm-deployer |
| 388 | + cosmwasm-deployer |
347 | 389 | ]; |
348 | 390 | text = '' |
349 | 391 | DEPLOYER=$(cosmwasm-deployer address-of-private-key --private-key ${private_key} --bech32-prefix ${bech32_prefix}) |
|
380 | 422 | inherit name; |
381 | 423 | runtimeInputs = [ |
382 | 424 | ibc-union-contract-addresses |
383 | | - cosmwasm-deployer.packages.cosmwasm-deployer |
| 425 | + cosmwasm-deployer |
384 | 426 | ]; |
385 | 427 | text = '' |
386 | 428 | DEPLOYER=$(cosmwasm-deployer address-of-private-key --private-key ${private_key} --bech32-prefix ${bech32_prefix}) |
|
417 | 459 | inherit name; |
418 | 460 | runtimeInputs = [ |
419 | 461 | ibc-union-contract-addresses |
420 | | - cosmwasm-deployer.packages.cosmwasm-deployer |
| 462 | + cosmwasm-deployer |
421 | 463 | ]; |
422 | 464 | text = '' |
423 | 465 | DEPLOYER=$(cosmwasm-deployer address-of-private-key --private-key ${private_key} --bech32-prefix ${bech32_prefix}) |
|
442 | 484 |
|
443 | 485 | ibc-union-contract-addresses = pkgs.writeShellApplication { |
444 | 486 | name = "ibc-union-contract-addresses"; |
445 | | - runtimeInputs = [ cosmwasm-deployer.packages.cosmwasm-deployer ]; |
| 487 | + runtimeInputs = [ cosmwasm-deployer ]; |
446 | 488 | text = '' |
447 | 489 | cosmwasm-deployer \ |
448 | 490 | addresses \ |
|
524 | 566 | pkgs.writeShellApplication { |
525 | 567 | name = "${name}-deployments-json-entry"; |
526 | 568 | runtimeInputs = [ |
527 | | - cosmwasm-deployer.packages.cosmwasm-deployer |
| 569 | + cosmwasm-deployer |
528 | 570 | pkgs.jq |
529 | 571 | ibc-union-contract-addresses |
530 | 572 | ]; |
|
584 | 626 | bytecode-base |
585 | 627 | cw721-base |
586 | 628 | ucs03-zkgm |
| 629 | + cosmwasm-deployer |
587 | 630 | # native-token-minter |
588 | 631 | cw20-token-minter |
589 | 632 | ibc-union |
|
612 | 655 | value = deployments-json-entry args; |
613 | 656 | }) networks |
614 | 657 | )) |
| 658 | + // (builtins.listToAttrs ( |
| 659 | + map (args: { |
| 660 | + name = "finalize-deployment-${args.name}"; |
| 661 | + value = finalize-deployment args; |
| 662 | + }) (builtins.filter (network: network ? multisig_address) networks) |
| 663 | + )) |
615 | 664 | ) |
616 | 665 | // (builtins.foldl' (a: b: a // b) { } (map chain-migration-scripts networks)) |
617 | 666 | // derivation { name = "cosmwasm-scripts"; }; |
618 | 667 | } |
619 | | - // cosmwasm-deployer.packages |
620 | 668 | // |
621 | 669 | # all light clients |
622 | 670 | (builtins.listToAttrs ( |
|
0 commit comments