cosmwasm-stargate: Add distribution msgs to default type registry

This commit is contained in:
willclarktech 2021-01-27 17:37:03 +00:00
parent 2a1df79713
commit a517b68fd2
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7

View File

@ -53,6 +53,12 @@ import { CosmWasmClient } from "./cosmwasmclient";
const { SignMode } = codec.cosmos.tx.signing.v1beta1;
const { TxRaw } = codec.cosmos.tx.v1beta1;
const { MsgMultiSend } = codec.cosmos.bank.v1beta1;
const {
MsgFundCommunityPool,
MsgSetWithdrawAddress,
MsgWithdrawDelegatorReward,
MsgWithdrawValidatorCommission,
} = codec.cosmos.distribution.v1beta1;
const {
MsgBeginRedelegate,
MsgCreateValidator,
@ -95,6 +101,10 @@ function createBroadcastTxErrorMessage(result: BroadcastTxFailure): string {
function createDefaultRegistry(): Registry {
return new Registry([
["/cosmos.bank.v1beta1.MsgMultiSend", MsgMultiSend],
["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool],
["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress],
["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward],
["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission],
["/cosmos.staking.v1beta1.MsgBeginRedelegate", MsgBeginRedelegate],
["/cosmos.staking.v1beta1.MsgCreateValidator", MsgCreateValidator],
["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate],