More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 45,405 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 54732442 | 402 days ago | IN | 0 POL | 0.00404304 | ||||
Send Message | 50099833 | 521 days ago | IN | 0.5 POL | 0.00030596 | ||||
Send Message | 50099833 | 521 days ago | IN | 0.5 POL | 0.0003059 | ||||
Claim Fees | 48565505 | 560 days ago | IN | 0 POL | 0.00199458 | ||||
Send Message | 45152954 | 646 days ago | IN | 0.5 POL | 0.00771762 | ||||
Send Message | 45151645 | 646 days ago | IN | 0.5 POL | 0.00730853 | ||||
Send Message | 45148888 | 646 days ago | IN | 0.5 POL | 0.00616189 | ||||
Send Message | 45148870 | 646 days ago | IN | 0.5 POL | 0.0062575 | ||||
Send Message | 45148523 | 646 days ago | IN | 0.5 POL | 0.00819592 | ||||
Send Message | 45146095 | 646 days ago | IN | 0.5 POL | 0.00637413 | ||||
Send Message | 45145081 | 646 days ago | IN | 0.5 POL | 0.00630278 | ||||
Send Message | 45142939 | 646 days ago | IN | 0.5 POL | 0.00553421 | ||||
Send Message | 45139763 | 646 days ago | IN | 0.5 POL | 0.0059886 | ||||
Send Message | 45139280 | 647 days ago | IN | 0.5 POL | 0.00659868 | ||||
Send Message | 45138977 | 647 days ago | IN | 0.5 POL | 0.00564016 | ||||
Send Message | 45136252 | 647 days ago | IN | 0.5 POL | 0.00650578 | ||||
Send Message | 45134968 | 647 days ago | IN | 0.5 POL | 0.0061211 | ||||
Send Message | 45133850 | 647 days ago | IN | 0.5 POL | 0.00561857 | ||||
Send Message | 45133810 | 647 days ago | IN | 0.5 POL | 0.00487328 | ||||
Send Message | 45131824 | 647 days ago | IN | 0.5 POL | 0.00595467 | ||||
Send Message | 45131201 | 647 days ago | IN | 0.5 POL | 0.0065087 | ||||
Send Message | 45125530 | 647 days ago | IN | 0.5 POL | 0.00462284 | ||||
Send Message | 45125221 | 647 days ago | IN | 0.5 POL | 0.00605526 | ||||
Send Message | 45125189 | 647 days ago | IN | 0.5 POL | 0.00637921 | ||||
Send Message | 45120702 | 647 days ago | IN | 0.5 POL | 0.00631981 |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x4d63d1Be...3F153B12e 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.18+commit.87f61d96
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 "@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; /// @notice Sequence number of the current emitter uint64 private sequence; uint256 public maxLength = 200; /// @notice Fee for each chain. mapping(uint16 => uint256) public fees; event MessageSend( uint64 indexed sequence, uint32 indexed dstChainId, address indexed dstAddress, address sender, address recipient, string message ); event NewFee(uint16 chainId, uint256 fee); 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 recipient Recipient of the target chain message. /// @param message The message to send. function sendMessage( uint16 dstChainId, address dstAddress, address recipient, string memory message ) external payable { require(msg.value >= fees[dstChainId], "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 msg length. /// @param _maxLength new msg length. function setMsgLength(uint256 _maxLength) external onlyOwner { maxLength = _maxLength; } // @notice Allows owner to claim all fees sent to this contract. /// @notice Allows owner to set a new fee. /// @param _dstChainId The chain ID where the destination MessageBridge. /// @param _fee The new fee to use. function setFee(uint16 _dstChainId, uint256 _fee) external onlyOwner { require(fees[_dstChainId] != _fee, "Fee has already been set."); fees[_dstChainId] = _fee; emit NewFee(_dstChainId, _fee); } /// @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); /// @return Current chain id. function chainId() external view returns (uint16); }
// 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 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; } }
{ "remappings": [ "@ensdomains/=node_modules/@ensdomains/", "@openzeppelin/=node_modules/@openzeppelin/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "hardhat/=node_modules/hardhat/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"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":false,"internalType":"uint16","name":"chainId","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"NewFee","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":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"fees","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":"uint16","name":"_dstChainId","type":"uint16"},{"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
0x6080604052600436106100915760003560e01c8063bc22e4bc11610059578063bc22e4bc14610137578063c7f0da1314610172578063d06a89a414610192578063d294f093146101a8578063f2fde38b146101bd57600080fd5b8063011ea0d01461009657806340925e95146100b8578063715018a6146100cb5780638da5cb5b146100e0578063904c811614610117575b600080fd5b3480156100a257600080fd5b506100b66100b13660046105d0565b6101dd565b005b6100b66100c636600461062d565b6101ea565b3480156100d757600080fd5b506100b6610399565b3480156100ec57600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561012357600080fd5b506001546100fa906001600160a01b031681565b34801561014357600080fd5b50610164610152366004610710565b60036020526000908152604090205481565b60405190815260200161010e565b34801561017e57600080fd5b506100b661018d366004610732565b6103ad565b34801561019e57600080fd5b5061016460025481565b3480156101b457600080fd5b506100b661046b565b3480156101c957600080fd5b506100b66101d836600461075c565b6104b0565b6101e5610526565b600255565b61ffff84166000908152600360205260409020543410156102455760405162461bcd60e51b815260206004820152601060248201526f496e73756666696369656e742046656560801b60448201526064015b60405180910390fd5b600254815111156102985760405162461bcd60e51b815260206004820181905260248201527f4d6178696d756d206d657373616765206c656e6774682065786365656465642e604482015260640161023c565b60003383836040516020016102af939291906107bd565b60408051601f198184030181529082905260015463b1d995dd60e01b83529092506000916001600160a01b039091169063b1d995dd906102f7908990899087906004016107f2565b6020604051808303816000875af1158015610316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033a9190610820565b9050846001600160a01b03168661ffff168267ffffffffffffffff167fbdb4daeca4a1c274318631b2e6569f5609c49b073f20d5925b06f069b71c84d4338888604051610389939291906107bd565b60405180910390a4505050505050565b6103a1610526565b6103ab6000610580565b565b6103b5610526565b61ffff82166000908152600360205260409020548190036104185760405162461bcd60e51b815260206004820152601960248201527f4665652068617320616c7265616479206265656e207365742e00000000000000604482015260640161023c565b61ffff8216600081815260036020908152604091829020849055815192835282018390527f3d9a6222528a5f37fccacff9e85c30a4b687e85338f74940f018b70c4f7461d7910160405180910390a15050565b610473610526565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f193505050501580156104ad573d6000803e3d6000fd5b50565b6104b8610526565b6001600160a01b03811661051d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161023c565b6104ad81610580565b6000546001600160a01b031633146103ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161023c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156105e257600080fd5b5035919050565b803561ffff811681146105fb57600080fd5b919050565b80356001600160a01b03811681146105fb57600080fd5b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561064357600080fd5b61064c856105e9565b935061065a60208601610600565b925061066860408601610600565b9150606085013567ffffffffffffffff8082111561068557600080fd5b818701915087601f83011261069957600080fd5b8135818111156106ab576106ab610617565b604051601f8201601f19908116603f011681019083821181831017156106d3576106d3610617565b816040528281528a60208487010111156106ec57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60006020828403121561072257600080fd5b61072b826105e9565b9392505050565b6000806040838503121561074557600080fd5b61074e836105e9565b946020939093013593505050565b60006020828403121561076e57600080fd5b61072b82610600565b6000815180845260005b8181101561079d57602081850181015186830182015201610781565b506000602082860101526020601f19601f83011685010191505092915050565b6001600160a01b038481168252831660208201526060604082018190526000906107e990830184610777565b95945050505050565b61ffff841681526001600160a01b03831660208201526060604082018190526000906107e990830184610777565b60006020828403121561083257600080fd5b815167ffffffffffffffff8116811461072b57600080fdfea26469706673582212204181627d3cebf708b3cd2236d530c51a86718b4a9c7d3291dc8e1a0b56f17b4e64736f6c63430008120033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
POL | 100.00% | $0.217547 | 1 | $0.217547 |
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.