@wormhole-foundation/wormhole-connect 3.0.0-beta.4-development → 3.0.0-beta.6-development

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.
Files changed (104) hide show
  1. package/dist/main.js +48 -48
  2. package/dist/src/config/tokens.d.ts +10 -3
  3. package/dist/src/config/tokens.d.ts.map +1 -1
  4. package/dist/src/exports/executor.d.ts +1 -1
  5. package/dist/src/exports/executor.d.ts.map +1 -1
  6. package/dist/src/utils/coingecko.d.ts.map +1 -1
  7. package/dist/src/utils/sdkv2.d.ts +1 -1
  8. package/dist/src/utils/sdkv2.d.ts.map +1 -1
  9. package/dist/src/views/v2/Bridge/AssetPicker/TokenList.d.ts +0 -2
  10. package/dist/src/views/v2/Bridge/AssetPicker/TokenList.d.ts.map +1 -1
  11. package/lib/{account-CKUCmcgT.mjs → account-BK8xMTUI.mjs} +1 -1
  12. package/lib/{address-Cj96wodd.mjs → address-BWXkejmE.mjs} +1 -1
  13. package/lib/{address-Drr_9OcK.mjs → address-CBux52Na.mjs} +2 -2
  14. package/lib/{address-B9anhmbU.mjs → address-DKHa7TFU.mjs} +1 -1
  15. package/lib/{aptos-DPIwkCrX.mjs → aptos-C180o9od.mjs} +7 -7
  16. package/lib/{aptos-CUrw_CM5.js → aptos-C2O9KvSO.js} +1 -1
  17. package/lib/{aptos-CMqi9xnz.mjs → aptos-Tbz2BmSl.mjs} +3 -3
  18. package/lib/{base64-BcnUThiU.mjs → base64-Dmj19Uvu.mjs} +1 -1
  19. package/lib/{blake2b-CnkNeJT4.mjs → blake2b-CgbIfNRX.mjs} +1 -1
  20. package/lib/{browser-ponyfill-oWZrCgRw.mjs → browser-ponyfill-BecG2Lnb.mjs} +1 -1
  21. package/lib/{ccip-DjEPg__u.mjs → ccip--upk5QVD.mjs} +1 -1
  22. package/lib/{ccip-tbJnHDO1.js → ccip-C1fv-O-z.js} +1 -1
  23. package/lib/{chain-CNVMEdrk.mjs → chain-sKZNJgPZ.mjs} +1 -1
  24. package/lib/{chunk-IMTC3J2M-B7fKwIuX.mjs → chunk-IMTC3J2M-DKLPKqnP.mjs} +3 -3
  25. package/lib/constants-5BAG78ih.js +1 -0
  26. package/lib/{constants-uvbe2N_4.mjs → constants-DokEy4aZ.mjs} +1 -1
  27. package/lib/{contract-DANWVftx.mjs → contract-BVaUamai.mjs} +1 -1
  28. package/lib/{create-B9LwWha4.mjs → create-CQ6n4Ga8.mjs} +1 -1
  29. package/lib/{evm-C51GRwXY.mjs → evm-8qap-w_A.mjs} +9 -9
  30. package/lib/{evm-B552wdhN.mjs → evm-C-aa4dBG.mjs} +9 -9
  31. package/lib/{evm-D-QB4hVf.js → evm-DEyDcOVJ.js} +3 -3
  32. package/lib/executor.js +1 -1
  33. package/lib/executor.mjs +226 -212
  34. package/lib/hosted.js +1 -1
  35. package/lib/hosted.mjs +1 -1
  36. package/lib/{index-Dw7INWis.mjs → index-07cEoDZD.mjs} +4 -4
  37. package/lib/{index-DoFo485M.mjs → index-B36we0ml.mjs} +7 -7
  38. package/lib/{index-CKg04pdA.mjs → index-B5XhLD_L.mjs} +5 -5
  39. package/lib/{index-CUZbT8Rs.js → index-B8P7Hgys.js} +79 -79
  40. package/lib/{index-BR4w3fuE.mjs → index-B9hin5U8.mjs} +5 -5
  41. package/lib/{index-CGHEayyy.mjs → index-BRWDo8jM.mjs} +7869 -7853
  42. package/lib/{index-CEXcD8Mw.mjs → index-BUfjw4S2.mjs} +4 -4
  43. package/lib/{index-DHAgduQ-.mjs → index-BUlzgqNa.mjs} +4 -4
  44. package/lib/{index-4UEV-pyS.js → index-B__hvnhZ.js} +1 -1
  45. package/lib/{index-BlJpOhTM.mjs → index-Batb-GTa.mjs} +5 -5
  46. package/lib/{index-CT2-qOL1.mjs → index-Bb8InrQU.mjs} +2 -2
  47. package/lib/{index-xc0U6vWT.js → index-CHRRy38m.js} +1 -1
  48. package/lib/{index-B4NYDFvU.mjs → index-CKaF7Gzs.mjs} +5 -5
  49. package/lib/{index-CYdhveYx.mjs → index-CLy98PXT.mjs} +6 -6
  50. package/lib/{index-DSSOE7Me.mjs → index-CjroDahP.mjs} +2 -2
  51. package/lib/{index-DD-AZ3hI.mjs → index-CrB-LSo2.mjs} +5 -5
  52. package/lib/{index-BO0DC-jc.mjs → index-Cry2AYTm.mjs} +3 -3
  53. package/lib/{index-pN0Dgjjf.mjs → index-CsdQttEt.mjs} +5 -5
  54. package/lib/{index-C9XIIFQK.mjs → index-Cu7gFSJv.mjs} +1 -1
  55. package/lib/{index-mXHkgOxH.mjs → index-Cx-ODuWg.mjs} +4 -4
  56. package/lib/{index-C7eKFnUC.mjs → index-D2Qb4LZn.mjs} +5 -5
  57. package/lib/{index-DQ5bBanH.js → index-D9a8BHae.js} +1 -1
  58. package/lib/{index-CM_IP492.mjs → index-DDBLdcME.mjs} +6 -6
  59. package/lib/{index-BAuH_G93.mjs → index-DNcx7dMI.mjs} +5 -5
  60. package/lib/{index-l0sxQXRT.mjs → index-DRleG63r.mjs} +1 -1
  61. package/lib/{index-DlREYA36.mjs → index-DcdFOYPU.mjs} +2 -2
  62. package/lib/{index-CfC3_uPF.mjs → index-DdvRmaTh.mjs} +7 -7
  63. package/lib/{index-BQ0RlDhv.mjs → index-DgIxcujP.mjs} +6 -6
  64. package/lib/{index-CCRPy0B_.mjs → index-DyvQhGPY.mjs} +2 -2
  65. package/lib/{index-B1XGfrNH.mjs → index-aA-2Ygs3.mjs} +1 -1
  66. package/lib/{index-2f5GRlqp.mjs → index-rAnJYuJr.mjs} +1 -1
  67. package/lib/{index.es-BmrEYzpc.js → index.es-DV3kw9DJ.js} +1 -1
  68. package/lib/{index.es-CWb9-nuQ.mjs → index.es-r3IXysvk.mjs} +7 -7
  69. package/lib/index.js +1 -1
  70. package/lib/index.mjs +1 -1
  71. package/lib/mayan.mjs +10 -10
  72. package/lib/{mint-DVxIczlI.mjs → mint-C3SdQH_S.mjs} +2 -2
  73. package/lib/ntt.mjs +10 -10
  74. package/lib/{platform-D-nUFU0e.mjs → platform-CUeBR_i4.mjs} +4 -4
  75. package/lib/{platform-PaIJsXKV.mjs → platform-Czq0KkFa.mjs} +4 -4
  76. package/lib/{platform-CbDx4hex.mjs → platform-Droe0nZu.mjs} +4 -4
  77. package/lib/{provider-jsonrpc-C_IZFSfB.mjs → provider-jsonrpc-CVWSLk8g.mjs} +2 -2
  78. package/lib/{sha3-DQQvDwj1.mjs → sha3-BMK6V2DM.mjs} +1 -1
  79. package/lib/{signer-CsMX8mEc.mjs → signer-CYkXKdE1.mjs} +2 -2
  80. package/lib/solana-Bs7_C3BS.mjs +18 -0
  81. package/lib/{solana-CdLrMjvN.mjs → solana-C6mhiYEU.mjs} +6 -6
  82. package/lib/{solana-Bo3NnEnJ.js → solana-CodmCaKY.js} +1 -1
  83. package/lib/{solanaEmbed.esm-CYlp6Icj.js → solanaEmbed.esm-CM5KEZzA.js} +1 -1
  84. package/lib/{solanaEmbed.esm-DiWgOIVr.mjs → solanaEmbed.esm-RbUXbhhE.mjs} +3 -3
  85. package/lib/src/config/tokens.d.ts +10 -3
  86. package/lib/src/config/tokens.d.ts.map +1 -1
  87. package/lib/src/exports/executor.d.ts +1 -1
  88. package/lib/src/exports/executor.d.ts.map +1 -1
  89. package/lib/src/utils/coingecko.d.ts.map +1 -1
  90. package/lib/src/utils/sdkv2.d.ts +1 -1
  91. package/lib/src/utils/sdkv2.d.ts.map +1 -1
  92. package/lib/src/views/v2/Bridge/AssetPicker/TokenList.d.ts +0 -2
  93. package/lib/src/views/v2/Bridge/AssetPicker/TokenList.d.ts.map +1 -1
  94. package/lib/{sui-BSLo7-bI.mjs → sui-BJsKaZg2.mjs} +8 -8
  95. package/lib/{sui-z1y1QOrV.js → sui-CL39dOHl.js} +1 -1
  96. package/lib/{sui-CXBd6k8g.mjs → sui-CNae24HH.mjs} +3 -3
  97. package/lib/{tokens-C9OdyBk_.js → tokens-BnT3LJzY.js} +1 -1
  98. package/lib/{tokens-GzwBLIsP.mjs → tokens-Bz4eEen0.mjs} +4 -4
  99. package/lib/{units-DP5zqyxn.mjs → units-YkCOGDr9.mjs} +2 -2
  100. package/lib/{unsignedTransaction-fSrwDjHx.mjs → unsignedTransaction-C0WXQMmv.mjs} +3 -3
  101. package/lib/{web3-DCo8oN-v.mjs → web3-B3Usc-Qj.mjs} +1 -1
  102. package/package.json +2 -2
  103. package/lib/constants-D8PkP8FD.js +0 -1
  104. package/lib/solana-C_0khyJw.mjs +0 -18
