Skip to content

Commit

Permalink
make ica host allow msg types const
Browse files Browse the repository at this point in the history
  • Loading branch information
Yaru Wang committed Mar 23, 2022
1 parent 675f04d commit b8cbf6a
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 29 deletions.
55 changes: 26 additions & 29 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ import (
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
)

const appName = "GaiaApp"
const upgradeName = "v7-Theta"

var (
// DefaultNodeHome default home directories for the application daemon
DefaultNodeHome string
Expand Down Expand Up @@ -637,32 +634,32 @@ func NewGaiaApp(
hostParams := icahosttypes.Params{
HostEnabled: true,
AllowMessages: []string{
"/cosmos.authz.v1beta1.MsgExec",
"/cosmos.authz.v1beta1.MsgGrant",
"/cosmos.authz.v1beta1.MsgRevoke",
"/cosmos.bank.v1beta1.MsgSend",
"/cosmos.bank.v1beta1.MsgMultiSend",
"/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
"/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",
"/cosmos.distribution.v1beta1.MsgFundCommunityPool",
"/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
"/cosmos.feegrant.v1beta1.MsgGrantAllowance",
"/cosmos.feegrant.v1beta1.MsgRevokeAllowance",
"/cosmos.gov.v1beta1.MsgVoteWeighted",
"/cosmos.gov.v1beta1.MsgSubmitProposal",
"/cosmos.gov.v1beta1.MsgDeposit",
"/cosmos.gov.v1beta1.MsgVote",
"/cosmos.staking.v1beta1.MsgEditValidator",
"/cosmos.staking.v1beta1.MsgDelegate",
"/cosmos.staking.v1beta1.MsgUndelegate",
"/cosmos.staking.v1beta1.MsgBeginRedelegate",
"/cosmos.staking.v1beta1.MsgCreateValidator",
"/cosmos.vesting.v1beta1.MsgCreateVestingAccount",
"/ibc.applications.transfer.v1.MsgTransfer",
"/tendermint.liquidity.v1beta1.MsgCreatePool",
"/tendermint.liquidity.v1beta1.MsgSwapWithinBatch",
"/tendermint.liquidity.v1beta1.MsgDepositWithinBatch",
"/tendermint.liquidity.v1beta1.MsgWithdrawWithinBatch",
authzMsgExec,
authzMsgGrant,
authzMsgRevoke,
bankMsgSend,
bankMsgMultiSend,
distrMsgSetWithdrawAddr,
distrMsgWithdrawValidatorCommission,
distrMsgFundCommunityPool,
distrMsgWithdrawDelegatorReward,
feegrantMsgGrantAllowance,
feegrantMsgRevokeAllowance,
govMsgVoteWeighted,
govMsgSubmitProposal,
govMsgDeposit,
govMsgVote,
stakingMsgEditValidator,
stakingMsgDelegate,
stakingMsgUndelegate,
stakingMsgBeginRedelegate,
stakingMsgCreateValidator,
vestingMsgCreateVestingAccount,
transferMsgTransfer,
liquidityMsgCreatePool,
liquidityMsgSwapWithinBatch,
liquidityMsgDepositWithinBatch,
liquidityMsgWithdrawWithinBatch,
},
}

Expand Down
33 changes: 33 additions & 0 deletions app/const.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package gaia

const (
appName = "GaiaApp"
upgradeName = "v7-Theta"

authzMsgExec = "/cosmos.authz.v1beta1.MsgExec"
authzMsgGrant = "/cosmos.authz.v1beta1.MsgGrant"
authzMsgRevoke = "/cosmos.authz.v1beta1.MsgRevoke"
bankMsgSend = "/cosmos.bank.v1beta1.MsgSend"
bankMsgMultiSend = "/cosmos.bank.v1beta1.MsgMultiSend"
distrMsgSetWithdrawAddr = "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress"
distrMsgWithdrawValidatorCommission = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission"
distrMsgFundCommunityPool = "/cosmos.distribution.v1beta1.MsgFundCommunityPool"
distrMsgWithdrawDelegatorReward = "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward"
feegrantMsgGrantAllowance = "/cosmos.feegrant.v1beta1.MsgGrantAllowance"
feegrantMsgRevokeAllowance = "/cosmos.feegrant.v1beta1.MsgRevokeAllowance"
govMsgVoteWeighted = "/cosmos.gov.v1beta1.MsgVoteWeighted"
govMsgSubmitProposal = "/cosmos.gov.v1beta1.MsgSubmitProposal"
govMsgDeposit = "/cosmos.gov.v1beta1.MsgDeposit"
govMsgVote = "/cosmos.gov.v1beta1.MsgVote"
stakingMsgEditValidator = "/cosmos.staking.v1beta1.MsgEditValidator"
stakingMsgDelegate = "/cosmos.staking.v1beta1.MsgDelegate"
stakingMsgUndelegate = "/cosmos.staking.v1beta1.MsgUndelegate"
stakingMsgBeginRedelegate = "/cosmos.staking.v1beta1.MsgBeginRedelegate"
stakingMsgCreateValidator = "/cosmos.staking.v1beta1.MsgCreateValidator"
vestingMsgCreateVestingAccount = "/cosmos.vesting.v1beta1.MsgCreateVestingAccount"
transferMsgTransfer = "/ibc.applications.transfer.v1.MsgTransfer"
liquidityMsgCreatePool = "/tendermint.liquidity.v1beta1.MsgCreatePool"
liquidityMsgSwapWithinBatch = "/tendermint.liquidity.v1beta1.MsgSwapWithinBatch"
liquidityMsgDepositWithinBatch = "/tendermint.liquidity.v1beta1.MsgDepositWithinBatch"
liquidityMsgWithdrawWithinBatch = "/tendermint.liquidity.v1beta1.MsgWithdrawWithinBatch"
)

0 comments on commit b8cbf6a

Please sign in to comment.