Skip to content

Instantly share code, notes, and snippets.

@giansalex
Last active December 14, 2023 18:00
Show Gist options
  • Save giansalex/edcdf7ad560b4e3761452402095a8d02 to your computer and use it in GitHub Desktop.
Save giansalex/edcdf7ad560b4e3761452402095a8d02 to your computer and use it in GitHub Desktop.

Revisions

  1. giansalex revised this gist Dec 14, 2023. 1 changed file with 8 additions and 7 deletions.
    15 changes: 8 additions & 7 deletions cw20-ics20.md
    Original file line number Diff line number Diff line change
    @@ -16,15 +16,16 @@ junod tx wasm instantiate <CODE-ID> "$JSON_DATA" --no-admin --from user $TX_FLAG
    - Create an IBC Channel `OSMO testnet <> JUNO testnet`
    ```
    hermes create channel osmo-test-4 \
    --chain-b uni-3 \
    --port-a transfer \
    --port-b wasm.juno1u2kf5e9qxf08hg3c0t53krjfjlj733ym9fkkgpch8qc3dp3yhpcses9c6n \
    hermes create channel --a-chain osmo-test-4 \
    --b-chain uni-3 \
    --a-port transfer \
    --b-port wasm.juno1u2kf5e9qxf08hg3c0t53krjfjlj733ym9fkkgpch8qc3dp3yhpcses9c6n \
    --new-client-connection \
    -o unordered \
    -v ics20-1
    --order unordered \
    --chan-version ics20-1
    ```
    > hermes v0.15.0 used
    > hermes v1.0 used
    > Note: You can replace `--new-client-connection` by `--a-connection connection-xx`
    - Verify ibc channel
    ```
  2. giansalex revised this gist Jun 27, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion cw20-ics20.md
    Original file line number Diff line number Diff line change
    @@ -24,7 +24,7 @@ hermes create channel osmo-test-4 \
    -o unordered \
    -v ics20-1
    ```
    > hermes v0.15.0
    > hermes v0.15.0 used
    - Verify ibc channel
    ```
  3. giansalex created this gist Jun 27, 2022.
    34 changes: 34 additions & 0 deletions cw20-ics20.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    # CW20-ICS20 on Juno

    - Upload [cw20-ics20](https://github.com/CosmWasm/cw-plus/tree/v0.13.4/contracts/cw20-ics20) contract - [cw0_ics20.wasm(v0.13.4)](https://github.com/CosmWasm/cw-plus/releases/download/v0.13.4/cw20_ics20.wasm)
    ```
    TX_FLAGS="--gas auto --gas-adjustment 1.3 --gas-prices 0.025ujunox"
    junod tx wasm store cw20_ics20.wasm --from user $TX_FLAGS
    ```
    > GET Code ID.
    - Instantiate Contract:
    ```
    JSON_DATA='{"default_timeout": 1200, "gov_contract": "juno14vhcdsyf83ngsrrqc92kmw8q9xakqjm0ff2dpn", "allowlist": [], "default_gas_limit": 200000}'
    junod tx wasm instantiate <CODE-ID> "$JSON_DATA" --no-admin --from user $TX_FLAGS
    ```
    > GET contract address (e.g juno1u2kf5e9qxf08hg3c0t53krjfjlj733ym9fkkgpch8qc3dp3yhpcses9c6n).
    - Create an IBC Channel `OSMO testnet <> JUNO testnet`
    ```
    hermes create channel osmo-test-4 \
    --chain-b uni-3 \
    --port-a transfer \
    --port-b wasm.juno1u2kf5e9qxf08hg3c0t53krjfjlj733ym9fkkgpch8qc3dp3yhpcses9c6n \
    --new-client-connection \
    -o unordered \
    -v ics20-1
    ```
    > hermes v0.15.0
    - Verify ibc channel
    ```
    junod q wasm contract-state smart juno1u2kf5e9qxf08hg3c0t53krjfjlj733ym9fkkgpch8qc3dp3yhpcses9c6n '{"list_channels":{}}'
    ```

    Deployed [demo](https://blueprints.juno.giansalex.dev/#/contracts/juno1u2kf5e9qxf08hg3c0t53krjfjlj733ym9fkkgpch8qc3dp3yhpcses9c6n)