POL Price: $0.631781 (+8.76%)
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo2.0002 POL

POL Value

$1.26 (@ $0.63/POL)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Create And Set R...435077922023-06-04 5:20:31556 days ago1685856031IN
0x7660397e...48470D90A
2 POL0.0267154153.86044669
Create435073952023-06-04 5:04:33556 days ago1685855073IN
0x7660397e...48470D90A
0.0001 POL0.01893904149.94931298
Execute435064122023-06-04 4:28:51556 days ago1685852931IN
0x7660397e...48470D90A
0 POL0.0098316147.94372309
Create And Set R...435047892023-06-04 3:30:21556 days ago1685849421IN
0x7660397e...48470D90A
2 POL0.0247581142.58787711
Create435000002023-06-04 0:33:11556 days ago1685838791IN
0x7660397e...48470D90A
0.0001 POL0.02178962151.94679967

Latest 1 internal transaction

Parent Transaction Hash Block From To
435064122023-06-04 4:28:51556 days ago1685852931
0x7660397e...48470D90A
2 POL
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TokenLocker

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 2 : TokenLocker.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract TokenLocker {
    uint256 private immutable _chainId;
    address public immutable notary;
    uint256 public lockIndex;

    struct Lock {
        address owner;
        uint256 toChainId;
        address payToken;
        uint256 payTokenAmount;
        address buyToken;
        uint256 buyTokenAmount;
        bool executed;
        bool cancelled;
    }
    // locks[lockId]
    mapping(uint256 => Lock) public locks;

    // Lock의 수령 대상 정보 저장
    struct Recipient {
        address recipient;
        uint256 recipientLockId;
    }
    // recipients[lockId]
    mapping(uint256 => Recipient) public recipients;

    // isRequestCancel[lockId]
    mapping(uint256 => bool) public isRequestCancel;

    event NewLock(
        address owner,
        uint256 lockId,
        uint256 toChain,
        address payToken,
        uint256 payTokenAmount,
        address buyToken,
        uint256 buyTokenAmount
    );
    event SetRecipient(
        uint256 lockId,
        address recipient,
        uint256 recipientLockId
    );
    event Executed(uint256 lockId);
    event RequestCancel(uint256 lockId);
    event Cancelled(uint256 lockId);

    constructor(address _notary) {
        _chainId = block.chainid;
        notary = _notary;
    }

    /// @notice 공증인 계정에서 생성한 sign 검증에 필요한 해시값 생성
    /// @param lockId 해시값을 생성할 Lock ID
    /// @param action "EXECUTE" 또는 "CANCEL"
    function hash(
        uint256 lockId,
        string memory action
    ) public view returns (bytes32) {
        // 해시할 때 체인 ID를 포함해서 다른 체인에서 사용된 서명값을 재사용하는 행위 차단
        return keccak256(abi.encodePacked(_chainId, lockId, action));
    }

    /// @notice personal_sign 검증에 사용할 수 있는 해시값 생성
    /// @param messageHash personal_sign 검증에 사용할 해시값
    function getEthSignedHash(
        bytes32 messageHash
    ) public pure returns (bytes32) {
        return
            keccak256(
                abi.encodePacked(
                    "\x19Ethereum Signed Message:\n32",
                    messageHash
                )
            );
    }

    /// @notice 공증인 계정에서 생성한 sign 검증
    /// @param action "EXECUTE" 또는 "CANCEL"
    /// @param lockId sign을 검증할 Lock ID
    /// @param digest hash()로 생성된 해시값
    /// @param v 공증인 계정에서 생성한 sign의 V 값(ex, 0x1b)
    /// @param r 공증인 계정에서 생성한 sign의 R 값(ex, 0xa795754cbc06513557f4fbe7f00a2b3267fe1d08922be34639675795226ba149)
    /// @param s 공증인 계정에서 생성한 sign의 S 값(ex, 0x0a3b4468386b6f54b19e9e7249da9c378cbcd1a2e1d24a97087c9154d72c19df)
    function checkSign(
        string memory action,
        uint256 lockId,
        bytes32 digest,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public view {
        require(digest == hash(lockId, action), "invalid digest");

        address signer = ecrecover(getEthSignedHash(digest), v, r, s);
        require(signer == notary, "invalid signer");
    }

    /// @notice 새로운 Lock 생성
    /// @param toChainId 거래할 대상 체인 ID
    /// @param payToken 지불 토큰 주소, address(0)는 네이티브 토큰
    /// @param payTokenAmount 지불할 토큰 수량
    /// @param buyToken 구매할 토큰 주소, address(0)는 네이티브 토큰
    /// @param buyTokenAmount 구매할 토큰 수량
    function create(
        uint256 toChainId,
        address payToken,
        uint256 payTokenAmount,
        address buyToken,
        uint256 buyTokenAmount
    ) public payable {
        uint256 lockId;
        unchecked {
            lockId = lockIndex++;
        }

        locks[lockId] = Lock({
            owner: msg.sender,
            toChainId: toChainId,
            payToken: payToken,
            payTokenAmount: payTokenAmount,
            buyToken: buyToken,
            buyTokenAmount: buyTokenAmount,
            executed: false,
            cancelled: false
        });

        if (payToken == address(0)) {
            require(
                msg.value == payTokenAmount,
                "TokenLocker: not enought token"
            );
        } else {
            IERC20(payToken).transfer(address(this), payTokenAmount);
        }

        emit NewLock(
            msg.sender,
            lockId,
            toChainId,
            payToken,
            payTokenAmount,
            buyToken,
            buyTokenAmount
        );
    }

    /// @notice Lock된 토큰을 수령할 상대방 지정
    /// @param lockId 수령할 상대방을 지정할 Lock ID
    /// @param recipient Lock된 토큰을 수령할 계정
    /// @param recipientLockId Lock된 토큰을 수령할 상대의 Lock ID
    function setRecipient(
        uint256 lockId,
        address recipient,
        uint256 recipientLockId
    ) public {
        require(locks[lockId].owner == msg.sender, "only owner");
        require(recipients[lockId].recipient == address(0), "already set");

        recipients[lockId].recipient = recipient;
        recipients[lockId].recipientLockId = recipientLockId;

        emit SetRecipient(lockId, recipient, recipientLockId);
    }

    /// @notice 공증인 계정에서 생성한 sign을 검증한 뒤, Lock된 토큰을 recipient에게 전송
    /// @param lockId Lock된 토큰을 전송할 Lock ID
    /// @param digest hash()로 생성된 Lock ID에 해당하는 해시값
    /// @param v 공증인 계정에서 생성한 sign의 V 값(ex, 0x1b)
    /// @param r 공증인 계정에서 생성한 sign의 R 값(ex, 0xa795754cbc06513557f4fbe7f00a2b3267fe1d08922be34639675795226ba149)
    /// @param s 공증인 계정에서 생성한 sign의 S 값(ex, 0x0a3b4468386b6f54b19e9e7249da9c378cbcd1a2e1d24a97087c9154d72c19df)
    function execute(
        uint256 lockId,
        bytes32 digest,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external {
        require(lockId < lockIndex, "TokenLocker: invalid Lock ID");
        require(
            locks[lockId].executed == false,
            "TokenLocker: already executed"
        );

        checkSign("EXECUTE", lockId, digest, v, r, s);
        locks[lockId].executed = true;

        address token = locks[lockId].payToken;
        if (token == address(0)) {
            payable(recipients[lockId].recipient).transfer(
                locks[lockId].payTokenAmount
            );
        } else {
            IERC20(token).transfer(
                recipients[lockId].recipient,
                locks[lockId].payTokenAmount
            );
        }

        emit Executed(lockId);
    }

    /// @notice Lock을 취소하기 위한 sign을 공증인에게 요청하는 이벤트 발생
    /// @dev execute에 필요한 키가 배포된 경우 취소 불가능
    /// @param lockId 취소할 Lock ID
    function requestCancel(uint256 lockId) external {
        require(locks[lockId].owner == msg.sender, "TokenLocker: only owner");
        require(
            recipients[lockId].recipient != address(0),
            "TokenLocker: not necessary"
        );
        require(
            isRequestCancel[lockId] == false,
            "TokenLocker: already requested"
        );

        isRequestCancel[lockId] = true;
        emit RequestCancel(lockId);
    }

    /// @notice 공증인 계정에서 생성한 sign을 검증한 뒤, Lock을 취소하고 토큰 환불
    /// @param lockId 취소할 Lock ID
    /// @param digest hash()로 생성된 Lock ID에 해당하는 해시값
    /// @param v 공증인 계정에서 생성한 sign의 V 값(ex, 0x1b)
    /// @param r 공증인 계정에서 생성한 sign의 R 값(ex, 0xa795754cbc06513557f4fbe7f00a2b3267fe1d08922be34639675795226ba149)
    /// @param s 공증인 계정에서 생성한 sign의 S 값(ex, 0x0a3b4468386b6f54b19e9e7249da9c378cbcd1a2e1d24a97087c9154d72c19df)
    function cancel(
        uint256 lockId,
        bytes32 digest,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external {
        require(lockId < lockIndex, "TokenLocker: invalid Lock ID");

        // recipeint를 지정하기 전에는 공증인을 거칠 필요없이 바로 취소 가능
        // recipient를 지정한 뒤에는 reqeustCancel()로 취소 요청을 하고,
        // 공증인이 제공한 sign을 받아서 제공해야함.
        require(
            isRequestCancel[lockId] == true ||
                recipients[lockId].recipient == address(0),
            "TokenLocker: not cancelable"
        );
        require(
            locks[lockId].cancelled == false,
            "TokenLocker: already cancelled"
        );

        checkSign("CANCEL", lockId, digest, v, r, s);
        locks[lockId].cancelled = true;

        address token = locks[lockId].payToken;
        if (token == address(0)) {
            payable(locks[lockId].owner).transfer(locks[lockId].payTokenAmount);
        } else {
            IERC20(token).transfer(
                locks[lockId].owner,
                locks[lockId].payTokenAmount
            );
        }

        emit Cancelled(lockId);
    }

    /// @notice Lock을 생성하면서 수령할 상대방 지정, 이미 생성된 주문을 Take 할 때 사용
    /// @param toChainId 거래할 대상 체인 ID
    /// @param payToken 지불 토큰 주소, address(0)는 네이티브 토큰
    /// @param payTokenAmount 지불할 토큰 수량
    /// @param buyToken 구매할 토큰 주소, address(0)는 네이티브 토큰
    /// @param buyTokenAmount 구매할 토큰 수량
    /// @param recipient Lock된 토큰을 수령할 계정
    /// @param recipientLockId Lock된 토큰을 수령할 상대의 Lock ID
    function createAndSetRecipient(
        uint256 toChainId,
        address payToken,
        uint256 payTokenAmount,
        address buyToken,
        uint256 buyTokenAmount,
        address recipient,
        uint256 recipientLockId
    ) external payable {
        create(toChainId, payToken, payTokenAmount, buyToken, buyTokenAmount);
        setRecipient(lockIndex - 1, recipient, recipientLockId);
    }

    /// @notice Notary에서 필요한 정보 제공
    /// @param lockId 정보를 조회할 Lock ID
    function getLockInfo(
        uint256 lockId
    ) public view returns (address, uint256, address, uint256, bool) {
        return (
            locks[lockId].owner,
            locks[lockId].toChainId,
            recipients[lockId].recipient,
            recipients[lockId].recipientLockId,
            isRequestCancel[lockId]
        );
    }
}

File 2 of 2 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

Settings
{
  "remappings": [
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts/contracts/"
  ],
  "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

[{"inputs":[{"internalType":"address","name":"_notary","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"Cancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"Executed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"lockId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toChain","type":"uint256"},{"indexed":false,"internalType":"address","name":"payToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"payTokenAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"buyToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"buyTokenAmount","type":"uint256"}],"name":"NewLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"RequestCancel","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockId","type":"uint256"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"recipientLockId","type":"uint256"}],"name":"SetRecipient","type":"event"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"},{"internalType":"bytes32","name":"digest","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"action","type":"string"},{"internalType":"uint256","name":"lockId","type":"uint256"},{"internalType":"bytes32","name":"digest","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"checkSign","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"toChainId","type":"uint256"},{"internalType":"address","name":"payToken","type":"address"},{"internalType":"uint256","name":"payTokenAmount","type":"uint256"},{"internalType":"address","name":"buyToken","type":"address"},{"internalType":"uint256","name":"buyTokenAmount","type":"uint256"}],"name":"create","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"toChainId","type":"uint256"},{"internalType":"address","name":"payToken","type":"address"},{"internalType":"uint256","name":"payTokenAmount","type":"uint256"},{"internalType":"address","name":"buyToken","type":"address"},{"internalType":"uint256","name":"buyTokenAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"recipientLockId","type":"uint256"}],"name":"createAndSetRecipient","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"},{"internalType":"bytes32","name":"digest","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"execute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"messageHash","type":"bytes32"}],"name":"getEthSignedHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"getLockInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"},{"internalType":"string","name":"action","type":"string"}],"name":"hash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isRequestCancel","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"locks","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"toChainId","type":"uint256"},{"internalType":"address","name":"payToken","type":"address"},{"internalType":"uint256","name":"payTokenAmount","type":"uint256"},{"internalType":"address","name":"buyToken","type":"address"},{"internalType":"uint256","name":"buyTokenAmount","type":"uint256"},{"internalType":"bool","name":"executed","type":"bool"},{"internalType":"bool","name":"cancelled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"recipients","outputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"recipientLockId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"}],"name":"requestCancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"lockId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"recipientLockId","type":"uint256"}],"name":"setRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405234801561001057600080fd5b506040516114ca3803806114ca83398101604081905261002f91610044565b466080526001600160a01b031660a052610074565b60006020828403121561005657600080fd5b81516001600160a01b038116811461006d57600080fd5b9392505050565b60805160a05161142a6100a0600039600081816101d00152610b580152600061072c015261142a6000f3fe6080604052600436106100e85760003560e01c8063b83d9d0a1161008a578063d1bc76a111610059578063d1bc76a114610303578063e683a2d414610362578063eacc5ec314610382578063f4dadc61146103a257600080fd5b8063b83d9d0a1461020a578063c1e94eec1461022a578063c9102afd1461024a578063cedbb657146102e357600080fd5b806323eeb43f116100c657806323eeb43f1461014b5780632f4ea5ea1461018b5780637a6985b5146101ab5780639d54c79d146101be57600080fd5b806303ea9c5b146100ed5780630e7735bc146101025780631ce3b82a1461012b575b600080fd5b6101006100fb3660046110ad565b610469565b005b34801561010e57600080fd5b5061011860005481565b6040519081526020015b60405180910390f35b34801561013757600080fd5b5061011861014636600461119e565b610728565b34801561015757600080fd5b5061017b6101663660046111e5565b60036020526000908152604090205460ff1681565b6040519015158152602001610122565b34801561019757600080fd5b506101186101a63660046111e5565b61077e565b6101006101b93660046111fe565b6107d1565b3480156101ca57600080fd5b506101f27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610122565b34801561021657600080fd5b50610100610225366004611279565b610800565b34801561023657600080fd5b506101006102453660046112c0565b610aa6565b34801561025657600080fd5b506102aa6102653660046111e5565b6000908152600160208181526040808420805490840154600284528286208054950154600390945291909420546001600160a01b039485169591949093169260ff1690565b604080516001600160a01b039687168152602081019590955292909416918301919091526060820152901515608082015260a001610122565b3480156102ef57600080fd5b506101006102fe366004611333565b610bc8565b34801561030f57600080fd5b5061034361031e3660046111e5565b600260205260009081526040902080546001909101546001600160a01b039091169082565b604080516001600160a01b039093168352602083019190915201610122565b34801561036e57600080fd5b5061010061037d3660046111e5565b610ce4565b34801561038e57600080fd5b5061010061039d366004611279565b610e63565b3480156103ae57600080fd5b506104166103bd3660046111e5565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006909501546001600160a01b03968716969495938516949293919092169160ff8082169161010090041688565b604080516001600160a01b03998a16815260208101989098529588169587019590955260608601939093529416608084015260a083019390935291151560c082015290151560e082015261010001610122565b6000806000815480929190600101919050559050604051806101000160405280336001600160a01b03168152602001878152602001866001600160a01b03168152602001858152602001846001600160a01b03168152602001838152602001600015158152602001600015158152506001600083815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506060820151816003015560808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a0820151816005015560c08201518160060160006101000a81548160ff02191690831515021790555060e08201518160060160016101000a81548160ff02191690831515021790555090505060006001600160a01b0316856001600160a01b031603610646578334146106415760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e4c6f636b65723a206e6f7420656e6f7567687420746f6b656e000060448201526064015b60405180910390fd5b6106b9565b60405163a9059cbb60e01b8152306004820152602481018590526001600160a01b0386169063a9059cbb906044016020604051808303816000875af1158015610693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b79190611368565b505b60408051338152602081018390529081018790526001600160a01b03808716606083015260808201869052841660a082015260c081018390527f0b7af8e1f1df6152f877eff780c4df1b1f2aaa9326a4ad7f9e4d5c28bdef85fd9060e0015b60405180910390a1505050505050565b60007f0000000000000000000000000000000000000000000000000000000000000000838360405160200161075f93929190611391565b6040516020818303038152906040528051906020012090505b92915050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6107de8787878787610469565b6107f760016000546107f091906113d3565b8383610bc8565b50505050505050565b60005485106108515760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e4c6f636b65723a20696e76616c6964204c6f636b204944000000006044820152606401610638565b60008581526003602052604090205460ff1615156001148061088857506000858152600260205260409020546001600160a01b0316155b6108d45760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e4c6f636b65723a206e6f742063616e63656c61626c6500000000006044820152606401610638565b600085815260016020526040902060060154610100900460ff161561093b5760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e4c6f636b65723a20616c72656164792063616e63656c6c656400006044820152606401610638565b6109676040518060400160405280600681526020016510d05390d15360d21b8152508686868686610aa6565b600085815260016020526040902060068101805461ff001916610100179055600201546001600160a01b0316806109e957600086815260016020526040808220805460039091015491516001600160a01b039091169282156108fc02929190818181858888f193505050501580156109e3573d6000803e3d6000fd5b50610a76565b600086815260016020526040908190208054600390910154915163a9059cbb60e01b81526001600160a01b039182166004820152602481019290925282169063a9059cbb906044016020604051808303816000875af1158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190611368565b505b6040518681527fc41d93b8bfbf9fd7cf5bfe271fd649ab6a6fec0ea101c23b82a2a28eca2533a990602001610718565b610ab08587610728565b8414610aef5760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a5908191a59d95cdd60921b6044820152606401610638565b60006001610afc8661077e565b6040805160008152602081018083529290925260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610b4a573d6000803e3d6000fd5b5050506020604051035190507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316146107f75760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21039b4b3b732b960911b6044820152606401610638565b6000838152600160205260409020546001600160a01b03163314610c1b5760405162461bcd60e51b815260206004820152600a60248201526937b7363c9037bbb732b960b11b6044820152606401610638565b6000838152600260205260409020546001600160a01b031615610c6e5760405162461bcd60e51b815260206004820152600b60248201526a185b1c9958591e481cd95d60aa1b6044820152606401610638565b60008381526002602090815260409182902080546001600160a01b0319166001600160a01b038616908117825560019091018490558251868152918201529081018290527f20b11853fbcf0f15248fb94180606faa9df806981a5f027e30433cc41f7dc7049060600160405180910390a1505050565b6000818152600160205260409020546001600160a01b03163314610d4a5760405162461bcd60e51b815260206004820152601760248201527f546f6b656e4c6f636b65723a206f6e6c79206f776e65720000000000000000006044820152606401610638565b6000818152600260205260409020546001600160a01b0316610dae5760405162461bcd60e51b815260206004820152601a60248201527f546f6b656e4c6f636b65723a206e6f74206e65636573736172790000000000006044820152606401610638565b60008181526003602052604090205460ff1615610e0d5760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e4c6f636b65723a20616c72656164792072657175657374656400006044820152606401610638565b60008181526003602052604090819020805460ff19166001179055517f3d83ffc48ad64ae99f3659bf0752911ad6c6c96176a60ea911741baf6fc6164290610e589083815260200190565b60405180910390a150565b6000548510610eb45760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e4c6f636b65723a20696e76616c6964204c6f636b204944000000006044820152606401610638565b60008581526001602052604090206006015460ff1615610f165760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e4c6f636b65723a20616c72656164792065786563757465640000006044820152606401610638565b610f43604051806040016040528060078152602001664558454355544560c81b8152508686868686610aa6565b600085815260016020819052604090912060068101805460ff1916909217909155600201546001600160a01b031680610fcd5760008681526002602090815260408083205460019092528083206003015490516001600160a01b039092169281156108fc029290818181858888f19350505050158015610fc7573d6000803e3d6000fd5b50611061565b60008681526002602090815260408083205460019092529182902060030154915163a9059cbb60e01b81526001600160a01b039182166004820152602481019290925282169063a9059cbb906044016020604051808303816000875af115801561103b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105f9190611368565b505b6040518681527fbcf6a68a2f901be4a23a41b53acd7697893a7e34def4e28acba584da75283b6790602001610718565b80356001600160a01b03811681146110a857600080fd5b919050565b600080600080600060a086880312156110c557600080fd5b853594506110d560208701611091565b9350604086013592506110ea60608701611091565b949793965091946080013592915050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261112257600080fd5b813567ffffffffffffffff8082111561113d5761113d6110fb565b604051601f8301601f19908116603f01168101908282118183101715611165576111656110fb565b8160405283815286602085880101111561117e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156111b157600080fd5b82359150602083013567ffffffffffffffff8111156111cf57600080fd5b6111db85828601611111565b9150509250929050565b6000602082840312156111f757600080fd5b5035919050565b600080600080600080600060e0888a03121561121957600080fd5b8735965061122960208901611091565b95506040880135945061123e60608901611091565b93506080880135925061125360a08901611091565b915060c0880135905092959891949750929550565b803560ff811681146110a857600080fd5b600080600080600060a0868803121561129157600080fd5b85359450602086013593506112a860408701611268565b94979396509394606081013594506080013592915050565b60008060008060008060c087890312156112d957600080fd5b863567ffffffffffffffff8111156112f057600080fd5b6112fc89828a01611111565b965050602087013594506040870135935061131960608801611268565b92506080870135915060a087013590509295509295509295565b60008060006060848603121561134857600080fd5b8335925061135860208501611091565b9150604084013590509250925092565b60006020828403121561137a57600080fd5b8151801515811461138a57600080fd5b9392505050565b838152600060208481840152835160005b818110156113be578581018301518582016040015282016113a2565b50600093016040019283525090949350505050565b8181038181111561077857634e487b7160e01b600052601160045260246000fdfea26469706673582212203c92ecf6b4187feb46028d327077e88196ef2f09b6e3a3806b6ed2d874670bae64736f6c6343000813003300000000000000000000000098684114447d600cc7a851b5c403c1ead63fe9bd

