@agoric/orchestration 0.1.1-dev-3c8aafe.0 → 0.1.1-dev-b2b928a.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/orchestration",
3
- "version": "0.1.1-dev-3c8aafe.0+3c8aafe",
3
+ "version": "0.1.1-dev-b2b928a.0+b2b928a",
4
4
  "description": "Chain abstraction for Agoric's orchestration clients",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -35,19 +35,19 @@
35
35
  },
36
36
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
37
37
  "dependencies": {
38
- "@agoric/async-flow": "0.1.1-dev-3c8aafe.0+3c8aafe",
39
- "@agoric/cosmic-proto": "0.4.1-dev-3c8aafe.0+3c8aafe",
40
- "@agoric/ertp": "0.16.3-dev-3c8aafe.0+3c8aafe",
41
- "@agoric/internal": "0.3.3-dev-3c8aafe.0+3c8aafe",
42
- "@agoric/network": "0.1.1-dev-3c8aafe.0+3c8aafe",
43
- "@agoric/notifier": "0.6.3-dev-3c8aafe.0+3c8aafe",
44
- "@agoric/store": "0.9.3-dev-3c8aafe.0+3c8aafe",
45
- "@agoric/time": "0.3.3-dev-3c8aafe.0+3c8aafe",
46
- "@agoric/vat-data": "0.5.3-dev-3c8aafe.0+3c8aafe",
47
- "@agoric/vats": "0.15.2-dev-3c8aafe.0+3c8aafe",
48
- "@agoric/vow": "0.1.1-dev-3c8aafe.0+3c8aafe",
49
- "@agoric/zoe": "0.26.3-dev-3c8aafe.0+3c8aafe",
50
- "@agoric/zone": "0.2.3-dev-3c8aafe.0+3c8aafe",
38
+ "@agoric/async-flow": "0.1.1-dev-b2b928a.0+b2b928a",
39
+ "@agoric/cosmic-proto": "0.4.1-dev-b2b928a.0+b2b928a",
40
+ "@agoric/ertp": "0.16.3-dev-b2b928a.0+b2b928a",
41
+ "@agoric/internal": "0.3.3-dev-b2b928a.0+b2b928a",
42
+ "@agoric/network": "0.1.1-dev-b2b928a.0+b2b928a",
43
+ "@agoric/notifier": "0.6.3-dev-b2b928a.0+b2b928a",
44
+ "@agoric/store": "0.9.3-dev-b2b928a.0+b2b928a",
45
+ "@agoric/time": "0.3.3-dev-b2b928a.0+b2b928a",
46
+ "@agoric/vat-data": "0.5.3-dev-b2b928a.0+b2b928a",
47
+ "@agoric/vats": "0.15.2-dev-b2b928a.0+b2b928a",
48
+ "@agoric/vow": "0.1.1-dev-b2b928a.0+b2b928a",
49
+ "@agoric/zoe": "0.26.3-dev-b2b928a.0+b2b928a",
50
+ "@agoric/zone": "0.2.3-dev-b2b928a.0+b2b928a",
51
51
  "@cosmjs/encoding": "^0.34.0",
52
52
  "@endo/base64": "^1.0.12",
53
53
  "@endo/errors": "^1.2.13",
@@ -60,7 +60,7 @@
60
60
  "esbuild": "^0.25.2"
61
61
  },
62
62
  "devDependencies": {
63
- "@agoric/swingset-liveslots": "0.10.3-dev-3c8aafe.0+3c8aafe",
63
+ "@agoric/swingset-liveslots": "0.10.3-dev-b2b928a.0+b2b928a",
64
64
  "@chain-registry/client": "^1.47.4",
65
65
  "@cosmjs/amino": "^0.34.0",
66
66
  "@cosmjs/proto-signing": "^0.34.0",
@@ -105,5 +105,5 @@
105
105
  "typeCoverage": {
106
106
  "atLeast": 97.46
107
107
  },
108
- "gitHead": "3c8aafe025c1edfbec581958dd7111d71eb46a41"
108
+ "gitHead": "b2b928a9d8f18400bb67d23787b169bb184217cd"
109
109
  }
