@agoric/vats 0.15.2-dev-90906b1.0 → 0.15.2-dev-4202f3e.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/vats",
3
- "version": "0.15.2-dev-90906b1.0+90906b1",
3
+ "version": "0.15.2-dev-4202f3e.0+4202f3e",
4
4
  "description": "Agoric's Vat library",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -22,20 +22,20 @@
22
22
  "author": "Agoric",
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@agoric/assert": "0.6.1-dev-90906b1.0+90906b1",
26
- "@agoric/cosmic-proto": "0.4.1-dev-90906b1.0+90906b1",
27
- "@agoric/ertp": "0.16.3-dev-90906b1.0+90906b1",
28
- "@agoric/governance": "0.10.4-dev-90906b1.0+90906b1",
29
- "@agoric/internal": "0.3.3-dev-90906b1.0+90906b1",
30
- "@agoric/network": "0.1.1-dev-90906b1.0+90906b1",
31
- "@agoric/notifier": "0.6.3-dev-90906b1.0+90906b1",
32
- "@agoric/store": "0.9.3-dev-90906b1.0+90906b1",
33
- "@agoric/swingset-vat": "0.32.3-dev-90906b1.0+90906b1",
34
- "@agoric/time": "0.3.3-dev-90906b1.0+90906b1",
35
- "@agoric/vat-data": "0.5.3-dev-90906b1.0+90906b1",
36
- "@agoric/vow": "0.1.1-dev-90906b1.0+90906b1",
37
- "@agoric/zoe": "0.26.3-dev-90906b1.0+90906b1",
38
- "@agoric/zone": "0.2.3-dev-90906b1.0+90906b1",
25
+ "@agoric/assert": "0.6.1-dev-4202f3e.0+4202f3e",
26
+ "@agoric/cosmic-proto": "0.4.1-dev-4202f3e.0+4202f3e",
27
+ "@agoric/ertp": "0.16.3-dev-4202f3e.0+4202f3e",
28
+ "@agoric/governance": "0.10.4-dev-4202f3e.0+4202f3e",
29
+ "@agoric/internal": "0.3.3-dev-4202f3e.0+4202f3e",
30
+ "@agoric/network": "0.1.1-dev-4202f3e.0+4202f3e",
31
+ "@agoric/notifier": "0.6.3-dev-4202f3e.0+4202f3e",
32
+ "@agoric/store": "0.9.3-dev-4202f3e.0+4202f3e",
33
+ "@agoric/swingset-vat": "0.32.3-dev-4202f3e.0+4202f3e",
34
+ "@agoric/time": "0.3.3-dev-4202f3e.0+4202f3e",
35
+ "@agoric/vat-data": "0.5.3-dev-4202f3e.0+4202f3e",
36
+ "@agoric/vow": "0.1.1-dev-4202f3e.0+4202f3e",
37
+ "@agoric/zoe": "0.26.3-dev-4202f3e.0+4202f3e",
38
+ "@agoric/zone": "0.2.3-dev-4202f3e.0+4202f3e",
39
39
  "@endo/base64": "^1.0.5",
40
40
  "@endo/far": "^1.1.2",
41
41
  "@endo/import-bundle": "^1.1.2",
@@ -47,7 +47,7 @@
47
47
  "jessie.js": "^0.3.4"
48
48
  },
49
49
  "devDependencies": {
50
- "@agoric/swingset-liveslots": "0.10.3-dev-90906b1.0+90906b1",
50
+ "@agoric/swingset-liveslots": "0.10.3-dev-4202f3e.0+4202f3e",
51
51
  "@endo/bundle-source": "^3.2.3",
52
52
  "@endo/init": "^1.1.2",
53
53
  "ava": "^5.3.0",
@@ -80,5 +80,5 @@
80
80
  "typeCoverage": {
81
81
  "atLeast": 91.27
82
82
  },
83
- "gitHead": "90906b18157a86d7f5ce5aea4eaa1508360ade1a"
83
+ "gitHead": "4202f3e330bdc7b185643d0b74939dd0392af390"
84
84
  }
