You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
mnuestc
changed the title
how to withdraw ustc from anchor protocol, through '@terra-money/terra.js'
how to withdraw ustc from anchor protocol, through '@terra-money/terra.js'. 🙏🙏🙏
Dec 9, 2023
this is my whole code:
but it always failed with "message: "failed to execute message; message index: 0: unrecognized wasm message type: *legacy.MsgExecuteContract: unknown request [CosmWasm/[email protected]/x/wasm/handler.go:44]","
is classc url lcd connected problm?
`import { LCDClient, MnemonicKey, MsgExecuteContract } from '@terra-money/terra.js';
const mk = new MnemonicKey({
mnemonic: '****'
})
// connect to localterra
const terra = new LCDClient({
URL: 'https://lcd.terra.dev',
chainID: 'columbus-5',
isClassic: true
});
const wallet = terra.wallet(mk);
console.log(wallet.key.accAddress);
const execute = new MsgExecuteContract(
wallet.key.accAddress, // sender
"terra1hzh9vpxhsk8253se0vv5jj6etdvxu3nv8z07zu", // aUst contract
{
"send": {
"msg": "eyJyZWRlZW1fc3RhYmxlIjp7fX0=",
"amount": "18995960848",
"contract": "terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s"
}
},
{ uluna: 509008 } // coins
);
const executeTx = await wallet.createAndSignTx({
msgs: [execute]
});
const executeTxResult = await terra.tx.broadcast(executeTx);`
The text was updated successfully, but these errors were encountered: