From 7ebb8f3389ada1c3f09d7a87311f703f4a158403 Mon Sep 17 00:00:00 2001 From: abefernan <44572727+abefernan@users.noreply.github.com> Date: Mon, 10 Jul 2023 19:18:02 +0200 Subject: [PATCH] Add migrate types --- lib/txMsgHelpers.ts | 2 ++ types/txMsg.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lib/txMsgHelpers.ts b/lib/txMsgHelpers.ts index 9e2f0b9..f5cb6b8 100644 --- a/lib/txMsgHelpers.ts +++ b/lib/txMsgHelpers.ts @@ -26,6 +26,8 @@ const gasOfMsg = (msgType: MsgTypeUrl): number => { return 150_000; case MsgTypeUrls.Instantiate2: return 150_000; + case MsgTypeUrls.Migrate: + return 150_000; default: throw new Error("Unknown msg type"); } diff --git a/types/txMsg.ts b/types/txMsg.ts index 0c6db2c..6a1ccb2 100644 --- a/types/txMsg.ts +++ b/types/txMsg.ts @@ -13,6 +13,7 @@ import { MsgExecuteContract, MsgInstantiateContract, MsgInstantiateContract2, + MsgMigrateContract, } from "cosmjs-types/cosmwasm/wasm/v1/tx"; import { MsgTransfer } from "cosmjs-types/ibc/applications/transfer/v1/tx"; @@ -28,6 +29,7 @@ export const MsgTypeUrls = { Execute: "/cosmwasm.wasm.v1.MsgExecuteContract", Instantiate: "/cosmwasm.wasm.v1.MsgInstantiateContract", Instantiate2: "/cosmwasm.wasm.v1.MsgInstantiateContract2", + Migrate: "/cosmwasm.wasm.v1.MsgMigrateContract", } as const; export type MsgTypeUrl = (typeof MsgTypeUrls)[keyof typeof MsgTypeUrls]; @@ -44,4 +46,5 @@ export const MsgCodecs = { [MsgTypeUrls.Execute]: MsgExecuteContract, [MsgTypeUrls.Instantiate]: MsgInstantiateContract, [MsgTypeUrls.Instantiate2]: MsgInstantiateContract2, + [MsgTypeUrls.Migrate]: MsgMigrateContract, };