@xchainjs/xchain-arbitrum 2.0.12 → 2.0.13
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 +9 -11
- package/lib/index.js +8 -10
- package/package.json +3 -3
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 {
|
|
3
|
+
import { RoutescanProvider } from '@xchainjs/xchain-evm-providers';
|
|
4
4
|
import { AssetType } from '@xchainjs/xchain-util';
|
|
5
5
|
import { JsonRpcProvider } from 'ethers';
|
|
6
6
|
import BigNumber from 'bignumber.js';
|
|
@@ -22,7 +22,6 @@ const AssetARB = {
|
|
|
22
22
|
type: AssetType.TOKEN,
|
|
23
23
|
};
|
|
24
24
|
// Define JSON-RPC providers for mainnet and testnet
|
|
25
|
-
// Ankr api key
|
|
26
25
|
const ARBITRUM_MAINNET_ETHERS_PROVIDER = new JsonRpcProvider('https://arb1.arbitrum.io/rpc');
|
|
27
26
|
const ARBITRUM_TESTNET_ETHERS_PROVIDER = new JsonRpcProvider('https://goerli-rollup.arbitrum.io/rpc');
|
|
28
27
|
// Define ethers providers for different networks
|
|
@@ -31,14 +30,13 @@ const ethersJSProviders = {
|
|
|
31
30
|
[Network.Testnet]: ARBITRUM_TESTNET_ETHERS_PROVIDER,
|
|
32
31
|
[Network.Stagenet]: ARBITRUM_MAINNET_ETHERS_PROVIDER,
|
|
33
32
|
};
|
|
34
|
-
//
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
[Network.
|
|
40
|
-
[Network.
|
|
41
|
-
[Network.Stagenet]: ARB_ONLINE_PROVIDER_MAINNET,
|
|
33
|
+
// Etherscan providers removed - Etherscan's gas oracle doesn't support Arbitrum
|
|
34
|
+
const ROUTESCAN_PROVIDER_MAINNET = new RoutescanProvider(ARBITRUM_MAINNET_ETHERS_PROVIDER, 'https://api.routescan.io', 42161, AssetAETH, ARB_DECIMAL);
|
|
35
|
+
const ROUTESCAN_PROVIDER_TESTNET = new RoutescanProvider(ARBITRUM_TESTNET_ETHERS_PROVIDER, 'https://api.routescan.io', 421613, AssetAETH, ARB_DECIMAL, true);
|
|
36
|
+
const routescanProviders = {
|
|
37
|
+
[Network.Mainnet]: ROUTESCAN_PROVIDER_MAINNET,
|
|
38
|
+
[Network.Testnet]: ROUTESCAN_PROVIDER_TESTNET,
|
|
39
|
+
[Network.Stagenet]: ROUTESCAN_PROVIDER_MAINNET,
|
|
42
40
|
};
|
|
43
41
|
// Define explorer providers for mainnet and testnet
|
|
44
42
|
const ARB_MAINNET_EXPLORER = new ExplorerProvider('https://arbiscan.io/', 'https://arbiscan.io/address/%%ADDRESS%%', 'https://arbiscan.io/tx/%%TX_ID%%');
|
|
@@ -84,7 +82,7 @@ const defaultArbParams = {
|
|
|
84
82
|
defaults,
|
|
85
83
|
providers: ethersJSProviders,
|
|
86
84
|
explorerProviders: arbExplorerProviders,
|
|
87
|
-
dataProviders: [
|
|
85
|
+
dataProviders: [routescanProviders],
|
|
88
86
|
network: Network.Mainnet,
|
|
89
87
|
feeBounds: {
|
|
90
88
|
lower: LOWER_FEE_BOUND,
|
package/lib/index.js
CHANGED
|
@@ -28,7 +28,6 @@ const AssetARB = {
|
|
|
28
28
|
type: xchainUtil.AssetType.TOKEN,
|
|
29
29
|
};
|
|
30
30
|
// Define JSON-RPC providers for mainnet and testnet
|
|
31
|
-
// Ankr api key
|
|
32
31
|
const ARBITRUM_MAINNET_ETHERS_PROVIDER = new ethers.JsonRpcProvider('https://arb1.arbitrum.io/rpc');
|
|
33
32
|
const ARBITRUM_TESTNET_ETHERS_PROVIDER = new ethers.JsonRpcProvider('https://goerli-rollup.arbitrum.io/rpc');
|
|
34
33
|
// Define ethers providers for different networks
|
|
@@ -37,14 +36,13 @@ const ethersJSProviders = {
|
|
|
37
36
|
[xchainClient.Network.Testnet]: ARBITRUM_TESTNET_ETHERS_PROVIDER,
|
|
38
37
|
[xchainClient.Network.Stagenet]: ARBITRUM_MAINNET_ETHERS_PROVIDER,
|
|
39
38
|
};
|
|
40
|
-
//
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
[xchainClient.Network.
|
|
46
|
-
[xchainClient.Network.
|
|
47
|
-
[xchainClient.Network.Stagenet]: ARB_ONLINE_PROVIDER_MAINNET,
|
|
39
|
+
// Etherscan providers removed - Etherscan's gas oracle doesn't support Arbitrum
|
|
40
|
+
const ROUTESCAN_PROVIDER_MAINNET = new xchainEvmProviders.RoutescanProvider(ARBITRUM_MAINNET_ETHERS_PROVIDER, 'https://api.routescan.io', 42161, AssetAETH, ARB_DECIMAL);
|
|
41
|
+
const ROUTESCAN_PROVIDER_TESTNET = new xchainEvmProviders.RoutescanProvider(ARBITRUM_TESTNET_ETHERS_PROVIDER, 'https://api.routescan.io', 421613, AssetAETH, ARB_DECIMAL, true);
|
|
42
|
+
const routescanProviders = {
|
|
43
|
+
[xchainClient.Network.Mainnet]: ROUTESCAN_PROVIDER_MAINNET,
|
|
44
|
+
[xchainClient.Network.Testnet]: ROUTESCAN_PROVIDER_TESTNET,
|
|
45
|
+
[xchainClient.Network.Stagenet]: ROUTESCAN_PROVIDER_MAINNET,
|
|
48
46
|
};
|
|
49
47
|
// Define explorer providers for mainnet and testnet
|
|
50
48
|
const ARB_MAINNET_EXPLORER = new xchainClient.ExplorerProvider('https://arbiscan.io/', 'https://arbiscan.io/address/%%ADDRESS%%', 'https://arbiscan.io/tx/%%TX_ID%%');
|
|
@@ -90,7 +88,7 @@ const defaultArbParams = {
|
|
|
90
88
|
defaults,
|
|
91
89
|
providers: ethersJSProviders,
|
|
92
90
|
explorerProviders: arbExplorerProviders,
|
|
93
|
-
dataProviders: [
|
|
91
|
+
dataProviders: [routescanProviders],
|
|
94
92
|
network: xchainClient.Network.Mainnet,
|
|
95
93
|
feeBounds: {
|
|
96
94
|
lower: LOWER_FEE_BOUND,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-arbitrum",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
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.9",
|
|
40
|
-
"@xchainjs/xchain-evm": "2.0.
|
|
41
|
-
"@xchainjs/xchain-evm-providers": "2.0.
|
|
40
|
+
"@xchainjs/xchain-evm": "2.0.13",
|
|
41
|
+
"@xchainjs/xchain-evm-providers": "2.0.12",
|
|
42
42
|
"@xchainjs/xchain-util": "2.0.5",
|
|
43
43
|
"bignumber.js": "^9.1.2",
|
|
44
44
|
"ethers": "^6.14.3"
|