Examples
Usage examples of the Nomos SDK
Sending funds
For this proposal to work, the multisig must have a balance x >= amount sent.
const {transactionHash, proposal} = await multisig.createProposal({
from: "<sender address>",
description: "<proposal description<",
messages: [
{
bank: {
send: {
amount: [
{
denom: "<network denom>", //"aarch" in archway mainnet
amount: "<amount to send",
},
],
to_address: receiverAddr,
},
},
},
],
});Instantiate any contract
To instantiate any contract you must pass the correct instantiateMessage that creates the contract. Then encode it base64 and create a wasm.instantiate message.
Transfer CW20 tokens
Any contract related transaction should have the message to send wrapped inside a wasm.execute. On this example we create a message to transfer 1 CW20 token with 18 decimal places.
Stake native tokens
A staking message is a special type of message that isnt wrapped in the commin wasm.execute. It can have different types, here we expose as example the delegate staking.
Astrovault deposit
An example of contract interaction is the astrovault deposit, astrovault is an Automated Market Maker living on the archway blockchain.
Astrovault Withdraw
Last updated