From 8ce6ac5d4c350a1b30badae64b2e014eb5a9ce22 Mon Sep 17 00:00:00 2001 From: nicholaspai Date: Mon, 17 Nov 2025 13:06:02 -0500 Subject: [PATCH 1/8] feat: Add simple Hypercore Depositor handler Signed-off-by: nicholaspai --- .gitmodules | 3 + .../handlers/HypercoreDepositorHandler.sol | 93 +++++++++++++++++++ foundry.toml | 1 + lib/hyper-evm-lib | 1 + 4 files changed, 98 insertions(+) create mode 100644 contracts/handlers/HypercoreDepositorHandler.sol create mode 160000 lib/hyper-evm-lib diff --git a/.gitmodules b/.gitmodules index 888d42dcd..202f56ed1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "lib/forge-std"] path = lib/forge-std url = https://github.com/foundry-rs/forge-std +[submodule "lib/hyper-evm-lib"] + path = lib/hyper-evm-lib + url = https://github.com/hyperliquid-dev/hyper-evm-lib diff --git a/contracts/handlers/HypercoreDepositorHandler.sol b/contracts/handlers/HypercoreDepositorHandler.sol new file mode 100644 index 000000000..5321ddc3d --- /dev/null +++ b/contracts/handlers/HypercoreDepositorHandler.sol @@ -0,0 +1,93 @@ +// SPDX-License-Identifier: GPL-3.0-only +pragma solidity ^0.8.0; + +import "../interfaces/SpokePoolMessageHandler.sol"; +import "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol"; +import "@openzeppelin/contracts-v4/access/AccessControl.sol"; +import "@openzeppelin/contracts-v4/security/ReentrancyGuard.sol"; +import { CoreWriterLib, PrecompileLib } from "@hyper-evm-lib/src/CoreWriterLib.sol"; +import { HLConversions } from "@hyper-evm-lib/src/common/HLConversions.sol"; + +/** + * @title Bespoke version of the MulticallHandler contract that allows whitelisted relayers to deposit Across Deposit + * output tokens into Hypercore (from HyperEVM) on behalf of the end user. + * @dev This contract is permissioned to only be callable by those with the DEPOSITOR. + * @dev This contract should only be deployed on HyperEVM. + */ +contract HypercoreDepositorHandler is AcrossMessageHandler, ReentrancyGuard, AccessControl { + using SafeERC20 for IERC20; + + // Role identifier for tx.origins that can ultimately call this contract. + bytes32 public constant HYPERCORE_DEPOSITOR_ROLE = keccak256("DEPOSITOR"); + + // Emitted when leftover tokens following a Hypercore deposit are sent to the end user. + event DrainedTokens(address indexed destination, address indexed token, uint256 amount); + + // Errors + error NotRelayer(); + + /** + * @notice Constructor that grants the DEFAULT_ADMIN_ROLE and the DEPOSITOR roles. + * @param admin Address that will have DEFAULT_ADMIN_ROLE + * @param initialDepositors List of initial depositors to grant the DEPOSITOR role to. + */ + constructor(address admin, address[] memory initialDepositors) { + _grantRole(HYPERCORE_DEPOSITOR_ROLE, msg.sender); + for (uint256 i = 0; i < initialDepositors.length; i++) { + _grantRole(HYPERCORE_DEPOSITOR_ROLE, initialDepositors[i]); + } + _grantRole(DEFAULT_ADMIN_ROLE, admin); + } + + modifier onlyWhitelistedOrigin() { + _requireTxOriginIsHypercoreDepositor(); + _; + } + + /** + * @notice Main entrypoint for the handler called by the SpokePool contract. + * @dev This will execute all calls encoded in the msg. The caller is responsible for making sure all tokens are + * drained from this contract by the end of the series of calls. If not, they can be stolen. + * A drainLeftoverTokens call can be included as a way to drain any remaining tokens from this contract. + * @param message abi encoded array of Call structs, containing a target, callData, and value for each call that + * the contract should make. + */ + function handleV3AcrossMessage( + address token, + uint256 evmAmount, + address, + bytes memory message + ) external nonReentrant onlyWhitelistedOrigin { + address user = abi.decode(message, (address)); + + CoreWriterLib.bridgeToCore(token, evmAmount); + + // Convert EVM amount to wei amount (used in HyperCore) + uint64 tokenIndex = PrecompileLib.getTokenIndex(token); + uint64 coreAmount = HLConversions.evmToWei(tokenIndex, evmAmount); + + // use CoreWriterLib to call the spotSend CoreWriter action and send tokens to end user. + CoreWriterLib.spotSend(user, tokenIndex, coreAmount); + + // If there are leftover tokens, send them to the recipient on Hyperevm. + _drainRemainingTokens(token, user); + } + + function _drainRemainingTokens(address token, address destination) internal { + // For now, native tokens are not supported by this contract so we don't need to handle any. + uint256 amount = IERC20(token).balanceOf(address(this)); + if (amount > 0) { + IERC20(token).safeTransfer(destination, amount); + emit DrainedTokens(destination, token, amount); + } + } + + function _requireTxOriginIsHypercoreDepositor() internal view { + // We check tx.origin to allow the whitelisted account to call this contract via another proxy contract. + // @todo: Is this a safe check to add permissioning properties that we want? + if (!hasRole(HYPERCORE_DEPOSITOR_ROLE, tx.origin)) revert NotRelayer(); + } + + // Native tokens are not supported by this contract. +} diff --git a/foundry.toml b/foundry.toml index 68f1ad17d..49c60c4dd 100644 --- a/foundry.toml +++ b/foundry.toml @@ -11,6 +11,7 @@ remappings = [ "@across-protocol/=node_modules/@across-protocol/", "@ensdomains/=node_modules/@ensdomains/", "@eth-optimism/=node_modules/@eth-optimism/", + "@hyper-evm-lib=lib/hyper-evm-lib", "@gnosis.pm/=node_modules/@gnosis.pm/", "@maticnetwork/=node_modules/@maticnetwork/", "@matterlabs/=node_modules/@matterlabs/", diff --git a/lib/hyper-evm-lib b/lib/hyper-evm-lib new file mode 160000 index 000000000..ee5e5e859 --- /dev/null +++ b/lib/hyper-evm-lib @@ -0,0 +1 @@ +Subproject commit ee5e5e8593e9265fca35719e4efaa4fd3092123e From 4e697e02c014c1c860bd5f24e1b0907b44d90967 Mon Sep 17 00:00:00 2001 From: nicholaspai Date: Mon, 17 Nov 2025 13:10:28 -0500 Subject: [PATCH 2/8] add package.json Signed-off-by: nicholaspai --- foundry.toml | 2 +- package.json | 1 + yarn.lock | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/foundry.toml b/foundry.toml index 49c60c4dd..4920ac065 100644 --- a/foundry.toml +++ b/foundry.toml @@ -11,7 +11,7 @@ remappings = [ "@across-protocol/=node_modules/@across-protocol/", "@ensdomains/=node_modules/@ensdomains/", "@eth-optimism/=node_modules/@eth-optimism/", - "@hyper-evm-lib=lib/hyper-evm-lib", + "@hyper-evm-lib=node_modules/hyper-evm-lib", "@gnosis.pm/=node_modules/@gnosis.pm/", "@maticnetwork/=node_modules/@maticnetwork/", "@matterlabs/=node_modules/@matterlabs/", diff --git a/package.json b/package.json index 27971fd9c..00eebffb9 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "@uma/contracts-node": "^0.4.17", "axios": "^1.7.4", "bs58": "^6.0.0", + "hyper-evm-lib": "hyperliquid-dev/hyper-evm-lib", "prettier-plugin-rust": "^0.1.9", "yargs": "^17.7.2", "zksync-web3": "^0.14.3" diff --git a/yarn.lock b/yarn.lock index f08f387af..038ca1c53 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10761,6 +10761,10 @@ husky@^4.2.3: slash "^3.0.0" which-pm-runs "^1.0.0" +hyper-evm-lib@hyperliquid-dev/hyper-evm-lib: + version "0.0.0" + resolved "https://codeload.github.com/hyperliquid-dev/hyper-evm-lib/tar.gz/ee5e5e8593e9265fca35719e4efaa4fd3092123e" + iconv-lite@0.4.24: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" From f59ca75ae8560a954f526e4156ff69e36992f062 Mon Sep 17 00:00:00 2001 From: nicholaspai Date: Mon, 17 Nov 2025 13:11:37 -0500 Subject: [PATCH 3/8] remove from .gitmodules Signed-off-by: nicholaspai --- .gitmodules | 3 --- lib/hyper-evm-lib | 1 - 2 files changed, 4 deletions(-) delete mode 160000 lib/hyper-evm-lib diff --git a/.gitmodules b/.gitmodules index 202f56ed1..888d42dcd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "lib/forge-std"] path = lib/forge-std url = https://github.com/foundry-rs/forge-std -[submodule "lib/hyper-evm-lib"] - path = lib/hyper-evm-lib - url = https://github.com/hyperliquid-dev/hyper-evm-lib diff --git a/lib/hyper-evm-lib b/lib/hyper-evm-lib deleted file mode 160000 index ee5e5e859..000000000 --- a/lib/hyper-evm-lib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ee5e5e8593e9265fca35719e4efaa4fd3092123e From 9b0732cd452edf9749fcf1760e873ac318f1f4bc Mon Sep 17 00:00:00 2001 From: nicholaspai Date: Mon, 17 Nov 2025 13:21:12 -0500 Subject: [PATCH 4/8] potential typo Signed-off-by: nicholaspai --- foundry.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/foundry.toml b/foundry.toml index 4920ac065..b981fd79d 100644 --- a/foundry.toml +++ b/foundry.toml @@ -11,7 +11,7 @@ remappings = [ "@across-protocol/=node_modules/@across-protocol/", "@ensdomains/=node_modules/@ensdomains/", "@eth-optimism/=node_modules/@eth-optimism/", - "@hyper-evm-lib=node_modules/hyper-evm-lib", + "@hyper-evm-lib=node_modules/hyper-evm-lib/", "@gnosis.pm/=node_modules/@gnosis.pm/", "@maticnetwork/=node_modules/@maticnetwork/", "@matterlabs/=node_modules/@matterlabs/", From 631a03d99393db94bc6ab8ed2816f2a584a11186 Mon Sep 17 00:00:00 2001 From: nicholaspai Date: Mon, 17 Nov 2025 13:26:00 -0500 Subject: [PATCH 5/8] remove drainLeftoverTokens logic Signed-off-by: nicholaspai --- .../handlers/HypercoreDepositorHandler.sol | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/contracts/handlers/HypercoreDepositorHandler.sol b/contracts/handlers/HypercoreDepositorHandler.sol index 5321ddc3d..3b60dd12f 100644 --- a/contracts/handlers/HypercoreDepositorHandler.sol +++ b/contracts/handlers/HypercoreDepositorHandler.sol @@ -21,9 +21,6 @@ contract HypercoreDepositorHandler is AcrossMessageHandler, ReentrancyGuard, Acc // Role identifier for tx.origins that can ultimately call this contract. bytes32 public constant HYPERCORE_DEPOSITOR_ROLE = keccak256("DEPOSITOR"); - // Emitted when leftover tokens following a Hypercore deposit are sent to the end user. - event DrainedTokens(address indexed destination, address indexed token, uint256 amount); - // Errors error NotRelayer(); @@ -46,12 +43,9 @@ contract HypercoreDepositorHandler is AcrossMessageHandler, ReentrancyGuard, Acc } /** - * @notice Main entrypoint for the handler called by the SpokePool contract. - * @dev This will execute all calls encoded in the msg. The caller is responsible for making sure all tokens are - * drained from this contract by the end of the series of calls. If not, they can be stolen. - * A drainLeftoverTokens call can be included as a way to drain any remaining tokens from this contract. - * @param message abi encoded array of Call structs, containing a target, callData, and value for each call that - * the contract should make. + * @notice Main entrypoint for the handler called by the SpokePool contract. Sends tokens to the + * end user on Hypercore using funds received on this contract on HyperEVM. + * @dev The tx.origin of this transaction must be an account with the DEPOSITOR role. */ function handleV3AcrossMessage( address token, @@ -68,19 +62,10 @@ contract HypercoreDepositorHandler is AcrossMessageHandler, ReentrancyGuard, Acc uint64 coreAmount = HLConversions.evmToWei(tokenIndex, evmAmount); // use CoreWriterLib to call the spotSend CoreWriter action and send tokens to end user. + // @dev: the following call does not execute atomically with the deposit into Hypercore. + // Therefore, this contract will maintain a balance of tokens for one block until the spot send into Hypercore + // is confirmed. CoreWriterLib.spotSend(user, tokenIndex, coreAmount); - - // If there are leftover tokens, send them to the recipient on Hyperevm. - _drainRemainingTokens(token, user); - } - - function _drainRemainingTokens(address token, address destination) internal { - // For now, native tokens are not supported by this contract so we don't need to handle any. - uint256 amount = IERC20(token).balanceOf(address(this)); - if (amount > 0) { - IERC20(token).safeTransfer(destination, amount); - emit DrainedTokens(destination, token, amount); - } } function _requireTxOriginIsHypercoreDepositor() internal view { From 786ffb9ecdc1991aa1274047e42746a6da852228 Mon Sep 17 00:00:00 2001 From: nicholaspai Date: Mon, 17 Nov 2025 14:24:33 -0500 Subject: [PATCH 6/8] remove permissioning Signed-off-by: nicholaspai --- .../handlers/HypercoreDepositorHandler.sol | 65 ++++++++----------- 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/contracts/handlers/HypercoreDepositorHandler.sol b/contracts/handlers/HypercoreDepositorHandler.sol index 3b60dd12f..d1531b0e5 100644 --- a/contracts/handlers/HypercoreDepositorHandler.sol +++ b/contracts/handlers/HypercoreDepositorHandler.sol @@ -4,59 +4,56 @@ pragma solidity ^0.8.0; import "../interfaces/SpokePoolMessageHandler.sol"; import "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol"; -import "@openzeppelin/contracts-v4/access/AccessControl.sol"; import "@openzeppelin/contracts-v4/security/ReentrancyGuard.sol"; import { CoreWriterLib, PrecompileLib } from "@hyper-evm-lib/src/CoreWriterLib.sol"; import { HLConversions } from "@hyper-evm-lib/src/common/HLConversions.sol"; /** - * @title Bespoke version of the MulticallHandler contract that allows whitelisted relayers to deposit Across Deposit - * output tokens into Hypercore (from HyperEVM) on behalf of the end user. - * @dev This contract is permissioned to only be callable by those with the DEPOSITOR. + * @title Allows caller to bridge tokens from HyperEVM to Hypercore and send them to the end user's account + * on Hypercore. * @dev This contract should only be deployed on HyperEVM. + * @dev This contract can replace a MulticallHandler on HyperEVM if the intent only wants to deposit tokens into + * Hypercore and bypass the other complex arbitrary calldata logic. + * @dev This contract can also be called by the MulticallHandler to deposit tokens into Hypercore. */ -contract HypercoreDepositorHandler is AcrossMessageHandler, ReentrancyGuard, AccessControl { +contract HypercoreDepositorHandler is AcrossMessageHandler, ReentrancyGuard { using SafeERC20 for IERC20; - // Role identifier for tx.origins that can ultimately call this contract. - bytes32 public constant HYPERCORE_DEPOSITOR_ROLE = keccak256("DEPOSITOR"); - - // Errors - error NotRelayer(); - /** - * @notice Constructor that grants the DEFAULT_ADMIN_ROLE and the DEPOSITOR roles. - * @param admin Address that will have DEFAULT_ADMIN_ROLE - * @param initialDepositors List of initial depositors to grant the DEPOSITOR role to. + * @notice Bridges tokens from HyperEVM to Hypercore and sends them to the end user's account on Hypercore. + * @param token The address of the token to deposit. + * @param amount The amount of tokens on HyperEVM to deposit. + * @param user The address of the user on Hypercore to send the tokens to. */ - constructor(address admin, address[] memory initialDepositors) { - _grantRole(HYPERCORE_DEPOSITOR_ROLE, msg.sender); - for (uint256 i = 0; i < initialDepositors.length; i++) { - _grantRole(HYPERCORE_DEPOSITOR_ROLE, initialDepositors[i]); - } - _grantRole(DEFAULT_ADMIN_ROLE, admin); - } - - modifier onlyWhitelistedOrigin() { - _requireTxOriginIsHypercoreDepositor(); - _; + function depositToHypercore(address token, uint256 amount, address user) external nonReentrant { + _bridgeToCore(token, amount); + _spotSend(user, token, amount); } /** - * @notice Main entrypoint for the handler called by the SpokePool contract. Sends tokens to the - * end user on Hypercore using funds received on this contract on HyperEVM. - * @dev The tx.origin of this transaction must be an account with the DEPOSITOR role. + * @notice Entrypoint function if this contract is called by the SpokePool contract following an intent fill. + * @dev Deposits tokens into Hypercore and sends them to the end user's account on Hypercore. + * @param token The address of the token sent. + * @param amount The amount of tokens received by this contract. + * @param message Encoded end user address. */ function handleV3AcrossMessage( address token, - uint256 evmAmount, - address, + uint256 amount, + address /* relayer */, bytes memory message - ) external nonReentrant onlyWhitelistedOrigin { + ) external nonReentrant { address user = abi.decode(message, (address)); + _bridgeToCore(token, amount); + _spotSend(user, token, amount); + } + function _bridgeToCore(address token, uint256 evmAmount) internal { + // Bridge tokens from HyperEVM to Hypercore. This call should revert if this contract has insufficient balance. CoreWriterLib.bridgeToCore(token, evmAmount); + } + function _spotSend(address user, address token, uint256 evmAmount) internal { // Convert EVM amount to wei amount (used in HyperCore) uint64 tokenIndex = PrecompileLib.getTokenIndex(token); uint64 coreAmount = HLConversions.evmToWei(tokenIndex, evmAmount); @@ -68,11 +65,5 @@ contract HypercoreDepositorHandler is AcrossMessageHandler, ReentrancyGuard, Acc CoreWriterLib.spotSend(user, tokenIndex, coreAmount); } - function _requireTxOriginIsHypercoreDepositor() internal view { - // We check tx.origin to allow the whitelisted account to call this contract via another proxy contract. - // @todo: Is this a safe check to add permissioning properties that we want? - if (!hasRole(HYPERCORE_DEPOSITOR_ROLE, tx.origin)) revert NotRelayer(); - } - // Native tokens are not supported by this contract. } From 8bfd1335bf41a624fafdab88f553b4ab18b599d3 Mon Sep 17 00:00:00 2001 From: nicholaspai Date: Mon, 17 Nov 2025 17:10:51 -0500 Subject: [PATCH 7/8] fix import Signed-off-by: nicholaspai --- contracts/handlers/HypercoreDepositorHandler.sol | 4 ++-- foundry.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/handlers/HypercoreDepositorHandler.sol b/contracts/handlers/HypercoreDepositorHandler.sol index d1531b0e5..fc402f8f6 100644 --- a/contracts/handlers/HypercoreDepositorHandler.sol +++ b/contracts/handlers/HypercoreDepositorHandler.sol @@ -5,8 +5,8 @@ import "../interfaces/SpokePoolMessageHandler.sol"; import "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts-v4/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts-v4/security/ReentrancyGuard.sol"; -import { CoreWriterLib, PrecompileLib } from "@hyper-evm-lib/src/CoreWriterLib.sol"; -import { HLConversions } from "@hyper-evm-lib/src/common/HLConversions.sol"; +import { CoreWriterLib, PrecompileLib } from "hyper-evm-lib/src/CoreWriterLib.sol"; +import { HLConversions } from "hyper-evm-lib/src/common/HLConversions.sol"; /** * @title Allows caller to bridge tokens from HyperEVM to Hypercore and send them to the end user's account diff --git a/foundry.toml b/foundry.toml index b981fd79d..3527f3d53 100644 --- a/foundry.toml +++ b/foundry.toml @@ -11,7 +11,6 @@ remappings = [ "@across-protocol/=node_modules/@across-protocol/", "@ensdomains/=node_modules/@ensdomains/", "@eth-optimism/=node_modules/@eth-optimism/", - "@hyper-evm-lib=node_modules/hyper-evm-lib/", "@gnosis.pm/=node_modules/@gnosis.pm/", "@maticnetwork/=node_modules/@maticnetwork/", "@matterlabs/=node_modules/@matterlabs/", @@ -25,6 +24,7 @@ remappings = [ "eth-gas-reporter/=node_modules/eth-gas-reporter/", "hardhat-deploy/=node_modules/hardhat-deploy/", "hardhat/=node_modules/hardhat/", + "hyper-evm-lib=node_modules/hyper-evm-lib/", ] via_ir = true optimizer_runs = 800 From a7790bd614ffea8a14d6d9ef2ed6472fab17ac50 Mon Sep 17 00:00:00 2001 From: nicholaspai Date: Tue, 18 Nov 2025 14:31:43 -0500 Subject: [PATCH 8/8] add safeTransferFrom Signed-off-by: nicholaspai --- .../handlers/HypercoreDepositorHandler.sol | 6 ++-- generated/constants.json | 36 ++++++++++++++++--- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/contracts/handlers/HypercoreDepositorHandler.sol b/contracts/handlers/HypercoreDepositorHandler.sol index fc402f8f6..0ccee3204 100644 --- a/contracts/handlers/HypercoreDepositorHandler.sol +++ b/contracts/handlers/HypercoreDepositorHandler.sol @@ -9,23 +9,25 @@ import { CoreWriterLib, PrecompileLib } from "hyper-evm-lib/src/CoreWriterLib.so import { HLConversions } from "hyper-evm-lib/src/common/HLConversions.sol"; /** - * @title Allows caller to bridge tokens from HyperEVM to Hypercore and send them to the end user's account + * @title Allows caller to bridge tokens from HyperEVM to Hypercore and send them to an end user's account * on Hypercore. * @dev This contract should only be deployed on HyperEVM. * @dev This contract can replace a MulticallHandler on HyperEVM if the intent only wants to deposit tokens into * Hypercore and bypass the other complex arbitrary calldata logic. - * @dev This contract can also be called by the MulticallHandler to deposit tokens into Hypercore. + * @dev This contract can also be called directly to deposit tokens into Hypercore on behalf of an end user. */ contract HypercoreDepositorHandler is AcrossMessageHandler, ReentrancyGuard { using SafeERC20 for IERC20; /** * @notice Bridges tokens from HyperEVM to Hypercore and sends them to the end user's account on Hypercore. + * @dev Requires msg.sender to have approved this contract to spend the tokens. * @param token The address of the token to deposit. * @param amount The amount of tokens on HyperEVM to deposit. * @param user The address of the user on Hypercore to send the tokens to. */ function depositToHypercore(address token, uint256 amount, address user) external nonReentrant { + IERC20(token).safeTransferFrom(msg.sender, address(this), amount); _bridgeToCore(token, amount); _spotSend(user, token, amount); } diff --git a/generated/constants.json b/generated/constants.json index 9a3eb5b42..9d2dc425c 100644 --- a/generated/constants.json +++ b/generated/constants.json @@ -43,13 +43,23 @@ "137": { "name": "Polygon", "family": "NONE", - "nativeToken": "MATIC", + "nativeToken": "POL", "publicRPC": "https://polygon-rpc.com", "blockExplorer": "https://polygonscan.com", "cctpDomain": 7, "oftEid": 30109, "hypDomainId": 137 }, + "143": { + "name": "Monad Mainnet", + "family": "NONE", + "nativeToken": "MON", + "publicRPC": "https://rpc-mainnet.monadinfra.com/", + "blockExplorer": "https://monadscan.com/", + "cctpDomain": 15, + "oftEid": 30390, + "hypDomainId": 143 + }, "232": { "name": "Lens", "family": "ZK_STACK", @@ -230,6 +240,16 @@ "oftEid": -1, "hypDomainId": -1 }, + "10143": { + "name": "Monad Testnet", + "family": "NONE", + "nativeToken": "MON", + "publicRPC": "https://testnet-rpc.monad.xyz/", + "blockExplorer": "https://testnet.monvision.io/", + "cctpDomain": 15, + "oftEid": 40204, + "hypDomainId": 10143 + }, "34443": { "name": "Mode", "family": "OP_STACK", @@ -293,7 +313,7 @@ "80002": { "name": "Polygon Amoy", "family": "NONE", - "nativeToken": "MATIC", + "nativeToken": "POL", "publicRPC": "https://rpc-amoy.polygon.technology", "blockExplorer": "https://amoy.polygonscan.com", "cctpDomain": 7, @@ -447,6 +467,7 @@ "LISK": 1135, "MAINNET": 1, "MODE": 34443, + "MONAD": 143, "OPTIMISM": 10, "PLASMA": 9745, "POLYGON": 137, @@ -469,6 +490,7 @@ "LENS_SEPOLIA": 37111, "LISK_SEPOLIA": 4202, "MODE_SEPOLIA": 919, + "MONAD_TESTNET": 10143, "OPTIMISM_SEPOLIA": 11155420, "PLASMA_TESTNET": 9746, "POLYGON_AMOY": 80002, @@ -479,8 +501,8 @@ "SOLANA_DEVNET": 133268194659241 }, "TESTNET_CHAIN_IDs": [ - 421614, 84532, 168587773, 808813, 998, 763373, 129399, 37111, 4202, 919, 11155420, 9746, 80002, 534351, 11155111, - 1301, 300, 133268194659241 + 421614, 84532, 168587773, 808813, 998, 763373, 129399, 37111, 4202, 919, 10143, 11155420, 9746, 80002, 534351, + 11155111, 1301, 300, 133268194659241 ], "WETH": { "1": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2", @@ -527,6 +549,7 @@ "56": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", "130": "0x4200000000000000000000000000000000000006", "137": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", + "143": "0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A", "288": "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000", "300": "0x2D6Db36B3117802E996f13073A08A685D3FeF7eD", "324": "0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91", @@ -542,6 +565,7 @@ "8453": "0x4200000000000000000000000000000000000006", "9745": "0x6100E367285b01F48D07953803A2d8dCA5D19873", "9746": "0x6100E367285b01F48D07953803A2d8dCA5D19873", + "10143": "0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701", "34443": "0x4200000000000000000000000000000000000006", "37111": "0xeee5a340Cdc9c179Db25dea45AcfD5FE8d4d3eB8", "41455": "0xb7Da55D7040ef9C887e20374D76A88F93A59119E", @@ -855,12 +879,14 @@ "10": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", "130": "0x078D782b760474a361dDA0AF3839290b0EF57AD6", "137": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359", + "143": "0x754704Bc059F8C67012fEd69BC8A327a5aafb603", "232": "0x88F08E304EC4f90D644Cec3Fb69b8aD414acf884", "480": "0x79A02482A880bCE3F13e09Da970dC34db4CD24d1", "998": "0x2B3370eE501B4a559b57D449569354196457D8Ab", "999": "0xb88339CB7199b77E23DB6E890353E22632Ba630f", "1301": "0x31d0220469e10c4E71834a79b1f276d740d3768F", "8453": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "10143": "0xf817257fed379853cDe0fa4F97AB987181B1E5Ea", "42161": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "59144": "0x176211869cA2b568f2A7D4EE941E073a821EE1ff", "80002": "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582", @@ -890,7 +916,7 @@ "232": "0x6bDc36E20D267Ff0dd6097799f82e78907105e2F" }, "WMATIC": { - "1": "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0", + "1": "0x455e53CBB86018Ac2B8092FdCd39d8444aFFC3F6", "137": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270", "80002": "0x360ad4f9a9A8EFe9A8DCB5f461c4Cc1047E1Dcf9", "11155111": "0x3fd0A53F4Bf853985a95F4Eb3F9C9FDE1F8e2b53"