stargate: Add distribution msgs to default type registry

This commit is contained in:
willclarktech 2021-01-26 10:41:35 +00:00
parent 7ed5074f12
commit 4e85ac482e
No known key found for this signature in database
GPG Key ID: 551A86E2E398ADF7

View File

@ -28,6 +28,12 @@ import { cosmos } from "./codec";
import { BroadcastTxResponse, StargateClient } from "./stargateclient";
const { MsgMultiSend } = cosmos.bank.v1beta1;
const {
MsgFundCommunityPool,
MsgSetWithdrawAddress,
MsgWithdrawDelegatorReward,
MsgWithdrawValidatorCommission,
} = cosmos.distribution.v1beta1;
const {
MsgBeginRedelegate,
MsgCreateValidator,
@ -48,6 +54,10 @@ function createDefaultRegistry(): Registry {
["/cosmos.staking.v1beta1.MsgDelegate", MsgDelegate],
["/cosmos.staking.v1beta1.MsgEditValidator", MsgEditValidator],
["/cosmos.staking.v1beta1.MsgUndelegate", MsgUndelegate],
["/cosmos.distribution.v1beta1.MsgFundCommunityPool", MsgFundCommunityPool],
["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", MsgSetWithdrawAddress],
["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", MsgWithdrawDelegatorReward],
["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", MsgWithdrawValidatorCommission],
]);
}