package/lib/executor.mjs CHANGED
@@ -1,28 +1,28 @@
1
- var Pe = Object.defineProperty;
2
- var Me = (e, n, t) => n in e ? Pe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
- var c = (e, n, t) => Me(e, typeof n != "symbol" ? n + "" : n, t);
4
- import { az as W, aP as C, aJ as Be, E as b, b4 as P, aF as Ie, aR as ze, aU as te, aV as Te, aW as Ue, v as Re, ae as g, ar as pe, aG as re, au as be, d as D, an as _e, as as Ce, b1 as N, b2 as Ne, ao as $e, a_ as $, aX as Oe, b3 as We, A as ke, D as se, F as Ge, W as S, u as Le, _ as Qe, aN as qe, a3 as ne, y as je, f as R, af as Ve, z as Ke, T as _, i as ae, aj as ie, B as Xe, C as Je, e as He } from "./address-Drr_9OcK.mjs";
5
- import { r as M } from "./chain-CNVMEdrk.mjs";
6
- import { l as oe } from "./chunk-IMTC3J2M-B7fKwIuX.mjs";
7
- import { A as Ze } from "./platform-PaIJsXKV.mjs";
8
- import { A as Ye, _ as et } from "./address-Cj96wodd.mjs";
9
- import { A as tt } from "./unsignedTransaction-BDOQhqcZ.mjs";
10
- import { E as ce } from "./platform-D-nUFU0e.mjs";
11
- import { C as rt } from "./contract-DANWVftx.mjs";
12
- import { E as st } from "./unsignedTransaction-C0V0UbsS.mjs";
13
- import { b as de, T as nt, a as at, _ as it } from "./platform-CbDx4hex.mjs";
14
- import { suiCircleObjects as ot } from "./index-BO0DC-jc.mjs";
15
- import { S as ct, R as dt } from "./address-B9anhmbU.mjs";
16
- import { S as ut } from "./unsignedTransaction-BD81leu1.mjs";
17
- import { createDepositForBurnInstruction as ft } from "./index-BR4w3fuE.mjs";
18
- import { P as mt } from "./index-l0sxQXRT.mjs";
19
- import { p as ue, u as Ae, b as ht } from "./web3-DCo8oN-v.mjs";
20
- import { a as lt, S as gt } from "./unsignedTransaction-fSrwDjHx.mjs";
21
- import { d as pt } from "./account-CKUCmcgT.mjs";
22
- const k = {
1
+ var Me = Object.defineProperty;
2
+ var Ie = (e, n, t) => n in e ? Me(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
+ var c = (e, n, t) => Ie(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import { az as O, aP as C, aJ as Be, E as w, b4 as P, aF as ze, aR as Te, aU as te, aV as Ue, aW as Re, v as _e, ae as p, ar as be, aG as re, au as we, d as D, an as Ne, as as Ce, b1 as N, b2 as $e, ao as ke, a_ as $, aX as Oe, b3 as Ge, A as Le, D as se, F as Qe, W as S, u as qe, _ as We, aN as je, a3 as ne, y as Ve, f as R, af as Ke, z as Xe, T as _, i as ae, aj as ie, B as Je, C as He, e as Ze } from "./address-CBux52Na.mjs";
5
+ import { r as M } from "./chain-sKZNJgPZ.mjs";
6
+ import { l as oe } from "./chunk-IMTC3J2M-DKLPKqnP.mjs";
7
+ import { A as Ye } from "./platform-Czq0KkFa.mjs";
8
+ import { A as et, _ as tt } from "./address-BWXkejmE.mjs";
9
+ import { A as rt } from "./unsignedTransaction-BDOQhqcZ.mjs";
10
+ import { E as ce } from "./platform-CUeBR_i4.mjs";
11
+ import { C as st } from "./contract-BVaUamai.mjs";
12
+ import { E as nt } from "./unsignedTransaction-C0V0UbsS.mjs";
13
+ import { b as de, T as at, a as it, _ as ot } from "./platform-Droe0nZu.mjs";
14
+ import { suiCircleObjects as ct } from "./index-Cry2AYTm.mjs";
15
+ import { S as dt, R as ut } from "./address-DKHa7TFU.mjs";
16
+ import { S as ft } from "./unsignedTransaction-BD81leu1.mjs";
17
+ import { createDepositForBurnInstruction as mt } from "./index-B9hin5U8.mjs";
18
+ import { P as ht } from "./index-DRleG63r.mjs";
19
+ import { p as ue, u as Ae, b as lt } from "./web3-B3Usc-Qj.mjs";
20
+ import { a as gt, S as pt } from "./unsignedTransaction-C0WXQMmv.mjs";
21
+ import { d as bt } from "./account-BK8xMTUI.mjs";
22
+ const G = {
23
23
  Testnet: "https://executor-testnet.labsapis.com",
24
24
  Mainnet: "https://executor.labsapis.com"
25
- }, G = {
25
+ }, L = {
26
26
  Testnet: {
27
27
  Aptos: "0x14a12d1fd6ef371b70c2113155534ec152ec7f779e281b54866c796c9a4a58d3",
28
28
  Avalanche: "0x2cfEC91B50f657Cc86Ec693542527ac3e03bF742",
@@ -50,7 +50,7 @@ const k = {
50
50
  executorId: "0xdb0fe8bb1e2b5be628adbea0636063325073e1070ee11e4281457dfd7f158235",
51
51
  executorRequestsId: "0xc030df7a3eed1494fa4b64aa8ab63a79041cf1114f4ff2b7ab5aca1c684a21a7"
52
52
  }
53
- }, bt = {
53
+ }, wt = {
54
54
  Testnet: "execXUrAsMnqMmTHj5m7N1YQgsDz3cwGLYCYyuDRciV",
55
55
  Mainnet: "execXUrAsMnqMmTHj5m7N1YQgsDz3cwGLYCYyuDRciV"
56
56
  }, Ct = 5001n, At = {
@@ -74,7 +74,7 @@ const k = {
74
74
  Solana: 250000n,
75
75
  Sui: 8000000n
76
76
  }
77
- }, wt = {
77
+ }, yt = {
78
78
  Testnet: {
79
79
  Aptos: "0x23b54f6e29bba7f4123d088f4cfcd83f5e23a049de15895b119ce5a6cb5faa91",
80
80
  Avalanche: "0x8F26A0025dcCc6Cfc07A7d38756280a10E295ad7",
@@ -96,22 +96,22 @@ const k = {
96
96
  Unichain: "0xF11e0efF8b11Ce382645dd75352fC16b3aB3551E"
97
97
  }
98
98
  };
99
- var w;
99
+ var A;
100
100
  (function(e) {
101
101
  e.Pending = "pending", e.Failed = "failed", e.Unsupported = "unsupported", e.Submitted = "submitted", e.Underpaid = "underpaid", e.Aborted = "aborted";
102
- })(w || (w = {}));
103
- async function yt(e) {
104
- const n = `${k[e]}/v0/capabilities`;
102
+ })(A || (A = {}));
103
+ async function xt(e) {
104
+ const n = `${G[e]}/v0/capabilities`;
105
105
  try {
106
- return (await W.get(n)).data;
106
+ return (await O.get(n)).data;
107
107
  } catch {
108
108
  throw new Error(`Failed to fetch capabilities for network: ${e}.`);
109
109
  }
110
110
  }
111
111
  async function Et(e, n, t, r) {
112
- const s = `${k[e]}/v0/quote`;
112
+ const s = `${G[e]}/v0/quote`;
113
113
  try {
114
- return (await W.post(s, {
114
+ return (await O.post(s, {
115
115
  srcChain: C(n),
116
116
  dstChain: C(t),
117
117
  relayInstructions: r
@@ -120,10 +120,10 @@ async function Et(e, n, t, r) {
120
120
  throw new Error("Failed to fetch signed quote.");
121
121
  }
122
122
  }
123
- async function xt(e, n, t) {
124
- const r = `${k[e]}/v0/status/tx`;
123
+ async function me(e, n, t) {
124
+ const r = `${G[e]}/v0/status/tx`;
125
125
  try {
126
- return (await W.post(r, {
126
+ return (await O.post(r, {
127
127
  txHash: n,
128
128
  chainId: C(t)
129
129
  })).data;
@@ -141,35 +141,38 @@ function vt(e, n) {
141
141
  }
142
142
  return { referrerFee: 0n, remainingAmount: e };
143
143
  }
144
- const Ft = [
144
+ function Ft(e) {
145
+ return new Promise((n) => setTimeout(n, e));
146
+ }
147
+ const Dt = [
145
148
  { name: "gasLimit", binary: "uint", size: 16 },
146
149
  { name: "msgValue", binary: "uint", size: 16 }
147
- ], Dt = [
150
+ ], Pt = [
148
151
  { name: "dropOff", binary: "uint", size: 16 },
149
152
  { name: "recipient", ...Be }
150
- ], Pt = [
153
+ ], Mt = [
151
154
  {
152
155
  name: "request",
153
156
  binary: "switch",
154
157
  idSize: 1,
155
158
  idTag: "type",
156
159
  layouts: [
157
- [[1, "GasInstruction"], Ft],
158
- [[2, "GasDropOffInstruction"], Dt]
160
+ [[1, "GasInstruction"], Dt],
161
+ [[2, "GasDropOffInstruction"], Pt]
159
162
  ]
160
163
  }
161
- ], me = [
164
+ ], he = [
162
165
  {
163
166
  name: "requests",
164
167
  binary: "array",
165
- layout: Pt
168
+ layout: Mt
166
169
  }
167
170
  ];
168
- var he;
171
+ var le;
169
172
  (function(e) {
170
173
  e.ERM1 = "ERM1", e.ERV1 = "ERV1", e.ERN1 = "ERN1", e.ERC1 = "ERC1";
171
- })(he || (he = {}));
172
- const Mt = {
174
+ })(le || (le = {}));
175
+ const It = {
173
176
  to: (e) => new Date(Number(e * 1000n)),
174
177
  from: (e) => BigInt(e.getTime()) / 1000n
175
178
  }, Bt = [
@@ -198,7 +201,7 @@ const Mt = {
198
201
  name: "expiryTime",
199
202
  binary: "uint",
200
203
  size: 8,
201
- custom: Mt
204
+ custom: It
202
205
  },
203
206
  { name: "baseFee", binary: "uint", size: 8 },
204
207
  { name: "dstGasPrice", binary: "uint", size: 8 },
@@ -208,11 +211,11 @@ const Mt = {
208
211
  ]
209
212
  ]
210
213
  }
211
- ], we = [
214
+ ], ye = [
212
215
  ...Bt,
213
216
  { name: "signature", binary: "bytes", size: 65 }
214
217
  ];
215
- class L {
218
+ class Q {
216
219
  constructor(n, t, r, s) {
217
220
  c(this, "network");
218
221
  c(this, "chain");
@@ -222,49 +225,49 @@ class L {
222
225
  c(this, "shimContract");
223
226
  var o;
224
227
  if (this.network = n, this.chain = t, this.provider = r, this.contracts = s, n === "Devnet")
225
- throw new Error("CCTPW7Executor not supported on Devnet");
226
- const a = b.get(this.network, this.chain);
228
+ throw new Error("CCTPExecutor not supported on Devnet");
229
+ const a = w.get(this.network, this.chain);
227
230
  if (!a)
228
231
  throw new Error(`No USDC contract configured for network=${this.network} chain=${this.chain}`);
229
232
  this.usdcId = a;
230
- const i = (o = G[n]) == null ? void 0 : o[t];
233
+ const i = (o = L[n]) == null ? void 0 : o[t];
231
234
  if (!i)
232
235
  throw new Error(`Shim contract for ${t} not found`);
233
236
  this.shimContract = i;
234
237
  }
235
238
  static async fromRpc(n, t) {
236
- const [r, s] = await Ze.chainFromRpc(n), a = t[s];
239
+ const [r, s] = await Ye.chainFromRpc(n), a = t[s];
237
240
  if (!a)
238
241
  throw new Error(`No config found for ${s}`);
239
242
  if (a.network !== r)
240
243
  throw new Error(`Network mismatch: ${a.network} != ${r}`);
241
- return new L(r, s, n, a.contracts);
244
+ return new Q(r, s, n, a.contracts);
242
245
  }
243
246
  async *transfer(n, t, r) {
244
- const s = new Ye(n).unwrap(), a = oe.from(t.address.toUniversalAddress().toUint8Array()), i = oe.from(this.usdcId), o = r.remainingAmount + r.referrerFee, d = P.get(this.network, t.chain), f = s, m = s, h = [
247
+ const s = new et(n).unwrap(), a = oe.from(t.address.toUniversalAddress().toUint8Array()), i = oe.from(this.usdcId), o = r.remainingAmount + r.referrerFee, d = P.get(this.network, t.chain), u = s, m = s, l = [
245
248
  o,
246
249
  d,
247
250
  a.toString(),
248
251
  i.toString(),
249
252
  r.estimatedCost,
250
253
  C(t.chain),
251
- f,
254
+ u,
252
255
  r.signedQuote,
253
256
  r.relayInstructions,
254
257
  r.referrerFeeDbps,
255
258
  m
256
- ], u = {
259
+ ], f = {
257
260
  function: `${this.shimContract}::cctp_v1_with_executor::deposit_for_burn_entry`,
258
- functionArguments: h
261
+ functionArguments: l
259
262
  };
260
- yield this.createUnsignedTx(u, "AtposCCTPW7Executor.Transfer");
263
+ yield this.createUnsignedTx(f, "AtposCCTPExecutor.Transfer");
261
264
  }
262
265
  createUnsignedTx(n, t, r = !1) {
263
- return new tt(n, this.network, this.chain, t, r);
266
+ return new rt(n, this.network, this.chain, t, r);
264
267
  }
265
268
  }
266
- M(et, "CCTPW7Executor", L);
267
- class Q {
269
+ M(tt, "CCTPExecutor", Q);
270
+ class q {
268
271
  constructor(n, t, r, s) {
269
272
  c(this, "network");
270
273
  c(this, "chain");
@@ -274,9 +277,9 @@ class Q {
274
277
  c(this, "shimContract");
275
278
  var i;
276
279
  if (this.network = n, this.chain = t, this.provider = r, this.contracts = s, n === "Devnet")
277
- throw new Error("CCTPW7Executor not supported on Devnet");
278
- this.chainId = Ie.get(n, t);
279
- const a = (i = G[n]) == null ? void 0 : i[t];
280
+ throw new Error("CCTPExecutor not supported on Devnet");
281
+ this.chainId = ze.get(n, t);
282
+ const a = (i = L[n]) == null ? void 0 : i[t];
280
283
  if (!a)
281
284
  throw new Error(`Shim contract for ${t} not found`);
282
285
  this.shimContract = a;
@@ -285,17 +288,17 @@ class Q {
285
288
  const [r, s] = await ce.chainFromRpc(n), a = t[s];
286
289
  if (a.network !== r)
287
290
  throw new Error(`Network mismatch: ${a.network} != ${r}`);
288
- return new Q(r, s, n, a.contracts);
291
+ return new q(r, s, n, a.contracts);
289
292
  }
290
293
  async *transfer(n, t, r) {
291
- const s = new ze(n).toString(), a = t.address.toUniversalAddress().toUint8Array(), i = r.remainingAmount + r.referrerFee, o = b.get(this.network, this.chain), d = ce.getTokenImplementation(this.provider, o);
294
+ const s = new Te(n).toString(), a = t.address.toUniversalAddress().toUint8Array(), i = r.remainingAmount + r.referrerFee, o = w.get(this.network, this.chain), d = ce.getTokenImplementation(this.provider, o);
292
295
  if (await d.allowance(s, this.shimContract) < i) {
293
- const l = await d.approve.populateTransaction(this.shimContract, i);
294
- yield this.createUnsignedTx(te(l, s), "ERC20.approve of EvmCCTPW7Executor", !1);
296
+ const g = await d.approve.populateTransaction(this.shimContract, i);
297
+ yield this.createUnsignedTx(te(g, s), "ERC20.approve of EvmCCTPExecutor", !1);
295
298
  }
296
299
  const m = [
297
300
  "function depositForBurn(uint256 amount, uint16 destinationChain, uint32 destinationDomain, bytes32 mintRecipient, address burnToken, (address refundAddress, bytes signedQuote, bytes instructions) executorArgs, (uint16 dbps, address payee) feeArgs) external payable returns (uint64 nonce)"
298
- ], u = await new rt(this.shimContract, m, this.provider).getFunction("depositForBurn").populateTransaction(i, C(t.chain), P.get(this.network, t.chain), a, o, {
301
+ ], f = await new st(this.shimContract, m, this.provider).getFunction("depositForBurn").populateTransaction(i, C(t.chain), P.get(this.network, t.chain), a, o, {
299
302
  refundAddress: s,
300
303
  signedQuote: r.signedQuote,
301
304
  instructions: r.relayInstructions
@@ -303,14 +306,14 @@ class Q {
303
306
  dbps: r.referrerFeeDbps,
304
307
  payee: r.referrer.address.toString()
305
308
  });
306
- u.value = r.estimatedCost, yield this.createUnsignedTx(te(u, s), "EvmCCTPW7Executor.depositForBurn");
309
+ f.value = r.estimatedCost, yield this.createUnsignedTx(te(f, s), "EvmCCTPExecutor.depositForBurn");
307
310
  }
308
311
  createUnsignedTx(n, t, r = !1) {
309
- return new st(Te(n, this.chainId), this.network, this.chain, t, r);
312
+ return new nt(Ue(n, this.chainId), this.network, this.chain, t, r);
310
313
  }
311
314
  }
312
- M(Ue, "CCTPW7Executor", Q);
313
- class q {
315
+ M(Re, "CCTPExecutor", q);
316
+ class W {
314
317
  constructor(n, t, r, s) {
315
318
  c(this, "network");
316
319
  c(this, "chain");
@@ -324,44 +327,44 @@ class q {
324
327
  c(this, "messageTransmitterStateId");
325
328
  c(this, "executorId");
326
329
  c(this, "executorRequestsId");
327
- var f, m, h, u;
330
+ var u, m, l, f;
328
331
  if (this.network = n, this.chain = t, this.provider = r, this.contracts = s, n === "Devnet")
329
- throw new Error("CCTPW7Executor not supported on Devnet");
330
- const a = (l, A) => {
331
- if (!l)
332
- throw new Error(A);
333
- return l;
332
+ throw new Error("CCTPExecutor not supported on Devnet");
333
+ const a = (g, h) => {
334
+ if (!g)
335
+ throw new Error(h);
336
+ return g;
334
337
  };
335
- this.usdcId = a(b.get(this.network, this.chain), `No USDC contract configured for network=${this.network} chain=${this.chain}`);
336
- const { tokenMessengerState: i, messageTransmitterState: o, usdcTreasury: d } = ot(n);
337
- this.usdcTreasuryId = d, this.tokenMessengerId = a((f = s.cctp) == null ? void 0 : f.tokenMessenger, `Circle Token Messenger contract for domain ${t} not found`), this.messageTransmitterId = a((m = s.cctp) == null ? void 0 : m.messageTransmitter, `Circle Message Transmitter contract for domain ${t} not found`), this.tokenMessengerStateId = i, this.messageTransmitterStateId = o, this.executorId = a((h = fe[n]) == null ? void 0 : h.executorId, `Executor contract for ${n} not found`), this.executorRequestsId = a((u = fe[n]) == null ? void 0 : u.executorRequestsId, `Executor requests contract for ${n} not found`);
338
+ this.usdcId = a(w.get(this.network, this.chain), `No USDC contract configured for network=${this.network} chain=${this.chain}`);
339
+ const { tokenMessengerState: i, messageTransmitterState: o, usdcTreasury: d } = ct(n);
340
+ this.usdcTreasuryId = d, this.tokenMessengerId = a((u = s.cctp) == null ? void 0 : u.tokenMessenger, `Circle Token Messenger contract for domain ${t} not found`), this.messageTransmitterId = a((m = s.cctp) == null ? void 0 : m.messageTransmitter, `Circle Message Transmitter contract for domain ${t} not found`), this.tokenMessengerStateId = i, this.messageTransmitterStateId = o, this.executorId = a((l = fe[n]) == null ? void 0 : l.executorId, `Executor contract for ${n} not found`), this.executorRequestsId = a((f = fe[n]) == null ? void 0 : f.executorRequestsId, `Executor requests contract for ${n} not found`);
338
341
  }
339
342
  static async fromRpc(n, t) {
340
343
  const [r, s] = await de.chainFromRpc(n), a = t[s];
341
344
  if (a.network !== r)
342
345
  throw new Error(`Network mismatch: ${a.network} != ${r}`);
343
- return new q(r, s, n, a.contracts);
346
+ return new W(r, s, n, a.contracts);
344
347
  }
345
348
  async *transfer(n, t, r) {
346
- const s = new nt(), a = new ct(n).unwrap(), i = P.get(this.network, t.chain), [o, ...d] = await de.getCoins(this.provider, n, this.usdcId);
349
+ const s = new at(), a = new dt(n).unwrap(), i = P.get(this.network, t.chain), [o, ...d] = await de.getCoins(this.provider, n, this.usdcId);
347
350
  if (o === void 0)
348
351
  throw new Error("No USDC in wallet");
349
- const f = s.object(o.coinObjectId);
350
- d.length > 0 && s.mergeCoins(f, d.map((p) => s.object(p.coinObjectId)));
352
+ const u = s.object(o.coinObjectId);
353
+ d.length > 0 && s.mergeCoins(u, d.map((b) => s.object(b.coinObjectId)));
351
354
  let m;
352
355
  if (r.referrerFee > 0n) {
353
- const [p, x] = s.splitCoins(f, [
356
+ const [b, E] = s.splitCoins(u, [
354
357
  r.remainingAmount,
355
358
  r.referrerFee
356
359
  ]);
357
- m = p, s.transferObjects([x], Re(r.referrer));
360
+ m = b, s.transferObjects([E], _e(r.referrer));
358
361
  } else {
359
- const [p] = s.splitCoins(f, [
362
+ const [b] = s.splitCoins(u, [
360
363
  r.remainingAmount
361
364
  ]);
362
- m = p;
365
+ m = b;
363
366
  }
364
- const [h, u] = s.moveCall({
367
+ const [l, f] = s.moveCall({
365
368
  target: `${this.tokenMessengerId}::deposit_for_burn::deposit_for_burn`,
366
369
  arguments: [
367
370
  m,
@@ -379,23 +382,23 @@ class q {
379
382
  // treasury object Treasury<USDC>
380
383
  ],
381
384
  typeArguments: [this.usdcId]
382
- }), [l] = s.moveCall({
385
+ }), [g] = s.moveCall({
383
386
  target: `${this.messageTransmitterId}::message::source_domain`,
384
- arguments: [u]
385
- }), [A] = s.moveCall({
387
+ arguments: [f]
388
+ }), [h] = s.moveCall({
386
389
  target: `${this.messageTransmitterId}::message::nonce`,
387
- arguments: [u]
390
+ arguments: [f]
388
391
  }), [y] = s.moveCall({
389
392
  target: `${this.executorRequestsId}::executor_requests::make_cctp_v1_request`,
390
- arguments: [l, A]
391
- }), [E] = s.splitCoins(s.gas, [
393
+ arguments: [g, h]
394
+ }), [x] = s.splitCoins(s.gas, [
392
395
  s.pure.u64(r.estimatedCost)
393
396
  ]);
394
397
  s.moveCall({
395
398
  target: `${this.executorId}::executor::request_execution`,
396
399
  arguments: [
397
- E,
398
- s.object(at),
400
+ x,
401
+ s.object(it),
399
402
  s.pure.u16(C(t.chain)),
400
403
  s.pure.address("0x0"),
401
404
  s.pure.address(a),
@@ -403,38 +406,38 @@ class q {
403
406
  y,
404
407
  s.pure.vector("u8", r.relayInstructions)
405
408
  ]
406
- }), yield this.createUnsignedTx(s, "SuiCCTPW7Executor.Transfer");
409
+ }), yield this.createUnsignedTx(s, "SuiCCTPExecutor.Transfer");
407
410
  }
408
411
  createUnsignedTx(n, t, r = !1) {
409
- return new ut(n, this.network, this.chain, t, r);
412
+ return new ft(n, this.network, this.chain, t, r);
410
413
  }
411
414
  }
412
- M(it, "CCTPW7Executor", q);
413
- const B = new g("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
414
- new g("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
415
- const j = new g("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
416
- new g("So11111111111111111111111111111111111111112");
417
- new g("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");
418
- class It extends Error {
415
+ M(ot, "CCTPExecutor", W);
416
+ const I = new p("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
417
+ new p("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
418
+ const j = new p("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
419
+ new p("So11111111111111111111111111111111111111112");
420
+ new p("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");
421
+ class zt extends Error {
419
422
  constructor(n) {
420
423
  super(n);
421
424
  }
422
425
  }
423
- class zt extends It {
426
+ class Tt extends zt {
424
427
  constructor() {
425
428
  super(...arguments), this.name = "TokenOwnerOffCurveError";
426
429
  }
427
430
  }
428
- var O;
431
+ var k;
429
432
  (function(e) {
430
433
  e[e.InitializeMint = 0] = "InitializeMint", e[e.InitializeAccount = 1] = "InitializeAccount", e[e.InitializeMultisig = 2] = "InitializeMultisig", e[e.Transfer = 3] = "Transfer", e[e.Approve = 4] = "Approve", e[e.Revoke = 5] = "Revoke", e[e.SetAuthority = 6] = "SetAuthority", e[e.MintTo = 7] = "MintTo", e[e.Burn = 8] = "Burn", e[e.CloseAccount = 9] = "CloseAccount", e[e.FreezeAccount = 10] = "FreezeAccount", e[e.ThawAccount = 11] = "ThawAccount", e[e.TransferChecked = 12] = "TransferChecked", e[e.ApproveChecked = 13] = "ApproveChecked", e[e.MintToChecked = 14] = "MintToChecked", e[e.BurnChecked = 15] = "BurnChecked", e[e.InitializeAccount2 = 16] = "InitializeAccount2", e[e.SyncNative = 17] = "SyncNative", e[e.InitializeAccount3 = 18] = "InitializeAccount3", e[e.InitializeMultisig2 = 19] = "InitializeMultisig2", e[e.InitializeMint2 = 20] = "InitializeMint2", e[e.GetAccountDataSize = 21] = "GetAccountDataSize", e[e.InitializeImmutableOwner = 22] = "InitializeImmutableOwner", e[e.AmountToUiAmount = 23] = "AmountToUiAmount", e[e.UiAmountToAmount = 24] = "UiAmountToAmount", e[e.InitializeMintCloseAuthority = 25] = "InitializeMintCloseAuthority", e[e.TransferFeeExtension = 26] = "TransferFeeExtension", e[e.ConfidentialTransferExtension = 27] = "ConfidentialTransferExtension", e[e.DefaultAccountStateExtension = 28] = "DefaultAccountStateExtension", e[e.Reallocate = 29] = "Reallocate", e[e.MemoTransferExtension = 30] = "MemoTransferExtension", e[e.CreateNativeMint = 31] = "CreateNativeMint", e[e.InitializeNonTransferableMint = 32] = "InitializeNonTransferableMint", e[e.InterestBearingMintExtension = 33] = "InterestBearingMintExtension", e[e.CpiGuardExtension = 34] = "CpiGuardExtension", e[e.InitializePermanentDelegate = 35] = "InitializePermanentDelegate", e[e.TransferHookExtension = 36] = "TransferHookExtension", e[e.MetadataPointerExtension = 39] = "MetadataPointerExtension";
431
- })(O || (O = {}));
432
- function Tt(e, n, t) {
434
+ })(k || (k = {}));
435
+ function Ut(e, n, t) {
433
436
  if (t.length) {
434
437
  e.push({ pubkey: n, isSigner: !1, isWritable: !1 });
435
438
  for (const r of t)
436
439
  e.push({
437
- pubkey: r instanceof g ? r : r.publicKey,
440
+ pubkey: r instanceof p ? r : r.publicKey,
438
441
  isSigner: !0,
439
442
  isWritable: !1
440
443
  });
@@ -442,32 +445,32 @@ function Tt(e, n, t) {
442
445
  e.push({ pubkey: n, isSigner: !0, isWritable: !1 });
443
446
  return e;
444
447
  }
445
- const Ut = pe([
448
+ const Rt = be([
446
449
  re("mintAuthorityOption"),
447
450
  ue("mintAuthority"),
448
451
  Ae("supply"),
449
- be("decimals"),
450
- ht("isInitialized"),
452
+ we("decimals"),
453
+ lt("isInitialized"),
451
454
  re("freezeAuthorityOption"),
452
455
  ue("freezeAuthority")
453
456
  ]);
454
- Ut.span;
455
- function le(e, n, t = !1, r = B, s = j) {
456
- if (!t && !g.isOnCurve(n.toBuffer()))
457
- throw new zt();
458
- const [a] = g.findProgramAddressSync([n.toBuffer(), r.toBuffer(), e.toBuffer()], s);
457
+ Rt.span;
458
+ function ge(e, n, t = !1, r = I, s = j) {
459
+ if (!t && !p.isOnCurve(n.toBuffer()))
460
+ throw new Tt();
461
+ const [a] = p.findProgramAddressSync([n.toBuffer(), r.toBuffer(), e.toBuffer()], s);
459
462
  return a;
460
463
  }
461
- function Rt(e, n, t, r, s = B, a = j) {
462
- return _t(e, n, t, r, D.Buffer.from([1]), s, a);
464
+ function _t(e, n, t, r, s = I, a = j) {
465
+ return Nt(e, n, t, r, D.Buffer.from([1]), s, a);
463
466
  }
464
- function _t(e, n, t, r, s, a = B, i = j) {
467
+ function Nt(e, n, t, r, s, a = I, i = j) {
465
468
  const o = [
466
469
  { pubkey: e, isSigner: !0, isWritable: !0 },
467
470
  { pubkey: n, isSigner: !1, isWritable: !0 },
468
471
  { pubkey: t, isSigner: !1, isWritable: !1 },
469
472
  { pubkey: r, isSigner: !1, isWritable: !1 },
470
- { pubkey: _e.programId, isSigner: !1, isWritable: !1 },
473
+ { pubkey: Ne.programId, isSigner: !1, isWritable: !1 },
471
474
  { pubkey: a, isSigner: !1, isWritable: !1 }
472
475
  ];
473
476
  return new Ce({
@@ -476,18 +479,18 @@ function _t(e, n, t, r, s, a = B, i = j) {
476
479
  data: s
477
480
  });
478
481
  }
479
- const ge = pe([be("instruction"), Ae("amount")]);
480
- function Nt(e, n, t, r, s = [], a = B) {
481
- const i = Tt([
482
+ const pe = be([we("instruction"), Ae("amount")]);
483
+ function $t(e, n, t, r, s = [], a = I) {
484
+ const i = Ut([
482
485
  { pubkey: e, isSigner: !1, isWritable: !0 },
483
486
  { pubkey: n, isSigner: !1, isWritable: !0 }
484
- ], t, s), o = D.Buffer.alloc(ge.span);
485
- return ge.encode({
486
- instruction: O.Transfer,
487
+ ], t, s), o = D.Buffer.alloc(pe.span);
488
+ return pe.encode({
489
+ instruction: k.Transfer,
487
490
  amount: BigInt(r)
488
491
  }, o), new Ce({ keys: i, programId: a, data: o });
489
492
  }
490
- const $t = {
493
+ const kt = {
491
494
  version: "0.1.0",
492
495
  name: "example_cctp_with_executor",
493
496
  instructions: [
@@ -569,60 +572,60 @@ class V {
569
572
  c(this, "executorProgramId");
570
573
  var i, o, d;
571
574
  if (this.network = n, this.chain = t, this.connection = r, this.contracts = s, n === "Devnet")
572
- throw new Error("CCTPW7Executor not supported on Devnet");
573
- const a = (f, m) => {
574
- if (!f)
575
+ throw new Error("CCTPExecutor not supported on Devnet");
576
+ const a = (u, m) => {
577
+ if (!u)
575
578
  throw new Error(m);
576
- return new g(f);
579
+ return new p(u);
577
580
  };
578
- this.tokenMessengerProgramId = a((i = s.cctp) == null ? void 0 : i.tokenMessenger, `Circle Token Messenger contract for domain ${t} not found`), this.messageTransmitterProgramId = a((o = s.cctp) == null ? void 0 : o.messageTransmitter, `Circle Message Transmitter contract for domain ${t} not found`), this.shimProgramId = a((d = G[n]) == null ? void 0 : d[t], `Shim contract for ${t} not found`), this.executorProgramId = a(bt[n], `Executor contract for ${n} not found`);
581
+ this.tokenMessengerProgramId = a((i = s.cctp) == null ? void 0 : i.tokenMessenger, `Circle Token Messenger contract for domain ${t} not found`), this.messageTransmitterProgramId = a((o = s.cctp) == null ? void 0 : o.messageTransmitter, `Circle Message Transmitter contract for domain ${t} not found`), this.shimProgramId = a((d = L[n]) == null ? void 0 : d[t], `Shim contract for ${t} not found`), this.executorProgramId = a(wt[n], `Executor contract for ${n} not found`);
579
582
  }
580
583
  static async fromRpc(n, t) {
581
- const [r, s] = await lt.chainFromRpc(n), a = t[s];
584
+ const [r, s] = await gt.chainFromRpc(n), a = t[s];
582
585
  if (a.network !== r)
583
586
  throw new Error(`Network mismatch: ${a.network} != ${r}`);
584
587
  return new V(r, s, n, a.contracts);
585
588
  }
586
589
  async *transfer(n, t, r) {
587
- const s = new g(b.get(this.network, this.chain)), a = new N(n).unwrap(), i = le(s, a), o = new N(r.referrer.address).unwrap(), d = new Ne();
590
+ const s = new p(w.get(this.network, this.chain)), a = new N(n).unwrap(), i = ge(s, a), o = new N(r.referrer.address).unwrap(), d = new $e();
588
591
  if (d.feePayer = a, r.referrerFee > 0n) {
589
- const y = le(s, o);
590
- await this.connection.getAccountInfo(y) || d.add(Rt(a, y, o, s)), d.add(Nt(i, y, a, r.referrerFee));
592
+ const y = ge(s, o);
593
+ await this.connection.getAccountInfo(y) || d.add(_t(a, y, o, s)), d.add($t(i, y, a, r.referrerFee));
591
594
  }
592
- const f = P.get(this.network, t.chain), m = t.address.toUniversalAddress(), h = $e.generate();
593
- d.add(await ft(this.messageTransmitterProgramId, this.tokenMessengerProgramId, s, f, a, i, m, r.remainingAmount, h.publicKey));
594
- const u = new mt($t, this.shimProgramId, { connection: null }), l = $(we, r.signedQuote), A = pt("message_transmitter", this.messageTransmitterProgramId);
595
- d.add(await u.methods.relayLastMessage({
595
+ const u = P.get(this.network, t.chain), m = t.address.toUniversalAddress(), l = ke.generate();
596
+ d.add(await mt(this.messageTransmitterProgramId, this.tokenMessengerProgramId, s, u, a, i, m, r.remainingAmount, l.publicKey));
597
+ const f = new ht(kt, this.shimProgramId, { connection: null }), g = $(ye, r.signedQuote), h = bt("message_transmitter", this.messageTransmitterProgramId);
598
+ d.add(await f.methods.relayLastMessage({
596
599
  execAmount: new Oe(r.estimatedCost.toString()),
597
600
  recipientChain: C(t.chain),
598
601
  signedQuoteBytes: D.Buffer.from(r.signedQuote),
599
602
  relayInstructions: D.Buffer.from(r.relayInstructions)
600
603
  }).accounts({
601
604
  payer: a,
602
- messageTransmitter: A,
603
- payee: new g(l.quote.payeeAddress),
605
+ messageTransmitter: h,
606
+ payee: new p(g.quote.payeeAddress),
604
607
  executorProgram: this.executorProgramId
605
- }).instruction()), yield this.createUnsignedTx({ transaction: d, signers: [h] }, "SvmCCTPW7Executor.Transfer");
608
+ }).instruction()), yield this.createUnsignedTx({ transaction: d, signers: [l] }, "SvmCCTPExecutor.Transfer");
606
609
  }
607
610
  createUnsignedTx(n, t, r = !1) {
608
- return new gt(n, this.network, this.chain, t, r);
611
+ return new pt(n, this.network, this.chain, t, r);
609
612
  }
610
613
  }
611
- M(We, "CCTPW7Executor", V);
614
+ M(Ge, "CCTPExecutor", V);
612
615
  let v;
613
- function ar(e) {
616
+ function ir(e) {
614
617
  if (e.referrerFeeDbps < 0 || e.referrerFeeDbps > 65535n)
615
618
  throw new Error("Referrer fee must be between 0 and 65535");
616
619
  class n extends F {
617
620
  }
618
621
  return c(n, "config", e), n;
619
622
  }
620
- class F extends ke {
623
+ class F extends Le {
621
624
  constructor() {
622
625
  super(...arguments);
623
626
  // @ts-ignore
624
627
  // Since we set the config on the static class, access it with this param
625
- // the CCTPW7ExecutorRoute.config will always be empty
628
+ // the CCTPExecutorRoute.config will always be empty
626
629
  c(this, "staticConfig", this.constructor.config);
627
630
  }
628
631
  static supportedNetworks() {
@@ -632,12 +635,12 @@ class F extends ke {
632
635
  return se.has(t) ? se.get(t) : [];
633
636
  }
634
637
  static async supportedDestinationTokens(t, r, s) {
635
- const a = b.get(r.network, r.chain);
636
- if (!(a && Ge(t, S.tokenId(r.chain, a))))
638
+ const a = w.get(r.network, r.chain);
639
+ if (!(a && Qe(t, S.tokenId(r.chain, a))))
637
640
  return [];
638
641
  const { network: i, chain: o } = s;
639
- return b.has(i, o) ? [
640
- S.chainAddress(o, b.get(i, o))
642
+ return w.has(i, o) ? [
643
+ S.chainAddress(o, w.get(i, o))
641
644
  ] : [];
642
645
  }
643
646
  getDefaultOptions() {
@@ -662,69 +665,69 @@ class F extends ke {
662
665
  async quote(t, r) {
663
666
  var Z, Y;
664
667
  const { fromChain: s, toChain: a } = t;
665
- if (!b.get(s.network, s.chain))
668
+ if (!w.get(s.network, s.chain))
666
669
  throw new Error("Invalid transfer, no USDC contract on source");
667
- const o = b.get(a.network, a.chain);
670
+ const o = w.get(a.network, a.chain);
668
671
  if (!o)
669
672
  throw new Error("Invalid transfer, no USDC contract on destination");
670
- const d = (Z = wt[s.network]) == null ? void 0 : Z[s.chain];
673
+ const d = (Z = yt[s.network]) == null ? void 0 : Z[s.chain];
671
674
  if (!d)
672
675
  return {
673
676
  success: !1,
674
677
  error: new Error("No referrer address found")
675
678
  };
676
- const f = S.chainAddress(s.chain, d), m = this.staticConfig.referrerFeeDbps, { referrerFee: h, remainingAmount: u } = vt(Le(r.normalizedParams.amount), this.staticConfig.referrerFeeDbps);
677
- if (u <= 0n)
679
+ const u = S.chainAddress(s.chain, d), m = this.staticConfig.referrerFeeDbps, { referrerFee: l, remainingAmount: f } = vt(qe(r.normalizedParams.amount), this.staticConfig.referrerFeeDbps);
680
+ if (f <= 0n)
678
681
  return {
679
682
  success: !1,
680
683
  error: new Error("Amount after fee <= 0")
681
684
  };
682
- const l = (Y = At[s.network]) == null ? void 0 : Y[a.chain];
683
- if (!l)
685
+ const g = (Y = At[s.network]) == null ? void 0 : Y[a.chain];
686
+ if (!g)
684
687
  return {
685
688
  success: !1,
686
689
  error: new Error("Gas limit not found")
687
690
  };
688
- const A = await yt(s.network);
689
- if (!A[C(s.chain)])
691
+ const h = await xt(s.network);
692
+ if (!h[C(s.chain)])
690
693
  return {
691
694
  success: !1,
692
695
  error: new Error("Unsupported source chain")
693
696
  };
694
- const E = A[C(a.chain)];
695
- if (!E || !E.requestPrefixes.includes("ERC1"))
697
+ const x = h[C(a.chain)];
698
+ if (!x || !x.requestPrefixes.includes("ERC1"))
696
699
  return {
697
700
  success: !1,
698
701
  error: new Error("Unsupported destination chain")
699
702
  };
700
- const { recipient: p } = t;
701
- let x = !0;
702
- if (p && a.chain === "Solana") {
703
- const Fe = S.parseAddress("Solana", o), De = await a.getTokenAccount(p.address, Fe), ee = await a.getRpc();
704
- x = await ee.getAccountInfo(new N(De.address).unwrap()) !== null, !x && !v && (v = BigInt(await ee.getMinimumBalanceForRentExemption(165)));
703
+ const { recipient: b } = t;
704
+ let E = !0;
705
+ if (b && a.chain === "Solana") {
706
+ const De = S.parseAddress("Solana", o), Pe = await a.getTokenAccount(b.address, De), ee = await a.getRpc();
707
+ E = await ee.getAccountInfo(new N(Pe.address).unwrap()) !== null, !E && !v && (v = BigInt(await ee.getMinimumBalanceForRentExemption(165)));
705
708
  }
706
- let I = 0n;
707
- a.chain === "Solana" && (I += Ct, !x && v && (I += v));
709
+ let B = 0n;
710
+ a.chain === "Solana" && (B += Ct, !E && v && (B += v));
708
711
  const z = [];
709
712
  z.push({
710
713
  request: {
711
714
  type: "GasInstruction",
712
- gasLimit: l,
713
- msgValue: I
715
+ gasLimit: g,
716
+ msgValue: B
714
717
  }
715
718
  });
716
- const K = BigInt(E.gasDropOffLimit), T = r.options.nativeGas && K > 0n ? BigInt(Math.round(r.options.nativeGas * 100)) * K / 100n : 0n;
717
- (T > 0n || !x) && z.push({
719
+ const K = BigInt(x.gasDropOffLimit), T = r.options.nativeGas && K > 0n ? BigInt(Math.round(r.options.nativeGas * 100)) * K / 100n : 0n;
720
+ (T > 0n || !E) && z.push({
718
721
  request: {
719
722
  type: "GasDropOffInstruction",
720
723
  dropOff: T,
721
724
  // If the recipient is undefined (e.g. the user hasn’t connected their wallet yet),
722
725
  // we temporarily use a dummy address to fetch a quote.
723
726
  // The recipient address is validated later in the `initiate` method, which will throw if it's still missing.
724
- recipient: p ? p.address.toUniversalAddress() : new Qe(new Uint8Array(32))
727
+ recipient: b ? b.address.toUniversalAddress() : new We(new Uint8Array(32))
725
728
  }
726
729
  });
727
- const X = qe(me, {
730
+ const X = je(he, {
728
731
  requests: z
729
732
  }), U = await Et(s.network, s.chain, a.chain, ne.encode(X, !0));
730
733
  if (!U.estimatedCost)
@@ -732,15 +735,15 @@ class F extends ke {
732
735
  success: !1,
733
736
  error: new Error("No estimated cost")
734
737
  };
735
- const J = ne.decode(U.signedQuote), ye = $(we, J), Ee = s.chain === "Polygon" ? 2e3 * 200 : je(s.chain) + 1e3, H = BigInt(U.estimatedCost), xe = {
738
+ const J = ne.decode(U.signedQuote), xe = $(ye, J), Ee = s.chain === "Polygon" ? 2e3 * 200 : Ve(s.chain) + 1e3, H = BigInt(U.estimatedCost), Se = {
736
739
  signedQuote: J,
737
740
  relayInstructions: X,
738
741
  estimatedCost: H,
739
- referrer: f,
740
- referrerFee: h,
741
- remainingAmount: u,
742
+ referrer: u,
743
+ referrerFee: l,
744
+ remainingAmount: f,
742
745
  referrerFeeDbps: m
743
- }, [Se, ve] = await Promise.all([
746
+ }, [ve, Fe] = await Promise.all([
744
747
  s.getDecimals("native"),
745
748
  a.getDecimals("native")
746
749
  ]);
@@ -753,37 +756,48 @@ class F extends ke {
753
756
  },
754
757
  destinationToken: {
755
758
  token: t.destination.id,
756
- amount: R(u, t.destination.decimals)
759
+ amount: R(f, t.destination.decimals)
757
760
  },
758
761
  relayFee: {
759
- token: Ve(s.chain),
760
- amount: R(H, Se)
762
+ token: Ke(s.chain),
763
+ amount: R(H, ve)
761
764
  },
762
- destinationNativeGas: R(T, ve),
765
+ destinationNativeGas: R(T, Fe),
763
766
  eta: Ee,
764
- expires: ye.quote.expiryTime,
765
- details: xe
767
+ expires: xe.quote.expiryTime,
768
+ details: Se
766
769
  };
767
770
  }
768
771
  async initiate(t, r, s, a) {
769
772
  if (!s.details)
770
773
  throw new Error("Missing quote details");
771
- $(me, s.details.relayInstructions).requests.forEach(({ request: u }) => {
772
- if (u.type === "GasDropOffInstruction" && !u.recipient.equals(a.address.toUniversalAddress()))
774
+ $(he, s.details.relayInstructions).requests.forEach(({ request: h }) => {
775
+ if (h.type === "GasDropOffInstruction" && !h.recipient.equals(a.address.toUniversalAddress()))
773
776
  throw new Error("Gas drop-off recipient does not match");
774
777
  });
775
- const o = await t.fromChain.getProtocol("CCTPW7Executor"), d = S.parseAddress(r.chain(), r.address());
776
- let f = a;
778
+ const o = await t.fromChain.getProtocol("CCTPExecutor"), d = S.parseAddress(r.chain(), r.address());
779
+ let u = a;
777
780
  if (a.chain === "Solana") {
778
- const u = S.parseAddress("Solana", b.get(t.toChain.network, t.toChain.chain));
779
- f = await t.toChain.getTokenAccount(a.address, u);
781
+ const h = S.parseAddress("Solana", w.get(t.toChain.network, t.toChain.chain));
782
+ u = await t.toChain.getTokenAccount(a.address, h);
780
783
  }
781
- const m = await o.transfer(d, f, s.details), h = await Ke(t.fromChain, m, r);
782
- return {
784
+ const m = await o.transfer(d, u, s.details), l = await Xe(t.fromChain, m, r);
785
+ let f = 0;
786
+ return (async () => {
787
+ for (; f < 20; ) {
788
+ try {
789
+ const [h] = await me(this.wh.network, l.at(-1).txid, t.fromChain.chain);
790
+ if (h)
791
+ break;
792
+ } catch {
793
+ }
794
+ f++, await Ft(2e3);
795
+ }
796
+ })(), {
783
797
  from: t.fromChain.chain,
784
798
  to: t.toChain.chain,
785
799
  state: _.SourceInitiated,
786
- originTxs: h
800
+ originTxs: l
787
801
  };
788
802
  }
789
803
  async *track(t, r) {
@@ -792,20 +806,20 @@ class F extends ke {
792
806
  let s = r || 60 * 60 * 1e3;
793
807
  for (; s > 0; ) {
794
808
  const a = Date.now();
795
- if (Xe(t) || Je(t) || He(t))
809
+ if (Je(t) || He(t) || Ze(t))
796
810
  try {
797
- const [i] = await xt(this.wh.network, t.originTxs.at(-1).txid, t.from);
811
+ const [i] = await me(this.wh.network, t.originTxs.at(-1).txid, t.from);
798
812
  if (!i)
799
813
  throw new Error("No transaction status found");
800
814
  const o = i == null ? void 0 : i.status;
801
- if ((o === w.Failed || // this could happen if simulation fails
802
- o === w.Underpaid || // only happens if you don't pay at least the costEstimate
803
- o === w.Unsupported || // capabilities check didn't pass
804
- o === w.Aborted) && (t = {
815
+ if ((o === A.Failed || // this could happen if simulation fails
816
+ o === A.Underpaid || // only happens if you don't pay at least the costEstimate
817
+ o === A.Unsupported || // capabilities check didn't pass
818
+ o === A.Aborted) && (t = {
805
819
  ...t,
806
820
  state: _.Failed,
807
- error: new dt(`Relay failed with status: ${o}`)
808
- }), o === w.Submitted && (t = {
821
+ error: new ut(`Relay failed with status: ${o}`)
822
+ }), o === A.Submitted && (t = {
809
823
  ...t,
810
824
  state: _.DestinationFinalized,
811
825
  attestation: { id: i.id, attestation: {} }
@@ -820,9 +834,9 @@ class F extends ke {
820
834
  }
821
835
  }
822
836
  c(F, "NATIVE_GAS_DROPOFF_SUPPORTED", !0), c(F, "config", { referrerFeeDbps: 0n }), c(F, "meta", {
823
- name: "CCTPW7ExecutorRoute",
824
- provider: "W7 Executor"
837
+ name: "CCTPExecutorRoute",
838
+ provider: "Circle"
825
839
  });
826
840
  export {
827
- ar as cctpW7ExecutorRoute
841
+ ir as cctpExecutorRoute
828
842
  };