Source Code
Latest 25 from a total of 2,365 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Send Message | 18001634 | 922 days ago | IN | 0.0008 ETH | 0.00058854 | ||||
| Send Message | 17927061 | 933 days ago | IN | 0 ETH | 0.00053922 | ||||
| Send Message | 17817021 | 948 days ago | IN | 0.0008 ETH | 0.00092731 | ||||
| Claim Fees | 17498496 | 993 days ago | IN | 0 ETH | 0.00047639 | ||||
| Send Message | 17451506 | 1000 days ago | IN | 0.0008 ETH | 0.00087435 | ||||
| Send Message | 17442038 | 1001 days ago | IN | 0.0008 ETH | 0.00110131 | ||||
| Send Message | 17440090 | 1001 days ago | IN | 0.0008 ETH | 0.00106854 | ||||
| Send Message | 17440063 | 1001 days ago | IN | 0.0008 ETH | 0.0011241 | ||||
| Send Message | 17434717 | 1002 days ago | IN | 0.0008 ETH | 0.00125926 | ||||
| Send Message | 17430758 | 1002 days ago | IN | 0.0008 ETH | 0.00126967 | ||||
| Send Message | 17430104 | 1003 days ago | IN | 0.0008 ETH | 0.00140917 | ||||
| Send Message | 17427679 | 1003 days ago | IN | 0.0008 ETH | 0.00117093 | ||||
| Send Message | 17424259 | 1003 days ago | IN | 0.0008 ETH | 0.0011006 | ||||
| Send Message | 17418965 | 1004 days ago | IN | 0.0008 ETH | 0.00102552 | ||||
| Send Message | 17411230 | 1005 days ago | IN | 0.0008 ETH | 0.00117107 | ||||
| Send Message | 17407817 | 1006 days ago | IN | 0.0008 ETH | 0.00139222 | ||||
| Send Message | 17406527 | 1006 days ago | IN | 0.0008 ETH | 0.00116478 | ||||
| Send Message | 17406155 | 1006 days ago | IN | 0.0008 ETH | 0.00112734 | ||||
| Send Message | 17406087 | 1006 days ago | IN | 0.0008 ETH | 0.00104557 | ||||
| Send Message | 17403108 | 1006 days ago | IN | 0.0008 ETH | 0.0009976 | ||||
| Send Message | 17400833 | 1007 days ago | IN | 0.0008 ETH | 0.00120846 | ||||
| Send Message | 17398743 | 1007 days ago | IN | 0.0008 ETH | 0.00110386 | ||||
| Send Message | 17393671 | 1008 days ago | IN | 0.0008 ETH | 0.00277981 | ||||
| Send Message | 17392731 | 1008 days ago | IN | 0.0008 ETH | 0.00186467 | ||||
| Transfer | 17392181 | 1008 days ago | IN | 0.00001 ETH | 0.00065968 |
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| Transfer | 17498496 | 993 days ago | 0.7408 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
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;
event MessageSend(uint64 indexed sequence, uint32 indexed dstChainId, address indexed dstAddress, address sender, address recipient, string message);
constructor(address zkBridgeEntrypointAddress) {
zkBridgeEntrypoint = IZKBridgeEntrypoint(zkBridgeEntrypointAddress);
}
/// @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");
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 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 {
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
Contract ABI
API[{"inputs":[{"internalType":"address","name":"zkBridgeEntrypointAddress","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":"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":"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"}]Contract Creation Code
608060405234801561001057600080fd5b506040516107a03803806107a083398101604081905261002f916100ad565b6100383361005d565b600180546001600160a01b0319166001600160a01b03929092169190911790556100dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100bf57600080fd5b81516001600160a01b03811681146100d657600080fd5b9392505050565b6106b4806100ec6000396000f3fe60806040526004361061007b5760003560e01c8063904c81161161004e578063904c811614610101578063d294f09314610121578063ddca3f4314610136578063f2fde38b1461015a57600080fd5b806340925e951461008057806369fe0e2d14610095578063715018a6146100b55780638da5cb5b146100ca575b600080fd5b61009361008e36600461047d565b61017a565b005b3480156100a157600080fd5b506100936100b0366004610569565b6102c5565b3480156100c157600080fd5b506100936102d2565b3480156100d657600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010d57600080fd5b506001546100e4906001600160a01b031681565b34801561012d57600080fd5b506100936102e6565b34801561014257600080fd5b5061014c60025481565b6040519081526020016100f8565b34801561016657600080fd5b50610093610175366004610582565b61032b565b6002543410156101c45760405162461bcd60e51b815260206004820152601060248201526f496e73756666696369656e742046656560801b60448201526064015b60405180910390fd5b60003383836040516020016101db939291906105f1565b60408051601f198184030181529082905260015463b1d995dd60e01b83529092506000916001600160a01b039091169063b1d995dd9061022390899089908790600401610626565b6020604051808303816000875af1158015610242573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102669190610654565b9050846001600160a01b03168661ffff168267ffffffffffffffff167fbdb4daeca4a1c274318631b2e6569f5609c49b073f20d5925b06f069b71c84d43388886040516102b5939291906105f1565b60405180910390a4505050505050565b6102cd6103a1565b600255565b6102da6103a1565b6102e460006103fb565b565b6102ee6103a1565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f19350505050158015610328573d6000803e3d6000fd5b50565b6103336103a1565b6001600160a01b0381166103985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101bb565b610328816103fb565b6000546001600160a01b031633146102e45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101bb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461046257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561049357600080fd5b843561ffff811681146104a557600080fd5b93506104b36020860161044b565b92506104c16040860161044b565b9150606085013567ffffffffffffffff808211156104de57600080fd5b818701915087601f8301126104f257600080fd5b81358181111561050457610504610467565b604051601f8201601f19908116603f0116810190838211818310171561052c5761052c610467565b816040528281528a602084870101111561054557600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60006020828403121561057b57600080fd5b5035919050565b60006020828403121561059457600080fd5b61059d8261044b565b9392505050565b6000815180845260005b818110156105ca576020818501810151868301820152016105ae565b818111156105dc576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061061d908301846105a4565b95945050505050565b61ffff841681526001600160a01b038316602082015260606040820181905260009061061d908301846105a4565b60006020828403121561066657600080fd5b815167ffffffffffffffff8116811461059d57600080fdfea264697066735822122066d9b6e39744124072882dede410f52d77eac98d8fe6b2c7c548d85702fc8e0f64736f6c634300080e0033000000000000000000000000b2c2fc86627366f0b9a529e6a3ea7fe8facbf386
Deployed Bytecode
0x60806040526004361061007b5760003560e01c8063904c81161161004e578063904c811614610101578063d294f09314610121578063ddca3f4314610136578063f2fde38b1461015a57600080fd5b806340925e951461008057806369fe0e2d14610095578063715018a6146100b55780638da5cb5b146100ca575b600080fd5b61009361008e36600461047d565b61017a565b005b3480156100a157600080fd5b506100936100b0366004610569565b6102c5565b3480156100c157600080fd5b506100936102d2565b3480156100d657600080fd5b506000546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010d57600080fd5b506001546100e4906001600160a01b031681565b34801561012d57600080fd5b506100936102e6565b34801561014257600080fd5b5061014c60025481565b6040519081526020016100f8565b34801561016657600080fd5b50610093610175366004610582565b61032b565b6002543410156101c45760405162461bcd60e51b815260206004820152601060248201526f496e73756666696369656e742046656560801b60448201526064015b60405180910390fd5b60003383836040516020016101db939291906105f1565b60408051601f198184030181529082905260015463b1d995dd60e01b83529092506000916001600160a01b039091169063b1d995dd9061022390899089908790600401610626565b6020604051808303816000875af1158015610242573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102669190610654565b9050846001600160a01b03168661ffff168267ffffffffffffffff167fbdb4daeca4a1c274318631b2e6569f5609c49b073f20d5925b06f069b71c84d43388886040516102b5939291906105f1565b60405180910390a4505050505050565b6102cd6103a1565b600255565b6102da6103a1565b6102e460006103fb565b565b6102ee6103a1565b600080546040516001600160a01b03909116914780156108fc02929091818181858888f19350505050158015610328573d6000803e3d6000fd5b50565b6103336103a1565b6001600160a01b0381166103985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101bb565b610328816103fb565b6000546001600160a01b031633146102e45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101bb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461046257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561049357600080fd5b843561ffff811681146104a557600080fd5b93506104b36020860161044b565b92506104c16040860161044b565b9150606085013567ffffffffffffffff808211156104de57600080fd5b818701915087601f8301126104f257600080fd5b81358181111561050457610504610467565b604051601f8201601f19908116603f0116810190838211818310171561052c5761052c610467565b816040528281528a602084870101111561054557600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60006020828403121561057b57600080fd5b5035919050565b60006020828403121561059457600080fd5b61059d8261044b565b9392505050565b6000815180845260005b818110156105ca576020818501810151868301820152016105ae565b818111156105dc576000602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0384811682528316602082015260606040820181905260009061061d908301846105a4565b95945050505050565b61ffff841681526001600160a01b038316602082015260606040820181905260009061061d908301846105a4565b60006020828403121561066657600080fd5b815167ffffffffffffffff8116811461059d57600080fdfea264697066735822122066d9b6e39744124072882dede410f52d77eac98d8fe6b2c7c548d85702fc8e0f64736f6c634300080e0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b2c2fc86627366f0b9a529e6a3ea7fe8facbf386
-----Decoded View---------------
Arg [0] : zkBridgeEntrypointAddress (address): 0xB2C2Fc86627366f0b9A529e6a3Ea7fe8faCBF386
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000b2c2fc86627366f0b9a529e6a3ea7fe8facbf386
Loading...
Loading
Loading...
Loading
Net Worth in USD
$3.18
Net Worth in ETH
0.0016
Token Allocations
ETH
100.00%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $1,985.38 | 0.0016 | $3.18 |
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.