@xchainjs/xchain-arbitrum 2.0.0 → 2.0.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.
package/lib/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Network, ExplorerProvider } from '@xchainjs/xchain-client';
2
2
  import { Client as Client$1, KeystoreSigner } from '@xchainjs/xchain-evm';
3
- import { EtherscanProvider } from '@xchainjs/xchain-evm-providers';
3
+ import { EtherscanProviderV2 } from '@xchainjs/xchain-evm-providers';
4
4
  import { AssetType } from '@xchainjs/xchain-util';
5
5
  import { ethers, BigNumber } from 'ethers';
6
6
 
@@ -21,6 +21,7 @@ const AssetARB = {
21
21
  type: AssetType.TOKEN,
22
22
  };
23
23
  // Define JSON-RPC providers for mainnet and testnet
24
+ // Ankr api key
24
25
  const ARBITRUM_MAINNET_ETHERS_PROVIDER = new ethers.providers.JsonRpcProvider('https://arb1.arbitrum.io/rpc');
25
26
  const ARBITRUM_TESTNET_ETHERS_PROVIDER = new ethers.providers.JsonRpcProvider('https://goerli-rollup.arbitrum.io/rpc');
26
27
  // Define ethers providers for different networks
@@ -30,8 +31,8 @@ const ethersJSProviders = {
30
31
  [Network.Stagenet]: ARBITRUM_MAINNET_ETHERS_PROVIDER,
31
32
  };
32
33
  // Define online providers (Etherscan) for mainnet and testnet
33
- const ARB_ONLINE_PROVIDER_MAINNET = new EtherscanProvider(ARBITRUM_MAINNET_ETHERS_PROVIDER, 'https://api.arbiscan.io', process.env.ARBISCAN_API_KEY || '', ARBChain, AssetAETH, 18);
34
- const ARB_ONLINE_PROVIDER_TESTNET = new EtherscanProvider(ARBITRUM_TESTNET_ETHERS_PROVIDER, 'https://api-goerli.arbiscan.io', process.env.ARBISCAN_API_KEY || '', ARBChain, AssetAETH, 18);
34
+ const ARB_ONLINE_PROVIDER_MAINNET = new EtherscanProviderV2(ARBITRUM_MAINNET_ETHERS_PROVIDER, 'https://api.etherscan.io/v2', process.env.ETHERSCAN_API_KEY || '', ARBChain, AssetAETH, 18, 42161);
35
+ const ARB_ONLINE_PROVIDER_TESTNET = new EtherscanProviderV2(ARBITRUM_TESTNET_ETHERS_PROVIDER, 'https://api.etherscan.io/v2', process.env.ETHERSCAN_API_KEY || '', ARBChain, AssetAETH, 18, 421614);
35
36
  // Define providers for different networks
36
37
  const arbProviders = {
37
38
  [Network.Mainnet]: ARB_ONLINE_PROVIDER_MAINNET,
package/lib/index.js CHANGED
@@ -23,6 +23,7 @@ const AssetARB = {
23
23
  type: xchainUtil.AssetType.TOKEN,
24
24
  };
25
25
  // Define JSON-RPC providers for mainnet and testnet
26
+ // Ankr api key
26
27
  const ARBITRUM_MAINNET_ETHERS_PROVIDER = new ethers.ethers.providers.JsonRpcProvider('https://arb1.arbitrum.io/rpc');
27
28
  const ARBITRUM_TESTNET_ETHERS_PROVIDER = new ethers.ethers.providers.JsonRpcProvider('https://goerli-rollup.arbitrum.io/rpc');
28
29
  // Define ethers providers for different networks
@@ -32,8 +33,8 @@ const ethersJSProviders = {
32
33
  [xchainClient.Network.Stagenet]: ARBITRUM_MAINNET_ETHERS_PROVIDER,
33
34
  };
34
35
  // Define online providers (Etherscan) for mainnet and testnet
35
- const ARB_ONLINE_PROVIDER_MAINNET = new xchainEvmProviders.EtherscanProvider(ARBITRUM_MAINNET_ETHERS_PROVIDER, 'https://api.arbiscan.io', process.env.ARBISCAN_API_KEY || '', ARBChain, AssetAETH, 18);
36
- const ARB_ONLINE_PROVIDER_TESTNET = new xchainEvmProviders.EtherscanProvider(ARBITRUM_TESTNET_ETHERS_PROVIDER, 'https://api-goerli.arbiscan.io', process.env.ARBISCAN_API_KEY || '', ARBChain, AssetAETH, 18);
36
+ const ARB_ONLINE_PROVIDER_MAINNET = new xchainEvmProviders.EtherscanProviderV2(ARBITRUM_MAINNET_ETHERS_PROVIDER, 'https://api.etherscan.io/v2', process.env.ETHERSCAN_API_KEY || '', ARBChain, AssetAETH, 18, 42161);
37
+ const ARB_ONLINE_PROVIDER_TESTNET = new xchainEvmProviders.EtherscanProviderV2(ARBITRUM_TESTNET_ETHERS_PROVIDER, 'https://api.etherscan.io/v2', process.env.ETHERSCAN_API_KEY || '', ARBChain, AssetAETH, 18, 421614);
37
38
  // Define providers for different networks
38
39
  const arbProviders = {
39
40
  [xchainClient.Network.Mainnet]: ARB_ONLINE_PROVIDER_MAINNET,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xchainjs/xchain-arbitrum",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Arbitrum EVM client for XChainJS",
5
5
  "keywords": [
6
6
  "XChain",
@@ -37,8 +37,8 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@xchainjs/xchain-client": "2.0.0",
40
- "@xchainjs/xchain-evm": "2.0.0",
41
- "@xchainjs/xchain-evm-providers": "2.0.0",
40
+ "@xchainjs/xchain-evm": "2.0.1",
41
+ "@xchainjs/xchain-evm-providers": "2.0.1",
42
42
  "@xchainjs/xchain-util": "2.0.0",
43
43
  "ethers": "5.7.2"
44
44
  }