Overview
ETH Balance
0.0025 ETH
Eth Value
$8.38 (@ $3,352.96/ETH)More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,508 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Send Message | 19593316 | 300 days ago | IN | 0.0005 ETH | 0.00063005 | ||||
Send Message | 18295226 | 482 days ago | IN | 0.0005 ETH | 0.00031519 | ||||
Send Message | 18104893 | 509 days ago | IN | 0.0005 ETH | 0.00063331 | ||||
Send Message | 17552322 | 586 days ago | IN | 0.0005 ETH | 0.00064016 | ||||
Send Message | 17548236 | 587 days ago | IN | 0.0005 ETH | 0.00076207 | ||||
Claim Fees | 17498489 | 594 days ago | IN | 0 ETH | 0.00050272 | ||||
Send Message | 17488633 | 595 days ago | IN | 0.0005 ETH | 0.00083597 | ||||
Send Message | 17465249 | 598 days ago | IN | 0.0005 ETH | 0.00103316 | ||||
Send Message | 17464987 | 598 days ago | IN | 0.0005 ETH | 0.00107227 | ||||
Send Message | 17462971 | 599 days ago | IN | 0.0005 ETH | 0.00117468 | ||||
Send Message | 17443046 | 601 days ago | IN | 0.0005 ETH | 0.00122415 | ||||
Send Message | 17442042 | 602 days ago | IN | 0.0005 ETH | 0.00114529 | ||||
Send Message | 17440188 | 602 days ago | IN | 0.0005 ETH | 0.00124529 | ||||
Send Message | 17439895 | 602 days ago | IN | 0.0005 ETH | 0.00110073 | ||||
Send Message | 17439615 | 602 days ago | IN | 0.0005 ETH | 0.00120436 | ||||
Send Message | 17439466 | 602 days ago | IN | 0.0005 ETH | 0.00116403 | ||||
Send Message | 17439361 | 602 days ago | IN | 0.0005 ETH | 0.00117344 | ||||
Send Message | 17438696 | 602 days ago | IN | 0.0005 ETH | 0.00139292 | ||||
Send Message | 17438191 | 602 days ago | IN | 0.0005 ETH | 0.00135241 | ||||
Send Message | 17437983 | 602 days ago | IN | 0.0005 ETH | 0.00119264 | ||||
Send Message | 17437718 | 602 days ago | IN | 0.0005 ETH | 0.00164748 | ||||
Send Message | 17437137 | 602 days ago | IN | 0.0005 ETH | 0.00165386 | ||||
Send Message | 17436706 | 602 days ago | IN | 0.0005 ETH | 0.00231074 | ||||
Send Message | 17436622 | 602 days ago | IN | 0.0005 ETH | 0.00172108 | ||||
Send Message | 17436330 | 602 days ago | IN | 0.0005 ETH | 0.00152337 |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xfFED85ae...64DFDe9b0 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Mailer
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./interfaces/IZKBridgeEntrypoint.sol"; import "./interfaces/IZKBridgeReceiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /// @title Mailer /// @notice An example contract for sending messages to other chains, using the ZKBridgeEntrypoint. contract Mailer is Ownable { /// @notice The ZKBridgeEntrypoint contract, which sends messages to other chains. IZKBridgeEntrypoint public zkBridgeEntrypoint; uint256 public fee; uint256 public maxLength = 66; event MessageSend(uint64 indexed sequence, uint32 indexed dstChainId, address indexed dstAddress, address sender, address recipient, string message); constructor(address _zkBridgeEntrypoint) { zkBridgeEntrypoint = IZKBridgeEntrypoint(_zkBridgeEntrypoint); } /// @notice Sends a message to a destination MessageBridge. /// @param dstChainId The chain ID where the destination MessageBridge. /// @param dstAddress The address of the destination MessageBridge. /// @param message The message to send. function sendMessage(uint16 dstChainId, address dstAddress, address recipient, string memory message) external payable { require(msg.value >= fee, "Insufficient Fee"); require(bytes(message).length <= maxLength, "Maximum message length exceeded."); bytes memory payload = abi.encode(msg.sender, recipient, message); uint64 sequence = zkBridgeEntrypoint.send(dstChainId, dstAddress, payload); emit MessageSend(sequence, dstChainId, dstAddress, msg.sender, recipient, message); } // @notice Allows owner to set a new fee. // @param fee The new fee to use. function setFee(uint256 _fee) external onlyOwner { fee = _fee; } // @notice Allows owner to set a new msg length. // @param new msg length. function setMsgLength(uint256 _maxLength) external onlyOwner { maxLength = _maxLength; } // @notice Allows owner to claim all fees sent to this contract. function claimFees() external onlyOwner { payable(owner()).transfer(address(this).balance); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IZKBridgeEntrypoint { // @notice send a ZKBridge message to the specified address at a ZKBridge endpoint. // @param dstChainId - the destination chain identifier // @param dstAddress - the address on destination chain // @param payload - a custom bytes payload to send to the destination contract function send(uint16 dstChainId, address dstAddress, bytes memory payload) external payable returns (uint64 sequence); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IZKBridgeReceiver { // @notice ZKBridge endpoint will invoke this function to deliver the message on the destination // @param srcChainId - the source endpoint identifier // @param srcAddress - the source sending contract address from the source chain // @param sequence - the ordered message nonce // @param payload - the signed payload is the UA bytes has encoded to be sent function zkReceive(uint16 srcChainId, address srcAddress, uint64 sequence, bytes calldata payload) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing 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 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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_zkBridgeEntrypoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"sequence","type":"uint64"},{"indexed":true,"internalType":"uint32","name":"dstChainId","type":"uint32"},{"indexed":true,"internalType":"address","name":"dstAddress","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"MessageSend","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"},{"inputs":[],"name":"claimFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"dstChainId","type":"uint16"},{"internalType":"address","name":"dstAddress","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"message","type":"string"}],"name":"sendMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxLength","type":"uint256"}],"name":"setMsgLength","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"zkBridgeEntrypoint","outputs":[{"internalType":"contract IZKBridgeEntrypoint","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x6080604052600436106100915760003560e01c8063904c811611610059578063904c811614610137578063d06a89a414610157578063d294f0931461017b578063ddca3f4314610190578063f2fde38b146101a657600080fd5b8063011ea0d01461009657806340925e95146100b857806369fe0e2d146100cb578063715018a6146100eb5780638da5cb5b14610100575b600080fd5b3480156100a257600080fd5b506100b66100b13660046104f7565b6101c6565b005b6100b66100c6366004610542565b6101d3565b3480156100d757600080fd5b506100b66100e63660046104f7565b610371565b3480156100f757600080fd5b506100b661037e565b34801561010c57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561014357600080fd5b5060015461011a906001600160a01b031681565b34801561016357600080fd5b5061016d60035481565b60405190815260200161012e565b34801561018757600080fd5b506100b6610392565b34801561019c57600080fd5b5061016d60025481565b3480156101b257600080fd5b506100b66101c136600461062e565b6103d7565b6101ce61044d565b600355565b60025434101561021d5760405162461bcd60e51b815260206004820152601060248201526f496e73756666696369656e742046656560801b60448201526064015b60405180910390fd5b600354815111156102705760405162461bcd60e51b815260206004820181905260248201527f4d6178696d756d206d657373616765206c656e6774682065786365656465642e6044820152606401610214565b60003383836040516020016102879392919061069d565b60408051601f198184030181529082905260015463b1d995dd60e01b83529092506000916001600160a01b039091169063b1d995dd906102cf908990899087906004016106d2565b6020604051808303816000875af11580156102ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103129190610700565b9050846001600160a01b03168661ffff168267ffffffffffffffff167fbdb4daeca4a1c274318631b2e6569f5609c49b073f20d5925b06f069b71c84d43388886040516103619392919061069d565b60405180910390a4505050505050565b61037961044d565b600255565b61038661044d565b61039060006104a7565b565b61039a61044d565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f193505050501580156103d4573d6000803e3d6000fd5b50565b6103df61044d565b6001600160a01b0381166104445760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610214565b6103d4816104a7565b6000546001600160a01b031633146103905760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610214565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561050957600080fd5b5035919050565b80356001600160a01b038116811461052757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561055857600080fd5b843561ffff8116811461056a57600080fd5b935061057860208601610510565b925061058660408601610510565b9150606085013567ffffffffffffffff808211156105a357600080fd5b818701915087601f8301126105b757600080fd5b8135818111156105c9576105c961052c565b604051601f8201601f19908116603f011681019083821181831017156105f1576105f161052c565b816040528281528a602084870101111561060a57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60006020828403121561064057600080fd5b61064982610510565b9392505050565b6000815180845260005b818110156106765760208185018101518683018201520161065a565b81811115610688576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b038481168252831660208201526060604082018190526000906106c990830184610650565b95945050505050565b61ffff841681526001600160a01b03831660208201526060604082018190526000906106c990830184610650565b60006020828403121561071257600080fd5b815167ffffffffffffffff8116811461064957600080fdfea2646970667358221220ccbedb3ca99ddb8ca0f0508c9ffd781c4282c11452f8fee2434e6f2a0691db3464736f6c634300080e0033
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.