@@ -31,7 +31,12 @@ export class MsgMigrateContract extends JSONSerializable<
31
31
value : { sender, contract, code_id, msg } ,
32
32
} = data
33
33
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
+ )
35
40
}
36
41
37
42
public toAmino ( ) : MsgMigrateContract . Amino {
@@ -42,14 +47,20 @@ export class MsgMigrateContract extends JSONSerializable<
42
47
sender,
43
48
contract,
44
49
code_id : code_id . toFixed ( ) ,
45
- msg,
50
+ msg : JSON . parse ( Buffer . from ( msg , 'base64' ) . toString ( ) ) ,
46
51
} ,
47
52
}
48
53
}
49
54
50
55
public static fromData ( data : MsgMigrateContract . Data ) : MsgMigrateContract {
51
56
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
+ )
53
64
}
54
65
55
66
public toData ( ) : MsgMigrateContract . Data {
@@ -59,7 +70,7 @@ export class MsgMigrateContract extends JSONSerializable<
59
70
sender,
60
71
contract,
61
72
code_id : code_id . toFixed ( ) ,
62
- msg,
73
+ msg : JSON . parse ( Buffer . from ( msg , 'base64' ) . toString ( ) ) ,
63
74
}
64
75
}
65
76
@@ -103,7 +114,7 @@ export namespace MsgMigrateContract {
103
114
sender : AccAddress
104
115
contract : AccAddress
105
116
code_id : string
106
- msg : string
117
+ msg : JSON
107
118
}
108
119
}
109
120
@@ -112,7 +123,7 @@ export namespace MsgMigrateContract {
112
123
sender : AccAddress
113
124
contract : AccAddress
114
125
code_id : string
115
- msg : string
126
+ msg : JSON
116
127
}
117
128
118
129
export type Proto = MsgMigrateContract_pb
0 commit comments