@cryptorubic/web3 1.1.0 → 1.1.1-alpha-megaeth.0
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/package.json +1 -1
- package/src/lib/adapter/adapters/adapter-evm/signer/evm-adapter-signer.js +1 -6
- package/src/lib/adapter/blockchain-adapter-factory.service.js +1 -1
- package/src/lib/adapter/constants/chain-configs/chain-configs.js +54 -0
- package/src/lib/adapter/constants/viem-blockchain-mapping.js +3 -1
package/package.json
CHANGED
|
@@ -87,12 +87,7 @@ class EvmAdapterSigner extends abstract_adapter_signer_1.AbstractAdapterSigner {
|
|
|
87
87
|
...(0, options_1.getViemGasOptions)(params.txOptions),
|
|
88
88
|
gas: calculatedGas
|
|
89
89
|
};
|
|
90
|
-
|
|
91
|
-
await this.publicClient.estimateGas(gasfulViemParams);
|
|
92
|
-
}
|
|
93
|
-
catch {
|
|
94
|
-
throw new rubic_sdk_error_1.RubicSdkError('Low native value');
|
|
95
|
-
}
|
|
90
|
+
await this.publicClient.estimateGas(gasfulViemParams);
|
|
96
91
|
const sendParams = {
|
|
97
92
|
...gasfulParams,
|
|
98
93
|
...(params.txOptions.onTransactionHash && {
|
|
@@ -93,7 +93,7 @@ class BlockchainAdapterFactoryService {
|
|
|
93
93
|
/**
|
|
94
94
|
* evm chains has many EvmAdapter instances
|
|
95
95
|
* if you change network before swap - you need to be sure that
|
|
96
|
-
* EvmAdapter.signer.wallet and EvmAdapter.signer.
|
|
96
|
+
* EvmAdapter.signer.wallet and EvmAdapter.signer.walletAddress already set
|
|
97
97
|
*/
|
|
98
98
|
const chainTypeAdapters = Object.values(this.adapterStore).filter((adapter) => core_1.BlockchainsInfo.getChainType(adapter.blockchain) === core_1.BlockchainsInfo.getChainType(blockchain));
|
|
99
99
|
chainTypeAdapters.forEach((adapter) => {
|
|
@@ -1438,6 +1438,33 @@ exports.viemConfig = {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
1440
|
}),
|
|
1441
|
+
HYPER_EVM: (0, viem_1.defineChain)({
|
|
1442
|
+
id: 999,
|
|
1443
|
+
name: 'HyperEVM',
|
|
1444
|
+
nativeCurrency: {
|
|
1445
|
+
name: 'Hyperliquid',
|
|
1446
|
+
symbol: 'HYPE',
|
|
1447
|
+
decimals: 18
|
|
1448
|
+
},
|
|
1449
|
+
rpcUrls: {
|
|
1450
|
+
default: {
|
|
1451
|
+
http: ['https://rpc.hyperliquid.xyz/evm'],
|
|
1452
|
+
webSocket: ['wss://rpc.hyperliquid.xyz/evm']
|
|
1453
|
+
}
|
|
1454
|
+
},
|
|
1455
|
+
blockExplorers: {
|
|
1456
|
+
default: {
|
|
1457
|
+
name: 'HyperEVMScan',
|
|
1458
|
+
url: 'https://hyperevmscan.io/',
|
|
1459
|
+
apiUrl: 'https://api.hyperevmscan.io/api'
|
|
1460
|
+
}
|
|
1461
|
+
},
|
|
1462
|
+
contracts: {
|
|
1463
|
+
multicall3: {
|
|
1464
|
+
address: '0xcA11bde05977b3631167028862bE2a173976CA11'
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
}),
|
|
1441
1468
|
MONAD: (0, viem_1.defineChain)({
|
|
1442
1469
|
id: 143,
|
|
1443
1470
|
name: 'Monad',
|
|
@@ -1464,5 +1491,32 @@ exports.viemConfig = {
|
|
|
1464
1491
|
address: '0xcA11bde05977b3631167028862bE2a173976CA11'
|
|
1465
1492
|
}
|
|
1466
1493
|
}
|
|
1494
|
+
}),
|
|
1495
|
+
MEGA_ETH: (0, viem_1.defineChain)({
|
|
1496
|
+
id: 4326,
|
|
1497
|
+
name: 'MegaETH',
|
|
1498
|
+
network: 'MegaETH',
|
|
1499
|
+
nativeCurrency: {
|
|
1500
|
+
name: 'Ethereum',
|
|
1501
|
+
symbol: 'ETH',
|
|
1502
|
+
decimals: 18
|
|
1503
|
+
},
|
|
1504
|
+
rpcUrls: {
|
|
1505
|
+
default: {
|
|
1506
|
+
http: ['https://mainnet.megaeth.com/rpc']
|
|
1507
|
+
}
|
|
1508
|
+
},
|
|
1509
|
+
blockExplorers: {
|
|
1510
|
+
default: {
|
|
1511
|
+
name: 'megaethblockscout',
|
|
1512
|
+
url: 'https://megaeth.blockscout.com'
|
|
1513
|
+
}
|
|
1514
|
+
},
|
|
1515
|
+
testnet: false,
|
|
1516
|
+
contracts: {
|
|
1517
|
+
multicall3: {
|
|
1518
|
+
address: '0xcA11bde05977b3631167028862bE2a173976CA11'
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1467
1521
|
})
|
|
1468
1522
|
};
|
|
@@ -77,5 +77,7 @@ exports.viemBlockchainMapping = {
|
|
|
77
77
|
[core_1.BLOCKCHAIN_NAME.MORPH]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.MORPH], // viem Morph config without multicall address
|
|
78
78
|
[core_1.BLOCKCHAIN_NAME.HEMI]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.HEMI],
|
|
79
79
|
[core_1.BLOCKCHAIN_NAME.PLASMA]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.PLASMA],
|
|
80
|
-
[core_1.BLOCKCHAIN_NAME.
|
|
80
|
+
[core_1.BLOCKCHAIN_NAME.HYPER_EVM]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.HYPER_EVM],
|
|
81
|
+
[core_1.BLOCKCHAIN_NAME.MONAD]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.MONAD],
|
|
82
|
+
[core_1.BLOCKCHAIN_NAME.MEGA_ETH]: chain_configs_1.viemConfig[core_1.BLOCKCHAIN_NAME.MEGA_ETH]
|
|
81
83
|
};
|