@argonprotocol/testing 1.4.11 → 1.4.12-dev.2afa6e4a

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/lib/index.cjs CHANGED
@@ -53,6 +53,7 @@ __export(index_exports, {
53
53
  signGatewayPermit: () => signGatewayPermit,
54
54
  startNetwork: () => startNetwork,
55
55
  stringifyExt: () => stringifyExt,
56
+ submitTx: () => submitTx,
56
57
  sudo: () => sudo,
57
58
  syncEthereumVerifierUntilAnchorCovers: () => syncEthereumVerifierUntilAnchorCovers,
58
59
  teardown: () => teardown,
@@ -62,13 +63,13 @@ __export(index_exports, {
62
63
  waitForFinalizedBeaconExecutionAtOrAbove: () => waitForFinalizedBeaconExecutionAtOrAbove
63
64
  });
64
65
  module.exports = __toCommonJS(index_exports);
65
- var import_mainchain8 = require("@argonprotocol/mainchain");
66
+ var import_mainchain9 = require("@argonprotocol/mainchain");
66
67
 
67
68
  // src/TestNotary.ts
68
69
  var import_nanoid = require("nanoid");
69
70
  var import_pg = __toESM(require("pg"), 1);
70
71
  var child_process2 = __toESM(require("child_process"), 1);
71
- var import_mainchain = require("@argonprotocol/mainchain");
72
+ var import_mainchain2 = require("@argonprotocol/mainchain");
72
73
  var fs = __toESM(require("fs"), 1);
73
74
  var readline = __toESM(require("readline"), 1);
74
75
 
@@ -170,6 +171,48 @@ function disconnectOnTeardown(closeable) {
170
171
  // src/TestNotary.ts
171
172
  var process3 = __toESM(require("process"), 1);
172
173
  var Path2 = __toESM(require("path"), 1);
174
+
175
+ // src/submitTx.ts
176
+ var import_mainchain = require("@argonprotocol/mainchain");
177
+ function submitTx(client, tx, signer) {
178
+ return new Promise((resolve3, reject) => {
179
+ let unsubscribe;
180
+ let completed = false;
181
+ const finish = (callback) => {
182
+ completed = true;
183
+ unsubscribe?.();
184
+ callback();
185
+ };
186
+ tx.signAndSend(signer, (result) => {
187
+ if (completed) return;
188
+ if (result.status.isDropped || result.status.isInvalid || result.status.isUsurped) {
189
+ finish(() => reject(new Error(`Transaction ${result.status.type.toLowerCase()}`)));
190
+ return;
191
+ }
192
+ if (!result.status.isInBlock) return;
193
+ void (0, import_mainchain.checkForExtrinsicSuccess)(result.events, client).then(
194
+ () => {
195
+ const feePaid = result.events.find(
196
+ ({ event }) => client.events.transactionPayment.TransactionFeePaid.is(event)
197
+ );
198
+ finish(
199
+ () => resolve3({
200
+ blockHash: result.status.asInBlock.toHex(),
201
+ events: result.events.map(({ event }) => event),
202
+ finalFee: feePaid && client.events.transactionPayment.TransactionFeePaid.is(feePaid.event) ? feePaid.event.data.actualFee.toBigInt() : void 0
203
+ })
204
+ );
205
+ },
206
+ (error) => finish(() => reject(error))
207
+ );
208
+ }).then((stop) => {
209
+ unsubscribe = stop;
210
+ if (completed) unsubscribe();
211
+ }).catch((error) => finish(() => reject(error)));
212
+ });
213
+ }
214
+
215
+ // src/TestNotary.ts
173
216
  var { Client: PgClient } = import_pg.default;
174
217
  var nanoid = (0, import_nanoid.customAlphabet)("0123456789abcdefghijklmnopqrstuvwxyz", 4);
175
218
  function createUid() {
@@ -203,8 +246,8 @@ var TestNotary = class {
203
246
  */
204
247
  async start(options) {
205
248
  const { pathToNotaryBin, uuid, mainchainUrl } = options;
206
- this.operator = new import_mainchain.Keyring({ type: "sr25519" }).createFromUri("//Bob");
207
- this.registeredPublicKey = new import_mainchain.Keyring({ type: "ed25519" }).createFromUri(
249
+ this.operator = new import_mainchain2.Keyring({ type: "sr25519" }).createFromUri("//Bob");
250
+ this.registeredPublicKey = new import_mainchain2.Keyring({ type: "ed25519" }).createFromUri(
208
251
  "//Ferdie//notary"
209
252
  ).publicKey;
210
253
  let notaryPath = pathToNotaryBin ?? Path2.join(projectRoot(), "target/debug/argon-notary");
@@ -302,7 +345,7 @@ var TestNotary = class {
302
345
  }
303
346
  async register(client) {
304
347
  const address = new URL(this.address);
305
- const result = await new import_mainchain.TxSubmitter(
348
+ await submitTx(
306
349
  client,
307
350
  client.tx.notaries.propose({
308
351
  public: this.registeredPublicKey,
@@ -310,8 +353,7 @@ var TestNotary = class {
310
353
  name: "Test Notary"
311
354
  }),
312
355
  this.operator
313
- ).submit();
314
- await result.waitForInFirstBlock;
356
+ );
315
357
  }
316
358
  async teardown() {
317
359
  this.#childProcess?.kill();
@@ -349,7 +391,7 @@ var readline2 = __toESM(require("readline"), 1);
349
391
  var import_detect_port = require("detect-port");
350
392
  var import_nanoid2 = require("nanoid");
351
393
  var lockfile = __toESM(require("proper-lockfile"), 1);
352
- var import_mainchain2 = require("@argonprotocol/mainchain");
394
+ var import_mainchain3 = require("@argonprotocol/mainchain");
353
395
  var nanoid2 = (0, import_nanoid2.customAlphabet)("0123456789abcdefghijklmnopqrstuvwxyz", 4);
354
396
  var lockPath = Path3.join(process.cwd(), ".port-lock");
355
397
  var TestMainchain = class {
@@ -476,7 +518,7 @@ var TestMainchain = class {
476
518
  let lastError;
477
519
  for (let attempt = 0; attempt < 20; attempt += 1) {
478
520
  try {
479
- const client = await (0, import_mainchain2.getClient)(this.address);
521
+ const client = await (0, import_mainchain3.getClient)(this.address);
480
522
  disconnectOnTeardown(client);
481
523
  return client;
482
524
  } catch (error) {
@@ -625,7 +667,7 @@ var BitcoinRpcClient = class {
625
667
 
626
668
  // src/TestOracle.ts
627
669
  var child_process3 = __toESM(require("child_process"), 1);
628
- var import_mainchain3 = require("@argonprotocol/mainchain");
670
+ var import_mainchain4 = require("@argonprotocol/mainchain");
629
671
  var fs3 = __toESM(require("fs"), 1);
630
672
  var readline3 = __toESM(require("readline"), 1);
631
673
  var process4 = __toESM(require("process"), 1);
@@ -643,7 +685,7 @@ var TestOracle = class _TestOracle {
643
685
  async start(service, options) {
644
686
  const { pathToBin, mainchainUrl, bitcoinRpcUrl } = options;
645
687
  const operatorSuri = service == "bitcoin" ? _TestOracle.BitcoinOperator : _TestOracle.PriceIndexOperator;
646
- this.operator = new import_mainchain3.Keyring({ type: "sr25519" }).createFromUri(operatorSuri);
688
+ this.operator = new import_mainchain4.Keyring({ type: "sr25519" }).createFromUri(operatorSuri);
647
689
  const binPath = pathToBin ?? Path4.join(projectRoot(), "target/debug/argon-oracle");
648
690
  if (!fs3.existsSync(binPath)) {
649
691
  throw new Error(`Oracle binary not found at ${binPath}`);
@@ -684,7 +726,7 @@ var os = __toESM(require("os"), 1);
684
726
  var Path5 = __toESM(require("path"), 1);
685
727
  var import_node_child_process2 = require("child_process");
686
728
  var import_detect_port2 = require("detect-port");
687
- var import_mainchain4 = require("@argonprotocol/mainchain");
729
+ var import_mainchain5 = require("@argonprotocol/mainchain");
688
730
  var import_accounts = require("viem/accounts");
689
731
  var import_viem = require("viem");
690
732
  var {
@@ -694,7 +736,7 @@ var {
694
736
  mintingGatewayArtifact,
695
737
  proxyAdminArtifact,
696
738
  transparentUpgradeableProxyArtifact
697
- } = import_mainchain4.EvmContracts;
739
+ } = import_mainchain5.EvmContracts;
698
740
  var DEFAULT_KURTOSIS_BIN = "kurtosis";
699
741
  var DEFAULT_ETHEREUM_PACKAGE = "github.com/ethpandaops/ethereum-package";
700
742
  var DEFAULT_EL_PORT_START = 32e3;
@@ -1171,7 +1213,7 @@ async function startNetwork(testName, options) {
1171
1213
  }
1172
1214
 
1173
1215
  // src/EthereumE2eUtils.ts
1174
- var import_mainchain5 = require("@argonprotocol/mainchain");
1216
+ var import_mainchain6 = require("@argonprotocol/mainchain");
1175
1217
  var import_viem2 = require("viem");
1176
1218
  async function signGatewayPermit(args) {
1177
1219
  const signature = (0, import_viem2.parseSignature)(
@@ -1289,14 +1331,14 @@ async function syncEthereumVerifierUntilAnchorCovers(mainchainClient, relayer, b
1289
1331
  let lastAnchorBlockNumber;
1290
1332
  while (Date.now() - startedAt < timeoutMs) {
1291
1333
  try {
1292
- const anchor = await (0, import_mainchain5.getLatestArgonFinalizedExecutionHeader)(mainchainClient);
1334
+ const anchor = await (0, import_mainchain6.getLatestArgonFinalizedExecutionHeader)(mainchainClient);
1293
1335
  lastAnchorBlockNumber = anchor.blockNumber;
1294
1336
  if (anchor.blockNumber >= minimumExecutionBlockNumber) {
1295
1337
  return;
1296
1338
  }
1297
1339
  } catch {
1298
1340
  }
1299
- const txs = await (0, import_mainchain5.getNextEthereumBeaconSyncTxs)(mainchainClient, beaconApiUrl);
1341
+ const txs = await (0, import_mainchain6.getNextEthereumBeaconSyncTxs)(mainchainClient, beaconApiUrl);
1300
1342
  if (txs.length === 0) {
1301
1343
  await delay2(500);
1302
1344
  continue;
@@ -1304,8 +1346,7 @@ async function syncEthereumVerifierUntilAnchorCovers(mainchainClient, relayer, b
1304
1346
  let shouldRetry = false;
1305
1347
  for (const tx of txs) {
1306
1348
  try {
1307
- const result = await new import_mainchain5.TxSubmitter(mainchainClient, tx, relayer).submit();
1308
- await result.waitForInFirstBlock;
1349
+ await submitTx(mainchainClient, tx, relayer);
1309
1350
  lastRetryableError = void 0;
1310
1351
  } catch (error) {
1311
1352
  if (isRetryableEthereumVerifierSyncError(error)) {
@@ -1325,35 +1366,35 @@ async function syncEthereumVerifierUntilAnchorCovers(mainchainClient, relayer, b
1325
1366
  );
1326
1367
  }
1327
1368
  function toArgonKeccakSignature(signature) {
1328
- const bytes = (0, import_mainchain5.hexToU8a)(signature);
1369
+ const bytes = (0, import_mainchain6.hexToU8a)(signature);
1329
1370
  if (bytes.length !== 65) {
1330
1371
  throw new Error(`Expected 65-byte ECDSA signature, received ${bytes.length} bytes`);
1331
1372
  }
1332
1373
  if (bytes[64] >= 27) {
1333
1374
  bytes[64] -= 27;
1334
1375
  }
1335
- return (0, import_mainchain5.u8aToHex)(bytes);
1376
+ return (0, import_mainchain6.u8aToHex)(bytes);
1336
1377
  }
1337
1378
  function toEvmRecoverableSignature(signature) {
1338
- const bytes = (0, import_mainchain5.hexToU8a)(signature);
1379
+ const bytes = (0, import_mainchain6.hexToU8a)(signature);
1339
1380
  if (bytes.length !== 65) {
1340
1381
  throw new Error(`Expected 65-byte ECDSA signature, received ${bytes.length} bytes`);
1341
1382
  }
1342
1383
  if (bytes[64] <= 1) {
1343
1384
  bytes[64] += 27;
1344
1385
  }
1345
- return (0, import_mainchain5.u8aToHex)(bytes);
1386
+ return (0, import_mainchain6.u8aToHex)(bytes);
1346
1387
  }
1347
1388
  function isRetryableEthereumVerifierSyncError(error) {
1348
1389
  const message = error instanceof Error ? error.message : String(error);
1349
- return (0, import_mainchain5.isOutdatedTransactionError)(error) || message.includes("ethereumVerifier.InvalidHeaderMerkleProof");
1390
+ return (0, import_mainchain6.isOutdatedTransactionError)(error) || message.includes("ethereumVerifier.InvalidHeaderMerkleProof");
1350
1391
  }
1351
1392
  async function delay2(ms) {
1352
1393
  await new Promise((resolve3) => setTimeout(resolve3, ms));
1353
1394
  }
1354
1395
 
1355
1396
  // src/EthereumGatewayQueue.ts
1356
- var import_mainchain6 = require("@argonprotocol/mainchain");
1397
+ var import_mainchain7 = require("@argonprotocol/mainchain");
1357
1398
  var import_viem3 = require("viem");
1358
1399
  var {
1359
1400
  encodeMintingGatewayGlobalIssuanceCouncilRotateTarget,
@@ -1366,7 +1407,7 @@ var {
1366
1407
  hashMintingGatewayRotateGlobalIssuanceCouncilApproval,
1367
1408
  mintingGatewayAbi,
1368
1409
  MINTING_GATEWAY_UPDATE_KINDS
1369
- } = import_mainchain6.EvmContracts;
1410
+ } = import_mainchain7.EvmContracts;
1370
1411
  async function getReadyEthereumGatewayUpdates(client, gatewayClient, options = {}) {
1371
1412
  const destinationChain = options.destinationChain ?? "Ethereum";
1372
1413
  const maxQueueEntries = options.maxQueueEntries ?? 100;
@@ -1639,10 +1680,10 @@ function toHexValue(value) {
1639
1680
  }
1640
1681
 
1641
1682
  // src/TestEthereumProofActors.ts
1642
- var import_mainchain7 = require("@argonprotocol/mainchain");
1683
+ var import_mainchain8 = require("@argonprotocol/mainchain");
1643
1684
  var import_accounts2 = require("viem/accounts");
1644
1685
  var import_viem4 = require("viem");
1645
- var { argonTokenAbi, mintingGatewayAbi: mintingGatewayAbi2, MINTING_GATEWAY_RUNTIME_TO_ERC20_SCALE } = import_mainchain7.EvmContracts;
1686
+ var { argonTokenAbi, mintingGatewayAbi: mintingGatewayAbi2, MINTING_GATEWAY_RUNTIME_TO_ERC20_SCALE } = import_mainchain8.EvmContracts;
1646
1687
  var MINIMAL_BOOTSTRAP_FINALIZED_SLOT = 64n;
1647
1688
  var EthereumProofE2eHarness = class _EthereumProofE2eHarness {
1648
1689
  constructor(ethereum, endpoints, mainchain, mainchainClient, deployerPrivateKey, proofRelayerUri) {
@@ -1674,9 +1715,9 @@ var EthereumProofE2eHarness = class _EthereumProofE2eHarness {
1674
1715
  chain: this.chain,
1675
1716
  transport: (0, import_viem4.http)(endpoints.executionRpcUrl)
1676
1717
  });
1677
- this.proofRelayer = new import_mainchain7.Keyring({ type: "sr25519" }).createFromUri(proofRelayerUri);
1718
+ this.proofRelayer = new import_mainchain8.Keyring({ type: "sr25519" }).createFromUri(proofRelayerUri);
1678
1719
  }
1679
- sudoSigner = new import_mainchain7.Keyring({ type: "sr25519" }).createFromUri("//Alice");
1720
+ sudoSigner = new import_mainchain8.Keyring({ type: "sr25519" }).createFromUri("//Alice");
1680
1721
  deployer;
1681
1722
  chain;
1682
1723
  publicClient;
@@ -1708,15 +1749,10 @@ var EthereumProofE2eHarness = class _EthereumProofE2eHarness {
1708
1749
  );
1709
1750
  }
1710
1751
  async submit(tx, signer) {
1711
- const result = await new import_mainchain7.TxSubmitter(this.mainchainClient, tx, signer).submit();
1712
- await result.waitForInFirstBlock;
1713
- return result;
1752
+ return submitTx(this.mainchainClient, tx, signer);
1714
1753
  }
1715
1754
  async sudoSubmit(tx) {
1716
- const result = await this.submit(
1717
- this.mainchainClient.tx.sudo.sudo(tx),
1718
- this.sudoSigner
1719
- );
1755
+ const result = await this.submit(this.mainchainClient.tx.sudo.sudo(tx.method), this.sudoSigner);
1720
1756
  const sudoEvent = result.events.find((event) => this.mainchainClient.events.sudo.Sudid.is(event));
1721
1757
  if (!sudoEvent || !this.mainchainClient.events.sudo.Sudid.is(sudoEvent)) {
1722
1758
  throw new Error("sudo did not emit sudo.Sudid");
@@ -1724,7 +1760,7 @@ var EthereumProofE2eHarness = class _EthereumProofE2eHarness {
1724
1760
  const sudoResult = sudoEvent.data[0];
1725
1761
  if (sudoResult.isErr) {
1726
1762
  throw new Error(
1727
- `sudo failed: ${(0, import_mainchain7.dispatchErrorToString)(this.mainchainClient, sudoResult.asErr)}`
1763
+ `sudo failed: ${(0, import_mainchain8.dispatchErrorToString)(this.mainchainClient, sudoResult.asErr)}`
1728
1764
  );
1729
1765
  }
1730
1766
  return result;
@@ -1738,7 +1774,7 @@ var EthereumProofE2eHarness = class _EthereumProofE2eHarness {
1738
1774
  );
1739
1775
  }
1740
1776
  async proveGatewayActivity(gatewayAddress, throughExecutionBlockNumber) {
1741
- const payload = await (0, import_mainchain7.buildGatewayActivityProofPayload)(this.mainchainClient, {
1777
+ const payload = await (0, import_mainchain8.buildGatewayActivityProofPayload)(this.mainchainClient, {
1742
1778
  executionRpcUrl: this.endpoints.executionRpcUrl,
1743
1779
  gatewayAddress,
1744
1780
  throughExecutionBlockNumber
@@ -1795,7 +1831,7 @@ var EthereumProofE2eHarness = class _EthereumProofE2eHarness {
1795
1831
  }
1796
1832
  }
1797
1833
  calls.push(
1798
- await (0, import_mainchain7.getEthereumBeaconSyncBootstrapTx)(this.mainchainClient, this.endpoints.beaconApiUrl)
1834
+ await (0, import_mainchain8.getEthereumBeaconSyncBootstrapTx)(this.mainchainClient, this.endpoints.beaconApiUrl)
1799
1835
  );
1800
1836
  const result = await this.sudoSubmit(this.mainchainClient.tx.utility.batchAll(calls));
1801
1837
  return { result };
@@ -1918,7 +1954,7 @@ var TestMintingGateway = class _TestMintingGateway {
1918
1954
  args: [
1919
1955
  batch.currentCouncil,
1920
1956
  batch.updates,
1921
- (0, import_viem4.toHex)((0, import_mainchain7.decodeAddress)(operatorAddress), { size: 32 })
1957
+ (0, import_viem4.toHex)((0, import_mainchain8.decodeAddress)(operatorAddress), { size: 32 })
1922
1958
  ]
1923
1959
  })
1924
1960
  });
@@ -1973,7 +2009,7 @@ var TestMintingGateway = class _TestMintingGateway {
1973
2009
  address: this.gatewayAddress,
1974
2010
  abi: mintingGatewayAbi2,
1975
2011
  functionName: "finalizedTransferOutOfArgonIds",
1976
- args: [import_mainchain7.EvmContracts.hashMintingGatewayTransferOutOfArgonRequest(transferRequest)]
2012
+ args: [import_mainchain8.EvmContracts.hashMintingGatewayTransferOutOfArgonRequest(transferRequest)]
1977
2013
  });
1978
2014
  }
1979
2015
  async argonBalance(address) {
@@ -1998,7 +2034,7 @@ var TestMintingGateway = class _TestMintingGateway {
1998
2034
  var TestMintingAuthorityActor = class {
1999
2035
  constructor(harness, args) {
2000
2036
  this.harness = harness;
2001
- this.operator = new import_mainchain7.Keyring({ type: "sr25519" }).createFromUri(args.operatorUri);
2037
+ this.operator = new import_mainchain8.Keyring({ type: "sr25519" }).createFromUri(args.operatorUri);
2002
2038
  this.councilSigner = (0, import_accounts2.privateKeyToAccount)(args.councilPrivateKey);
2003
2039
  this.authoritySigner = (0, import_accounts2.privateKeyToAccount)(args.authorityPrivateKey);
2004
2040
  }
@@ -2012,16 +2048,21 @@ var TestMintingAuthorityActor = class {
2012
2048
  async prepareOperator(args) {
2013
2049
  await this.harness.forceSetBalance(this.operator.address, args.freeBalance);
2014
2050
  await this.harness.forceSetOwnership(this.operator.address, args.ownershipBalance);
2015
- const vault = await import_mainchain7.Vault.create(this.harness.mainchainClient, this.operator, {
2016
- securitization: 1000000000n,
2017
- securitizationRatio: 1,
2018
- annualPercentRate: 0.05,
2019
- baseFee: 0n,
2020
- bitcoinXpub: args.bitcoinXpub,
2021
- treasuryProfitSharing: 0,
2022
- treasuryBonusProfitSharing: 0
2023
- });
2024
- await vault.getVault();
2051
+ await this.harness.submit(
2052
+ this.harness.mainchainClient.tx.vaults.create({
2053
+ terms: {
2054
+ bitcoinAnnualPercentRate: (0, import_mainchain8.toFixedNumber)(0.05, import_mainchain8.FIXED_U128_DECIMALS),
2055
+ bitcoinBaseFee: 0n,
2056
+ treasuryProfitSharing: (0, import_mainchain8.toFixedNumber)(0, import_mainchain8.PERMILL_DECIMALS),
2057
+ treasuryBonusProfitSharing: (0, import_mainchain8.toFixedNumber)(0, import_mainchain8.PERMILL_DECIMALS)
2058
+ },
2059
+ securitizationRatio: (0, import_mainchain8.toFixedNumber)(1, import_mainchain8.FIXED_U128_DECIMALS),
2060
+ securitization: 1000000000n,
2061
+ bitcoinXpubkey: (0, import_mainchain8.hexToU8a)(args.bitcoinXpubBytesHex),
2062
+ delegateAccountId: null
2063
+ }),
2064
+ this.operator
2065
+ );
2025
2066
  await this.harness.sudoSubmit(
2026
2067
  this.harness.mainchainClient.tx.priceIndex.setOperator(this.operator.address)
2027
2068
  );
@@ -2029,11 +2070,11 @@ var TestMintingAuthorityActor = class {
2029
2070
  await this.harness.submit(
2030
2071
  this.harness.mainchainClient.tx.priceIndex.submit(
2031
2072
  {
2032
- btcUsdPrice: (0, import_mainchain7.toFixedNumber)(6e4, 18),
2033
- argonotUsdPrice: (0, import_mainchain7.toFixedNumber)(1, 18),
2034
- argonUsdPrice: (0, import_mainchain7.toFixedNumber)(1, 18),
2035
- argonUsdTargetPrice: (0, import_mainchain7.toFixedNumber)(1, 18),
2036
- argonTimeWeightedAverageLiquidity: (0, import_mainchain7.toFixedNumber)(1e6, 18),
2073
+ btcUsdPrice: (0, import_mainchain8.toFixedNumber)(6e4, 18),
2074
+ argonotUsdPrice: (0, import_mainchain8.toFixedNumber)(1, 18),
2075
+ argonUsdPrice: (0, import_mainchain8.toFixedNumber)(1, 18),
2076
+ argonUsdTargetPrice: (0, import_mainchain8.toFixedNumber)(1, 18),
2077
+ argonTimeWeightedAverageLiquidity: (0, import_mainchain8.toFixedNumber)(1e6, 18),
2037
2078
  tick: currentTick.toBigInt()
2038
2079
  },
2039
2080
  null
@@ -2127,8 +2168,8 @@ var TestMintingAuthorityActor = class {
2127
2168
  await this.harness.submit(
2128
2169
  this.harness.mainchainClient.tx.crosschainTransfer.approveQueueEntries(
2129
2170
  "Ethereum",
2130
- new import_mainchain7.Vec(this.harness.mainchainClient.registry, import_mainchain7.U8aFixed.with(520), [
2131
- new import_mainchain7.U8aFixed(
2171
+ new import_mainchain8.Vec(this.harness.mainchainClient.registry, import_mainchain8.U8aFixed.with(520), [
2172
+ new import_mainchain8.U8aFixed(
2132
2173
  this.harness.mainchainClient.registry,
2133
2174
  toArgonKeccakSignature(councilApprovalSignature),
2134
2175
  520
@@ -2174,7 +2215,7 @@ var TestMintingAuthorityActor = class {
2174
2215
  mintingAuthorityTip: transfer.mintingAuthorityTip.toBigInt()
2175
2216
  };
2176
2217
  const micronotCollateral = transfer.amount.toBigInt();
2177
- const collateralizationHash = import_mainchain7.EvmContracts.hashMintingGatewayMintingAuthorization(
2218
+ const collateralizationHash = import_mainchain8.EvmContracts.hashMintingGatewayMintingAuthorization(
2178
2219
  { chainId: BigInt(this.harness.chain.id), gatewayAddress: gateway.gatewayAddress },
2179
2220
  {
2180
2221
  request: transferRequest,
@@ -2246,16 +2287,15 @@ function stringifyExt(obj) {
2246
2287
  );
2247
2288
  }
2248
2289
  function sudo() {
2249
- return new import_mainchain8.Keyring({ type: "sr25519" }).createFromUri("//Alice");
2290
+ return new import_mainchain9.Keyring({ type: "sr25519" }).createFromUri("//Alice");
2250
2291
  }
2251
2292
  async function activateNotary(sudo2, client, notary) {
2252
2293
  await notary.register(client);
2253
- const txResult = await new import_mainchain8.TxSubmitter(
2294
+ await submitTx(
2254
2295
  client,
2255
2296
  client.tx.sudo.sudo(client.tx.notaries.activate(notary.operator.publicKey)),
2256
2297
  sudo2
2257
- ).submit();
2258
- await txResult.waitForInFirstBlock;
2298
+ );
2259
2299
  }
2260
2300
  // Annotate the CommonJS export names for ESM import in node:
2261
2301
  0 && (module.exports = {
@@ -2282,6 +2322,7 @@ async function activateNotary(sudo2, client, notary) {
2282
2322
  signGatewayPermit,
2283
2323
  startNetwork,
2284
2324
  stringifyExt,
2325
+ submitTx,
2285
2326
  sudo,
2286
2327
  syncEthereumVerifierUntilAnchorCovers,
2287
2328
  teardown,