@snowbridge/registry 1.0.16-alpha.2 → 1.1.1

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.
@@ -118,7 +118,7 @@ const SNOWBRIDGE_ENV: { [env: string]: Environment } = {
118
118
  beefyContract: "0x7cfc5c8b341991993080af67d940b6ad19a010e1",
119
119
  assetHubParaId: 1000,
120
120
  bridgeHubParaId: 1002,
121
- v2_parachains: [1000],
121
+ v2_parachains: [1000, 2034],
122
122
  indexerGraphQlUrl: "https://subsquid.snowbridge.network/graphql",
123
123
  kusama: {
124
124
  assetHubParaId: 1000,
@@ -569,18 +569,15 @@ async function buildRegistry(environment: Environment): Promise<AssetRegistry> {
569
569
 
570
570
  let relayInfo: ChainProperties
571
571
  {
572
- console.log("Connecting to relaychain:", relaychainUrl)
573
572
  let provider = await ApiPromise.create({
574
573
  noInitWarn: true,
575
574
  provider: relaychainUrl.startsWith("http")
576
575
  ? new HttpProvider(relaychainUrl)
577
576
  : new WsProvider(relaychainUrl),
578
577
  })
579
- console.log("Connected to relaychain. Getting chain properties...")
580
578
  relayInfo = await (await paraImplementation(provider)).chainProperties()
581
- console.log("Got relaychain properties.")
579
+
582
580
  await provider.disconnect()
583
- console.log("Disconnected from relaychain.")
584
581
  }
585
582
 
586
583
  // Connect to all eth connections
@@ -592,13 +589,10 @@ async function buildRegistry(environment: Environment): Promise<AssetRegistry> {
592
589
  }
593
590
  } = {}
594
591
  {
595
- console.log("Connecting to Ethereum chains:", ethereumChains)
596
592
  for (const result of await Promise.all(
597
593
  Object.keys(ethereumChains).map(async (ethChain) => {
598
- console.log(`Connecting to Ethereum chain ${ethChain}: ${ethereumChains[ethChain]}`)
599
594
  let provider = ethers.getDefaultProvider(ethereumChains[ethChain])
600
595
  const network = await provider.getNetwork()
601
- console.log(`Connected to Ethereum chain ${ethChain}, network:`, network)
602
596
  return { chainId: Number(network.chainId), provider, name: network.name }
603
597
  }),
604
598
  )) {
@@ -607,7 +601,6 @@ async function buildRegistry(environment: Environment): Promise<AssetRegistry> {
607
601
  if (!(ethChainId.toString() in ethProviders)) {
608
602
  throw Error(`Cannot find ethereum chain ${ethChainId} in the list of ethereum chains.`)
609
603
  }
610
- console.log("Connected to all Ethereum chains.")
611
604
  }
612
605
 
613
606
  let pnaAssets: PNAMap = {}
@@ -617,24 +610,20 @@ async function buildRegistry(environment: Environment): Promise<AssetRegistry> {
617
610
  throw Error(`Cannot find bridge hub ${bridgeHubParaId} in the list of parachains.`)
618
611
  }
619
612
  const bridgeHubUrl = parachains[bridgeHubParaId.toString()]
620
- console.log("Connecting to Bridge Hub:", bridgeHubUrl)
621
613
  let provider = await ApiPromise.create({
622
614
  noInitWarn: true,
623
615
  provider: bridgeHubUrl.startsWith("http")
624
616
  ? new HttpProvider(bridgeHubUrl)
625
617
  : new WsProvider(bridgeHubUrl),
626
618
  })
627
- console.log("Connected to Bridge Hub. Getting chain properties...")
628
619
  bridgeHubInfo = await (await paraImplementation(provider)).chainProperties()
629
- console.log("Getting registered PNAs from Bridge Hub...")
630
620
  pnaAssets = await getRegisteredPnas(
631
621
  provider,
632
622
  ethProviders[ethChainId].provider,
633
623
  gatewayContract,
634
624
  )
635
- console.log("Got registered PNAs from Bridge Hub.")
625
+
636
626
  await provider.disconnect()
637
- console.log("Disconnected from Bridge Hub.")
638
627
  }
639
628
 
640
629
  // Connect to all substrate parachains.
@@ -642,20 +631,16 @@ async function buildRegistry(environment: Environment): Promise<AssetRegistry> {
642
631
  [paraIdKey: string]: { parachainId: number; accessor: ParachainBase }
643
632
  } = {}
644
633
  {
645
- console.log("Connecting to all substrate parachains:", parachains)
646
634
  for (const { parachainId, accessor } of await Promise.all(
647
635
  Object.keys(parachains).map(async (parachainId) => {
648
636
  const parachainUrl = parachains[parachainId]
649
- console.log(`Connecting to parachain ${parachainId}: ${parachainUrl}`)
650
637
  const provider = await ApiPromise.create({
651
638
  noInitWarn: true,
652
639
  provider: parachainUrl.startsWith("http")
653
640
  ? new HttpProvider(parachainUrl)
654
641
  : new WsProvider(parachainUrl),
655
642
  })
656
- console.log(`Connected to parachain ${parachainId}. Getting accessor...`)
657
643
  const accessor = await paraImplementation(provider, new EthersEthereumProvider())
658
- console.log(`Got accessor for parachain ${parachainId}.`)
659
644
  return { parachainId: accessor.parachainId, accessor }
660
645
  }),
661
646
  )) {
@@ -666,7 +651,6 @@ async function buildRegistry(environment: Environment): Promise<AssetRegistry> {
666
651
  `Could not resolve asset hub para id ${assetHubParaId} in the list of parachains provided.`,
667
652
  )
668
653
  }
669
- console.log("Connected to all substrate parachains.")
670
654
  }
671
655
 
672
656
  // Index parachains
@@ -1029,10 +1013,7 @@ async function indexEthChain(
1029
1013
  name,
1030
1014
  assets,
1031
1015
  key: `ethereum_${networkChainId}`,
1032
- baseVerificationGas: 120_000n,
1033
- baseDispatchGas: 80_000n,
1034
- twoPhaseSubmitGas: 1_000_000n,
1035
- submitFiatShamirGas: 2_000_000n,
1016
+ baseDeliveryGas: 120_000n,
1036
1017
  }
1037
1018
  } else if (networkChainId in l2Chains) {
1038
1019
  const assets: ERC20MetadataMap = {}
@@ -1206,7 +1187,7 @@ async function getRegisteredPnas(
1206
1187
  }
1207
1188
 
1208
1189
  ;(async () => {
1209
- let env = "polkadot_mainnet"
1190
+ let env = "local_e2e"
1210
1191
  if (process.env.NODE_ENV !== undefined) {
1211
1192
  env = process.env.NODE_ENV
1212
1193
  }
@@ -61,7 +61,7 @@ const registry = {
61
61
  },
62
62
  },
63
63
  key: "ethereum_11155111",
64
- baseVerificationGas: 120000n,
64
+ baseDeliveryGas: 120000n,
65
65
  },
66
66
  },
67
67
  parachains: {
@@ -183,7 +183,7 @@ const registry = {
183
183
  },
184
184
  },
185
185
  key: "ethereum_11155111",
186
- baseVerificationGas: 120000n,
186
+ baseDeliveryGas: 120000n,
187
187
  },
188
188
  },
189
189
  parachains: {