@agoric/cosmos 0.32.3-dev-f941b26.0 → 0.32.3-dev-49b65e6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/x/swingset/types/msgs.go +32 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/cosmos",
|
|
3
|
-
"version": "0.32.3-dev-
|
|
3
|
+
"version": "0.32.3-dev-49b65e6.0+49b65e6",
|
|
4
4
|
"description": "Connect JS to the Cosmos blockchain SDK",
|
|
5
5
|
"parsers": {
|
|
6
6
|
"js": "mjs"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "49b65e639d5ac35ddb983e03149a001ab73b2290"
|
|
51
51
|
}
|
package/x/swingset/types/msgs.go
CHANGED
|
@@ -20,9 +20,9 @@ var (
|
|
|
20
20
|
|
|
21
21
|
_ vm.ControllerAdmissionMsg = &MsgDeliverInbound{}
|
|
22
22
|
_ vm.ControllerAdmissionMsg = &MsgInstallBundle{}
|
|
23
|
+
_ vm.ControllerAdmissionMsg = &MsgProvision{}
|
|
23
24
|
_ vm.ControllerAdmissionMsg = &MsgWalletAction{}
|
|
24
25
|
_ vm.ControllerAdmissionMsg = &MsgWalletSpendAction{}
|
|
25
|
-
// MsgProvision has its own fee mechanism and is intentionally omitted.
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
// Charge an account address for the beans associated with given messages.
|
|
@@ -63,6 +63,11 @@ func (msg MsgDeliverInbound) CheckAdmissibility(ctx sdk.Context, data interface{
|
|
|
63
63
|
return chargeAdmission(ctx, keeper, msg.Submitter, msg.Messages)
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
// GetInboundMsgCount implements InboundMsgCarrier.
|
|
67
|
+
func (msg MsgDeliverInbound) GetInboundMsgCount() int32 {
|
|
68
|
+
return 1
|
|
69
|
+
}
|
|
70
|
+
|
|
66
71
|
// Route should return the name of the module
|
|
67
72
|
func (msg MsgDeliverInbound) Route() string { return RouterKey }
|
|
68
73
|
|
|
@@ -119,6 +124,11 @@ func (msg MsgWalletAction) CheckAdmissibility(ctx sdk.Context, data interface{})
|
|
|
119
124
|
return chargeAdmission(ctx, keeper, msg.Owner, []string{msg.Action})
|
|
120
125
|
}
|
|
121
126
|
|
|
127
|
+
// GetInboundMsgCount implements InboundMsgCarrier.
|
|
128
|
+
func (msg MsgWalletAction) GetInboundMsgCount() int32 {
|
|
129
|
+
return 1
|
|
130
|
+
}
|
|
131
|
+
|
|
122
132
|
func (msg MsgWalletAction) GetSigners() []sdk.AccAddress {
|
|
123
133
|
return []sdk.AccAddress{msg.Owner}
|
|
124
134
|
}
|
|
@@ -176,6 +186,10 @@ func (msg MsgWalletSpendAction) CheckAdmissibility(ctx sdk.Context, data interfa
|
|
|
176
186
|
return chargeAdmission(ctx, keeper, msg.Owner, []string{msg.SpendAction})
|
|
177
187
|
}
|
|
178
188
|
|
|
189
|
+
// GetInboundMsgCount implements InboundMsgCarrier.
|
|
190
|
+
func (msg MsgWalletSpendAction) GetInboundMsgCount() int32 {
|
|
191
|
+
return 1
|
|
192
|
+
}
|
|
179
193
|
func (msg MsgWalletSpendAction) GetSigners() []sdk.AccAddress {
|
|
180
194
|
return []sdk.AccAddress{msg.Owner}
|
|
181
195
|
}
|
|
@@ -223,6 +237,18 @@ func (msg MsgProvision) ValidateBasic() error {
|
|
|
223
237
|
return nil
|
|
224
238
|
}
|
|
225
239
|
|
|
240
|
+
// CheckAdmissibility implements the vm.ControllerAdmissionMsg interface.
|
|
241
|
+
func (msg MsgProvision) CheckAdmissibility(ctx sdk.Context, data interface{}) error {
|
|
242
|
+
// We have our own fee charging mechanism within Swingset itself,
|
|
243
|
+
// so there are no admission restriction here.
|
|
244
|
+
return nil
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// GetInboundMsgCount implements InboundMsgCarrier.
|
|
248
|
+
func (msg MsgProvision) GetInboundMsgCount() int32 {
|
|
249
|
+
return 1
|
|
250
|
+
}
|
|
251
|
+
|
|
226
252
|
// GetSignBytes encodes the message for signing
|
|
227
253
|
func (msg MsgProvision) GetSignBytes() []byte {
|
|
228
254
|
if msg.PowerFlags == nil {
|
|
@@ -253,6 +279,11 @@ func (msg MsgInstallBundle) CheckAdmissibility(ctx sdk.Context, data interface{}
|
|
|
253
279
|
return chargeAdmission(ctx, keeper, msg.Submitter, []string{msg.Bundle})
|
|
254
280
|
}
|
|
255
281
|
|
|
282
|
+
// GetInboundMsgCount implements InboundMsgCarrier.
|
|
283
|
+
func (msg MsgInstallBundle) GetInboundMsgCount() int32 {
|
|
284
|
+
return 1
|
|
285
|
+
}
|
|
286
|
+
|
|
256
287
|
// Route should return the name of the module
|
|
257
288
|
func (msg MsgInstallBundle) Route() string { return RouterKey }
|
|
258
289
|
|