Source Code
Overview
ETH Balance
0.215932059208360977 ETH
Eth Value
$450.09 (@ $2,084.41/ETH)Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 24460350 | 38 mins ago | 0.00000331 ETH | ||||
| Transfer | 24460269 | 54 mins ago | 0.00000362 ETH | ||||
| Transfer | 24460264 | 55 mins ago | 0.00000397 ETH | ||||
| Transfer | 24460250 | 58 mins ago | 0.00000377 ETH | ||||
| Transfer | 24460045 | 1 hr ago | 0.00000467 ETH | ||||
| Transfer | 24459968 | 1 hr ago | 0.0000036 ETH | ||||
| Transfer | 24459960 | 1 hr ago | 0.00000404 ETH | ||||
| Transfer | 24459945 | 1 hr ago | 0.00000374 ETH | ||||
| Transfer | 24459744 | 2 hrs ago | 0.00000475 ETH | ||||
| Transfer | 24459665 | 2 hrs ago | 0.00000392 ETH | ||||
| Transfer | 24459656 | 2 hrs ago | 0.00000384 ETH | ||||
| Transfer | 24459643 | 3 hrs ago | 0.00000381 ETH | ||||
| Transfer | 24459447 | 3 hrs ago | 0.00000584 ETH | ||||
| Transfer | 24459359 | 3 hrs ago | 0.00000382 ETH | ||||
| Transfer | 24459352 | 3 hrs ago | 0.00000372 ETH | ||||
| Transfer | 24459342 | 4 hrs ago | 0.00000389 ETH | ||||
| Transfer | 24459145 | 4 hrs ago | 0.00000467 ETH | ||||
| Transfer | 24459053 | 4 hrs ago | 0.00000449 ETH | ||||
| Transfer | 24459048 | 4 hrs ago | 0.00000449 ETH | ||||
| Transfer | 24459038 | 5 hrs ago | 0.00000433 ETH | ||||
| Transfer | 24458844 | 5 hrs ago | 0.00000461 ETH | ||||
| Transfer | 24458750 | 5 hrs ago | 0.00000352 ETH | ||||
| Transfer | 24458748 | 6 hrs ago | 0.00000323 ETH | ||||
| Transfer | 24458734 | 6 hrs ago | 0.00000393 ETH | ||||
| Transfer | 24458545 | 6 hrs ago | 0.00000411 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ProtocolFeeHook
Compiler Version
v0.8.29+commit.ab55807c
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.29 ^0.8.0;
// lib/openzeppelin-contracts/contracts/utils/Context.sol
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
/**
* @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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
// contracts/interfaces/hooks/IPostDispatchHook.sol
/*@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@ @@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@ 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_Hook
}
/**
* @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);
}
// lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}
// contracts/libs/TypeCasts.sol
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) {
return address(uint160(uint256(_buf)));
}
}
// contracts/interfaces/hooks/IProtocolFeeHook.sol
interface IProtocolFeeHook is IPostDispatchHook {
/// @notice Thrown when a message is already validated
error MessageAlreadyValidated();
/// @notice Thrown when the fee paid is insufficient
error InsufficientFeePaid();
/// @notice Thrown when the fee recipient is invalid
error InvalidFeeRecipient();
/// @notice Thrown when there is no balance to withdraw
error NoBalanceToWithdraw();
/// @notice Thrown when the mailbox address is unauthorized
error UnauthorizedMailbox();
/// @notice Thrown when the fee transfer fails
error FeeTransferFailed();
/// @notice Error thrown when an invalid address (zero address) is used.
error InvalidAddress();
/// @notice Emitted when a dispatch fee is paid
/// @param requiredFee The required fee
/// @param actualFee The actual fee paid
/// @param messageId The id of the message
event DispatchFeePaid(
uint256 requiredFee,
uint256 actualFee,
bytes32 messageId
);
/// @notice Emitted when the trusted mailbox is updated
/// @param previousMailBox The previous mailbox address
/// @param newMailBox The new mailbox address
event TrustedMailBoxUpdated(
address indexed previousMailBox,
address indexed newMailBox
);
/// @notice Emitted when the gas used per tx is updated
/// @param previousGasUsed The previous gas used per tx
/// @param newGasUsed The new gas used per tx
event GasUsedPerTxUpdated(uint256 previousGasUsed, uint256 newGasUsed);
/// @notice Emitted when the fees are withdrawn
/// @param feeRecipient The address of the fee recipient
/// @param amount The amount of fees withdrawn
event FeesWithdrawn(address indexed feeRecipient, uint256 amount);
/// @notice Emitted when the minimum fee is updated
/// @param previousMinFee The previous minimum fee
/// @param newMinFee The new minimum fee
event MinFeeWeiUpdated(uint256 previousMinFee, uint256 newMinFee);
/// @notice Thrown when there is insufficient balance to withdraw the requested amount
error InsufficientBalance();
/// @notice Sets the gas used per tx
/// @param _gasUsedPerTx The new gas used per tx
function setGasUsedPerTx(uint256 _gasUsedPerTx) external;
/// @notice Withdraws the fees
/// @param feeRecipient The address of the fee recipient
function withdrawFees(address feeRecipient, uint256 amount) external;
/// @notice Returns the gas used per tx
/// @return The gas used per tx
function gasUsedPerTx() external view returns (uint256);
/// @notice Returns the validation status of a message
/// @param messageId The id of the message
/// @return status of the message
function messageValidated(bytes32 messageId) external view returns (bool);
}
// contracts/libs/Message.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:]);
}
}
// lib/openzeppelin-contracts/contracts/access/Ownable.sol
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.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);
}
}
// contracts/ProtocolFeeHook.sol
/** @title ProtocolFeeHook
* @notice This contract implements a post-dispatch hook that requires a fee
* @author Diadata.org
* to be paid after a message dispatch. The required fee is calculated based on
* the current transaction gas price.
*/
contract ProtocolFeeHook is IProtocolFeeHook, Ownable, ReentrancyGuard {
using Message for bytes;
/// @notice Gas used per transaction, adjustable by the owner
uint256 public gasUsedPerTx = 97440;
/// @notice Minimum base fee in wei, adjustable by the owner
uint256 public minFeeWei = 1;
/// @notice only Message from this mailbox will be handled
address public trustedMailBox;
/// @notice Tracks if a message has been validated to prevent double processing
mapping(bytes32 => bool) public messageValidated;
/// @notice Enum representing different hook types
/// @return The type of hook
function hookType() external pure override returns (uint8) {
return uint8(Types.PROTOCOL_FEE);
}
/// @notice Modifier to validate that an address is not the zero address
modifier validateAddress(address _address) {
if (_address == address(0)) revert InvalidAddress();
_;
}
/// @notice Checks if the hook supports metadata
/// @return True if the hook supports metadata
function supportsMetadata(
bytes calldata
) external pure override returns (bool) {
return true;
}
/// @notice Ensures a message is only validated once
modifier validateMessageOnce(bytes calldata _message) {
bytes32 messageId = _message.id();
if (messageValidated[messageId]) revert MessageAlreadyValidated();
_;
messageValidated[messageId] = true;
}
/**
* @notice Handles post-dispatch logic for messages
* @param metadata The metadata associated with the message
* @param message The message payload
*/
function postDispatch(
bytes calldata metadata,
bytes calldata message
) external payable override validateMessageOnce(message) {
bytes32 messageId = message.id();
if (msg.sender != trustedMailBox) revert UnauthorizedMailbox();
uint256 requiredFee = quoteDispatch(metadata, message);
if (msg.value < requiredFee) revert InsufficientFeePaid();
emit DispatchFeePaid(requiredFee, msg.value, messageId);
}
/**
* @notice Calculates the required fee for message dispatch
* @dev Combines dynamic gas cost with fixed base fee
* @return Total fee in wei required to process the dispatch
*/
function quoteDispatch(
bytes calldata,
bytes calldata
) public view override returns (uint256) {
uint256 gasPrice = tx.gasprice;
uint256 cost = (gasUsedPerTx * gasPrice) + minFeeWei;
return cost;
}
/**
* @notice Sets the gas used per tx
* @param _gasUsedPerTx The new gas used per tx
*/
function setGasUsedPerTx(uint256 _gasUsedPerTx) external onlyOwner {
emit GasUsedPerTxUpdated(gasUsedPerTx, _gasUsedPerTx);
gasUsedPerTx = _gasUsedPerTx;
}
/**
* @notice Withdraws accumulated fees to a specified recipient
* @param feeRecipient The address to receive the withdrawn fees
* @param amount The amount of fees to withdraw
*/
function withdrawFees(address feeRecipient, uint256 amount) external onlyOwner nonReentrant {
if (feeRecipient == address(0)) revert InvalidFeeRecipient();
uint256 balance = address(this).balance;
if (balance == 0) revert NoBalanceToWithdraw();
if (amount > balance) revert InsufficientBalance();
emit FeesWithdrawn(feeRecipient, amount);
(bool success, ) = payable(feeRecipient).call{ value: amount }("");
if (!success) revert FeeTransferFailed();
}
/**
* @notice Sets the trusted mailbox address
* @param _mailbox The new trusted mailbox address
*/
function setTrustedMailBox(
address _mailbox
) external onlyOwner validateAddress(_mailbox) {
emit TrustedMailBoxUpdated(trustedMailBox, _mailbox);
trustedMailBox = _mailbox;
}
/**
* @notice Sets the minimum base fee in wei
* @param _minFeeWei The new minimum fee in wei
*/
function setMinFeeWei(uint256 _minFeeWei) external onlyOwner {
emit MinFeeWeiUpdated(minFeeWei, _minFeeWei);
minFeeWei = _minFeeWei;
}
/// @notice Allows the contract to receive ether
receive() external payable {}
/// @notice Fallback function to receive ether
fallback() external payable {}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"viaIR": true,
"evmVersion": "prague",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"FeeTransferFailed","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InsufficientFeePaid","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidFeeRecipient","type":"error"},{"inputs":[],"name":"MessageAlreadyValidated","type":"error"},{"inputs":[],"name":"NoBalanceToWithdraw","type":"error"},{"inputs":[],"name":"UnauthorizedMailbox","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requiredFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"actualFee","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"messageId","type":"bytes32"}],"name":"DispatchFeePaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeesWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousGasUsed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newGasUsed","type":"uint256"}],"name":"GasUsedPerTxUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousMinFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMinFee","type":"uint256"}],"name":"MinFeeWeiUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousMailBox","type":"address"},{"indexed":true,"internalType":"address","name":"newMailBox","type":"address"}],"name":"TrustedMailBoxUpdated","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"gasUsedPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hookType","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"messageValidated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minFeeWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","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":"","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"quoteDispatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gasUsedPerTx","type":"uint256"}],"name":"setGasUsedPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minFeeWei","type":"uint256"}],"name":"setMinFeeWei","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mailbox","type":"address"}],"name":"setTrustedMailBox","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"supportsMetadata","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"trustedMailBox","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"feeRecipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
608080604052346069575f8054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001805562017ca0600255600160035561082f908161006e8239f35b5f80fdfe60806040526004361015610010575b005b5f3560e01c8063086011b91461056d5780631b5e4f961461055057806352b56a09146104fd578063715018a6146104a657806373f250eb14610477578063769b0fda1461045a5780637c418c58146103d95780638da5cb5b146103b2578063938a2d1b1461035f578063aaccd2301461033b578063ad3b1b4714610204578063d5cb8894146101dc578063e445e7dd146101c1578063e5320bb9146101835763f2fde38b0361000e573461017f57602036600319011261017f576100d26106d4565b6100da6107a2565b6001600160a01b0316801561012b575f80546001600160a01b03198116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b5f80fd5b3461017f57602036600319011261017f5760043567ffffffffffffffff811161017f576101b4903690600401610654565b5050602060405160018152f35b3461017f575f36600319011261017f57602060405160088152f35b3461017f575f36600319011261017f576004546040516001600160a01b039091168152602090f35b3461017f57604036600319011261017f5761021d6106d4565b602435906102296107a2565b6002600154146102f65760026001556001600160a01b031680156102e7574780156102d85782116102c9575f8080938382947fc0819c13be868895eb93e40eaceb96de976442fa1d404e5c55f14bb65a8c489a6020604051858152a25af13d156102c4573d61029f61029a82610724565b6106ea565b9081525f60203d92013e5b156102b55760018055005b634033e4e360e01b5f5260045ffd5b6102aa565b631e9acf1760e31b5f5260045ffd5b63177b02e160e31b5f5260045ffd5b630ed1b8b360e31b5f5260045ffd5b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b3461017f5761034936610682565b50505050602061035761076b565b604051908152f35b3461017f57602036600319011261017f5760043561037b6107a2565b7fc1551314cea8f7441d30b3d0276a0a411f365f68f3c0651cb01b83a1dd59a75f60406003548151908152836020820152a1600355005b3461017f575f36600319011261017f575f546040516001600160a01b039091168152602090f35b3461017f57602036600319011261017f576103f26106d4565b6103fa6107a2565b6001600160a01b0316801561044b57600454816001600160a01b0382167f64b7e51d6fc454cb25d3dc1cd1b1f3077ae0fe37af8e442b2e4fb6f3af45e22e5f80a36001600160a01b03191617600455005b63e6c4247b60e01b5f5260045ffd5b3461017f575f36600319011261017f576020600254604051908152f35b3461017f57602036600319011261017f576004355f526005602052602060ff60405f2054166040519015158152f35b3461017f575f36600319011261017f576104be6107a2565b5f80546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461017f57602036600319011261017f576004356105196107a2565b7fa44271b01238defc8d90785d8887bdfa73afbf978dfd7aecc4f89359f206dbcb60406002548151908152836020820152a1600255005b3461017f575f36600319011261017f576020600354604051908152f35b61057636610682565b91509150610585368284610740565b6020815191012091825f52600560205260ff60405f205416610645576105ac913691610740565b80516020909101206004546001600160a01b03163303610636576105ce61076b565b90813410610627577fab3619842ec4cdfe6c1d8c6766b0cc0e270bd8af8dd615b07905409d65a66740916060916040519182523460208301526040820152a15f908152600560205260409020805460ff19166001179055005b633b98d7db60e21b5f5260045ffd5b6312e495ef60e21b5f5260045ffd5b6353bf9ee360e11b5f5260045ffd5b9181601f8401121561017f5782359167ffffffffffffffff831161017f576020838186019501011161017f57565b604060031982011261017f5760043567ffffffffffffffff811161017f57816106ad91600401610654565b929092916024359067ffffffffffffffff821161017f576106d091600401610654565b9091565b600435906001600160a01b038216820361017f57565b6040519190601f01601f1916820167ffffffffffffffff81118382101761071057604052565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff811161071057601f01601f191660200190565b92919261074f61029a83610724565b938285528282011161017f57815f926020928387013784010152565b6002543a8102908082043a149015171561078e57600354810180911161078e5790565b634e487b7160e01b5f52601160045260245ffd5b5f546001600160a01b031633036107b557565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea26469706673582212201c6688957b027260e4dbf96f23850980e08bab15e95655556147f77f9ca8bfea64736f6c634300081d0033
Deployed Bytecode
0x60806040526004361015610010575b005b5f3560e01c8063086011b91461056d5780631b5e4f961461055057806352b56a09146104fd578063715018a6146104a657806373f250eb14610477578063769b0fda1461045a5780637c418c58146103d95780638da5cb5b146103b2578063938a2d1b1461035f578063aaccd2301461033b578063ad3b1b4714610204578063d5cb8894146101dc578063e445e7dd146101c1578063e5320bb9146101835763f2fde38b0361000e573461017f57602036600319011261017f576100d26106d4565b6100da6107a2565b6001600160a01b0316801561012b575f80546001600160a01b03198116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b5f80fd5b3461017f57602036600319011261017f5760043567ffffffffffffffff811161017f576101b4903690600401610654565b5050602060405160018152f35b3461017f575f36600319011261017f57602060405160088152f35b3461017f575f36600319011261017f576004546040516001600160a01b039091168152602090f35b3461017f57604036600319011261017f5761021d6106d4565b602435906102296107a2565b6002600154146102f65760026001556001600160a01b031680156102e7574780156102d85782116102c9575f8080938382947fc0819c13be868895eb93e40eaceb96de976442fa1d404e5c55f14bb65a8c489a6020604051858152a25af13d156102c4573d61029f61029a82610724565b6106ea565b9081525f60203d92013e5b156102b55760018055005b634033e4e360e01b5f5260045ffd5b6102aa565b631e9acf1760e31b5f5260045ffd5b63177b02e160e31b5f5260045ffd5b630ed1b8b360e31b5f5260045ffd5b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b3461017f5761034936610682565b50505050602061035761076b565b604051908152f35b3461017f57602036600319011261017f5760043561037b6107a2565b7fc1551314cea8f7441d30b3d0276a0a411f365f68f3c0651cb01b83a1dd59a75f60406003548151908152836020820152a1600355005b3461017f575f36600319011261017f575f546040516001600160a01b039091168152602090f35b3461017f57602036600319011261017f576103f26106d4565b6103fa6107a2565b6001600160a01b0316801561044b57600454816001600160a01b0382167f64b7e51d6fc454cb25d3dc1cd1b1f3077ae0fe37af8e442b2e4fb6f3af45e22e5f80a36001600160a01b03191617600455005b63e6c4247b60e01b5f5260045ffd5b3461017f575f36600319011261017f576020600254604051908152f35b3461017f57602036600319011261017f576004355f526005602052602060ff60405f2054166040519015158152f35b3461017f575f36600319011261017f576104be6107a2565b5f80546001600160a01b0319811682556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461017f57602036600319011261017f576004356105196107a2565b7fa44271b01238defc8d90785d8887bdfa73afbf978dfd7aecc4f89359f206dbcb60406002548151908152836020820152a1600255005b3461017f575f36600319011261017f576020600354604051908152f35b61057636610682565b91509150610585368284610740565b6020815191012091825f52600560205260ff60405f205416610645576105ac913691610740565b80516020909101206004546001600160a01b03163303610636576105ce61076b565b90813410610627577fab3619842ec4cdfe6c1d8c6766b0cc0e270bd8af8dd615b07905409d65a66740916060916040519182523460208301526040820152a15f908152600560205260409020805460ff19166001179055005b633b98d7db60e21b5f5260045ffd5b6312e495ef60e21b5f5260045ffd5b6353bf9ee360e11b5f5260045ffd5b9181601f8401121561017f5782359167ffffffffffffffff831161017f576020838186019501011161017f57565b604060031982011261017f5760043567ffffffffffffffff811161017f57816106ad91600401610654565b929092916024359067ffffffffffffffff821161017f576106d091600401610654565b9091565b600435906001600160a01b038216820361017f57565b6040519190601f01601f1916820167ffffffffffffffff81118382101761071057604052565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff811161071057601f01601f191660200190565b92919261074f61029a83610724565b938285528282011161017f57815f926020928387013784010152565b6002543a8102908082043a149015171561078e57600354810180911161078e5790565b634e487b7160e01b5f52601160045260245ffd5b5f546001600160a01b031633036107b557565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea26469706673582212201c6688957b027260e4dbf96f23850980e08bab15e95655556147f77f9ca8bfea64736f6c634300081d0033
Loading...
Loading
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.