Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 41191889 | 2 days ago | 0.00003407 ETH | ||||
| 41191889 | 2 days ago | 0.00007407 ETH | ||||
| 41191889 | 2 days ago | 0.00010814 ETH | ||||
| 41148309 | 3 days ago | 0.00003356 ETH | ||||
| 41148309 | 3 days ago | 0.00007407 ETH | ||||
| 41148309 | 3 days ago | 0.00010763 ETH | ||||
| 41109530 | 4 days ago | 0.00003414 ETH | ||||
| 41109530 | 4 days ago | 0.00007407 ETH | ||||
| 41109530 | 4 days ago | 0.00010821 ETH | ||||
| 40839285 | 10 days ago | 0.00003003 ETH | ||||
| 40839285 | 10 days ago | 0.00006905 ETH | ||||
| 40839285 | 10 days ago | 0.00009909 ETH | ||||
| 40796265 | 11 days ago | 0.00002999 ETH | ||||
| 40796265 | 11 days ago | 0.00006905 ETH | ||||
| 40796265 | 11 days ago | 0.00009905 ETH | ||||
| 40625044 | 15 days ago | 0.00003239 ETH | ||||
| 40625044 | 15 days ago | 0.00006905 ETH | ||||
| 40625044 | 15 days ago | 0.00010145 ETH | ||||
| 40302758 | 23 days ago | 0.00003203 ETH | ||||
| 40302758 | 23 days ago | 0.0000737 ETH | ||||
| 40302758 | 23 days ago | 0.00010573 ETH | ||||
| 40210023 | 25 days ago | 0.00003366 ETH | ||||
| 40210023 | 25 days ago | 0.0000737 ETH | ||||
| 40210023 | 25 days ago | 0.00010737 ETH | ||||
| 40201745 | 25 days ago | 0.00003347 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
AmountRoutingHook
Compiler Version
v0.8.22+commit.4fc1097e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.0;
// ============ External Imports ============
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
// ============ Internal Imports ============
import {AbstractPostDispatchHook} from "../libs/AbstractPostDispatchHook.sol";
import {IPostDispatchHook} from "../../interfaces/hooks/IPostDispatchHook.sol";
import {AmountPartition} from "../../token/libs/AmountPartition.sol";
import {IInterchainSecurityModule} from "../../interfaces/IInterchainSecurityModule.sol";
import {Message} from "../../libs/Message.sol";
import {PackageVersioned} from "../../PackageVersioned.sol";
import {TokenMessage} from "../../token/libs/TokenMessage.sol";
/**
* @title AmountRoutingHook
*/
contract AmountRoutingHook is AmountPartition, AbstractPostDispatchHook {
constructor(
address _lowerHook,
address _upperHook,
uint256 _threshold
) AmountPartition(_lowerHook, _upperHook, _threshold) {}
function hookType() external pure override returns (uint8) {
return uint8(IPostDispatchHook.Types.AMOUNT_ROUTING);
}
function _postDispatch(
bytes calldata _metadata,
bytes calldata _message
) internal override {
uint256 quote = _quoteDispatch(_metadata, _message);
IPostDispatchHook(_partition(_message)).postDispatch{value: quote}(
_metadata,
_message
);
return _refund(_metadata, _message, msg.value - quote);
}
function _quoteDispatch(
bytes calldata _metadata,
bytes calldata _message
) internal view override returns (uint256) {
return
IPostDispatchHook(_partition(_message)).quoteDispatch(
_metadata,
_message
);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// 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: MIT OR Apache-2.0
pragma solidity >=0.8.0;
/*@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ HYPERLANE @@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@*/
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
// ============ Internal Imports ============
import {StandardHookMetadata} from "./StandardHookMetadata.sol";
import {IPostDispatchHook} from "../../interfaces/hooks/IPostDispatchHook.sol";
import {PackageVersioned} from "../../PackageVersioned.sol";
import {Message} from "../../libs/Message.sol";
/**
* @title AbstractPostDispatch
* @notice Abstract post dispatch hook supporting the current global hook metadata variant.
*/
abstract contract AbstractPostDispatchHook is
IPostDispatchHook,
PackageVersioned
{
using StandardHookMetadata for bytes;
using Message for bytes;
using Address for address payable;
// ============ External functions ============
/// @inheritdoc IPostDispatchHook
function supportsMetadata(
bytes calldata metadata
) public pure virtual override returns (bool) {
return
metadata.length == 0 ||
metadata.variant() == StandardHookMetadata.VARIANT;
}
function _refund(
bytes calldata metadata,
bytes calldata message,
uint256 amount
) internal {
if (amount == 0) {
return;
}
address refundAddress = metadata.refundAddress(message.senderAddress());
require(
refundAddress != address(0),
"AbstractPostDispatchHook: no refund address"
);
payable(refundAddress).sendValue(amount);
}
/// @inheritdoc IPostDispatchHook
function postDispatch(
bytes calldata metadata,
bytes calldata message
) external payable override {
require(
supportsMetadata(metadata),
"AbstractPostDispatchHook: invalid metadata variant"
);
_postDispatch(metadata, message);
}
/// @inheritdoc IPostDispatchHook
function quoteDispatch(
bytes calldata metadata,
bytes calldata message
) public view override returns (uint256) {
require(
supportsMetadata(metadata),
"AbstractPostDispatchHook: invalid metadata variant"
);
return _quoteDispatch(metadata, message);
}
// ============ Internal functions ============
/**
* @notice Post dispatch hook implementation.
* @param metadata The metadata of the message being dispatched.
* @param message The message being dispatched.
*/
function _postDispatch(
bytes calldata metadata,
bytes calldata message
) internal virtual;
/**
* @notice Quote dispatch hook implementation.
* @param metadata The metadata of the message being dispatched.
* @param message The message being dispatched.
* @return The quote for the dispatch.
*/
function _quoteDispatch(
bytes calldata metadata,
bytes calldata message
) internal view virtual returns (uint256);
}// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.0;
/*@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ HYPERLANE @@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@*/
interface IPostDispatchHook {
enum Types {
UNUSED,
ROUTING,
AGGREGATION,
MERKLE_TREE,
INTERCHAIN_GAS_PAYMASTER,
FALLBACK_ROUTING,
ID_AUTH_ISM,
PAUSABLE,
PROTOCOL_FEE,
LAYER_ZERO_V1,
RATE_LIMITED,
ARB_L2_TO_L1,
OP_L2_TO_L1,
MAILBOX_DEFAULT_HOOK,
AMOUNT_ROUTING
}
/**
* @notice Returns an enum that represents the type of hook
*/
function hookType() external view returns (uint8);
/**
* @notice Returns whether the hook supports metadata
* @param metadata metadata
* @return Whether the hook supports metadata
*/
function supportsMetadata(
bytes calldata metadata
) external view returns (bool);
/**
* @notice Post action after a message is dispatched via the Mailbox
* @param metadata The metadata required for the hook
* @param message The message passed from the Mailbox.dispatch() call
*/
function postDispatch(
bytes calldata metadata,
bytes calldata message
) external payable;
/**
* @notice Compute the payment required by the postDispatch call
* @param metadata The metadata required for the hook
* @param message The message passed from the Mailbox.dispatch() call
* @return Quoted payment for the postDispatch call
*/
function quoteDispatch(
bytes calldata metadata,
bytes calldata message
) external view returns (uint256);
}// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.0;
// ============ External Imports ============
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
// ============ Internal Imports ============
import {Message} from "../../libs/Message.sol";
import {PackageVersioned} from "../../PackageVersioned.sol";
import {TokenMessage} from "../../token/libs/TokenMessage.sol";
/**
* @title AmountPartition
*/
abstract contract AmountPartition is PackageVersioned {
using Message for bytes;
using TokenMessage for bytes;
using Address for address;
address public immutable lower;
address public immutable upper;
uint256 public immutable threshold;
constructor(address _lower, address _upper, uint256 _threshold) {
require(
_lower.isContract() && _upper.isContract(),
"AmountPartition: lower and upper must be contracts"
);
lower = _lower;
upper = _upper;
threshold = _threshold;
}
function _partition(
bytes calldata _message
) internal view returns (address) {
uint256 amount = _message.body().amount();
if (amount >= threshold) {
return upper;
} else {
return lower;
}
}
}// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.6.11;
interface IInterchainSecurityModule {
enum Types {
UNUSED,
ROUTING,
AGGREGATION,
LEGACY_MULTISIG,
MERKLE_ROOT_MULTISIG,
MESSAGE_ID_MULTISIG,
NULL, // used with relayer carrying no metadata
CCIP_READ,
ARB_L2_TO_L1,
WEIGHTED_MERKLE_ROOT_MULTISIG,
WEIGHTED_MESSAGE_ID_MULTISIG,
OP_L2_TO_L1
}
/**
* @notice Returns an enum that represents the type of security model
* encoded by this ISM.
* @dev Relayers infer how to fetch and format metadata.
*/
function moduleType() external view returns (uint8);
/**
* @notice Defines a security model responsible for verifying interchain
* messages based on the provided metadata.
* @param _metadata Off-chain metadata provided by a relayer, specific to
* the security model encoded by the module (e.g. validator signatures)
* @param _message Hyperlane encoded interchain message
* @return True if the message was verified
*/
function verify(
bytes calldata _metadata,
bytes calldata _message
) external returns (bool);
}
interface ISpecifiesInterchainSecurityModule {
function interchainSecurityModule()
external
view
returns (IInterchainSecurityModule);
}// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.0;
import {TypeCasts} from "./TypeCasts.sol";
/**
* @title Hyperlane Message Library
* @notice Library for formatted messages used by Mailbox
**/
library Message {
using TypeCasts for bytes32;
uint256 private constant VERSION_OFFSET = 0;
uint256 private constant NONCE_OFFSET = 1;
uint256 private constant ORIGIN_OFFSET = 5;
uint256 private constant SENDER_OFFSET = 9;
uint256 private constant DESTINATION_OFFSET = 41;
uint256 private constant RECIPIENT_OFFSET = 45;
uint256 private constant BODY_OFFSET = 77;
/**
* @notice Returns formatted (packed) Hyperlane message with provided fields
* @dev This function should only be used in memory message construction.
* @param _version The version of the origin and destination Mailboxes
* @param _nonce A nonce to uniquely identify the message on its origin chain
* @param _originDomain Domain of origin chain
* @param _sender Address of sender as bytes32
* @param _destinationDomain Domain of destination chain
* @param _recipient Address of recipient on destination chain as bytes32
* @param _messageBody Raw bytes of message body
* @return Formatted message
*/
function formatMessage(
uint8 _version,
uint32 _nonce,
uint32 _originDomain,
bytes32 _sender,
uint32 _destinationDomain,
bytes32 _recipient,
bytes calldata _messageBody
) internal pure returns (bytes memory) {
return
abi.encodePacked(
_version,
_nonce,
_originDomain,
_sender,
_destinationDomain,
_recipient,
_messageBody
);
}
/**
* @notice Returns the message ID.
* @param _message ABI encoded Hyperlane message.
* @return ID of `_message`
*/
function id(bytes memory _message) internal pure returns (bytes32) {
return keccak256(_message);
}
/**
* @notice Returns the message version.
* @param _message ABI encoded Hyperlane message.
* @return Version of `_message`
*/
function version(bytes calldata _message) internal pure returns (uint8) {
return uint8(bytes1(_message[VERSION_OFFSET:NONCE_OFFSET]));
}
/**
* @notice Returns the message nonce.
* @param _message ABI encoded Hyperlane message.
* @return Nonce of `_message`
*/
function nonce(bytes calldata _message) internal pure returns (uint32) {
return uint32(bytes4(_message[NONCE_OFFSET:ORIGIN_OFFSET]));
}
/**
* @notice Returns the message origin domain.
* @param _message ABI encoded Hyperlane message.
* @return Origin domain of `_message`
*/
function origin(bytes calldata _message) internal pure returns (uint32) {
return uint32(bytes4(_message[ORIGIN_OFFSET:SENDER_OFFSET]));
}
/**
* @notice Returns the message sender as bytes32.
* @param _message ABI encoded Hyperlane message.
* @return Sender of `_message` as bytes32
*/
function sender(bytes calldata _message) internal pure returns (bytes32) {
return bytes32(_message[SENDER_OFFSET:DESTINATION_OFFSET]);
}
/**
* @notice Returns the message sender as address.
* @param _message ABI encoded Hyperlane message.
* @return Sender of `_message` as address
*/
function senderAddress(
bytes calldata _message
) internal pure returns (address) {
return sender(_message).bytes32ToAddress();
}
/**
* @notice Returns the message destination domain.
* @param _message ABI encoded Hyperlane message.
* @return Destination domain of `_message`
*/
function destination(
bytes calldata _message
) internal pure returns (uint32) {
return uint32(bytes4(_message[DESTINATION_OFFSET:RECIPIENT_OFFSET]));
}
/**
* @notice Returns the message recipient as bytes32.
* @param _message ABI encoded Hyperlane message.
* @return Recipient of `_message` as bytes32
*/
function recipient(
bytes calldata _message
) internal pure returns (bytes32) {
return bytes32(_message[RECIPIENT_OFFSET:BODY_OFFSET]);
}
/**
* @notice Returns the message recipient as address.
* @param _message ABI encoded Hyperlane message.
* @return Recipient of `_message` as address
*/
function recipientAddress(
bytes calldata _message
) internal pure returns (address) {
return recipient(_message).bytes32ToAddress();
}
/**
* @notice Returns the message body.
* @param _message ABI encoded Hyperlane message.
* @return Body of `_message`
*/
function body(
bytes calldata _message
) internal pure returns (bytes calldata) {
return bytes(_message[BODY_OFFSET:]);
}
}// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.6.11;
/**
* @title PackageVersioned
* @notice Package version getter for contracts
**/
abstract contract PackageVersioned {
// GENERATED CODE - DO NOT EDIT
string public constant PACKAGE_VERSION = "5.11.3";
}// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.0;
library TokenMessage {
function format(
bytes32 _recipient,
uint256 _amount,
bytes memory _metadata
) internal pure returns (bytes memory) {
return abi.encodePacked(_recipient, _amount, _metadata);
}
function recipient(bytes calldata message) internal pure returns (bytes32) {
return bytes32(message[0:32]);
}
function amount(bytes calldata message) internal pure returns (uint256) {
return uint256(bytes32(message[32:64]));
}
// alias for ERC721
function tokenId(bytes calldata message) internal pure returns (uint256) {
return amount(message);
}
function metadata(
bytes calldata message
) internal pure returns (bytes calldata) {
return message[64:];
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.8.0;
/*@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ HYPERLANE @@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@*/
/**
* Format of metadata:
*
* [0:2] variant
* [2:34] msg.value
* [34:66] Gas limit for message (IGP)
* [66:86] Refund address for message (IGP)
* [86:] Custom metadata
*/
library StandardHookMetadata {
struct Metadata {
uint16 variant;
uint256 msgValue;
uint256 gasLimit;
address refundAddress;
}
uint8 private constant VARIANT_OFFSET = 0;
uint8 private constant MSG_VALUE_OFFSET = 2;
uint8 private constant GAS_LIMIT_OFFSET = 34;
uint8 private constant REFUND_ADDRESS_OFFSET = 66;
uint256 private constant MIN_METADATA_LENGTH = 86;
uint16 public constant VARIANT = 1;
/**
* @notice Returns the variant of the metadata.
* @param _metadata ABI encoded standard hook metadata.
* @return variant of the metadata as uint8.
*/
function variant(bytes calldata _metadata) internal pure returns (uint16) {
if (_metadata.length < VARIANT_OFFSET + 2) return 0;
return uint16(bytes2(_metadata[VARIANT_OFFSET:VARIANT_OFFSET + 2]));
}
/**
* @notice Returns the specified value for the message.
* @param _metadata ABI encoded standard hook metadata.
* @param _default Default fallback value.
* @return Value for the message as uint256.
*/
function msgValue(
bytes calldata _metadata,
uint256 _default
) internal pure returns (uint256) {
if (_metadata.length < MSG_VALUE_OFFSET + 32) return _default;
return
uint256(bytes32(_metadata[MSG_VALUE_OFFSET:MSG_VALUE_OFFSET + 32]));
}
/**
* @notice Returns the specified gas limit for the message.
* @param _metadata ABI encoded standard hook metadata.
* @param _default Default fallback gas limit.
* @return Gas limit for the message as uint256.
*/
function gasLimit(
bytes calldata _metadata,
uint256 _default
) internal pure returns (uint256) {
if (_metadata.length < GAS_LIMIT_OFFSET + 32) return _default;
return
uint256(bytes32(_metadata[GAS_LIMIT_OFFSET:GAS_LIMIT_OFFSET + 32]));
}
/**
* @notice Returns the specified refund address for the message.
* @param _metadata ABI encoded standard hook metadata.
* @param _default Default fallback refund address.
* @return Refund address for the message as address.
*/
function refundAddress(
bytes calldata _metadata,
address _default
) internal pure returns (address) {
if (_metadata.length < REFUND_ADDRESS_OFFSET + 20) return _default;
return
address(
bytes20(
_metadata[REFUND_ADDRESS_OFFSET:REFUND_ADDRESS_OFFSET + 20]
)
);
}
/**
* @notice Returns any custom metadata.
* @param _metadata ABI encoded standard hook metadata.
* @return Custom metadata.
*/
function getCustomMetadata(
bytes calldata _metadata
) internal pure returns (bytes calldata) {
if (_metadata.length < MIN_METADATA_LENGTH) return _metadata[0:0];
return _metadata[MIN_METADATA_LENGTH:];
}
/**
* @notice Formats the specified gas limit and refund address into standard hook metadata.
* @param _msgValue msg.value for the message.
* @param _gasLimit Gas limit for the message.
* @param _refundAddress Refund address for the message.
* @param _customMetadata Additional metadata to include in the standard hook metadata.
* @return ABI encoded standard hook metadata.
*/
function formatMetadata(
uint256 _msgValue,
uint256 _gasLimit,
address _refundAddress,
bytes memory _customMetadata
) internal pure returns (bytes memory) {
return
abi.encodePacked(
VARIANT,
_msgValue,
_gasLimit,
_refundAddress,
_customMetadata
);
}
/**
* @notice Formats the specified gas limit and refund address into standard hook metadata.
* @param _msgValue msg.value for the message.
* @return ABI encoded standard hook metadata.
*/
function overrideMsgValue(
uint256 _msgValue
) internal view returns (bytes memory) {
return formatMetadata(_msgValue, uint256(0), msg.sender, "");
}
/**
* @notice Formats the specified gas limit and refund address into standard hook metadata.
* @param _gasLimit Gas limit for the message.
* @return ABI encoded standard hook metadata.
*/
function overrideGasLimit(
uint256 _gasLimit
) internal view returns (bytes memory) {
return formatMetadata(uint256(0), _gasLimit, msg.sender, "");
}
/**
* @notice Formats the specified refund address into standard hook metadata.
* @param _refundAddress Refund address for the message.
* @return ABI encoded standard hook metadata.
*/
function overrideRefundAddress(
address _refundAddress
) internal pure returns (bytes memory) {
return formatMetadata(uint256(0), uint256(0), _refundAddress, "");
}
}// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.6.11;
library TypeCasts {
// alignment preserving cast
function addressToBytes32(address _addr) internal pure returns (bytes32) {
return bytes32(uint256(uint160(_addr)));
}
// alignment preserving cast
function bytes32ToAddress(bytes32 _buf) internal pure returns (address) {
require(
uint256(_buf) <= uint256(type(uint160).max),
"TypeCasts: bytes32ToAddress overflow"
);
return address(uint160(uint256(_buf)));
}
}{
"optimizer": {
"enabled": true,
"runs": 999999
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_lowerHook","type":"address"},{"internalType":"address","name":"_upperHook","type":"address"},{"internalType":"uint256","name":"_threshold","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"PACKAGE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hookType","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"lower","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"metadata","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"name":"postDispatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"metadata","type":"bytes"},{"internalType":"bytes","name":"message","type":"bytes"}],"name":"quoteDispatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"metadata","type":"bytes"}],"name":"supportsMetadata","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"threshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"upper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60e060405234801561001057600080fd5b50604051610e4e380380610e4e83398101604081905261002f916100fa565b8282826001600160a01b0383163b1515801561005457506001600160a01b0382163b15155b6100bf5760405162461bcd60e51b815260206004820152603260248201527f416d6f756e74506172746974696f6e3a206c6f77657220616e64207570706572604482015271206d75737420626520636f6e74726163747360701b606482015260840160405180910390fd5b6001600160a01b03928316608052911660a05260c05250610136915050565b80516001600160a01b03811681146100f557600080fd5b919050565b60008060006060848603121561010f57600080fd5b610118846100de565b9250610126602085016100de565b9150604084015190509250925092565b60805160a05160c051610cd66101786000396000818160a7015261054901526000818160ee01526105700152600081816101bd01526105990152610cd66000f3fe60806040526004361061007b5760003560e01c8063aaccd2301161004e578063aaccd2301461018b578063b951486d146101ab578063e445e7dd146101df578063e5320bb9146101fb57600080fd5b8063086011b91461008057806342cde4e8146100955780634bdf4a6d146100dc57806393c4484714610135575b600080fd5b61009361008e3660046109a2565b61022b565b005b3480156100a157600080fd5b506100c97f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b3480156100e857600080fd5b506101107f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100d3565b34801561014157600080fd5b5061017e6040518060400160405280600681526020017f352e31312e33000000000000000000000000000000000000000000000000000081525081565b6040516100d39190610a0e565b34801561019757600080fd5b506100c96101a63660046109a2565b6102d8565b3480156101b757600080fd5b506101107f000000000000000000000000000000000000000000000000000000000000000081565b3480156101eb57600080fd5b50604051600e81526020016100d3565b34801561020757600080fd5b5061021b610216366004610a7b565b610385565b60405190151581526020016100d3565b6102358484610385565b6102c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4162737472616374506f73744469737061746368486f6f6b3a20696e76616c6960448201527f64206d657461646174612076617269616e74000000000000000000000000000060648201526084015b60405180910390fd5b6102d2848484846103aa565b50505050565b60006102e48585610385565b610370576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4162737472616374506f73744469737061746368486f6f6b3a20696e76616c6960448201527f64206d657461646174612076617269616e74000000000000000000000000000060648201526084016102bd565b61037c85858585610454565b95945050505050565b60008115806103a15750600161039b84846104df565b61ffff16145b90505b92915050565b60006103b885858585610454565b90506103c48383610530565b73ffffffffffffffffffffffffffffffffffffffff1663086011b982878787876040518663ffffffff1660e01b81526004016104039493929190610b06565b6000604051808303818588803b15801561041c57600080fd5b505af1158015610430573d6000803e3d6000fd5b505050505061044d8585858585346104489190610b67565b6105c0565b5050505050565b60006104608383610530565b73ffffffffffffffffffffffffffffffffffffffff1663aaccd230868686866040518563ffffffff1660e01b815260040161049e9493929190610b06565b602060405180830381865afa1580156104bb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037c9190610b7a565b60006104ec816002610b93565b60ff168210156104fe575060006103a4565b8260008361050d826002610b93565b60ff169261051d93929190610bac565b61052691610bd6565b60f01c9392505050565b60008061054561054085856106ab565b6106c7565b90507f00000000000000000000000000000000000000000000000000000000000000008110610597577f00000000000000000000000000000000000000000000000000000000000000009150506103a4565b7f00000000000000000000000000000000000000000000000000000000000000009150506103a4565b801561044d5760006105de6105d585856106e0565b879087906106f4565b905073ffffffffffffffffffffffffffffffffffffffff8116610683576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4162737472616374506f73744469737061746368486f6f6b3a206e6f2072656660448201527f756e64206164647265737300000000000000000000000000000000000000000060648201526084016102bd565b6106a373ffffffffffffffffffffffffffffffffffffffff821683610748565b505050505050565b3660006106bb83604d8187610bac565b915091505b9250929050565b60006106d7604060208486610bac565b6103a191610c1e565b60006103a16106ef84846108a7565b6108b7565b600061070260426014610b93565b60ff16831015610713575080610741565b83604284610722826014610b93565b60ff169261073293929190610bac565b61073b91610c5a565b60601c90505b9392505050565b804710156107b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102bd565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461080c576040519150601f19603f3d011682016040523d82523d6000602084013e610811565b606091505b50509050806108a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102bd565b505050565b60006106d7602960098486610bac565b600073ffffffffffffffffffffffffffffffffffffffff82111561095c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f5479706543617374733a2062797465733332546f41646472657373206f76657260448201527f666c6f770000000000000000000000000000000000000000000000000000000060648201526084016102bd565b5090565b60008083601f84011261097257600080fd5b50813567ffffffffffffffff81111561098a57600080fd5b6020830191508360208285010111156106c057600080fd5b600080600080604085870312156109b857600080fd5b843567ffffffffffffffff808211156109d057600080fd5b6109dc88838901610960565b909650945060208701359150808211156109f557600080fd5b50610a0287828801610960565b95989497509550505050565b60006020808352835180602085015260005b81811015610a3c57858101830151858201604001528201610a20565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60008060208385031215610a8e57600080fd5b823567ffffffffffffffff811115610aa557600080fd5b610ab185828601610960565b90969095509350505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000610b1a604083018688610abd565b8281036020840152610b2d818587610abd565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156103a4576103a4610b38565b600060208284031215610b8c57600080fd5b5051919050565b60ff81811683821601908111156103a4576103a4610b38565b60008085851115610bbc57600080fd5b83861115610bc957600080fd5b5050820193919092039150565b7fffff0000000000000000000000000000000000000000000000000000000000008135818116916002851015610c165780818660020360031b1b83161692505b505092915050565b803560208310156103a4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008135818116916014851015610c165760149490940360031b84901b169092169291505056fea2646970667358221220cce2c9f40afe7652dd4b761bf910541894d5c0d26d0ca6228292cdc5c32e277b64736f6c634300081600330000000000000000000000000e4790d7fbba7f2471dde668449bb5c492b1301a000000000000000000000000a472418689c532e9322d064eea0d381e04a0f2410000000000000000000000000000000000000000000000000000003a35294400
Deployed Bytecode
0x60806040526004361061007b5760003560e01c8063aaccd2301161004e578063aaccd2301461018b578063b951486d146101ab578063e445e7dd146101df578063e5320bb9146101fb57600080fd5b8063086011b91461008057806342cde4e8146100955780634bdf4a6d146100dc57806393c4484714610135575b600080fd5b61009361008e3660046109a2565b61022b565b005b3480156100a157600080fd5b506100c97f0000000000000000000000000000000000000000000000000000003a3529440081565b6040519081526020015b60405180910390f35b3480156100e857600080fd5b506101107f000000000000000000000000a472418689c532e9322d064eea0d381e04a0f24181565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100d3565b34801561014157600080fd5b5061017e6040518060400160405280600681526020017f352e31312e33000000000000000000000000000000000000000000000000000081525081565b6040516100d39190610a0e565b34801561019757600080fd5b506100c96101a63660046109a2565b6102d8565b3480156101b757600080fd5b506101107f0000000000000000000000000e4790d7fbba7f2471dde668449bb5c492b1301a81565b3480156101eb57600080fd5b50604051600e81526020016100d3565b34801561020757600080fd5b5061021b610216366004610a7b565b610385565b60405190151581526020016100d3565b6102358484610385565b6102c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4162737472616374506f73744469737061746368486f6f6b3a20696e76616c6960448201527f64206d657461646174612076617269616e74000000000000000000000000000060648201526084015b60405180910390fd5b6102d2848484846103aa565b50505050565b60006102e48585610385565b610370576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4162737472616374506f73744469737061746368486f6f6b3a20696e76616c6960448201527f64206d657461646174612076617269616e74000000000000000000000000000060648201526084016102bd565b61037c85858585610454565b95945050505050565b60008115806103a15750600161039b84846104df565b61ffff16145b90505b92915050565b60006103b885858585610454565b90506103c48383610530565b73ffffffffffffffffffffffffffffffffffffffff1663086011b982878787876040518663ffffffff1660e01b81526004016104039493929190610b06565b6000604051808303818588803b15801561041c57600080fd5b505af1158015610430573d6000803e3d6000fd5b505050505061044d8585858585346104489190610b67565b6105c0565b5050505050565b60006104608383610530565b73ffffffffffffffffffffffffffffffffffffffff1663aaccd230868686866040518563ffffffff1660e01b815260040161049e9493929190610b06565b602060405180830381865afa1580156104bb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037c9190610b7a565b60006104ec816002610b93565b60ff168210156104fe575060006103a4565b8260008361050d826002610b93565b60ff169261051d93929190610bac565b61052691610bd6565b60f01c9392505050565b60008061054561054085856106ab565b6106c7565b90507f0000000000000000000000000000000000000000000000000000003a352944008110610597577f000000000000000000000000a472418689c532e9322d064eea0d381e04a0f2419150506103a4565b7f0000000000000000000000000e4790d7fbba7f2471dde668449bb5c492b1301a9150506103a4565b801561044d5760006105de6105d585856106e0565b879087906106f4565b905073ffffffffffffffffffffffffffffffffffffffff8116610683576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4162737472616374506f73744469737061746368486f6f6b3a206e6f2072656660448201527f756e64206164647265737300000000000000000000000000000000000000000060648201526084016102bd565b6106a373ffffffffffffffffffffffffffffffffffffffff821683610748565b505050505050565b3660006106bb83604d8187610bac565b915091505b9250929050565b60006106d7604060208486610bac565b6103a191610c1e565b60006103a16106ef84846108a7565b6108b7565b600061070260426014610b93565b60ff16831015610713575080610741565b83604284610722826014610b93565b60ff169261073293929190610bac565b61073b91610c5a565b60601c90505b9392505050565b804710156107b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016102bd565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461080c576040519150601f19603f3d011682016040523d82523d6000602084013e610811565b606091505b50509050806108a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016102bd565b505050565b60006106d7602960098486610bac565b600073ffffffffffffffffffffffffffffffffffffffff82111561095c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f5479706543617374733a2062797465733332546f41646472657373206f76657260448201527f666c6f770000000000000000000000000000000000000000000000000000000060648201526084016102bd565b5090565b60008083601f84011261097257600080fd5b50813567ffffffffffffffff81111561098a57600080fd5b6020830191508360208285010111156106c057600080fd5b600080600080604085870312156109b857600080fd5b843567ffffffffffffffff808211156109d057600080fd5b6109dc88838901610960565b909650945060208701359150808211156109f557600080fd5b50610a0287828801610960565b95989497509550505050565b60006020808352835180602085015260005b81811015610a3c57858101830151858201604001528201610a20565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60008060208385031215610a8e57600080fd5b823567ffffffffffffffff811115610aa557600080fd5b610ab185828601610960565b90969095509350505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000610b1a604083018688610abd565b8281036020840152610b2d818587610abd565b979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156103a4576103a4610b38565b600060208284031215610b8c57600080fd5b5051919050565b60ff81811683821601908111156103a4576103a4610b38565b60008085851115610bbc57600080fd5b83861115610bc957600080fd5b5050820193919092039150565b7fffff0000000000000000000000000000000000000000000000000000000000008135818116916002851015610c165780818660020360031b1b83161692505b505092915050565b803560208310156103a4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008135818116916014851015610c165760149490940360031b84901b169092169291505056fea2646970667358221220cce2c9f40afe7652dd4b761bf910541894d5c0d26d0ca6228292cdc5c32e277b64736f6c63430008160033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000e4790d7fbba7f2471dde668449bb5c492b1301a000000000000000000000000a472418689c532e9322d064eea0d381e04a0f2410000000000000000000000000000000000000000000000000000003a35294400
-----Decoded View---------------
Arg [0] : _lowerHook (address): 0x0E4790d7FBbA7f2471dDe668449Bb5C492B1301A
Arg [1] : _upperHook (address): 0xa472418689c532E9322d064eEa0d381E04a0F241
Arg [2] : _threshold (uint256): 250000000000
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000e4790d7fbba7f2471dde668449bb5c492b1301a
Arg [1] : 000000000000000000000000a472418689c532e9322d064eea0d381e04a0f241
Arg [2] : 0000000000000000000000000000000000000000000000000000003a35294400
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.