POL Price: $0.218283 (-0.77%)
Gas: 31 GWei
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo1 POL

POL Value

$0.22 (@ $0.22/POL)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...547324422024-03-16 15:42:43402 days ago1710603763IN
0x3fFb9897...aB2a981D7
0 POL0.00404304141.1035886
Send Message500998332023-11-18 16:54:03521 days ago1700326443IN
0x3fFb9897...aB2a981D7
0.5 POL0.000305964.85
Send Message500998332023-11-18 16:54:03521 days ago1700326443IN
0x3fFb9897...aB2a981D7
0.5 POL0.00030594.85
Claim Fees485655052023-10-10 21:21:40560 days ago1696972900IN
0x3fFb9897...aB2a981D7
0 POL0.0019945865.48439194
Send Message451529542023-07-16 16:01:33646 days ago1689523293IN
0x3fFb9897...aB2a981D7
0.5 POL0.00771762131.22081137
Send Message451516452023-07-16 15:13:59646 days ago1689520439IN
0x3fFb9897...aB2a981D7
0.5 POL0.00730853124.26517828
Send Message451488882023-07-16 13:35:08646 days ago1689514508IN
0x3fFb9897...aB2a981D7
0.5 POL0.00616189104.76910628
Send Message451488702023-07-16 13:34:30646 days ago1689514470IN
0x3fFb9897...aB2a981D7
0.5 POL0.0062575106.39488627
Send Message451485232023-07-16 13:22:12646 days ago1689513732IN
0x3fFb9897...aB2a981D7
0.5 POL0.00819592139.35338196
Send Message451460952023-07-16 11:54:58646 days ago1689508498IN
0x3fFb9897...aB2a981D7
0.5 POL0.00637413108.37786335
Send Message451450812023-07-16 11:18:23646 days ago1689506303IN
0x3fFb9897...aB2a981D7
0.5 POL0.00630278107.16479056
Send Message451429392023-07-16 10:00:23646 days ago1689501623IN
0x3fFb9897...aB2a981D7
0.5 POL0.0055342194.09692712
Send Message451397632023-07-16 8:05:04646 days ago1689494704IN
0x3fFb9897...aB2a981D7
0.5 POL0.0059886101.82276164
Send Message451392802023-07-16 7:46:21647 days ago1689493581IN
0x3fFb9897...aB2a981D7
0.5 POL0.00659868112.19574355
Send Message451389772023-07-16 7:35:35647 days ago1689492935IN
0x3fFb9897...aB2a981D7
0.5 POL0.0056401695.89840196
Send Message451362522023-07-16 5:52:07647 days ago1689486727IN
0x3fFb9897...aB2a981D7
0.5 POL0.00650578110.66141639
Send Message451349682023-07-16 5:03:33647 days ago1689483813IN
0x3fFb9897...aB2a981D7
0.5 POL0.0061211104.1181854
Send Message451338502023-07-16 4:21:06647 days ago1689481266IN
0x3fFb9897...aB2a981D7
0.5 POL0.0056185795.53119347
Send Message451338102023-07-16 4:18:50647 days ago1689481130IN
0x3fFb9897...aB2a981D7
0.5 POL0.0048732882.85921532
Send Message451318242023-07-16 3:05:38647 days ago1689476738IN
0x3fFb9897...aB2a981D7
0.5 POL0.00595467101.24589304
Send Message451312012023-07-16 2:43:02647 days ago1689475382IN
0x3fFb9897...aB2a981D7
0.5 POL0.0065087110.66587245
Send Message451255302023-07-15 23:13:38647 days ago1689462818IN
0x3fFb9897...aB2a981D7
0.5 POL0.0046228478.60117606
Send Message451252212023-07-15 23:02:38647 days ago1689462158IN
0x3fFb9897...aB2a981D7
0.5 POL0.00605526102.95615309
Send Message451251892023-07-15 23:01:30647 days ago1689462090IN
0x3fFb9897...aB2a981D7
0.5 POL0.00637921108.46431089
Send Message451207022023-07-15 20:17:25647 days ago1689452245IN
0x3fFb9897...aB2a981D7
0.5 POL0.00631981107.4542893
View all transactions

Latest 4 internal transactions

Parent Transaction Hash Block From To
485655052023-10-10 21:21:40560 days ago1696972900
0x3fFb9897...aB2a981D7
90 POL
445397482023-07-01 2:51:35662 days ago1688179895
0x3fFb9897...aB2a981D7
193.5 POL
441545442023-06-21 4:12:04672 days ago1687320724
0x3fFb9897...aB2a981D7
105.5 POL
440081882023-06-17 8:54:45675 days ago1686992085
0x3fFb9897...aB2a981D7
22,294 POL
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
File 1 of 4 : Mailer.sol
// 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);
    }
}

File 2 of 4 : IZKBridgeEntrypoint.sol
// 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);
}

File 3 of 4 : Ownable.sol
// 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);
    }
}

File 4 of 4 : Context.sol
// 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;
    }
}

Settings
{
  "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

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

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.