Wasm
Messages
MsgExecuteContract (Transfer)
import { Network } from '@injectivelabs/networks'
import { MsgExecuteContract, MsgBroadcasterWithPk } from '@injectivelabs/sdk-ts'
const injectiveAddress = 'inj1...'
const recipientAddress = 'inj2...'
const contractAddress = 'cw...'
const msg = MsgExecuteContract.fromJSON({
contractAddress,
sender: injectiveAddress,
exec: {
action: 'transfer',
msg: {
recipient: recipientAddress,
amount: 100000,
},
},
})
const txHash = await new MsgBroadcasterWithPk({
privateKey,
network: Network.Mainnet,
}).broadcast({
msgs: msg,
})
console.log(txHash)MsgExecuteContract (funds example)
MsgExecuteContractCompat
Last updated
