Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove instruction for wasm contract #190

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/cosmos/call-contract/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
43 changes: 1 addition & 42 deletions examples/cosmos/call-contract/wasm-contract/README.md
Original file line number Diff line number Diff line change
@@ -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 <code_id>
```
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 <code_id>, store the <contract_address>
```
osmosisd tx wasm instantiate <code_id> '{}' --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 <contract_address> '{"send_message_evm": {"destination_chain": "Avalanche", "destination_address":"<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 <contract_address> '{"send_message_cosmos": {"destination_chain": "osmosis-6", "destination_address":"<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 <contract_address> '{"get_stored_message":{}}'
```
This Cosmwasm smart contract can send and receive message payloads to/from EVM.
Loading