From d80e413b73e0e745d7bdde6ac0360585e81640de Mon Sep 17 00:00:00 2001 From: npty Date: Tue, 2 Jul 2024 15:15:57 +0700 Subject: [PATCH 1/2] chore: remove unnecessary details in wasm-contract --- .../call-contract/wasm-contract/README.md | 43 +------------------ 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/examples/cosmos/call-contract/wasm-contract/README.md b/examples/cosmos/call-contract/wasm-contract/README.md index 5cc63466..34b6d89f 100644 --- a/examples/cosmos/call-contract/wasm-contract/README.md +++ b/examples/cosmos/call-contract/wasm-contract/README.md @@ -1,44 +1,3 @@ # Cosmwasm SendReceive Smart Contract -This project contains the Cosmwasm smart contract that can send and receive message payloads to/from EVM. -This contract is deployed to osmosis-5 testnet: `osmo12uds53qp285w68vzq9wx5kjjfj0evvsy7k0e2srx9mchj29h7urq3rtuuc` - -# Tests -Unit tests can be run with `cargo test` - -# Build and deploy -This process assumes you're using osmosisd CLI: https://docs.osmosis.zone/osmosis-core/osmosisd/ - -1. Build -``` -docker run --rm -v "$(pwd)":/code \ - --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \ - --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \ - cosmwasm/rust-optimizer:0.12.13 - ``` - -2. Deploy and store the -``` -osmosisd tx wasm store ./artifacts/send_receive.wasm --from wallet --gas-prices 0.1uosmo --gas auto --gas-adjustment 1.5 -y -b block -``` - - -3. Instantiate with , store the -``` -osmosisd tx wasm instantiate '{}' --from wallet --label "send_receive" --gas-prices 0.1uosmo --gas auto --gas-adjustment 1.3 --no-admin -y -b block -``` - -4. Example send message from Osmosis -> Avalache Fuji -``` -osmosisd tx wasm execute '{"send_message_evm": {"destination_chain": "Avalanche", "destination_address":"","message":"hello"}}' --amount 1uosmo --from wallet --gas-prices 0.1uosmo --gas auto --gas-adjustment 1.3 -y -b block -``` - -5. Example send message transaction from Osmosis -> Osmosis via Axelar -``` -osmosisd tx wasm execute '{"send_message_cosmos": {"destination_chain": "osmosis-6", "destination_address":"","message":"hello"}}' --amount 1uosmo --from wallet --gas-prices 0.1uosmo --gas auto --gas-adjustment 1.3 -y -b block -``` - -6. Example query stored message -``` -osmosisd query wasm contract-state smart '{"get_stored_message":{}}' -``` \ No newline at end of file +This Cosmwasm smart contract can send and receive message payloads to/from EVM. From 174289f2a3a46afbe9ddd9fccfba81fbdc7b9eba Mon Sep 17 00:00:00 2001 From: npty Date: Tue, 2 Jul 2024 15:18:33 +0700 Subject: [PATCH 2/2] chore: fix link --- examples/cosmos/call-contract/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cosmos/call-contract/README.md b/examples/cosmos/call-contract/README.md index 6d934615..52db2efd 100644 --- a/examples/cosmos/call-contract/README.md +++ b/examples/cosmos/call-contract/README.md @@ -8,7 +8,7 @@ This example demonstrates how to deploy a smart contract and facilitate communic ## Build a Contract (Optional) -1. A precompiled version of the contract is available [here](../cosmos/call-contract/wasm-contract/artifacts/send_receive.wasm). If you wish to modify the contract, follow these steps to recompile it: +1. A precompiled version of the contract is available [here](./wasm-contract/artifacts/send_receive.wasm). If you wish to modify the contract, follow these steps to recompile it: ``` npm run build-wasm