@@ -1 +1 @@
1
- {"version":3,"file":"fake-bridge.d.ts","sourceRoot":"","sources":["fake-bridge.js"],"names":[],"mappings":"AAWO,wCALI,OAAO,cAAc,EAAE,IAAI,cAC3B,CAAC,GAAG,KAAA,KAAK,IAAI,gBACb,CAAC,OAAO,KAAA,EAAE,GAAG,KAAA,KAAK,OAAO,CAAC,IAAI,CAAC,+BA8BzC;AAQM,+CALI,OAAO,cAAc,EAAE,IAAI,8BAClB,IAAI,2DACK,IAAI,CAAC,IAAI,CAAC,mDAoCtC;yCA5EsC,iBAAiB"}
1
+ {"version":3,"file":"fake-bridge.d.ts","sourceRoot":"","sources":["fake-bridge.js"],"names":[],"mappings":"AAcO,wCALI,OAAO,cAAc,EAAE,IAAI,cAC3B,CAAC,GAAG,KAAA,KAAK,IAAI,gBACb,CAAC,OAAO,KAAA,EAAE,GAAG,KAAA,KAAK,OAAO,CAAC,IAAI,CAAC,+BA8BzC;AAQM,+CALI,OAAO,cAAc,EAAE,IAAI,8BAClB,IAAI,2DACK,IAAI,CAAC,IAAI,CAAC,mDA+DtC;yCAxGqC,iBAAiB"}
@@ -1,7 +1,10 @@
1
1
  import { Fail } from '@agoric/assert';
2
2
  import assert from 'node:assert/strict';
3
3
 
4
- /** @import {ScopedBridgeManager} from '../src/types.js'; */
4
+ /**
5
+ * @import {MsgDelegateResponse} from '@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js';
6
+ * @import {ScopedBridgeManager} from '../src/types.js';
7
+ */
5
8
 
6
9
  /**
7
10
  * @param {import('@agoric/zone').Zone} zone
@@ -50,6 +53,7 @@ export const makeFakeLocalchainBridge = (
50
53
  onFromBridge = () => {},
51
54
  ) => {
52
55
  let hndlr;
56
+ let lcaExecuteTxSequence = 0;
53
57
  return zone.exo('Fake Localchain Bridge Manager', undefined, {
54
58
  getBridgeId: () => 'vlocalchain',
55
59
  toBridge: async obj => {
@@ -58,7 +62,33 @@ export const makeFakeLocalchainBridge = (
58
62
  console.info('toBridge', type, method, params);
59
63
  switch (type) {
60
64
  case 'VLOCALCHAIN_ALLOCATE_ADDRESS':
61
- return 'agoric1fakeBridgeAddress';
65
+ return 'agoric1fakeLCAAddress';
66
+ case 'VLOCALCHAIN_EXECUTE_TX': {
67
+ lcaExecuteTxSequence += 1;
68
+ return obj.messages.map(message => {
69
+ switch (message['@type']) {
70
+ // TODO #9402 reference bank to ensure caller has tokens they are transferring
71
+ case '/ibc.applications.transfer.v1.MsgTransfer': {
72
+ if (message.token.amount === '504') {
73
+ throw Error(
74
+ 'simulated unexpected MsgTransfer packet timeout',
75
+ );
76
+ }
77
+ // like `JsonSafe<MsgTransferResponse>`, but bigints are converted to numbers
78
+ // XXX should vlocalchain return a string instead of number for bigint?
79
+ return {
80
+ sequence: lcaExecuteTxSequence,
81
+ };
82
+ }
83
+ case '/cosmos.staking.v1beta1.MsgDelegate': {
84
+ return /** @type {MsgDelegateResponse} */ {};
85
+ }
86
+ // returns one empty object per message unless specified
87
+ default:
88
+ return {};
89
+ }
90
+ });
91
+ }
62
92
  default:
63
93
  Fail`unknown type ${type}`;
64
94
  }