Skip to content

CodeLab-Experiment/ics721

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Read this repo for detail

Oraichain

How to setup and using oraicli

CW721 Contract

Upload wasm to chain

yarn oraicli wasm upload  /home/asus/Workspace/transfer-cross-chain/cw-nfts/artifacts/cw721_base.wasm --fees 2500orai

Code id:

6525

Instantiate contract

yarn oraicli wasm instantiate --code-id 6525 --input '{"name":"Orai NFT collection", "symbol":"orai-test-01", "minter":"orai1yzsegvns6vmvf5q29uv26p3th4fd2kzmsq3h6m"}' --label "NFT"

Contract address:

orai1cqrc6a05px2epcuvvhxzcyes5s7x72hjwqqs30g7lhenpsuus63qaeeayy

Query

yarn oraicli wasm query orai1cqrc6a05px2epcuvvhxzcyes5s7x72hjwqqs30g7lhenpsuus63qaeeayy --input '{"num_tokens": {}}'
yarn oraicli wasm query orai1cqrc6a05px2epcuvvhxzcyes5s7x72hjwqqs30g7lhenpsuus63qaeeayy --input '{"contract_info": {}}'

ICS721 contract

Upload wasm to chain

yarn oraicli wasm upload /home/asus/Workspace/transfer-cross-chain/ICS721/artifacts/cw_ics721_bridge.wasm --fees 2500orai

Code id:

6526

Instantiate contract

yarn oraicli wasm instantiate --code-id 6526 --input '{"cw721_base_code_id": 6525}' --label "ICS721"

Contract address:

orai1u3hjrupq82c9kxq0y674lxxt872n78ae79xujjskukhhngl6td8qpl5tdw

Query

yarn oraicli wasm query orai1u3hjrupq82c9kxq0y674lxxt872n78ae79xujjskukhhngl6td8qpl5tdw --input '{"nft_contract": {"class_id":"DUMMY"}}'

Stargaze

You can watch the transaction at here How to setup CLI & create testnet account

Stargaze testnet account

  address: stars1a3766060t67u8mu740anrfqwxs7aax9srt4l4r
  name: testnet-key
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A1danmpAnqkS6RQWdzs7NTlL1UWLfo0uZ13MoidP92wg"}'
  type: local

Creator

  address: stars19cd68t3j0klfsehxs88pt0k2ft7s2ut0f7q4d4
  name: creator
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AtBLl2gXbkSSyEkGS9QstVQ9t/laHS4Mc/kp8c2mggI0"}'
  type: local

mnemonic

accident boost twenty come dove cinnamon pass donate balcony loyal dance forget weapon region trophy poem sorry divorce isolate more summer series dance around

Minter

  address: stars1qdrw8f7sgnay5nm5kmzu5zzgeefqc58ymfrcjw
  name: minter
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ay1C78opwpRQ7RjRbdc+8JfBX+7u9YvXh4Y5I653tiio"}'
  type: local

mnemonic

border all modify edit surface same liberty order goddess century focus move trend mountain couple once exercise adjust east cloth garment seed funny coil

Relayer

  address: stars182ntv6wdys9t5h7j0audfq7e66zdl6gzq74evx
  name: relayer
  pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AxyuajWdGbqnhckj+GrtxOorqNDbzB8zNJHWxUnPjHdN"}'
  type: local

mnemonic

winter super indoor foot come curtain remind topic kingdom frost prefer mom rifle industry circle mutual rally upon toe refuse universe sick leopard tiger

CW721 contract

Upload wasm to chain

starsd tx wasm store /home/asus/Workspace/transfer-cross-chain/cw-nfts/artifacts/cw721_base.wasm --from stars1a3766060t67u8mu740anrfqwxs7aax9srt4l4r --gas-prices 0.025ustars --gas-adjustment 1.7 --gas auto

Code id:

3430

Instantiate contract

starsd tx wasm instantiate 3430 '{"name":"Stargaze NFT collection", "symbol":"starsd-nft-01", "minter":"stars1a3766060t67u8mu740anrfqwxs7aax9srt4l4r"}' --label "ICS721" --admin stars1a3766060t67u8mu740anrfqwxs7aax9srt4l4r --from stars1a3766060t67u8mu740anrfqwxs7aax9srt4l4r --amount "100000ustars" --gas-prices 0.025ustars --gas-adjustment 1.7 --gas auto

Contract address:

stars10h3qpct2nn2ffjfphkexa5j585k9mf3cp39ajpsggamfs0d4xp9qv8c6zv

ICS721 contract

Upload wasm to chain

starsd tx wasm store /home/asus/Workspace/transfer-cross-chain/ICS721/artifacts/cw_ics721_bridge.wasm --from stars1a3766060t67u8mu740anrfqwxs7aax9srt4l4r --gas-prices 0.025ustars --gas-adjustment 1.7 --gas auto

Code id:

3431

Instantiate contract

starsd tx wasm instantiate 3431 '{"cw721_base_code_id":3430}' --label "ICS721" --admin stars1a3766060t67u8mu740anrfqwxs7aax9srt4l4r --from stars1a3766060t67u8mu740anrfqwxs7aax9srt4l4r --amount "100000ustars" --gas-prices 0.025ustars --gas-adjustment 1.7 --gas auto

Contract address:

stars1du26qvkqhhc5n6l6ue0h6uwl42a9pdrh3y630vfun2hhqykmqv6sa9zrcv

Query

starsd query wasm contract-state smart stars1du26qvkqhhc5n6l6ue0h6uwl42a9pdrh3y630vfun2hhqykmqv6sa9zrcv '{"nft_contract":{"class_id":"DUMMY"}}'
starsd query wasm contract-state smart stars10h3qpct2nn2ffjfphkexa5j585k9mf3cp39ajpsggamfs0d4xp9qv8c6zv '{"num_tokens":{}}'
starsd query wasm contract-state smart stars10h3qpct2nn2ffjfphkexa5j585k9mf3cp39ajpsggamfs0d4xp9qv8c6zv '{"all_nft_info":{"token_id": "0"}}'

Execute

Mint NFT

starsd tx wasm execute stars10h3qpct2nn2ffjfphkexa5j585k9mf3cp39ajpsggamfs0d4xp9qv8c6zv '{"mint": {"token_id":"0", "owner":"stars1a3766060t67u8mu740anrfqwxs7aax9srt4l4r"}}' --from stars1a3766060t67u8mu740anrfqwxs7aax9srt4l4r --gas-prices 0.025ustars --gas-adjustment 1.7 --gas auto

Setup Hermes

Installation Github

Create an IBC Channel (not working)

hermes --config config.toml create channel --a-chain Oraichain-testnet --b-chain elgafar-1 --a-port wasm.orai1u3hjrupq82c9kxq0y674lxxt872n78ae79xujjskukhhngl6td8qpl5tdw --b-port wasm.stars1du26qvkqhhc5n6l6ue0h6uwl42a9pdrh3y630vfun2hhqykmqv6sa9zrcv --new-client-connection --channel-version 0.0.1 --yes

{ "receiver": "orai1yzsegvns6vmvf5q29uv26p3th4fd2kzmsq3h6m", "channel_id": "SOURCE_ICS721_CHANNEL", "timeout": { "block": { "revision": 1, "height": 3999999 } } }

BASE64_ENCODED_JSON_MSG_FOR_ICS721

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published