Cosmos - XION
Publish on chain using XION and CosmWasm Stargate
Pre-requisite
Before trying the steps below, make sure you have XION Daemon and Docker installed.
You can access the code of this walkthrough on Github:
Contract deployment
Step 1: Clone the Repository
Step 2: Compile and Optimize the Wasm Bytecode
Step 3: Upload the Bytecode to the Blockchain
Set your signing key name:
Run the upload command:
Extract the transaction hash by running:
And set the value:
Step 4: Retrieve the Code ID
Then, retrieve the code id:
And view it:
Step 5: Instantiate the Contract
Set the contract's initialization message (replace with your own):
Instantiate the contract with the Code ID from the previous step:
Example output:
Copy the new transaction hash for the next step.
Step 6: Retrieve the Contract Address
Set the new transaction hash:
Query the blockchain to get the contract address:
Display the contract address:
Example output:
Interact with the Contract
Step 1: Setup
Change directory to the /node
directory and install packages:
Then add your credentials to your .env
:
Step 2: Add an Epoch
While in /node
, run the command:
This will add an Epoch, here is an example tx.
You can fetch an added Epoch with:
Step 3: Verify a Proof
While in the same directory, run the command:
This will add an Epoch, here is an example tx.