Running through the new mask demo, I use an opaque message to trigger a staking action from the mask contract. In the end, cosmwasm-js throws an error parsing the logs. We should be less strict, either support more, silently ignore them, or just parse them without care for the type. In any case this should not be an error
>> .editor
// Entering editor mode (^D to finish, ^C to cancel)
const staking2 = {
type: "cosmos-sdk/MsgDelegate",
value: {
delegator_address: mask,
validator_address: "cosmosvaloper1e8gslcu2u2p5zp9rgj8alz4q3lt6hvywqppf23",
amount: {
denom: "ustake",
amount: "300000"
}
}
};
undefined
>> const callOpaque2: HandleMsg = { reflectmsg: { msgs: [opaqueMsg(staking2)]}};
undefined
>> client.execute(mask, callOpaque2)
Thrown:
Error: Event type must be one of message, transfer, wasm; got delegate
at process._tickCallback (internal/process/next_tick.js:68:7)
at SigningCosmWasmClient.postTx (/home/ethan/js/cosmwasm-js/packages/sdk/src/cosmwasmclient.ts:312:27)
at Object.parseLogs (/home/ethan/js/cosmwasm-js/packages/sdk/src/logs.ts:71:16)
at Array.map (<anonymous>)
at parseLog (/home/ethan/js/cosmwasm-js/packages/sdk/src/logs.ts:65:20)
at Array.map (<anonymous>)
at parseEvent (/home/ethan/js/cosmwasm-js/packages/sdk/src/logs.ts:47:11)