@@ -31,7 +31,12 @@ export class MsgMigrateContract extends JSONSerializable<
3131 value : { sender, contract, code_id, msg } ,
3232 } = data
3333
34- return new MsgMigrateContract ( sender , contract , parseInt ( code_id ) , msg )
34+ return new MsgMigrateContract (
35+ sender ,
36+ contract ,
37+ parseInt ( code_id ) ,
38+ Buffer . from ( JSON . stringify ( msg ) ) . toString ( 'base64' )
39+ )
3540 }
3641
3742 public toAmino ( ) : MsgMigrateContract . Amino {
@@ -42,14 +47,20 @@ export class MsgMigrateContract extends JSONSerializable<
4247 sender,
4348 contract,
4449 code_id : code_id . toFixed ( ) ,
45- msg,
50+ msg : JSON . parse ( Buffer . from ( msg , 'base64' ) . toString ( ) ) ,
4651 } ,
4752 }
4853 }
4954
5055 public static fromData ( data : MsgMigrateContract . Data ) : MsgMigrateContract {
5156 const { sender, contract, code_id, msg } = data
52- return new MsgMigrateContract ( sender , contract , parseInt ( code_id ) , msg )
57+
58+ return new MsgMigrateContract (
59+ sender ,
60+ contract ,
61+ parseInt ( code_id ) ,
62+ Buffer . from ( JSON . stringify ( msg ) ) . toString ( 'base64' )
63+ )
5364 }
5465
5566 public toData ( ) : MsgMigrateContract . Data {
@@ -59,7 +70,7 @@ export class MsgMigrateContract extends JSONSerializable<
5970 sender,
6071 contract,
6172 code_id : code_id . toFixed ( ) ,
62- msg,
73+ msg : JSON . parse ( Buffer . from ( msg , 'base64' ) . toString ( ) ) ,
6374 }
6475 }
6576
@@ -103,7 +114,7 @@ export namespace MsgMigrateContract {
103114 sender : AccAddress
104115 contract : AccAddress
105116 code_id : string
106- msg : string
117+ msg : JSON
107118 }
108119 }
109120
@@ -112,7 +123,7 @@ export namespace MsgMigrateContract {
112123 sender : AccAddress
113124 contract : AccAddress
114125 code_id : string
115- msg : string
126+ msg : JSON
116127 }
117128
118129 export type Proto = MsgMigrateContract_pb
0 commit comments