diff --git a/docs/band_price_source.md b/docs/band_price_source.md new file mode 100644 index 00000000..b9fb3081 --- /dev/null +++ b/docs/band_price_source.md @@ -0,0 +1,80 @@ +# Integrate mesh security using band oracle price source. + +## Prerequisites + +- Setup mesh-security consumer and provider chains as [integration_consumer](./integration_consumer.md), [integration_provider](./integration_provider.md) +- Choose a price source for 2 chains in [band laozi testnet](https://laozi-testnet6.cosmoscan.io/data-sources), [band mainnet](https://www.cosmoscan.io/data-sources) + +You can request 4 symbols on [oracle script id: 360](https://laozi-testnet6.cosmoscan.io/oracle-script/360) + +- BTC, ETH, USDT, BAND + +## Band Price Feeder + +Band oracle price feeder is design base on cw-band. More details could be found in: <https://github.com/bandprotocol/cw-band/tree/main/docs> + +The contract needs some information to instantiate, which is: + +``` +trading_pair: { + base_asset: String, + quote_asset: String, +} -> Consumer chain denom is base_asset, provider chain denom is quote_asset +client_id: String -> Arbitary string for your request +oracle_script_id: Uint64, -> The data source's id you choose +ask_count: Uint64, -> The number of validator you want to ask (Recommend: 4 on testnet) +min_count: Uint64, -> The minimum number of validator need to answer to aggregate result (Recommend: 3 on testnet) +fee_limit: Vec<Coin>, -> Data source fee that you willing to pay (Recommend: 250000uband, which is [{"denom": "uband", "amount":"250000"}]) +prepare_gas: Uint64, -> Gas for running prepare phrase (Recommend: 100000) +execute_gas: Uint64, -> Gas for running execute phrase (Recommend: 500000) +minimum_sources: u8, -> The minimum available sources to determine price is aggregated from at least minimum sources (for data integrity) 1 should be ok for testing +price_info_ttl_in_secs: u64, -> The price only can live in an amount of time, after that, they should be update (Recommend: 60) +``` + +## Configure relayer + +1. Create config for consumer chain and band chain as usual. +2. Create path, clients, connections +3. Deploy band price feeder on consumer chain +4. Setup channel using port wasm on consumer chain, port oracle on band chain and version bandchain-1 +5. Using contract address as price source in converter contract +Deploy contract: + +```bash +meshconsumerd tx wasm store ./tests/testdata/mesh_band_price_feed.wasm.gz --node $node --from $wallet --home=$home --chain-id $chainid --keyring-backend test --gas 300000 -y + +band_code_id=$(meshconsumerd q wasm list-code --node $node --output json | jq -r '.code_infos[-1].code_id') +client_id=$(yq e '.paths.{$PATH_NAME}.src.client-id' $relayer_home/config/config.yaml) +oracle_script_id=445 + +init_band_price_feed=$(cat <<EOF +{ + "trading_pair": { + "base_asset": "OSMO", + "quote_asset": "ATOM" + }, + "client_id": "$client_id", + "oracle_script_id": "$oracle_script_id", + "ask_count": "1", + "min_count": "1", + "fee_limit": [{"denom": "uband", "amount":"10000"}], + "prepare_gas": "40000", + "execute_gas": "300000", + "minimum_sources": 2, + "price_info_ttl_in_secs": 60 +} +EOF +) +meshconsumerd tx wasm instantiate $band_code_id "$init_band_price_feed" --node $node --label contract-pricefeed --admin $wallet --from $wallet --home=$home --chain-id $chainid --keyring-backend test -y --gas 300000 +sleep 7 + +price_feed=$(meshconsumerd q wasm list-contract-by-code $band_code_id --node $node --output json | jq -r '.contracts[0]' ) +echo "price feed contract: $price_feed" + +``` + +Create channel + +```bash +rly tx channel {$PATH_NAME} --src-port wasm.$price_feed --dst-port oracle --order unordered --version bandchain-1 --home $relayer_home --override +``` diff --git a/scripts/mesh/test_mvp.sh b/scripts/mesh/test_mvp.sh index ce54b7b6..7dfcc5f9 100755 --- a/scripts/mesh/test_mvp.sh +++ b/scripts/mesh/test_mvp.sh @@ -1,34 +1,39 @@ # !/bin/bash -killall meshd || true +killall meshconsumerd || true +killall meshproviderd || true killall rly || true # deploy chain 1 ./scripts/mesh/testibc/chain1.sh # deploy chain 2 ./scripts/mesh/testibc/chain2.sh sleep 7 + +./scripts/mesh/testibc/rly_band.sh + ./scripts/mesh/testibc/instantiate.sh # run relayer ./scripts/mesh/testibc/rly.sh home1node1=$HOME/.meshd/chain1/node1 home2node1=$HOME/.meshd/chain2/node1 +node1=tcp://127.0.0.1:26657 node2=tcp://127.0.0.1:26667 -virtual_staking=$(meshd q wasm list-contract-by-code 2 --output json | jq -r '.contracts[0]' ) -converter=$(meshd q wasm list-contract-by-code 3 --output json | jq -r '.contracts[0]' ) -vault=$(meshd q wasm list-contract-by-code 1 --output json --node $node2 | jq -r '.contracts[0]' ) -native_staking=$(meshd q wasm list-contract-by-code 3 --output json --node $node2 | jq -r '.contracts[0]' ) -ext_staking=$(meshd q wasm list-contract-by-code 4 --output json --node $node2 | jq -r '.contracts[0]' ) -test1_provider_addr=$(meshd keys show test1 --keyring-backend test --home=$home2node1 --address) -meshd tx meshsecurity submit-proposal set-virtual-staking-max-cap $virtual_staking 100000000stake --title "a title" --summary "a summary" --from test1 --keyring-backend test --home=$home1node1 --chain-id chain-1 -y --deposit 10000000stake +virtual_staking=$(meshconsumerd q wasm list-contract-by-code 2 --output json --node $node1| jq -r '.contracts[0]' ) +converter=$(meshconsumerd q wasm list-contract-by-code 3 --output json --node $node1 | jq -r '.contracts[0]' ) +vault=$(meshproviderd q wasm list-contract-by-code 1 --output json --node $node2 | jq -r '.contracts[0]' ) +native_staking=$(meshproviderd q wasm list-contract-by-code 3 --output json --node $node2 | jq -r '.contracts[0]' ) +ext_staking=$(meshproviderd q wasm list-contract-by-code 4 --output json --node $node2 | jq -r '.contracts[0]' ) +test1_provider_addr=$(meshproviderd keys show test1 --keyring-backend test --home=$home2node1 --address) +meshconsumerd tx meshsecurity submit-proposal set-virtual-staking-max-cap $virtual_staking 100000000stake --title "a title" --summary "a summary" --from test1 --keyring-backend test --home=$home1node1 --node $node1 --chain-id chain-1 -y --deposit 10000000stake sleep 7 -meshd tx gov vote 1 yes --from val1 --keyring-backend test --home=$home1node1 --chain-id chain-1 -y +meshconsumerd tx gov vote 1 yes --from val1 --keyring-backend test --node $node1 --home=$home1node1 --chain-id chain-1 -y sleep 5 -gov_addr=$(meshd q auth --node $node2 module-account gov -o json | jq ".account.base_account.address") +gov_addr=$(meshproviderd q auth --node $node2 module-account gov -o json | jq ".account.base_account.address") echo "gov addr: $gov_addr" proposal=$(cat <<EOF @@ -52,16 +57,16 @@ EOF ) echo $proposal echo $proposal > ./scripts/mesh/update_params.json -meshd tx gov submit-proposal ./scripts/mesh/update_params.json --from test1 --keyring-backend test --home=$home2node1 --node $node2 --chain-id chain-2 -y +meshproviderd tx gov submit-proposal ./scripts/mesh/update_params.json --from test1 --keyring-backend test --home=$home2node1 --node $node2 --chain-id chain-2 -y sleep 7 -meshd tx gov vote 1 yes --from val1 --keyring-backend test --home=$home2node1 --chain-id chain-2 --node $node2 -y +meshproviderd tx gov vote 1 yes --from val1 --keyring-backend test --home=$home2node1 --chain-id chain-2 --node $node2 -y sleep 30 # stake from provider(chain2) '{"bond":{}}'=======bond============ -meshd tx wasm execute $vault '{"bond":{"amount":{"amount": "10000", "denom":"stake"}}}' --from test1 --home=$home2node1 --chain-id chain-2 --keyring-backend test --node $node2 --fees 1stake -y --gas 15406929 +meshproviderd tx wasm execute $vault '{"bond":{"amount":{"amount": "10000", "denom":"stake"}}}' --from test1 --home=$home2node1 --chain-id chain-2 --keyring-backend test --node $node2 --fees 1stake -y --gas 15406929 sleep 7 @@ -74,10 +79,10 @@ account_query=$(cat <<EOF EOF ) -meshd q wasm state smart $vault "$account_query" --node $node2 +meshproviderd q wasm state smart $vault "$account_query" --node $node2 # ===========stake local=============================meshvaloper1w7f3xx7e75p4l7qdym5msqem9rd4dyc4u6ypev # '{"stake_local":{"amount": {"denom":"stake", "amount":"190000000"}, "msg":"eyJ2YWxpZGF0b3IiOiAiY29zbW9zdmFsb3BlcjF5OHNzMzR6Y2RncTlnM3l6MDNyZjZrZ3J1ajZ6cGFneGh6ZXFmbSJ9"}}' -val1_provider_addr=$(meshd q staking validators --output json --node $node2 | jq -r '.validators[0].operator_address') +val1_provider_addr=$(meshproviderd q staking validators --output json --node $node2 | jq -r '.validators[0].operator_address') stake_msg=$(cat <<EOF {"validator": "$val1_provider_addr"} EOF @@ -91,18 +96,18 @@ stake_local_msg=$(cat <<EOF "denom":"stake", "amount":"9000" }, - "msg":"$encode_msg" + "msg":"$(echo -n $encode_msg| tr -d '[:space:]')" } } EOF ) -meshd tx wasm execute $vault "$stake_local_msg" --from test1 --home=$home2node1 --chain-id chain-2 --keyring-backend test --node $node2 --fees 1stake -y --gas 15406929 +meshproviderd tx wasm execute $vault "$stake_local_msg" --from test1 --home=$home2node1 --chain-id chain-2 --keyring-backend test --node $node2 --fees 1stake -y --gas 15406929 sleep 7 # =========extenal============================meshvaloper1f7twgcq4ypzg7y24wuywy06xmdet8pc4hsl6ty # '{"stake_remote":{"contract":"cosmos1zwv6feuzhy6a9wekh96cd57lsarmqlwxdypdsplw6zhfncqw6ftqp82y57", "amount": {"denom":"stake", "amount":"100000000"}, "msg":"eyJ2YWxpZGF0b3IiOiAiY29zbW9zdmFsb3BlcjE0cjNhbmRuM3FyaDJ6NzN1eTNhNjZ2YzgyazU1ZHE1ZG04MmFxeSJ9"}}' -val1_consumer_addr=$(meshd q staking validators --output json | jq -r '.validators[0].operator_address') +val1_consumer_addr=$(meshconsumerd q staking validators --output json --node $node1| jq -r '.validators[0].operator_address') stake_msg=$(cat <<EOF {"validator": "$val1_consumer_addr"} EOF @@ -117,13 +122,13 @@ stake_remote_msg=$(cat <<EOF "denom":"stake", "amount":"1000" }, - "msg":"$encode_msg" + "msg":"$(echo -n $encode_msg| tr -d '[:space:]')" } } EOF ) -meshd tx wasm execute $vault "$stake_remote_msg" --from test1 --home=$home2node1 --chain-id chain-2 --keyring-backend test --node $node2 --fees 1stake -y --gas 15406929 +meshproviderd tx wasm execute $vault "$stake_remote_msg" --from test1 --home=$home2node1 --chain-id chain-2 --keyring-backend test --node $node2 --fees 1stake -y --gas 15406929 # Wait a while for relaying tx to consumer chain sleep 20 @@ -138,4 +143,4 @@ stake_query=$(cat <<EOF } EOF ) -meshd q wasm state smart $ext_staking "$stake_query" --node $node2 +meshproviderd q wasm state smart $ext_staking "$stake_query" --node $node2 diff --git a/scripts/mesh/testibc/chain1.sh b/scripts/mesh/testibc/chain1.sh index f4f8b39b..20bd53a9 100755 --- a/scripts/mesh/testibc/chain1.sh +++ b/scripts/mesh/testibc/chain1.sh @@ -7,13 +7,13 @@ home2=$HOME/.meshd/chain1/node2 chainid=chain-1 # init chain -meshd init mesh-1 --chain-id $chainid --home=$home1 -meshd init mesh-2 --chain-id $chainid --home=$home2 +meshconsumerd init mesh-1 --chain-id $chainid --home=$home1 +meshconsumerd init mesh-2 --chain-id $chainid --home=$home2 # keys add -meshd keys add val1 --keyring-backend test --home=$home1 -meshd keys add val2 --keyring-backend test --home=$home2 -meshd keys add test1 --keyring-backend test --home=$home1 +meshconsumerd keys add val1 --keyring-backend test --home=$home1 +meshconsumerd keys add val2 --keyring-backend test --home=$home2 +meshconsumerd keys add test1 --keyring-backend test --home=$home1 # Change parameter token denominations to stake cat $home1/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="stake"' > $home1/config/tmp_genesis.json && mv $home1/config/tmp_genesis.json $home1/config/genesis.json @@ -26,25 +26,25 @@ cat $home1/config/genesis.json | jq '.app_state["meshsecurity"]["params"]["epoch cat $home1/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="stake"' > $home1/config/tmp_genesis.json && mv $home1/config/tmp_genesis.json $home1/config/genesis.json # Allocate genesis accounts (cosmos formatted addresses) -val1=$(meshd keys show val1 --keyring-backend test --home=$home1 -a) -test1=$(meshd keys show test1 --keyring-backend test --home=$home1 -a) -val2=$(meshd keys show val2 --keyring-backend test --home=$home2 -a) -meshd add-genesis-account $val1 1000000000000stake --keyring-backend test --home=$home1 -meshd add-genesis-account $val2 1000000000000stake --keyring-backend test --home=$home1 -meshd add-genesis-account $test1 1000000000stake --keyring-backend test --home=$home1 +val1=$(meshconsumerd keys show val1 --keyring-backend test --home=$home1 -a) +test1=$(meshconsumerd keys show test1 --keyring-backend test --home=$home1 -a) +val2=$(meshconsumerd keys show val2 --keyring-backend test --home=$home2 -a) +meshconsumerd add-genesis-account $val1 1000000000000stake --keyring-backend test --home=$home1 +meshconsumerd add-genesis-account $val2 1000000000000stake --keyring-backend test --home=$home1 +meshconsumerd add-genesis-account $test1 1000000000stake --keyring-backend test --home=$home1 cp $home1/config/genesis.json $home2/config/genesis.json # Sign genesis transaction -meshd gentx val1 900000000000stake --keyring-backend test --chain-id $chainid --home=$home1 -meshd gentx val2 100000000000stake --keyring-backend test --chain-id $chainid --home=$home2 +meshconsumerd gentx val1 900000000000stake --keyring-backend test --chain-id $chainid --home=$home1 +meshconsumerd gentx val2 100000000000stake --keyring-backend test --chain-id $chainid --home=$home2 cp $home2/config/gentx/*.json $home1/config/gentx/ # Collect genesis tx -meshd collect-gentxs --home=$home1 +meshconsumerd collect-gentxs --home=$home1 cp $home1/config/genesis.json $home2/config/genesis.json # Run this to ensure everything worked and that the genesis file is setup correctly -meshd validate-genesis --home=$home1 +meshconsumerd validate-genesis --home=$home1 # change app.toml values VALIDATOR1_APP_TOML=$home1/config/app.toml @@ -67,11 +67,11 @@ sed -i -E 's|allow_duplicate_ip = false|allow_duplicate_ip = true|g' $VALIDATOR2 sed -i -E 's|prometheus = false|prometheus = true|g' $VALIDATOR2_CONFIG sed -i -E 's|prometheus_listen_addr = ":26660"|prometheus_listen_addr = ":26630"|g' $VALIDATOR2_CONFIG -node1=$(meshd tendermint show-node-id --home=$home1) -node2=$(meshd tendermint show-node-id --home=$home2) +node1=$(meshconsumerd tendermint show-node-id --home=$home1) +node2=$(meshconsumerd tendermint show-node-id --home=$home2) sed -i -E "s|persistent_peers = \"\"|persistent_peers = \"$node1@localhost:26656,$node2@localhost:26656\"|g" $home1/config/config.toml sed -i -E "s|persistent_peers = \"\"|persistent_peers = \"$node1@localhost:26656,$node2@localhost:26656\"|g" $home2/config/config.toml # Start the node (remove the --pruning=nothing flag if historical queries are not needed) -screen -S mesh1-node1 -t mesh1-node1 -d -m meshd start --home=$home1 -screen -S mesh1-node2 -t mesh1-node2 -d -m meshd start --home=$home2 \ No newline at end of file +screen -S mesh1-node1 -t mesh1-node1 -d -m meshconsumerd start --home=$home1 +screen -S mesh1-node2 -t mesh1-node2 -d -m meshconsumerd start --home=$home2 \ No newline at end of file diff --git a/scripts/mesh/testibc/chain2.sh b/scripts/mesh/testibc/chain2.sh index 940e9d6b..59703063 100755 --- a/scripts/mesh/testibc/chain2.sh +++ b/scripts/mesh/testibc/chain2.sh @@ -7,13 +7,13 @@ home2=$HOME/.meshd/chain2/node2 chainid=chain-2 # init chain -meshd init mesh-2 --chain-id $chainid --home=$home1 -meshd init mesh-2 --chain-id $chainid --home=$home2 +meshproviderd init mesh-2 --chain-id $chainid --home=$home1 +meshproviderd init mesh-2 --chain-id $chainid --home=$home2 # keys add -meshd keys add val1 --keyring-backend test --home=$home1 -meshd keys add val2 --keyring-backend test --home=$home2 -meshd keys add test1 --keyring-backend test --home=$home1 +meshproviderd keys add val1 --keyring-backend test --home=$home1 +meshproviderd keys add val2 --keyring-backend test --home=$home2 +meshproviderd keys add test1 --keyring-backend test --home=$home1 # Change parameter token denominations to stake cat $home1/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="stake"' > $home1/config/tmp_genesis.json && mv $home1/config/tmp_genesis.json $home1/config/genesis.json @@ -25,24 +25,24 @@ cat $home1/config/genesis.json | jq '.app_state["slashing"]["params"]["signed_bl cat $home1/config/genesis.json | jq '.app_state["mint"]["params"]["mint_denom"]="stake"' > $home1/config/tmp_genesis.json && mv $home1/config/tmp_genesis.json $home1/config/genesis.json # Allocate genesis accounts (cosmos formatted addresses) -val1=$(meshd keys show val1 --keyring-backend test --home=$home1 -a) -test1=$(meshd keys show test1 --keyring-backend test --home=$home1 -a) -val2=$(meshd keys show val2 --keyring-backend test --home=$home2 -a) -meshd add-genesis-account $val1 1000000000000stake --keyring-backend test --home=$home1 -meshd add-genesis-account $val2 1000000000000stake --keyring-backend test --home=$home1 -meshd add-genesis-account $test1 1000000000stake --keyring-backend test --home=$home1 +val1=$(meshproviderd keys show val1 --keyring-backend test --home=$home1 -a) +test1=$(meshproviderd keys show test1 --keyring-backend test --home=$home1 -a) +val2=$(meshproviderd keys show val2 --keyring-backend test --home=$home2 -a) +meshproviderd add-genesis-account $val1 1000000000000stake --keyring-backend test --home=$home1 +meshproviderd add-genesis-account $val2 1000000000000stake --keyring-backend test --home=$home1 +meshproviderd add-genesis-account $test1 1000000000stake --keyring-backend test --home=$home1 cp $home1/config/genesis.json $home2/config/genesis.json # Sign genesis transactions -meshd gentx val1 900000000000stake --keyring-backend test --chain-id $chainid --home $home1 -meshd gentx val2 100000000000stake --keyring-backend test --chain-id $chainid --home $home2 +meshproviderd gentx val1 900000000000stake --keyring-backend test --chain-id $chainid --home $home1 +meshproviderd gentx val2 100000000000stake --keyring-backend test --chain-id $chainid --home $home2 cp $home2/config/gentx/*.json $home1/config/gentx/ # Collect genesis tx -meshd collect-gentxs --home $home1 +meshproviderd collect-gentxs --home $home1 # Run this to ensure everything worked and that the genesis file is setup correctly -meshd validate-genesis --home $home1 +meshproviderd validate-genesis --home $home1 cp $home1/config/genesis.json $home2/config/genesis.json # change app.toml values @@ -71,11 +71,11 @@ sed -i -E 's|tcp://0.0.0.0:26656|tcp://0.0.0.0:26663|g' $VALIDATOR2_CONFIG sed -i -E 's|allow_duplicate_ip = false|allow_duplicate_ip = true|g' $VALIDATOR2_CONFIG # peers -NODE1=$(meshd tendermint show-node-id --home=$home1) -NODE2=$(meshd tendermint show-node-id --home=$home2) +NODE1=$(meshproviderd tendermint show-node-id --home=$home1) +NODE2=$(meshproviderd tendermint show-node-id --home=$home2) sed -i -E "s|persistent_peers = \"\"|persistent_peers = \"$NODE1@localhost:26666,$NODE2@localhost:26666\"|g" $home1/config/config.toml sed -i -E "s|persistent_peers = \"\"|persistent_peers = \"$NODE1@localhost:26666,$NODE2@localhost:26666\"|g" $home2/config/config.toml # start -screen -S mesh2-node1 -t mesh2-node1 -d -m meshd start --home=$home1 -screen -S mesh2-node2 -t mesh2-node2 -d -m meshd start --home=$home2 \ No newline at end of file +screen -S mesh2-node1 -t mesh2-node1 -d -m meshproviderd start --home=$home1 +screen -S mesh2-node2 -t mesh2-node2 -d -m meshproviderd start --home=$home2 \ No newline at end of file diff --git a/scripts/mesh/testibc/config.yaml b/scripts/mesh/testibc/config.yaml index ab87fa2f..05ec1d9f 100644 --- a/scripts/mesh/testibc/config.yaml +++ b/scripts/mesh/testibc/config.yaml @@ -7,7 +7,7 @@ chains: consumer: type: cosmos value: - key-directory: /Users/phamminh/.relayer/keys/chain-1/ + key-directory: [Your directory/keys/chain-1] key: key1 chain-id: chain-1 rpc-addr: http://localhost:26657 @@ -32,7 +32,7 @@ chains: provider: type: cosmos value: - key-directory: /Users/phamminh/.relayer/keys/chain-2/ + key-directory: [Your directory/keys/chain-2] key: key2 chain-id: chain-2 rpc-addr: http://localhost:26667 diff --git a/scripts/mesh/testibc/config_band.yaml b/scripts/mesh/testibc/config_band.yaml new file mode 100644 index 00000000..3bfc3dc8 --- /dev/null +++ b/scripts/mesh/testibc/config_band.yaml @@ -0,0 +1,57 @@ +global: + api-listen-addr: :5183 + timeout: 10s + memo: "" + light-cache-size: 20 +chains: + consumer: + type: cosmos + value: + key-directory: scripts/relayer/keys/chain-1 + key: key1 + chain-id: chain-1 + rpc-addr: http://localhost:26657 + account-prefix: mesh + keyring-backend: test + gas-adjustment: 1.2 + gas-prices: 0.01stake + min-gas-amount: 1000000 + max-gas-amount: 0 + debug: false + timeout: 20s + block-timeout: "" + output-format: json + sign-mode: direct + extra-codecs: [] + coin-type: 118 + signing-algorithm: "" + broadcast-mode: batch + min-loop-duration: 0s + extension-options: [] + feegrants: null + band: + type: cosmos + value: + key-directory: scripts/relayer/keys/band-laozi-testnet6 + key: testnet + chain-id: band-laozi-testnet6 + rpc-addr: https://rpc.laozi-testnet6.bandchain.org:443 + account-prefix: band + keyring-backend: test + gas-adjustment: 1.2 + gas-prices: 0.01uband + min-gas-amount: 1000000 + max-gas-amount: 0 + debug: false + timeout: 20s + block-timeout: "" + output-format: json + sign-mode: direct + extra-codecs: [] + coin-type: 494 + signing-algorithm: "" + broadcast-mode: batch + min-loop-duration: 0s + extension-options: [] + feegrants: null +paths: {} diff --git a/scripts/mesh/testibc/faucet.js b/scripts/mesh/testibc/faucet.js new file mode 100644 index 00000000..7f009893 --- /dev/null +++ b/scripts/mesh/testibc/faucet.js @@ -0,0 +1,22 @@ +async function getFaucet(address) { + const body = { + address: address, + amount: '100', + } + + let options = { + method: 'POST', + headers: { + 'Content-Type': 'application/json;charset=utf-8', + }, + body: JSON.stringify(body), + } + + // See https://docs.bandchain.org/develop/api-endpoints#laozi-testnet-5 + let response = await fetch(`https://laozi-testnet6.bandchain.org/faucet`, options) + + console.log(response) + } + +const address = process.argv[2]; +getFaucet(address) diff --git a/scripts/mesh/testibc/instantiate.sh b/scripts/mesh/testibc/instantiate.sh index 599e4756..e2f06273 100755 --- a/scripts/mesh/testibc/instantiate.sh +++ b/scripts/mesh/testibc/instantiate.sh @@ -7,22 +7,18 @@ chainid2=chain-2 node1=tcp://127.0.0.1:26657 node2=tcp://127.0.0.1:26667 -test1=$(meshd keys show test1 --keyring-backend test -a --home=$home1) -val1=$(meshd keys show val1 --keyring-backend test -a --home=$home1) -test2=$(meshd keys show test1 --keyring-backend test -a --home=$home2) -val2=$(meshd keys show val1 --keyring-backend test -a --home=$home2) +test1=$(meshconsumerd keys show test1 --keyring-backend test -a --home=$home1) +val1=$(meshconsumerd keys show val1 --keyring-backend test -a --home=$home1) +test2=$(meshproviderd keys show test1 --keyring-backend test -a --home=$home2) +val2=$(meshproviderd keys show val1 --keyring-backend test -a --home=$home2) # # #=======bootstrap contract consumer -meshd tx wasm store ./tests/testdata/mesh_simple_price_feed.wasm.gz --node $node1 --from $val1 --home=$home1 --chain-id $chainid1 --keyring-backend test --fees 1stake -y --gas 10059023 +meshconsumerd tx wasm store ./tests/testdata/mesh_virtual_staking.wasm.gz --node $node1 --from $val1 --home=$home1 --chain-id $chainid1 --keyring-backend test --fees 1stake -y --gas 10059023 sleep 7 -meshd tx wasm store ./tests/testdata/mesh_virtual_staking.wasm.gz --node $node1 --from $val1 --home=$home1 --chain-id $chainid1 --keyring-backend test --fees 1stake -y --gas 10059023 -sleep 7 -meshd tx wasm store ./tests/testdata/mesh_converter.wasm.gz --node $node1 --from $val1 --home=$home1 --chain-id $chainid1 --keyring-backend test --fees 1stake -y --gas 10059023 -sleep 7 -meshd tx wasm instantiate 1 '{"native_per_foreign": "0.5"}' --node $node1 --label contract-pricefeed --admin $val1 --from $val1 --home=$home1 --chain-id $chainid1 --keyring-backend test --fees 1stake -y --gas 3059023 +meshconsumerd tx wasm store ./tests/testdata/mesh_converter.wasm.gz --node $node1 --from $val1 --home=$home1 --chain-id $chainid1 --keyring-backend test --fees 1stake -y --gas 10059023 sleep 7 -price_feed=$(meshd q wasm list-contract-by-code 1 --node $node1 --output json | jq -r '.contracts[0]' ) +price_feed=$(meshconsumerd q wasm list-contract-by-code 1 --node $node1 --output json | jq -r '.contracts[0]' ) echo "price feed contract: $price_feed" init_converter=$(cat <<EOF @@ -36,13 +32,13 @@ init_converter=$(cat <<EOF } EOF ) -meshd tx wasm instantiate 3 "$init_converter" --node $node1 --label contract-converter --admin $val1 --from $val1 --home=$home1 --chain-id $chainid1 --keyring-backend test --fees 1stake -y --gas 3059023 +meshconsumerd tx wasm instantiate 3 "$init_converter" --node $node1 --label contract-converter --admin $val1 --from $val1 --home=$home1 --chain-id $chainid1 --keyring-backend test --fees 1stake -y --gas 3059023 sleep 7 -virtual_staking=$(meshd q wasm list-contract-by-code 2 --node $node1 --output json | jq -r '.contracts[0]' ) +virtual_staking=$(meshconsumerd q wasm list-contract-by-code 2 --node $node1 --output json | jq -r '.contracts[0]' ) echo "virtual staking contract: $virtual_staking" -converter=$(meshd q wasm list-contract-by-code 3 --node $node1 --output json | jq -r '.contracts[0]' ) +converter=$(meshconsumerd q wasm list-contract-by-code 3 --node $node1 --output json | jq -r '.contracts[0]' ) echo "converter contract: $converter" # 1:mesh14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sysl6kf @@ -50,13 +46,13 @@ echo "converter contract: $converter" # 3:mesh1qg5ega6dykkxc307y25pecuufrjkxkaggkkxh7nad0vhyhtuhw3stmd2jl # # #========== bootstrap contract provider -meshd tx wasm store ./tests/testdata/mesh_vault.wasm.gz --from $val2 --home=$home2 --chain-id $chainid2 --keyring-backend test --node $node2 --fees 1stake -y --gas 10059023 +meshproviderd tx wasm store ./tests/testdata/mesh_vault.wasm.gz --from $val2 --home=$home2 --chain-id $chainid2 --keyring-backend test --node $node2 --fees 1stake -y --gas 10059023 sleep 7 -meshd tx wasm store ./tests/testdata/mesh_native_staking_proxy.wasm.gz --from $val2 --home=$home2 --chain-id $chainid2 --keyring-backend test --node $node2 --fees 1stake -y --gas 10059023 +meshproviderd tx wasm store ./tests/testdata/mesh_native_staking_proxy.wasm.gz --from $val2 --home=$home2 --chain-id $chainid2 --keyring-backend test --node $node2 --fees 1stake -y --gas 10059023 sleep 7 -meshd tx wasm store ./tests/testdata/mesh_native_staking.wasm.gz --from $val2 --home=$home2 --chain-id $chainid2 --keyring-backend test --node $node2 --fees 1stake -y --gas 10059023 +meshproviderd tx wasm store ./tests/testdata/mesh_native_staking.wasm.gz --from $val2 --home=$home2 --chain-id $chainid2 --keyring-backend test --node $node2 --fees 1stake -y --gas 10059023 sleep 7 -meshd tx wasm store ./tests/testdata/mesh_external_staking.wasm.gz --from $val2 --home=$home2 --chain-id $chainid2 --keyring-backend test --node $node2 --fees 1stake -y --gas 15406929 +meshproviderd tx wasm store ./tests/testdata/mesh_external_staking.wasm.gz --from $val2 --home=$home2 --chain-id $chainid2 --keyring-backend test --node $node2 --fees 1stake -y --gas 15406929 sleep 7 msg=$(cat <<EOF @@ -69,15 +65,15 @@ init_vault=$(cat <<EOF "denom": "stake", "local_staking": { "code_id": 3, - "msg": "$encode_msg" + "msg": "$(echo -n $encode_msg| tr -d '[:space:]')" } } EOF ) -meshd tx wasm instantiate 1 "$init_vault" --label contract-vault --admin $val2 --from $val2 --home=$home2 --chain-id $chainid2 --keyring-backend test --node $node2 --fees 1stake -y --gas 3059023 +meshproviderd tx wasm instantiate 1 "$init_vault" --label contract-vault --admin $val2 --from $val2 --home=$home2 --chain-id $chainid2 --keyring-backend test --node $node2 --fees 1stake -y --gas 3059023 sleep 7 -vault=$(meshd q wasm list-contract-by-code 1 --output json --node $node2 | jq -r '.contracts[0]' ) +vault=$(meshproviderd q wasm list-contract-by-code 1 --output json --node $node2 | jq -r '.contracts[0]' ) echo "vault contract: $vault" init_ext_staking=$(cat <<EOF @@ -97,11 +93,11 @@ init_ext_staking=$(cat <<EOF } EOF ) -meshd tx wasm instantiate 4 "$init_ext_staking" --label contract-externalstaking --admin $val2 --from $val2 --home=$home2 --chain-id $chainid2 --keyring-backend test --node $node2 --fees 1stake -y --gas 3059023 +meshproviderd tx wasm instantiate 4 "$init_ext_staking" --label contract-externalstaking --admin $val2 --from $val2 --home=$home2 --chain-id $chainid2 --keyring-backend test --node $node2 --fees 1stake -y --gas 3059023 sleep 7 -ext_staking=$(meshd q wasm list-contract-by-code 4 --output json --node $node2 | jq -r '.contracts[0]' ) +ext_staking=$(meshproviderd q wasm list-contract-by-code 4 --output json --node $node2 | jq -r '.contracts[0]' ) echo "ext_staking contract: $ext_staking" echo "Finish instantiate steps" diff --git a/scripts/mesh/testibc/rly.sh b/scripts/mesh/testibc/rly.sh index ba92bc36..5ee649a5 100755 --- a/scripts/mesh/testibc/rly.sh +++ b/scripts/mesh/testibc/rly.sh @@ -1,4 +1,5 @@ #!/bin/bash +rly config init cp ./scripts/mesh/testibc/config.yaml $HOME/.relayer/config/ @@ -8,8 +9,8 @@ rly_wallet_1=$(rly keys show consumer key1) rly keys add provider key2 rly_wallet_2=$(rly keys show provider key2) -meshd tx bank send test1 --keyring-backend test $rly_wallet_1 10000000stake --node http://localhost:26657 --fees 200000stake -y --home $HOME/.meshd/chain1/node1 --chain-id chain-1 -meshd tx bank send test1 --keyring-backend test $rly_wallet_2 10000000stake --node http://localhost:26667 --fees 200000stake -y --home $HOME/.meshd/chain2/node1 --chain-id chain-2 +meshconsumerd tx bank send test1 --keyring-backend test $rly_wallet_1 10000000stake --node http://localhost:26657 --fees 200000stake -y --home $HOME/.meshd/chain1/node1 --chain-id chain-1 +meshproviderd tx bank send test1 --keyring-backend test $rly_wallet_2 10000000stake --node http://localhost:26667 --fees 200000stake -y --home $HOME/.meshd/chain2/node1 --chain-id chain-2 sleep 3 @@ -25,12 +26,13 @@ rly tx connection demo sleep 10 -converter=$(meshd q wasm list-contract-by-code 3 --output json | jq -r '.contracts[0]' ) -ext_staking=$(meshd q wasm list-contract-by-code 4 --output json --node tcp://127.0.0.1:26667 | jq -r '.contracts[0]' ) +converter=$(meshconsumerd q wasm list-contract-by-code 3 --output json --node http://localhost:26657 | jq -r '.contracts[0]' ) +ext_staking=$(meshproviderd q wasm list-contract-by-code 4 --output json --node tcp://127.0.0.1:26667 | jq -r '.contracts[0]' ) rly tx channel demo --src-port wasm.$converter --dst-port wasm.$ext_staking --order unordered --version '{"protocol":"mesh-security","version":"0.11.0"}' sleep 5 -screen -S relayer -t relayer -d -m rly start demo +echo "abcxyz" +# screen -S relayer -t relayer -d -m rly start demo sleep 5 \ No newline at end of file diff --git a/scripts/mesh/testibc/rly_band.sh b/scripts/mesh/testibc/rly_band.sh new file mode 100755 index 00000000..ecdbd12a --- /dev/null +++ b/scripts/mesh/testibc/rly_band.sh @@ -0,0 +1,72 @@ +#!/bin/bash +rly config init --home ./scripts/relayer + +cp ./scripts/mesh/testibc/config_band.yaml ./scripts/relayer/config/config.yaml + +rly keys add consumer key1 --home ./scripts/relayer + +rly_wallet_1=$(rly keys show consumer key1 --home ./scripts/relayer) + +# rly keys add band testnet --home ./scripts/relayer +rly_wallet_2=$(rly keys show band testnet --home ./scripts/relayer) + +meshconsumerd tx bank send test1 --keyring-backend test $rly_wallet_1 10000000stake --node http://localhost:26657 --fees 200000stake -y --home $HOME/.meshd/chain1/node1 --chain-id chain-1 + +node ./scripts/mesh/testibc/faucet.js $rly_wallet_2 + +sleep 3 + +rly paths new chain-1 band-laozi-testnet6 demo-band --home ./scripts/relayer + +sleep 5 + +rly tx clients demo-band --home ./scripts/relayer --override + +sleep 10 + +rly tx connection demo-band --home ./scripts/relayer + +sleep 10 + +home1=$HOME/.meshd/chain1/node1/ +chainid1=chain-1 +node1=tcp://127.0.0.1:26657 +test1=$(meshconsumerd keys show test1 --keyring-backend test -a --home=$home1) +val1=$(meshconsumerd keys show val1 --keyring-backend test -a --home=$home1) +meshconsumerd tx wasm store ./tests/testdata/mesh_band_price_feed.wasm.gz --node $node1 --from $val1 --home=$home1 --chain-id $chainid1 --keyring-backend test --fees 1stake -y --gas 10059023 +sleep 7 + +client_id=$(yq e '.paths.demo-band.src.client-id' ./scripts/relayer/config/config.yaml) +oracle_script_id=445 + +init_band_price_feed=$(cat <<EOF +{ + "trading_pair": { + "base_asset": "OSMO", + "quote_asset": "ATOM" + }, + "client_id": "$client_id", + "oracle_script_id": "$oracle_script_id", + "ask_count": "1", + "min_count": "1", + "fee_limit": [{"denom": "uband", "amount":"10000"}], + "prepare_gas": "40000", + "execute_gas": "300000", + "minimum_sources": 2, + "price_info_ttl_in_secs": 60 +} +EOF +) +meshconsumerd tx wasm instantiate 1 "$init_band_price_feed" --node $node1 --label contract-pricefeed --admin $val1 --from $val1 --home=$home1 --chain-id $chainid1 --keyring-backend test --fees 1stake -y --gas 3059023 +sleep 7 + +price_feed=$(meshconsumerd q wasm list-contract-by-code 1 --node $node1 --output json | jq -r '.contracts[0]' ) +echo "price feed contract: $price_feed" + + +rly tx channel demo-band --src-port wasm.$price_feed --dst-port oracle --order unordered --version bandchain-1 --home ./scripts/relayer --override + +sleep 5 + +screen -S relayer -t relayer -d -m rly start demo-band --home ./scripts/relayer --debug-addr localhost:5184 +sleep 5 \ No newline at end of file diff --git a/scripts/relayer/config/config.lock b/scripts/relayer/config/config.lock new file mode 100644 index 00000000..e69de29b diff --git a/scripts/relayer/config/config.yaml b/scripts/relayer/config/config.yaml new file mode 100644 index 00000000..d455257e --- /dev/null +++ b/scripts/relayer/config/config.yaml @@ -0,0 +1,69 @@ +global: + api-listen-addr: :5183 + timeout: 10s + memo: "" + light-cache-size: 20 +chains: + band: + type: cosmos + value: + key-directory: scripts/relayer/keys/band-laozi-testnet6 + key: testnet + chain-id: band-laozi-testnet6 + rpc-addr: https://rpc.laozi-testnet6.bandchain.org:443 + account-prefix: band + keyring-backend: test + gas-adjustment: 1.2 + gas-prices: 0.01uband + min-gas-amount: 1000000 + max-gas-amount: 0 + debug: false + timeout: 20s + block-timeout: "" + output-format: json + sign-mode: direct + extra-codecs: [] + coin-type: 494 + signing-algorithm: "" + broadcast-mode: batch + min-loop-duration: 0s + extension-options: [] + feegrants: null + consumer: + type: cosmos + value: + key-directory: scripts/relayer/keys/chain-1 + key: key1 + chain-id: chain-1 + rpc-addr: http://localhost:26657 + account-prefix: mesh + keyring-backend: test + gas-adjustment: 1.2 + gas-prices: 0.01stake + min-gas-amount: 1000000 + max-gas-amount: 0 + debug: false + timeout: 20s + block-timeout: "" + output-format: json + sign-mode: direct + extra-codecs: [] + coin-type: 118 + signing-algorithm: "" + broadcast-mode: batch + min-loop-duration: 0s + extension-options: [] + feegrants: null +paths: + demo-band: + src: + chain-id: chain-1 + client-id: 07-tendermint-0 + connection-id: connection-0 + dst: + chain-id: band-laozi-testnet6 + client-id: 07-tendermint-1186 + connection-id: connection-1029 + src-channel-filter: + rule: "" + channel-list: [] diff --git a/scripts/relayer/keys/band-laozi-testnet6/keyring-test/cd3d523f4e2c63141401e1689b533f3ac7a0aee2.address b/scripts/relayer/keys/band-laozi-testnet6/keyring-test/cd3d523f4e2c63141401e1689b533f3ac7a0aee2.address new file mode 100644 index 00000000..dddf54e5 --- /dev/null +++ b/scripts/relayer/keys/band-laozi-testnet6/keyring-test/cd3d523f4e2c63141401e1689b533f3ac7a0aee2.address @@ -0,0 +1 @@ +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyNC0wOS0xOCAxMTo0MDowNi45MDIzMDU4OTIgKzA3MDAgKzA3IG09KzAuMDIzNDc2OTU4IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiYV9KZXVpb3ZENXAtcmpqViJ9.B2MbKvo6pTgvfR1DRZaaDZBWOW6BLQ3EyICILoJbfjLq35ImQA6csA.41pmUvVo3_ppsYax.L_jE_BoxidE2zpMv30UjNrbY7ILlQcaBUlr9CxGww8LduwJrHY4QJRJJ8FZ7vSqm3-EawOqwA9DKMYm1tL4U54SgYIZrS3CosZUrVVabl9G1oiM95P5Q4IuDGRBEXNNq66C9nIhflOXxD-XmzBy1HSf_Rh9rYqVcdVm0jcMX8VR3ZyWkXfjeXRqp-1s4TdfKIkVq8G7YRANa7sTQcXRE6Mg9V1I2CEQJ7MZ3GU9GUeS-4qf5li4.StABwHq5EOURGxpZlJKbjQ \ No newline at end of file diff --git a/scripts/relayer/keys/band-laozi-testnet6/keyring-test/testnet.info b/scripts/relayer/keys/band-laozi-testnet6/keyring-test/testnet.info new file mode 100644 index 00000000..345114fc --- /dev/null +++ b/scripts/relayer/keys/band-laozi-testnet6/keyring-test/testnet.info @@ -0,0 +1 @@ +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyNC0wOS0xOSAxMjowMTowMy4yMDY0NzIwMTYgKzA3MDAgKzA3IG09KzAuMDU0Mzc1NjAxIiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiei13SGZGaHNydTRYcXFFcyJ9.tIaANGyVIa4wP5dxx4mDQE1l0q9_RnBdtjuhlRqD-kI5IJkbDKueiQ.h2_zvSv7hTJkLYsp.hej089xGUb6BXBL6Qgu48j8AjBI2Y4hONJ8U6yz75dlicX04JuQGO1OLmVF3MsnAuBX6K7S6hjTxMng_jAw6uqIGGRHcLLmM3madYf90LkUOh9Bx4OT2HnjN4pThuqdS6sBuADoyl0XwAabivyt-dFppo5ilD-Fu1He_ULhMXALY2tc4-AEi4D_O_zOG3i97LIAeAjUy_NjYcg811f6thBFARqFv9AYKOgWP5beHr9ZQZV9kdrw6QbMDb4pF6dX08wcufbif75qFrFZZVgn8ciho2X_Ce-YrFkOVANWfFnAEHDrrCKSV5-vab7THvukg2x-e4eGu_xrL3i9obsseJmre2M419PGypt_fF3GoIvayRhhVuskEr1R9RzTn7EP-zgDCTAKD0dldM8GAh7gFytRXkZPrs71a8mpHDaCpYQP_sfsayzgEIvNjLjuKb_4.BK02aTGZLjfftS3QFLREyg \ No newline at end of file diff --git a/scripts/relayer/keys/chain-1/keyring-test/cf32d005beaf5b86be3a4eac78fa258909b4be2c.address b/scripts/relayer/keys/chain-1/keyring-test/cf32d005beaf5b86be3a4eac78fa258909b4be2c.address new file mode 100644 index 00000000..0ea36ec3 --- /dev/null +++ b/scripts/relayer/keys/chain-1/keyring-test/cf32d005beaf5b86be3a4eac78fa258909b4be2c.address @@ -0,0 +1 @@ +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyNC0wOS0xOSAxMTo1ODoxNC4wNzI4NDMxNTMgKzA3MDAgKzA3IG09KzAuMDQ2MDcyNDc3IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiMjFpa3ZDSGluQUJiMm10ZyJ9.ZvLDKN99QV253KcJZoOMtbqIsgcuHfYbxkhe55k42F8WiDRJjtZ-0g.v0cIIffZnxm8lyDN.ke_af_jBlWIra8axZgsMi8Whj6gGrwHFy3ssnSkPQiRSxcrq5H9Bdm5fQI7X6ntNkIE6FZv2qcAGeC0kh17HvV7ULqbi-OqQ4r1QrifVtszp7d6NRN8LMd22OMiVPqBaSxUZXmswwNFA2SBVobC5goPzfkR80tKpbKLKbOXwqYo_EbeQYr02Qr3cqsNVs9oZJJzFjVwElOBEntC-KTis6HUROMbs6px7cLyR-S_YpCfbaw.kqkKvNTi31Ru_lfMug6fZg \ No newline at end of file diff --git a/scripts/relayer/keys/chain-1/keyring-test/key1.info b/scripts/relayer/keys/chain-1/keyring-test/key1.info new file mode 100644 index 00000000..3a13837d --- /dev/null +++ b/scripts/relayer/keys/chain-1/keyring-test/key1.info @@ -0,0 +1 @@ +eyJhbGciOiJQQkVTMi1IUzI1NitBMTI4S1ciLCJjcmVhdGVkIjoiMjAyNC0wOS0xOSAxMTo1ODoxNC4wNzE1NDgyNzIgKzA3MDAgKzA3IG09KzAuMDQ0Nzc3NjA3IiwiZW5jIjoiQTI1NkdDTSIsInAyYyI6ODE5MiwicDJzIjoiaXdmOTcybVFqdjZVa1NWbSJ9.nuvV20E2GhDlXyJHXnK7hTtLRFFa3bEpbUvvWibiQOxvTunsf2g13A.JD0rM9-ZYVwuK4l4.50BagWjll0IvQJokQ9iAqTVXLS9e7yxrUOr4KftLIhHpAYiiYMSPQcBgltY2zPv5vGOMOdjB9DrOzY-luXNNhjdD7kI6XsT7LQf7zmI4lgxMql5M8iORhPEiH_dTqLN9_4eui2RJtq7lDsvOAiCVyFoR1zG2zdbFUdsRaOLtiZw0Rok83GoideI74huCVIMUQ2SLSta10LSnnNKkvZVnSB-qjysr9XaeWzjSpyVcn0M0rxe_xW6-t-uECtMfULZzwlxchbJCvh3bZwZ4X48lmSJlxdNaejs4I1JkGWUxjMGvXAbl3bDiv6hyMrHxLIXh5oCo7NtCE9gCKjEjf9hGGYGgdlCtmfnsgAuWhgLjw3zIRVyzg6FbX3KgrPPOa9OKq9w3QzmSQp7VAS_SYJMM69euCO2MRAvNgJthRJ-smYv7ImaOY2RfUsxHaA.CTEf7kO3vhLcfMPjo3LtmQ \ No newline at end of file diff --git a/tests/testdata/copy_local_wasm.sh b/tests/testdata/copy_local_wasm.sh index 1e47a731..4c0bc852 100755 --- a/tests/testdata/copy_local_wasm.sh +++ b/tests/testdata/copy_local_wasm.sh @@ -4,7 +4,7 @@ command -v shellcheck > /dev/null && shellcheck "$0" echo "DEV-only: copy from local built instead of downloading" -for contract in mesh_external_staking mesh_converter mesh_native_staking mesh_native_staking_proxy mesh_osmosis_price_provider mesh_remote_price_feed mesh_simple_price_feed \ +for contract in mesh_external_staking mesh_converter mesh_native_staking mesh_native_staking_proxy mesh_osmosis_price_provider mesh_band_price_feed mesh_osmosis_price_feed mesh_simple_price_feed \ mesh_vault mesh_virtual_staking ; do cp -f ../../../mesh-security/artifacts/${contract}.wasm . gzip -fk ${contract}.wasm diff --git a/tests/testdata/mesh_band_price_feed.wasm.gz b/tests/testdata/mesh_band_price_feed.wasm.gz new file mode 100644 index 00000000..357ec578 Binary files /dev/null and b/tests/testdata/mesh_band_price_feed.wasm.gz differ diff --git a/tests/testdata/mesh_converter.wasm.gz b/tests/testdata/mesh_converter.wasm.gz index 65c15585..85925eaf 100644 Binary files a/tests/testdata/mesh_converter.wasm.gz and b/tests/testdata/mesh_converter.wasm.gz differ diff --git a/tests/testdata/mesh_external_staking.wasm.gz b/tests/testdata/mesh_external_staking.wasm.gz index 41b51f7c..292a1bc6 100644 Binary files a/tests/testdata/mesh_external_staking.wasm.gz and b/tests/testdata/mesh_external_staking.wasm.gz differ diff --git a/tests/testdata/mesh_native_staking.wasm.gz b/tests/testdata/mesh_native_staking.wasm.gz index 92665068..4ad4a956 100644 Binary files a/tests/testdata/mesh_native_staking.wasm.gz and b/tests/testdata/mesh_native_staking.wasm.gz differ diff --git a/tests/testdata/mesh_native_staking_proxy.wasm.gz b/tests/testdata/mesh_native_staking_proxy.wasm.gz index 448bc9e5..4a272fcd 100644 Binary files a/tests/testdata/mesh_native_staking_proxy.wasm.gz and b/tests/testdata/mesh_native_staking_proxy.wasm.gz differ diff --git a/tests/testdata/mesh_osmosis_price_feed.wasm.gz b/tests/testdata/mesh_osmosis_price_feed.wasm.gz new file mode 100644 index 00000000..2250359b Binary files /dev/null and b/tests/testdata/mesh_osmosis_price_feed.wasm.gz differ diff --git a/tests/testdata/mesh_osmosis_price_provider.wasm.gz b/tests/testdata/mesh_osmosis_price_provider.wasm.gz index 447dc050..cb369462 100644 Binary files a/tests/testdata/mesh_osmosis_price_provider.wasm.gz and b/tests/testdata/mesh_osmosis_price_provider.wasm.gz differ diff --git a/tests/testdata/mesh_simple_price_feed.wasm.gz b/tests/testdata/mesh_simple_price_feed.wasm.gz index 63761789..6f99efaa 100644 Binary files a/tests/testdata/mesh_simple_price_feed.wasm.gz and b/tests/testdata/mesh_simple_price_feed.wasm.gz differ diff --git a/tests/testdata/mesh_vault.wasm.gz b/tests/testdata/mesh_vault.wasm.gz index 583a23b3..2a6e5725 100644 Binary files a/tests/testdata/mesh_vault.wasm.gz and b/tests/testdata/mesh_vault.wasm.gz differ diff --git a/tests/testdata/mesh_virtual_staking.wasm.gz b/tests/testdata/mesh_virtual_staking.wasm.gz index 236b2108..0bc19308 100644 Binary files a/tests/testdata/mesh_virtual_staking.wasm.gz and b/tests/testdata/mesh_virtual_staking.wasm.gz differ diff --git a/tests/testdata/version.txt b/tests/testdata/version.txt index f536e9e0..66a6ad6a 100644 --- a/tests/testdata/version.txt +++ b/tests/testdata/version.txt @@ -1 +1 @@ -9c1a08272a3c580544ae4978bb40ca56f38d6d71 +da560f398b59d3a7430efbc1e71cbb0bcf62ad7a