@@ -30,6 +30,7 @@ export type EvmTapState = {
30
30
  localDenom: Denom;
31
31
  assets: any;
32
32
  remoteChainInfo: any;
33
+ nonce: bigint;
33
34
  };
34
35
  export type ContractCall = {
35
36
  target: `0x${string}`;
@@ -1 +1 @@
1
- {"version":3,"file":"axelar-types.d.ts","sourceRoot":"","sources":["axelar-types.js"],"names":[],"mappings":";;;;;6BAwBa,CAAC,OAAO,oBAAoB,EAAE,MAAM,OAAO,oBAAoB,CAAC;;kBAK/D,MAAM;oBACN,MAAM;aACN,MAAM;UACN,cAAc;;;YAKd,MAAM;eACN,aAAa;;;uBAKb,MAAM;yBACN,MAAM;aACN,MAAM,EAAE,GAAG,IAAI;UACf,cAAc;;;;kBAMd,qBAAqB;QAAE,OAAO,EAAE,QAAQ,CAAA;KAAE,CAAC;uBAC3C,kBAAkB;mBAClB,YAAY;gBACZ,KAAK;YACL,GAAG;qBACH,GAAG;;;YAKH,KAAK,MAAM,EAAE;uBACb,MAAM;UACN,OAAO,EAAE;;;YAKT,KAAK,MAAM,EAAE;UACb,KAAK,MAAM,EAAE;;iCAId,MAAa,iBAAU;mCAtEV,uBAAuB;0CAAvB,uBAAuB;wCAAvB,uBAAuB;kCAClB,cAAc;2BADnB,uBAAuB;gCAEpB,gBAAgB"}
1
+ {"version":3,"file":"axelar-types.d.ts","sourceRoot":"","sources":["axelar-types.js"],"names":[],"mappings":";;;;;6BAwBa,CAAC,OAAO,oBAAoB,EAAE,MAAM,OAAO,oBAAoB,CAAC;;kBAK/D,MAAM;oBACN,MAAM;aACN,MAAM;UACN,cAAc;;;YAKd,MAAM;eACN,aAAa;;;uBAKb,MAAM;yBACN,MAAM;aACN,MAAM,EAAE,GAAG,IAAI;UACf,cAAc;;;;kBAMd,qBAAqB;QAAE,OAAO,EAAE,QAAQ,CAAA;KAAE,CAAC;uBAC3C,kBAAkB;mBAClB,YAAY;gBACZ,KAAK;YACL,GAAG;qBACH,GAAG;WACH,MAAM;;;YAKN,KAAK,MAAM,EAAE;uBACb,MAAM;UACN,OAAO,EAAE;;;YAKT,KAAK,MAAM,EAAE;UACb,KAAK,MAAM,EAAE;;iCAId,MAAa,iBAAU;mCAvEV,uBAAuB;0CAAvB,uBAAuB;wCAAvB,uBAAuB;kCAClB,cAAc;2BADnB,uBAAuB;gCAEpB,gBAAgB"}
@@ -56,6 +56,7 @@ harden(AxelarGMPMessageType);
56
56
  * @property {Denom} localDenom
57
57
  * @property {any} assets
58
58
  * @property {any} remoteChainInfo
59
+ * @property {bigint} nonce
59
60
  */
60
61
 
61
62
  /**
@@ -6,11 +6,22 @@ export function prepareEvmAccountKit(zone: Zone, { zcf, vowTools, log, zoeTools
6
6
  }): (initialState: EvmTapState) => import("@endo/exo").GuardedKit<{
7
7
  tap: {
8
8
  /**
9
+ * This function handles incoming packets from the cross-chain
10
+ * communication.
11
+ *
12
+ * NOTE: The implementation here is no longer relevant, as the Factory
13
+ * contract has been updated. Previously, this function was used to
14
+ * receive a response back from the Factory contract deployed on the EVM
15
+ * chain. However, the Factory contract now no longer sends a response
16
+ * to Agoric. Instead, we now fetch that response off-chain and notify
17
+ * the Agoric contract through off-chain mechanisms.
18
+ *
9
19
  * @param {VTransferIBCEvent} event
10
20
  */
11
21
  receiveUpcall(event: VTransferIBCEvent): void;
12
22
  };
