Cosmos SDK - Nibiru
Publish on chain using CosmWasm
Pre-requisite
At this stage, we assume that you are familiar with the steps at ReactJs.
We will be using Keplr as a wallet to interact with the frontend interface. Make sure that you have it installed and funded with testnet Nibi.
You can access the code of this walkthrough on Gitlab:
Contract deployment
Clone the client contract repo.
This Nibiru contract serves as a client to our Reclaim contract. It instantiates Reclaim's contract, handles proofs, and verifies them.
Add your wallet information.
As stated in the README, add your wallet credentials to your node/.env
.
Deploy and verify a proof.
In the node
directory, run npm run start
, you can upload the contract, instantiate it, and verify a Reclaim proof on it.
Run the script and take a note of your contract address, we will be using it later.
React client development
Cloning the frontend repo.
Code discovery (App.js).
We will submit the proof on chain once we get the onSuccessCallback
. Fill in your Reclaim credentials marked with //TODO
s.
Code discovery (src/nibiJs/nibijsFunctions.js).
Replace with your own Reclaim client contract's address.
Submitting the proof.
After requesting a proof from Reclaim and performing the verification on your end, a verify proof button will appear on the screen. Make sure your Keplr is connected, click the button, a wallet pop-up will show prompting you to submit.
Now your proof will get approved on-chain, here is the sample transaction from the screenshot above.