Deployed Bytecode

0x6080604052600436106100e85760003560e01c8063b83d9d0a1161008a578063d1bc76a111610059578063d1bc76a114610303578063e683a2d414610362578063eacc5ec314610382578063f4dadc61146103a257600080fd5b8063b83d9d0a1461020a578063c1e94eec1461022a578063c9102afd1461024a578063cedbb657146102e357600080fd5b806323eeb43f116100c657806323eeb43f1461014b5780632f4ea5ea1461018b5780637a6985b5146101ab5780639d54c79d146101be57600080fd5b806303ea9c5b146100ed5780630e7735bc146101025780631ce3b82a1461012b575b600080fd5b6101006100fb3660046110ad565b610469565b005b34801561010e57600080fd5b5061011860005481565b6040519081526020015b60405180910390f35b34801561013757600080fd5b5061011861014636600461119e565b610728565b34801561015757600080fd5b5061017b6101663660046111e5565b60036020526000908152604090205460ff1681565b6040519015158152602001610122565b34801561019757600080fd5b506101186101a63660046111e5565b61077e565b6101006101b93660046111fe565b6107d1565b3480156101ca57600080fd5b506101f27f00000000000000000000000098684114447d600cc7a851b5c403c1ead63fe9bd81565b6040516001600160a01b039091168152602001610122565b34801561021657600080fd5b50610100610225366004611279565b610800565b34801561023657600080fd5b506101006102453660046112c0565b610aa6565b34801561025657600080fd5b506102aa6102653660046111e5565b6000908152600160208181526040808420805490840154600284528286208054950154600390945291909420546001600160a01b039485169591949093169260ff1690565b604080516001600160a01b039687168152602081019590955292909416918301919091526060820152901515608082015260a001610122565b3480156102ef57600080fd5b506101006102fe366004611333565b610bc8565b34801561030f57600080fd5b5061034361031e3660046111e5565b600260205260009081526040902080546001909101546001600160a01b039091169082565b604080516001600160a01b039093168352602083019190915201610122565b34801561036e57600080fd5b5061010061037d3660046111e5565b610ce4565b34801561038e57600080fd5b5061010061039d366004611279565b610e63565b3480156103ae57600080fd5b506104166103bd3660046111e5565b600160208190526000918252604090912080549181015460028201546003830154600484015460058501546006909501546001600160a01b03968716969495938516949293919092169160ff8082169161010090041688565b604080516001600160a01b03998a16815260208101989098529588169587019590955260608601939093529416608084015260a083019390935291151560c082015290151560e082015261010001610122565b6000806000815480929190600101919050559050604051806101000160405280336001600160a01b03168152602001878152602001866001600160a01b03168152602001858152602001846001600160a01b03168152602001838152602001600015158152602001600015158152506001600083815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506060820151816003015560808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060a0820151816005015560c08201518160060160006101000a81548160ff02191690831515021790555060e08201518160060160016101000a81548160ff02191690831515021790555090505060006001600160a01b0316856001600160a01b031603610646578334146106415760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e4c6f636b65723a206e6f7420656e6f7567687420746f6b656e000060448201526064015b60405180910390fd5b6106b9565b60405163a9059cbb60e01b8152306004820152602481018590526001600160a01b0386169063a9059cbb906044016020604051808303816000875af1158015610693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b79190611368565b505b60408051338152602081018390529081018790526001600160a01b03808716606083015260808201869052841660a082015260c081018390527f0b7af8e1f1df6152f877eff780c4df1b1f2aaa9326a4ad7f9e4d5c28bdef85fd9060e0015b60405180910390a1505050505050565b60007f0000000000000000000000000000000000000000000000000000000000000089838360405160200161075f93929190611391565b6040516020818303038152906040528051906020012090505b92915050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6107de8787878787610469565b6107f760016000546107f091906113d3565b8383610bc8565b50505050505050565b60005485106108515760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e4c6f636b65723a20696e76616c6964204c6f636b204944000000006044820152606401610638565b60008581526003602052604090205460ff1615156001148061088857506000858152600260205260409020546001600160a01b0316155b6108d45760405162461bcd60e51b815260206004820152601b60248201527f546f6b656e4c6f636b65723a206e6f742063616e63656c61626c6500000000006044820152606401610638565b600085815260016020526040902060060154610100900460ff161561093b5760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e4c6f636b65723a20616c72656164792063616e63656c6c656400006044820152606401610638565b6109676040518060400160405280600681526020016510d05390d15360d21b8152508686868686610aa6565b600085815260016020526040902060068101805461ff001916610100179055600201546001600160a01b0316806109e957600086815260016020526040808220805460039091015491516001600160a01b039091169282156108fc02929190818181858888f193505050501580156109e3573d6000803e3d6000fd5b50610a76565b600086815260016020526040908190208054600390910154915163a9059cbb60e01b81526001600160a01b039182166004820152602481019290925282169063a9059cbb906044016020604051808303816000875af1158015610a50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a749190611368565b505b6040518681527fc41d93b8bfbf9fd7cf5bfe271fd649ab6a6fec0ea101c23b82a2a28eca2533a990602001610718565b610ab08587610728565b8414610aef5760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a5908191a59d95cdd60921b6044820152606401610638565b60006001610afc8661077e565b6040805160008152602081018083529290925260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610b4a573d6000803e3d6000fd5b5050506020604051035190507f00000000000000000000000098684114447d600cc7a851b5c403c1ead63fe9bd6001600160a01b0316816001600160a01b0316146107f75760405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21039b4b3b732b960911b6044820152606401610638565b6000838152600160205260409020546001600160a01b03163314610c1b5760405162461bcd60e51b815260206004820152600a60248201526937b7363c9037bbb732b960b11b6044820152606401610638565b6000838152600260205260409020546001600160a01b031615610c6e5760405162461bcd60e51b815260206004820152600b60248201526a185b1c9958591e481cd95d60aa1b6044820152606401610638565b60008381526002602090815260409182902080546001600160a01b0319166001600160a01b038616908117825560019091018490558251868152918201529081018290527f20b11853fbcf0f15248fb94180606faa9df806981a5f027e30433cc41f7dc7049060600160405180910390a1505050565b6000818152600160205260409020546001600160a01b03163314610d4a5760405162461bcd60e51b815260206004820152601760248201527f546f6b656e4c6f636b65723a206f6e6c79206f776e65720000000000000000006044820152606401610638565b6000818152600260205260409020546001600160a01b0316610dae5760405162461bcd60e51b815260206004820152601a60248201527f546f6b656e4c6f636b65723a206e6f74206e65636573736172790000000000006044820152606401610638565b60008181526003602052604090205460ff1615610e0d5760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e4c6f636b65723a20616c72656164792072657175657374656400006044820152606401610638565b60008181526003602052604090819020805460ff19166001179055517f3d83ffc48ad64ae99f3659bf0752911ad6c6c96176a60ea911741baf6fc6164290610e589083815260200190565b60405180910390a150565b6000548510610eb45760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e4c6f636b65723a20696e76616c6964204c6f636b204944000000006044820152606401610638565b60008581526001602052604090206006015460ff1615610f165760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e4c6f636b65723a20616c72656164792065786563757465640000006044820152606401610638565b610f43604051806040016040528060078152602001664558454355544560c81b8152508686868686610aa6565b600085815260016020819052604090912060068101805460ff1916909217909155600201546001600160a01b031680610fcd5760008681526002602090815260408083205460019092528083206003015490516001600160a01b039092169281156108fc029290818181858888f19350505050158015610fc7573d6000803e3d6000fd5b50611061565b60008681526002602090815260408083205460019092529182902060030154915163a9059cbb60e01b81526001600160a01b039182166004820152602481019290925282169063a9059cbb906044016020604051808303816000875af115801561103b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105f9190611368565b505b6040518681527fbcf6a68a2f901be4a23a41b53acd7697893a7e34def4e28acba584da75283b6790602001610718565b80356001600160a01b03811681146110a857600080fd5b919050565b600080600080600060a086880312156110c557600080fd5b853594506110d560208701611091565b9350604086013592506110ea60608701611091565b949793965091946080013592915050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261112257600080fd5b813567ffffffffffffffff8082111561113d5761113d6110fb565b604051601f8301601f19908116603f01168101908282118183101715611165576111656110fb565b8160405283815286602085880101111561117e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156111b157600080fd5b82359150602083013567ffffffffffffffff8111156111cf57600080fd5b6111db85828601611111565b9150509250929050565b6000602082840312156111f757600080fd5b5035919050565b600080600080600080600060e0888a03121561121957600080fd5b8735965061122960208901611091565b95506040880135945061123e60608901611091565b93506080880135925061125360a08901611091565b915060c0880135905092959891949750929550565b803560ff811681146110a857600080fd5b600080600080600060a0868803121561129157600080fd5b85359450602086013593506112a860408701611268565b94979396509394606081013594506080013592915050565b60008060008060008060c087890312156112d957600080fd5b863567ffffffffffffffff8111156112f057600080fd5b6112fc89828a01611111565b965050602087013594506040870135935061131960608801611268565b92506080870135915060a087013590509295509295509295565b60008060006060848603121561134857600080fd5b8335925061135860208501611091565b9150604084013590509250925092565b60006020828403121561137a57600080fd5b8151801515811461138a57600080fd5b9392505050565b838152600060208481840152835160005b818110156113be578581018301518582016040015282016113a2565b50600093016040019283525090949350505050565b8181038181111561077857634e487b7160e01b600052601160045260246000fdfea26469706673582212203c92ecf6b4187feb46028d327077e88196ef2f09b6e3a3806b6ed2d874670bae64736f6c63430008130033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000098684114447d600cc7a851b5c403c1ead63fe9bd

-----Decoded View---------------
Arg [0] : _notary (address): 0x98684114447D600cC7a851b5c403c1EAd63fe9bd

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000098684114447d600cc7a851b5c403c1ead63fe9bd


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.