Add new types
This commit is contained in:
@@ -20,6 +20,12 @@ const gasOfMsg = (msgType: MsgTypeUrl): number => {
|
||||
return 100_000;
|
||||
case MsgTypeUrls.Transfer:
|
||||
return 180_000;
|
||||
case MsgTypeUrls.Execute:
|
||||
return 150_000;
|
||||
case MsgTypeUrls.Instantiate:
|
||||
return 150_000;
|
||||
case MsgTypeUrls.Instantiate2:
|
||||
return 150_000;
|
||||
default:
|
||||
throw new Error("Unknown msg type");
|
||||
}
|
||||
|
||||
@@ -9,6 +9,11 @@ import {
|
||||
MsgUndelegate,
|
||||
} from "cosmjs-types/cosmos/staking/v1beta1/tx";
|
||||
import { MsgCreateVestingAccount } from "cosmjs-types/cosmos/vesting/v1beta1/tx";
|
||||
import {
|
||||
MsgExecuteContract,
|
||||
MsgInstantiateContract,
|
||||
MsgInstantiateContract2,
|
||||
} from "cosmjs-types/cosmwasm/wasm/v1/tx";
|
||||
import { MsgTransfer } from "cosmjs-types/ibc/applications/transfer/v1/tx";
|
||||
|
||||
export const MsgTypeUrls = {
|
||||
@@ -20,6 +25,9 @@ export const MsgTypeUrls = {
|
||||
Undelegate: "/cosmos.staking.v1beta1.MsgUndelegate",
|
||||
CreateVestingAccount: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount",
|
||||
Transfer: "/ibc.applications.transfer.v1.MsgTransfer",
|
||||
Execute: "/cosmwasm.wasm.v1.MsgExecuteContract",
|
||||
Instantiate: "/cosmwasm.wasm.v1.MsgInstantiateContract",
|
||||
Instantiate2: "/cosmwasm.wasm.v1.MsgInstantiateContract2",
|
||||
} as const;
|
||||
|
||||
export type MsgTypeUrl = (typeof MsgTypeUrls)[keyof typeof MsgTypeUrls];
|
||||
@@ -33,4 +41,7 @@ export const MsgCodecs = {
|
||||
[MsgTypeUrls.Undelegate]: MsgUndelegate,
|
||||
[MsgTypeUrls.CreateVestingAccount]: MsgCreateVestingAccount,
|
||||
[MsgTypeUrls.Transfer]: MsgTransfer,
|
||||
[MsgTypeUrls.Execute]: MsgExecuteContract,
|
||||
[MsgTypeUrls.Instantiate]: MsgInstantiateContract,
|
||||
[MsgTypeUrls.Instantiate2]: MsgInstantiateContract2,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user