13
23
  holder: {
24
+ getNonce(): bigint;
14
25
  getLocalAddress(): `${string}1${string}`;
15
26
  getRemoteAddress(): Promise<string | undefined>;
16
27
  getLatestMessage(): Promise<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"axelar-gmp-account-kit.d.ts","sourceRoot":"","sources":["axelar-gmp-account-kit.js"],"names":[],"mappings":"AAgEO,2CARI,IAAI,oCACJ;IACN,GAAG,EAAE,GAAG,CAAC;IACT,QAAQ,EAAE,QAAQ,CAAC;IACnB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC;IAChC,QAAQ,EAAE,QAAQ,CAAC;CACpB;;QAwCI;;WAEG;6BADQ,iBAAiB;;;;;;QAyE5B;;;;;;;WAOG;wBAHQ,OAAO,uBAAuB,EAAE,kBAAkB,UAClD,OAAO,uBAAuB,EAAE,SAAS,GACvC,OAAO,CAAC,MAAM,CAAC;QAO5B;;;;;;;;;WASG;sBARQ,OAAO,aACP;YACN,kBAAkB,EAAE,MAAM,CAAC;YAC3B,IAAI,EAAE,cAAc,CAAC;YACrB,mBAAmB,EAAE,kBAAkB,CAAC;YACxC,SAAS,EAAE,MAAM,CAAC;YAClB,sBAAsB,EAAE,YAAY,EAAE,CAAC;SACxC;QA4FJ;;;WAGG;sBAFQ,OAAO,QACP,GAAG;;;;;GAoErB;2BA3Va,YAAY;gCA6VZ,UAAU,CAAC,OAAO,oBAAoB,CAAC;4BACvC,UAAU,CAAC,iBAAiB,CAAC;0BAvWpB,cAAc;yBAKN,aAAa;8BANZ,aAAa;yBAAb,aAAa;8BAIlB,uBAAuB;iCACqC,oBAAoB;uCANvE,cAAc;6BAOnB,aAAa;oCACY,oBAAoB;wCAFW,oBAAoB;kCAApB,oBAAoB"}
1
+ {"version":3,"file":"axelar-gmp-account-kit.d.ts","sourceRoot":"","sources":["axelar-gmp-account-kit.js"],"names":[],"mappings":"AAkEO,2CARI,IAAI,oCACJ;IACN,GAAG,EAAE,GAAG,CAAC;IACT,QAAQ,EAAE,QAAQ,CAAC;IACnB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC;IAChC,QAAQ,EAAE,QAAQ,CAAC;CACpB;;QAwCI;;;;;;;;;;;;WAYG;6BADQ,iBAAiB;;;;;;;QA8E5B;;;;;;;WAOG;wBAHQ,OAAO,uBAAuB,EAAE,kBAAkB,UAClD,OAAO,uBAAuB,EAAE,SAAS,GACvC,OAAO,CAAC,MAAM,CAAC;QAO5B;;;;;;;;;WASG;sBARQ,OAAO,aACP;YACN,kBAAkB,EAAE,MAAM,CAAC;YAC3B,IAAI,EAAE,cAAc,CAAC;YACrB,mBAAmB,EAAE,kBAAkB,CAAC;YACxC,SAAS,EAAE,MAAM,CAAC;YAClB,sBAAsB,EAAE,YAAY,EAAE,CAAC;SACxC;QA4FJ;;;WAGG;sBAFQ,OAAO,QACP,GAAG;;;;;GAoErB;2BA5Wa,YAAY;gCA8WZ,UAAU,CAAC,OAAO,oBAAoB,CAAC;4BACvC,UAAU,CAAC,iBAAiB,CAAC;0BAxXpB,cAAc;yBAKN,aAAa;8BANZ,aAAa;yBAAb,aAAa;8BAIlB,uBAAuB;iCACqC,oBAAoB;uCANvE,cAAc;6BAOnB,aAAa;oCACY,oBAAoB;wCAFW,oBAAoB;kCAApB,oBAAoB"}
@@ -25,6 +25,7 @@ const trace = makeTracer('EvmAccountKit');
25
25
  const { entries } = Object;
