From 23489f6fa49a9e35878dcb1f403f021809a784cf Mon Sep 17 00:00:00 2001 From: nhpd Date: Mon, 9 Oct 2023 15:47:51 +0400 Subject: [PATCH] cleanup --- README.md | 24 ++++++++++++++++++------ test/lib/step_2.js | 3 --- test/lib/step_4.js | 3 --- test/src/step_2.ts | 4 ---- test/src/step_4.ts | 4 ---- 5 files changed, 18 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 5343e2b..40ad7f3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,11 @@ # Transfer unclaimed airdrop funds from neutron-1 to cosmoshub-4 -yarn build +# Test +`cd ./test` +`yarn build` + +## learn denom neutrond tx ibc-transfer transfer "transfer" "channel-189" "cosmos1mwfj5j8v2aafqqnjekeqtupgc6894033nvtgre" "100untrn" --chain-id pion-1 --home "~/.neutrond" --node "https://rpc-falcron.pion-1.ntrn.tech:443" --from "pion1_testnet_wallet" --keyring-backend test gaiad q bank balances cosmos1mwfj5j8v2aafqqnjekeqtupgc6894033nvtgre --home ~/.gaiad-theta --node https://rpc.sentry-02.theta-testnet.polypore.xyz:443 @@ -10,27 +14,35 @@ IBC_DENOM="ibc/kekw" ENDPOINT="http://127.0.0.1:26657" MNEMONICS="banner spread envelope side kite person disagree path silver will brother under couch edit food venture squirrel civil budget number acquire point work mass" -## 1. create channel beforehand +## prepare. create channel beforehand // WARN: testnet connection id example hermes create channel --a-chain pion-1 --a-port transfer --b-port transfer --a-connection connection-120 // created "channel-189 <-> channel-3235" for testnet -## 2. setup contracts +## 1. setup contracts node ./lib/index.js setup_contracts "$MNEMONICS" "$ENDPOINT" "connection-120" "channel-189" "$IBC_DENOM" // Result contracts: -{"creditsAddress":"neutron1je7qemax5u362p6f8qw5z7327vdwu36f0nyskkccwk2g88afrxkszj792a","airdropAddress":"neutron1hksph0z3aw59tf4zt63wadf7lmrw3aywylp52nd4ycypvhtatq4sj5wtm5","claimerAddress":"neutron1224xy9aygqryna5u0x4c8jnxpe8lxn8fvkvvjszszr87cqt202hqtpp9fl"} +{"creditsAddress":"neutron1s7q7t60agc4qll5u5hrt2th237rpn4wkjxva8zw2tj0rr36rue6qdqshcq","airdropAddress":"neutron140evr8wdxf44a5tz7lk7p9guus84d7763vp30j6zek9zmupj24nqye5mnd","claimerAddress":"neutron1xmf2rmsmnz208lfjytqdw8xx90ulkdg7p3k7g4ql82ady7mr3m0qdxp5qd"} -## 3. run steps -CLAIMER_ADDRESS="neutron1224xy9aygqryna5u0x4c8jnxpe8lxn8fvkvvjszszr87cqt202hqtpp9fl" +## 2. run steps +CLAIMER_ADDRESS="neutron1xmf2rmsmnz208lfjytqdw8xx90ulkdg7p3k7g4ql82ady7mr3m0qdxp5qd" node ./lib/index.js step_1 "$MNEMONICS" "$ENDPOINT" "$CLAIMER_ADDRESS" # withdraw from airdrop + node ./lib/index.js step_2 "$MNEMONICS" "$ENDPOINT" "$CLAIMER_ADDRESS" # create ica + node ./lib/index.js step_3 "$MNEMONICS" "$ENDPOINT" "$CLAIMER_ADDRESS" # send to ica + node ./lib/index.js step_4 "$MNEMONICS" "$ENDPOINT" "$CLAIMER_ADDRESS" # execute MsgFundCommunityPool ## query state node ./lib/index.js query_state "$MNEMONICS" "$ENDPOINT" "$CLAIMER_ADDRESS" should be 0 on account + +## query community pool +gaiad q auth module-account distribution --chain-id theta-testnet-001 --node "https://rpc.sentry-02.theta-testnet.polypore.xyz:443" +gaiad q bank balances cosmos1jv65s3grqf6v6jl3dp4t6c9t9rk99cd88lyufl --chain-id theta-testnet-001 --node "https://rpc.sentry-02.theta-testnet.polypore.xyz:443" +https://testnet.mintscan.io/cosmoshub-testnet/account/cosmos1jv65s3grqf6v6jl3dp4t6c9t9rk99cd88lyufl diff --git a/test/lib/step_2.js b/test/lib/step_2.js index fe14561..f335137 100644 --- a/test/lib/step_2.js +++ b/test/lib/step_2.js @@ -7,8 +7,5 @@ async function Step2(c, claimerAddress) { create_hub_i_c_a: {}, }, 'auto', 'create hub ica', []); console.log('createhubicares ' + JSON.stringify(createhubicares)); - console.log('Step 2 check'); - const icaResponse = await c.client.queryContractSmart(claimerAddress, { interchain_account: {} }); - console.log('ICA address: ' + icaResponse); } exports.Step2 = Step2; diff --git a/test/lib/step_4.js b/test/lib/step_4.js index 8ce9491..ffafde1 100644 --- a/test/lib/step_4.js +++ b/test/lib/step_4.js @@ -7,8 +7,5 @@ async function Step4(c, claimerAddress) { fund_community_pool: {}, }, 'auto', 'fund community pool', [{ amount: '8000', denom: 'untrn' }]); console.log('fundcommunitypoolres ' + JSON.stringify(fundcommunitypoolres)); - console.log('Step 4 check'); - console.log('ICA address: ' + await c.client.queryContractSmart(claimerAddress, { transfer_amount: {} })); - console.log('Stage: ' + JSON.stringify(await c.client.queryContractSmart(claimerAddress, { stage: {} }))); } exports.Step4 = Step4; diff --git a/test/src/step_2.ts b/test/src/step_2.ts index 9441609..0b8ddf2 100644 --- a/test/src/step_2.ts +++ b/test/src/step_2.ts @@ -6,8 +6,4 @@ export async function Step2(c: Connection, claimerAddress: string): Promise