Overview
ETH Balance
0 ETH
ETH Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 24,759 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit | 128896975 | 4 days ago | IN | 0.147151 ETH | 0.000002437073 | ||||
Deposit | 128874805 | 5 days ago | IN | 0.13717 ETH | 0.000009650716 | ||||
Deposit | 128834661 | 6 days ago | IN | 0.122933 ETH | 0.00000041149 | ||||
Deposit | 128832295 | 6 days ago | IN | 0.103451 ETH | 0.00000056964 | ||||
Deposit | 128778860 | 7 days ago | IN | 0.163997 ETH | 0.000001584296 | ||||
Deposit | 128770959 | 7 days ago | IN | 0.115498 ETH | 0.000001104513 | ||||
Deposit | 128736951 | 8 days ago | IN | 0.170523 ETH | 0.00000092164 | ||||
Deposit | 128732264 | 8 days ago | IN | 0.173948 ETH | 0.000001573108 | ||||
Deposit | 128726535 | 8 days ago | IN | 0.013018 ETH | 0.000000208341 | ||||
Deposit | 128724892 | 8 days ago | IN | 0.016645 ETH | 0.000000317098 | ||||
Deposit | 128693369 | 9 days ago | IN | 0.173788 ETH | 0.000001152172 | ||||
Deposit | 128668598 | 9 days ago | IN | 0.140644 ETH | 0.000000213144 | ||||
Deposit | 128665967 | 10 days ago | IN | 0.169811 ETH | 0.000000229482 | ||||
Deposit | 128662407 | 10 days ago | IN | 0.159202 ETH | 0.000000250679 | ||||
Deposit | 128653223 | 10 days ago | IN | 0.158316 ETH | 0.000000306258 | ||||
Deposit | 128610600 | 11 days ago | IN | 0.099263 ETH | 0.000003506796 | ||||
Deposit | 128604372 | 11 days ago | IN | 0.166221 ETH | 0.000009390537 | ||||
Deposit | 128601055 | 11 days ago | IN | 0.12995 ETH | 0.000010121222 | ||||
Deposit | 128580409 | 12 days ago | IN | 0.154076 ETH | 0.000000258375 | ||||
Deposit | 128534066 | 13 days ago | IN | 0.174707 ETH | 0.000000404544 | ||||
Deposit | 128503535 | 13 days ago | IN | 0.12006 ETH | 0.000020221396 | ||||
Deposit | 128465801 | 14 days ago | IN | 0.144048 ETH | 0.000001388267 | ||||
Deposit | 128462625 | 14 days ago | IN | 0.137692 ETH | 0.00000184755 | ||||
Deposit | 128435016 | 15 days ago | IN | 0.13859 ETH | 0.000004580863 | ||||
Deposit | 128424783 | 15 days ago | IN | 0.117813 ETH | 0.000001908513 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
128896975 | 4 days ago | 0.147151 ETH | ||||
128874805 | 5 days ago | 0.13717 ETH | ||||
128834661 | 6 days ago | 0.122933 ETH | ||||
128832295 | 6 days ago | 0.103451 ETH | ||||
128778860 | 7 days ago | 0.163997 ETH | ||||
128770959 | 7 days ago | 0.115498 ETH | ||||
128736951 | 8 days ago | 0.170523 ETH | ||||
128732264 | 8 days ago | 0.173948 ETH | ||||
128726535 | 8 days ago | 0.013018 ETH | ||||
128724892 | 8 days ago | 0.016645 ETH | ||||
128693369 | 9 days ago | 0.173788 ETH | ||||
128668598 | 9 days ago | 0.140644 ETH | ||||
128665967 | 10 days ago | 0.169811 ETH | ||||
128662407 | 10 days ago | 0.159202 ETH | ||||
128653223 | 10 days ago | 0.158316 ETH | ||||
128610600 | 11 days ago | 0.099263 ETH | ||||
128604372 | 11 days ago | 0.166221 ETH | ||||
128601055 | 11 days ago | 0.12995 ETH | ||||
128580409 | 12 days ago | 0.154076 ETH | ||||
128534066 | 13 days ago | 0.174707 ETH | ||||
128503535 | 13 days ago | 0.12006 ETH | ||||
128465801 | 14 days ago | 0.144048 ETH | ||||
128462625 | 14 days ago | 0.137692 ETH | ||||
128435016 | 15 days ago | 0.13859 ETH | ||||
128424783 | 15 days ago | 0.117813 ETH |
Loading...
Loading
Contract Name:
SpokePoolVerifier
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Address.sol"; import "./interfaces/SpokePoolInterface.sol"; /** * @notice SpokePoolVerifier is a contract that verifies that the SpokePool exists on this chain before sending ETH to it. * @dev This contract must be deployed via Create2 to the same address on all chains. That way, an errant transaction sent * to the wrong chain will be blocked by this contract rather than hitting a dead address. This means that this contract * will not work to protect chains, like zkSync, where Create2 address derivations don't match other chains. * Source: https://era.zksync.io/docs/reference/architecture/differences-with-ethereum.html#create-create2 */ contract SpokePoolVerifier { using Address for address; /** * @notice Passthrough function to `deposit()` on the SpokePool contract. * @dev Protects the caller from losing their ETH (or other native token) by reverting if the SpokePool address * they intended to call does not exist on this chain. Because this contract can be deployed at the same address * everywhere callers should be protected even if the transaction is submitted to an unintended network. * This contract should only be used for native token deposits, as this problem only exists for native tokens. * @param spokePool Address of the SpokePool contract that the user is intending to call. * @param recipient Address to receive funds at on destination chain. * @param originToken Token to lock into this contract to initiate deposit. * @param amount Amount of tokens to deposit. Will be amount of tokens to receive less fees. * @param destinationChainId Denotes network where user will receive funds from SpokePool by a relayer. * @param relayerFeePct % of deposit amount taken out to incentivize a fast relayer. * @param quoteTimestamp Timestamp used by relayers to compute this deposit's realizedLPFeePct which is paid * to LP pool on HubPool. * @param message Arbitrary data that can be used to pass additional information to the recipient along with the tokens. * Note: this is intended to be used to pass along instructions for how a contract should use or allocate the tokens. * @param maxCount used to protect the depositor from frontrunning to guarantee their quote remains valid. */ function deposit( SpokePoolInterface spokePool, address recipient, address originToken, uint256 amount, uint256 destinationChainId, int64 relayerFeePct, uint32 quoteTimestamp, bytes memory message, uint256 maxCount ) external payable { require(msg.value == amount, "msg.value != amount"); require(address(spokePool).isContract(), "spokePool is not a contract"); spokePool.deposit{ value: msg.value }( recipient, originToken, amount, destinationChainId, relayerFeePct, quoteTimestamp, message, maxCount ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; /** * @notice Contains common data structures and functions used by all SpokePool implementations. */ interface SpokePoolInterface { // This leaf is meant to be decoded in the SpokePool to pay out successful relayers. struct RelayerRefundLeaf { // This is the amount to return to the HubPool. This occurs when there is a PoolRebalanceLeaf netSendAmount that // is negative. This is just the negative of this value. uint256 amountToReturn; // Used to verify that this is being executed on the correct destination chainId. uint256 chainId; // This array designates how much each of those addresses should be refunded. uint256[] refundAmounts; // Used as the index in the bitmap to track whether this leaf has been executed or not. uint32 leafId; // The associated L2TokenAddress that these claims apply to. address l2TokenAddress; // Must be same length as refundAmounts and designates each address that must be refunded. address[] refundAddresses; } // This struct represents the data to fully specify a relay. If any portion of this data differs, the relay is // considered to be completely distinct. Only one relay for a particular depositId, chainId pair should be // considered valid and repaid. This data is hashed and inserted into the slow relay merkle root so that an off // chain validator can choose when to refund slow relayers. struct RelayData { // The address that made the deposit on the origin chain. address depositor; // The recipient address on the destination chain. address recipient; // The corresponding token address on the destination chain. address destinationToken; // The total relay amount before fees are taken out. uint256 amount; // Origin chain id. uint256 originChainId; // Destination chain id. uint256 destinationChainId; // The LP Fee percentage computed by the relayer based on the deposit's quote timestamp // and the HubPool's utilization. int64 realizedLpFeePct; // The relayer fee percentage specified in the deposit. int64 relayerFeePct; // The id uniquely identifying this deposit on the origin chain. uint32 depositId; // Data that is forwarded to the recipient. bytes message; } struct SlowFill { RelayData relayData; int256 payoutAdjustmentPct; } // Stores collection of merkle roots that can be published to this contract from the HubPool, which are referenced // by "data workers" via inclusion proofs to execute leaves in the roots. struct RootBundle { // Merkle root of slow relays that were not fully filled and whose recipient is still owed funds from the LP pool. bytes32 slowRelayRoot; // Merkle root of relayer refunds for successful relays. bytes32 relayerRefundRoot; // This is a 2D bitmap tracking which leaves in the relayer refund root have been claimed, with max size of // 256x(2^248) leaves per root. mapping(uint256 => uint256) claimedBitmap; } function setCrossDomainAdmin(address newCrossDomainAdmin) external; function setHubPool(address newHubPool) external; function setEnableRoute( address originToken, uint256 destinationChainId, bool enable ) external; function pauseDeposits(bool pause) external; function pauseFills(bool pause) external; function setDepositQuoteTimeBuffer(uint32 buffer) external; function relayRootBundle(bytes32 relayerRefundRoot, bytes32 slowRelayRoot) external; function emergencyDeleteRootBundle(uint256 rootBundleId) external; function deposit( address recipient, address originToken, uint256 amount, uint256 destinationChainId, int64 relayerFeePct, uint32 quoteTimestamp, bytes memory message, uint256 maxCount ) external payable; function depositNow( address recipient, address originToken, uint256 amount, uint256 destinationChainId, int64 relayerFeePct, bytes memory message, uint256 maxCount ) external payable; function speedUpDeposit( address depositor, int64 updatedRelayerFeePct, uint32 depositId, address updatedRecipient, bytes memory updatedMessage, bytes memory depositorSignature ) external; function fillRelay( address depositor, address recipient, address destinationToken, uint256 amount, uint256 maxTokensToSend, uint256 repaymentChainId, uint256 originChainId, int64 realizedLpFeePct, int64 relayerFeePct, uint32 depositId, bytes memory message, uint256 maxCount ) external; function fillRelayWithUpdatedDeposit( address depositor, address recipient, address updatedRecipient, address destinationToken, uint256 amount, uint256 maxTokensToSend, uint256 repaymentChainId, uint256 originChainId, int64 realizedLpFeePct, int64 relayerFeePct, int64 updatedRelayerFeePct, uint32 depositId, bytes memory message, bytes memory updatedMessage, bytes memory depositorSignature, uint256 maxCount ) external; function executeSlowRelayLeaf( address depositor, address recipient, address destinationToken, uint256 amount, uint256 originChainId, int64 realizedLpFeePct, int64 relayerFeePct, uint32 depositId, uint32 rootBundleId, bytes memory message, int256 payoutAdjustment, bytes32[] memory proof ) external; function executeRelayerRefundLeaf( uint32 rootBundleId, SpokePoolInterface.RelayerRefundLeaf memory relayerRefundLeaf, bytes32[] memory proof ) external; function chainId() external view returns (uint256); }
{ "optimizer": { "enabled": true, "runs": 1000000 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract SpokePoolInterface","name":"spokePool","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"originToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"int64","name":"relayerFeePct","type":"int64"},{"internalType":"uint32","name":"quoteTimestamp","type":"uint32"},{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"uint256","name":"maxCount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
60808060405234610016576103c3908161001c8239f35b600080fdfe608060048036101561001057600080fd5b600091823560e01c63e0db3fcf1461002757600080fd5b6101207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038957813573ffffffffffffffffffffffffffffffffffffffff908181168091036103855760249182359181831680930361038157604435918216809203610381576064359460a435928360070b80940361037d5760c4359663ffffffff88168098036103795760e4359767ffffffffffffffff95868a11610375573660238b01121561037557898b01359287841161034a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09485603f81601f880116011687019b8c8a89821091111761031e578e9060409d8e52868952368d888301011161031a57868d97602098899301838c0137890101528134036102be57873b1561026257873b1561025e579b989593918d979593918c519d8e987f1186ec33000000000000000000000000000000000000000000000000000000008a528c8a01528c89015260448801526084356064880152608487015260a486015261010060c4860152825190610104938285880152875b83811061024157505050849291601f849261012494898683870101523560e48501520116810103019134905af18015610237576101fb578580f35b841161020d5750505238808080808580f35b604185917f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b84513d88823e3d90fd5b81810183015197810161012401979097528d97508c9682016101c0565b8d80fd5b5060648c601b8c878f51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f73706f6b65506f6f6c206973206e6f74206120636f6e747261637400000000006044820152fd5b5060648c60138c878f51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f6d73672e76616c756520213d20616d6f756e74000000000000000000000000006044820152fd5b5080fd5b508a8e60418f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b898d60418e7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8b80fd5b8980fd5b8880fd5b8680fd5b8480fd5b8280fdfea2646970667358221220fe313dd010e3aac8603c847d2fd84c8d4a95364db43b887b61b615152b259cdf64736f6c63430008120033
Deployed Bytecode
0x608060048036101561001057600080fd5b600091823560e01c63e0db3fcf1461002757600080fd5b6101207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038957813573ffffffffffffffffffffffffffffffffffffffff908181168091036103855760249182359181831680930361038157604435918216809203610381576064359460a435928360070b80940361037d5760c4359663ffffffff88168098036103795760e4359767ffffffffffffffff95868a11610375573660238b01121561037557898b01359287841161034a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09485603f81601f880116011687019b8c8a89821091111761031e578e9060409d8e52868952368d888301011161031a57868d97602098899301838c0137890101528134036102be57873b1561026257873b1561025e579b989593918d979593918c519d8e987f1186ec33000000000000000000000000000000000000000000000000000000008a528c8a01528c89015260448801526084356064880152608487015260a486015261010060c4860152825190610104938285880152875b83811061024157505050849291601f849261012494898683870101523560e48501520116810103019134905af18015610237576101fb578580f35b841161020d5750505238808080808580f35b604185917f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b84513d88823e3d90fd5b81810183015197810161012401979097528d97508c9682016101c0565b8d80fd5b5060648c601b8c878f51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f73706f6b65506f6f6c206973206e6f74206120636f6e747261637400000000006044820152fd5b5060648c60138c878f51937f08c379a00000000000000000000000000000000000000000000000000000000085528401528201527f6d73672e76616c756520213d20616d6f756e74000000000000000000000000006044820152fd5b5080fd5b508a8e60418f7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b898d60418e7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8b80fd5b8980fd5b8880fd5b8680fd5b8480fd5b8280fdfea2646970667358221220fe313dd010e3aac8603c847d2fd84c8d4a95364db43b887b61b615152b259cdf64736f6c63430008120033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.