26
26
 
27
27
  const EVMI = M.interface('holder', {
28
+ getNonce: M.call().returns(M.bigint()),
28
29
  getLocalAddress: M.call().returns(M.any()),
29
30
  getRemoteAddress: M.call().returns(M.any()),
30
31
  // TODO: This is currently a placeholder.
@@ -50,6 +51,7 @@ const EvmKitStateShape = {
50
51
  localAccount: M.remotable('LocalAccount'),
51
52
  assets: M.any(),
52
53
  remoteChainInfo: M.any(),
54
+ nonce: M.bigint(),
53
55
  };
54
56
  harden(EvmKitStateShape);
55
57
 
@@ -101,6 +103,16 @@ export const prepareEvmAccountKit = (
101
103
  {
102
104
  tap: {
103
105
  /**
106
+ * This function handles incoming packets from the cross-chain
107
+ * communication.
108
+ *
109
+ * NOTE: The implementation here is no longer relevant, as the Factory
110
+ * contract has been updated. Previously, this function was used to
111
+ * receive a response back from the Factory contract deployed on the EVM
112
+ * chain. However, the Factory contract now no longer sends a response
113
+ * to Agoric. Instead, we now fetch that response off-chain and notify
114
+ * the Agoric contract through off-chain mechanisms.
115
+ *
104
116
  * @param {VTransferIBCEvent} event
105
117
  */
106
118
  receiveUpcall(event) {
@@ -165,6 +177,11 @@ export const prepareEvmAccountKit = (
165
177
  },
166
178
  },
167
179
  holder: {
180
+ getNonce() {
181
+ const currentNonce = this.state.nonce;
182
+ this.state.nonce = currentNonce + 1n;
183
+ return currentNonce;
184
+ },
168
185
  getLocalAddress() {
169
186
  return this.state.localAccount.getAddress().value;
170
187
  },
@@ -11,9 +11,7 @@ export function contract(zcf: ZCF, privateArgs: OrchestrationPowers & {
11
11
  invitationMakers: import("@endo/exo").Guarded<{
12
12
  makeEVMTransactionInvitation(method: any, args: any): Promise<globalThis.Invitation<string | void, undefined>>;
13
13
  }>;
14
- }>, {
15
- gasAmount: bigint;
16
- }>>;
14
+ }>, undefined>>;
17
15
  }>;
18
16
  creatorFacet: import("@endo/exo").Guarded<{
19
17
  registerChain(chainName: string, chainInfo: import("@agoric/orchestration").ChainInfo, ibcConnectionInfo?: import("@agoric/orchestration").IBCConnectionInfo): Promise<void>;
@@ -33,9 +31,7 @@ export const start: (zcf: ZCF<Record<string, unknown>>, privateArgs: Orchestrati
33
31
  invitationMakers: import("@endo/exo").Guarded<{
34
32
  makeEVMTransactionInvitation(method: any, args: any): Promise<globalThis.Invitation<string | void, undefined>>;
35
33
  }>;
36
- }>, {
37
- gasAmount: bigint;
38
- }>>;
34
+ }>, undefined>>;
39
35
  }>;
40
36
  creatorFacet: import("@endo/exo").Guarded<{
41
37
  registerChain(chainName: string, chainInfo: import("@agoric/orchestration").ChainInfo, ibcConnectionInfo?: import("@agoric/orchestration").IBCConnectionInfo): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"axelar-gmp.contract.d.ts","sourceRoot":"","sources":["axelar-gmp.contract.js"],"names":[],"mappings":"AAiCO,8BAVI,GAAG,eACH,mBAAmB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAC3D,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;CAClC,QACO,IAAI,oDACJ,kBAAkB;;;;;;;uBAkDK,MAAM;;;;;;;GAcvC;AAGD;gBAzEiB,UAAU;gBACV,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;gBAC/B,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE;iBAC7C,OAAO,WAAW,CAAC;;;;;;;;uBAqDH,MAAM;;;;;;;GAiBS;yBAnF3B,aAAa;yCAHuB,0BAA0B;gCAE1C,0CAA0C;qCAD9B,uBAAuB;2BAAvB,uBAAuB;iCAAvB,uBAAuB;iCACnC,0CAA0C;4BAJtD,aAAa;0BACpB,cAAc;wCACqB,0BAA0B;yBAFtD,aAAa"}
1
+ {"version":3,"file":"axelar-gmp.contract.d.ts","sourceRoot":"","sources":["axelar-gmp.contract.js"],"names":[],"mappings":"AAiCO,8BAVI,GAAG,eACH,mBAAmB,GAAG;IAC5B,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC5C,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAC;IAC3D,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;CAClC,QACO,IAAI,oDACJ,kBAAkB;;;;;;;;;;;;GA8D5B;AAGD;gBAvEiB,UAAU;gBACV,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC;gBAC/B,CAAC,KAAK,EAAE,WAAW,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE;iBAC7C,OAAO,WAAW,CAAC;;;;;;;;;;;;;GAoEY;yBAjF3B,aAAa;yCAHuB,0BAA0B;gCAE1C,0CAA0C;qCAD9B,uBAAuB;2BAAvB,uBAAuB;iCAAvB,uBAAuB;iCACnC,0CAA0C;4BAJtD,aAAa;0BACpB,cAAc;wCACqB,0BAA0B;yBAFtD,aAAa"}
@@ -1,6 +1,6 @@
1
1
  import { makeTracer } from '@agoric/internal';
2
2
  import { E } from '@endo/far';
3
- import { M, mustMatch } from '@endo/patterns';
3
+ import { M } from '@endo/patterns';
4
4
  import { prepareChainHubAdmin } from '../exos/chain-hub-admin.js';
5
5
  import { registerChainsAndAssets } from '../utils/chain-hub-helper.js';
6
6
  import { withOrchestration } from '../utils/start-helper.js';
@@ -79,11 +79,9 @@ export const contract = async (
79
79
  return zcf.makeInvitation(
80
80
  /**
81
81
  * @param {ZCFSeat} seat
82
- * @param {{ gasAmount: bigint }} offerArgs
83
82
  */
84
- (seat, offerArgs) => {
85
- mustMatch(offerArgs, M.splitRecord({ gasAmount: M.bigint() }));
86
- return createAndMonitorLCA(seat, offerArgs);
83
+ seat => {
84
+ return createAndMonitorLCA(seat);
87
85
  },
88
86
  'makeAccount',
89
87
  undefined,
@@ -4,9 +4,7 @@ export function createAndMonitorLCA(orch: Orchestrator, { makeEvmAccountKit, cha
4
4
  log: GuestOf<(msg: string) => Vow<void>>;
5
5
  localTransfer: GuestOf<(srcSeat: ZCFSeat, localAccount: LocalAccountMethods, amounts: AmountKeywordRecord) => Vow<void>>;
6
6
  withdrawToSeat: GuestOf<(localAccount: LocalAccountMethods, destSeat: ZCFSeat, amounts: AmountKeywordRecord) => Vow<void>>;
7
- }, seat: ZCFSeat, offerArgs: {
8
- gasAmount: bigint;
9
- }): Promise<{
7
+ }, seat: ZCFSeat): Promise<{
10
8
  invitationMakers: import("@endo/exo").Guarded<{
11
9
  makeEVMTransactionInvitation(method: any, args: any): Promise<globalThis.Invitation<string | void, undefined>>;
12
10
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"axelar-gmp.flows.d.ts","sourceRoot":"","sources":["axelar-gmp.flows.js"],"names":[],"mappings":"AAyDO,0CAzBI,YAAY,uEACZ;IACN,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,QAAQ,EAAE,eAAe,QAAQ,CAAC,CAAC;IACnC,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC;IACzC,aAAa,EAAE,QACnB,CACQ,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,mBAAmB,EACjC,OAAO,EAAE,mBAAmB,KACzB,IAAI,IAAI,CAAC,CACf,CAAC;IACF,cAAc,EAAE,QACpB,CACQ,YAAY,EAAE,mBAAmB,EACjC,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,mBAAmB,KACzB,IAAI,IAAI,CAAC,CACf,CAAC;CACH,QACO,OAAO,aACP;IACN,SAAS,EAAE,MAAM,CAAC;CACnB;;;;GAuGH;kCA3IiD,uBAAuB;uCACrC,6BAA6B;8BACtC,6CAA6C;oCAH9B,oBAAoB;yBAIxC,aAAa;6BAJO,oBAAoB;6BAKf,aAAa;yCACtB,uBAAuB;yCADd,aAAa"}
1
+ {"version":3,"file":"axelar-gmp.flows.d.ts","sourceRoot":"","sources":["axelar-gmp.flows.js"],"names":[],"mappings":"AAsDO,0CAtBI,YAAY,uEACZ;IACN,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,QAAQ,EAAE,eAAe,QAAQ,CAAC,CAAC;IACnC,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC;IACzC,aAAa,EAAE,QACnB,CACQ,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,mBAAmB,EACjC,OAAO,EAAE,mBAAmB,KACzB,IAAI,IAAI,CAAC,CACf,CAAC;IACF,cAAc,EAAE,QACpB,CACQ,YAAY,EAAE,mBAAmB,EACjC,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,mBAAmB,KACzB,IAAI,IAAI,CAAC,CACf,CAAC;CACH,QACO,OAAO;;;;GAuGjB;kCAxIiD,uBAAuB;uCACrC,6BAA6B;8BACtC,6CAA6C;oCAH9B,oBAAoB;yBAIxC,aAAa;6BAJO,oBAAoB;6BAKf,aAAa;yCACtB,uBAAuB;yCADd,aAAa"}
@@ -13,7 +13,7 @@ import { makeTracer, NonNullish } from '@agoric/internal';
13
13
  import { Fail, makeError, q } from '@endo/errors';
14
14
  import { AxelarGMPMessageType } from '../axelar-types.js';
15
15
  import { denomHash } from '../utils/denomHash.js';
16
- import { buildGasPayload, gmpAddresses } from '../utils/gmp.js';
16
+ import { buildNoncePayload, gmpAddresses } from '../utils/gmp.js';
17
17
 
18
18
  /**
19
19
  * @import {GuestInterface, GuestOf} from '@agoric/async-flow';
@@ -51,15 +51,11 @@ const trace = makeTracer('EvmFlow');
51
51
  * >;
52
52
  * }} ctx
53
53
  * @param {ZCFSeat} seat
54
- * @param {{
55
- * gasAmount: bigint;
56
- * }} offerArgs
57
54
  */
58
55
  export const createAndMonitorLCA = async (
59
56
  orch,
60
57
  { makeEvmAccountKit, chainHub, log, localTransfer, withdrawToSeat },
61
58
  seat,
62
- offerArgs,
63
59
  ) => {
64
60
  void log('Inside createAndMonitorLCA');
65
61
  const [agoric, remoteChain] = await Promise.all([
@@ -96,6 +92,7 @@ export const createAndMonitorLCA = async (
96
92
  localDenom,
97
93
  assets,
98
94
  remoteChainInfo: info,
95
+ nonce: 1n,
99
96
  });
100
97
  void log('tap created successfully');
101
98
  // XXX consider storing appRegistration, so we can .revoke() or .updateTargetApp()
@@ -121,7 +118,7 @@ export const createAndMonitorLCA = async (
121
118
  const memo = {
122
119
  destination_chain: 'Ethereum',
123
120
  destination_address: factoryContractAddress,
124
- payload: buildGasPayload(offerArgs.gasAmount),
121
+ payload: buildNoncePayload(evmAccountKit.holder.getNonce()),
125
122
  type: AxelarGMPMessageType.ContractCall,
126
123
  fee: {
127
124
  amount: '1', // TODO: Get fee amount from api
@@ -17,7 +17,7 @@ export const gmpAddresses: {
17
17
  };
18
18
  export function constructContractCall({ target, functionSignature, args }: ContractCall): AbiEncodedContractCall;
19
19
  export function buildGMPPayload(contractCalls: ContractCall[]): number[];
20
- export function buildGasPayload(gasAmount: bigint): number[];
20
+ export function buildNoncePayload(nonce: bigint): number[];
21
21
  export namespace networkConfigs {
22
22
  namespace devnet {
23
23
  let label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"gmp.d.ts","sourceRoot":"","sources":["gmp.js"],"names":[],"mappings":";;;;;AAoBA;;;;;;GAMG;AACH,2BANU;IACL,UAAU,EAAE,aAAa,CAAC;IAC1B,UAAU,EAAE,aAAa,CAAC;IAC1B,gBAAgB,EAAE,aAAa,CAAC;CACjC,CAOF;AAQK,2EAHI,YAAY,GACV,sBAAsB,CAoBlC;AAQM,+CAHI,YAAY,EAAE,GACZ,MAAM,EAAE,CAyBpB;AAMM,2CAHI,MAAM,GACJ,MAAM,EAAE,CASpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCA3F+B,uBAAuB;kCADA,oBAAoB;4CAApB,oBAAoB"}
1
+ {"version":3,"file":"gmp.d.ts","sourceRoot":"","sources":["gmp.js"],"names":[],"mappings":";;;;;AAoBA;;;;;;GAMG;AACH,2BANU;IACL,UAAU,EAAE,aAAa,CAAC;IAC1B,UAAU,EAAE,aAAa,CAAC;IAC1B,gBAAgB,EAAE,aAAa,CAAC;CACjC,CAOF;AAQK,2EAHI,YAAY,GACV,sBAAsB,CAoBlC;AAQM,+CAHI,YAAY,EAAE,GACZ,MAAM,EAAE,CAyBpB;AAMM,yCAHI,MAAM,GACJ,MAAM,EAAE,CAMpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAxF+B,uBAAuB;kCADA,oBAAoB;4CAApB,oBAAoB"}
package/src/utils/gmp.js CHANGED
@@ -90,14 +90,11 @@ export const buildGMPPayload = contractCalls => {
90
90
  };
91
91
 
92
92
  /**
93
- * @param {bigint} gasAmount - gas amount for the EVM to Agoric message
93
+ * @param {bigint} nonce - gas amount for the EVM to Agoric message
94
94
  * @returns {number[]} The payload array.
95
95
  */
96
- export const buildGasPayload = gasAmount => {
97
- const abiEncodedData = encodeAbiParameters(
98
- [{ type: 'uint256' }],
99
- [gasAmount],
100
- );
96
+ export const buildNoncePayload = nonce => {
97
+ const abiEncodedData = encodeAbiParameters([{ type: 'uint256' }], [nonce]);
101
98
 
102
99
  return Array.from(hexToBytes(abiEncodedData));
103
100
  };