FTM Price: $0.48 (+7.61%)
Gas: 52 GWei

Contract

0xd57f8b6F3e5d1e0ab85118F5E0Dd893A08C43346
 

Multichain Info

1 address found via
Transaction Hash
Method
Block
From
To
Value
Send764372122024-02-27 23:28:561 day 2 hrs ago1709076536IN
0xd57f8b...08C43346
1.81517017 FTM0.0071732831.07269608
Send764330592024-02-27 20:08:201 day 5 hrs ago1709064500IN
0xd57f8b...08C43346
1.60872305 FTM0.0082873835.89493243
Send764312172024-02-27 19:30:451 day 5 hrs ago1709062245IN
0xd57f8b...08C43346
1.60872305 FTM0.008297435.93830732
Send764146782024-02-27 11:54:501 day 13 hrs ago1709034890IN
0xd57f8b...08C43346
0.1927438 FTM0.02869424118.26290823
Send764001932024-02-27 6:50:301 day 18 hrs ago1709016630IN
0xd57f8b...08C43346
1.81517017 FTM0.02398082101.76762645
Send763013392024-02-25 20:36:563 days 4 hrs ago1708893416IN
0xd57f8b...08C43346
0.15818876 FTM0.0252592104
Send762995082024-02-25 19:55:523 days 5 hrs ago1708890952IN
0xd57f8b...08C43346
1.692128 FTM0.02622931108
Send762994612024-02-25 19:54:493 days 5 hrs ago1708890889IN
0xd57f8b...08C43346
1.2567111 FTM0.02756376108
Send762748192024-02-25 11:57:423 days 13 hrs ago1708862262IN
0xd57f8b...08C43346
0.25521567 FTM0.0085006935
Send762672052024-02-25 8:42:123 days 16 hrs ago1708850532IN
0xd57f8b...08C43346
0.17033205 FTM0.0215920289
Send762666982024-02-25 8:30:263 days 16 hrs ago1708849826IN
0xd57f8b...08C43346
0.1663524 FTM0.02887166119
Send762658812024-02-25 8:12:323 days 17 hrs ago1708848752IN
0xd57f8b...08C43346
0.1617861 FTM0.02547499105
Send762576052024-02-25 5:07:103 days 20 hrs ago1708837630IN
0xd57f8b...08C43346
1.89857512 FTM0.0225996997.9109136
Send762006922024-02-24 8:49:304 days 16 hrs ago1708764570IN
0xd57f8b...08C43346
0.15809545 FTM0.02453057101
Send761792772024-02-24 0:58:155 days 32 mins ago1708736295IN
0xd57f8b...08C43346
0.1793 FTM0.0223198492
Send761789392024-02-24 0:47:085 days 43 mins ago1708735628IN
0xd57f8b...08C43346
2.75133145 FTM0.003227913.69830002
Send761188922024-02-22 14:50:396 days 10 hrs ago1708613439IN
0xd57f8b...08C43346
0.204182 FTM0.0239750898.81785837
Send761107592024-02-22 11:37:566 days 13 hrs ago1708601876IN
0xd57f8b...08C43346
3.71164804 FTM0.0081839534.24276934
Send760682192024-02-21 20:37:287 days 4 hrs ago1708547848IN
0xd57f8b...08C43346
0.23376 FTM0.0146940460.56428167
Send760482252024-02-21 13:16:217 days 12 hrs ago1708521381IN
0xd57f8b...08C43346
0.25475797 FTM0.0034958514.83540315
Send760395502024-02-21 8:04:277 days 17 hrs ago1708502667IN
0xd57f8b...08C43346
0.1612 FTM0.0281438116
Send760375212024-02-21 7:15:147 days 18 hrs ago1708499714IN
0xd57f8b...08C43346
0.168 FTM0.0281438116
Send760237832024-02-21 1:14:208 days 16 mins ago1708478060IN
0xd57f8b...08C43346
0.80754932 FTM0.0135316258.60916504
Send760086862024-02-20 19:55:488 days 5 hrs ago1708458948IN
0xd57f8b...08C43346
1.70743771 FTM0.0043730418.94084474
Send759903332024-02-20 11:10:128 days 14 hrs ago1708427412IN
0xd57f8b...08C43346
1.64671589 FTM0.0054133922.97168665
View all transactions

Latest 25 internal transactions (View All)

Parent Txn Hash Block From To Value
764372122024-02-27 23:28:561 day 2 hrs ago1709076536
0xd57f8b...08C43346
1.81517017 FTM
764330592024-02-27 20:08:201 day 5 hrs ago1709064500
0xd57f8b...08C43346
1.60872305 FTM
764312172024-02-27 19:30:451 day 5 hrs ago1709062245
0xd57f8b...08C43346
1.60872305 FTM
764146782024-02-27 11:54:501 day 13 hrs ago1709034890
0xd57f8b...08C43346
0.1927438 FTM
764001932024-02-27 6:50:301 day 18 hrs ago1709016630
0xd57f8b...08C43346
1.81517017 FTM
763013392024-02-25 20:36:563 days 4 hrs ago1708893416
0xd57f8b...08C43346
0.15818876 FTM
762995082024-02-25 19:55:523 days 5 hrs ago1708890952
0xd57f8b...08C43346
1.692128 FTM
762994612024-02-25 19:54:493 days 5 hrs ago1708890889
0xd57f8b...08C43346
1.2567111 FTM
762748192024-02-25 11:57:423 days 13 hrs ago1708862262
0xd57f8b...08C43346
0.25521567 FTM
762672052024-02-25 8:42:123 days 16 hrs ago1708850532
0xd57f8b...08C43346
0.17033205 FTM
762666982024-02-25 8:30:263 days 16 hrs ago1708849826
0xd57f8b...08C43346
0.1663524 FTM
762658812024-02-25 8:12:323 days 17 hrs ago1708848752
0xd57f8b...08C43346
0.1617861 FTM
762576052024-02-25 5:07:103 days 20 hrs ago1708837630
0xd57f8b...08C43346
1.89857512 FTM
762006922024-02-24 8:49:304 days 16 hrs ago1708764570
0xd57f8b...08C43346
0.15809545 FTM
761792772024-02-24 0:58:155 days 32 mins ago1708736295
0xd57f8b...08C43346
0.1793 FTM
761789392024-02-24 0:47:085 days 43 mins ago1708735628
0xd57f8b...08C43346
2.75133145 FTM
761188922024-02-22 14:50:396 days 10 hrs ago1708613439
0xd57f8b...08C43346
0.204182 FTM
761107592024-02-22 11:37:566 days 13 hrs ago1708601876
0xd57f8b...08C43346
3.71164804 FTM
760682192024-02-21 20:37:287 days 4 hrs ago1708547848
0xd57f8b...08C43346
0.23376 FTM
760482252024-02-21 13:16:217 days 12 hrs ago1708521381
0xd57f8b...08C43346
0.25475797 FTM
760395502024-02-21 8:04:277 days 17 hrs ago1708502667
0xd57f8b...08C43346
0.1612 FTM
760375212024-02-21 7:15:147 days 18 hrs ago1708499714
0xd57f8b...08C43346
0.168 FTM
760237832024-02-21 1:14:208 days 16 mins ago1708478060
0xd57f8b...08C43346
0.80754932 FTM
760086862024-02-20 19:55:488 days 5 hrs ago1708458948
0xd57f8b...08C43346
1.70743771 FTM
759903332024-02-20 11:10:128 days 14 hrs ago1708427412
0xd57f8b...08C43346
1.64671589 FTM
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OSEABridge

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 17 : OSEABridge.sol
pragma solidity ^0.8.7;

import "../oft/OFT.sol";

contract OSEABridge {

    event Sent(address sender, uint256 amount, uint16 dstChainId);

    OFT public token;
    bool public isPaused;
    address private owner;
    address private taker;
    address private treasury;

    constructor (OFT _token, address _taker, address _treasury) {
        owner = msg.sender;
        treasury = _treasury;
        taker = _taker;
        token = _token;
    }

    function send(uint16 dstChainId, address to, uint256 amount) external payable {
        require(isPaused == false, "PAUSED");
        require(amount > 0, "<= 0");
        require(token.allowance(msg.sender, address(this)) >= amount);
        token.sendFrom{value: msg.value}(msg.sender, dstChainId, abi.encodePacked(msg.sender == taker ? treasury : (to == address(0) ? msg.sender : to)), amount, payable(msg.sender), address(0), bytes(""));
        emit Sent(msg.sender, amount, dstChainId);
    }

    function estimateSendFee(uint16 _dstChainId, bytes memory _toAddress, uint _amount, bool _useZro, bytes memory _adapterParams) public view returns (uint) {
        (uint nativeFee,) = token.estimateSendFee(_dstChainId, _toAddress, _amount, _useZro, _adapterParams);

        return nativeFee;
    }

    function togglePause() external {
        require(msg.sender == owner);
        isPaused = !isPaused;
    }
}

File 2 of 17 : OFT.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "./OFTCore.sol";
import "./IOFT.sol";

// override decimal() function is needed
contract OFT is OFTCore, ERC20, IOFT {
    constructor(string memory _name, string memory _symbol, address _lzEndpoint) ERC20(_name, _symbol) OFTCore(_lzEndpoint) {}

    function supportsInterface(bytes4 interfaceId) public view virtual override(OFTCore, IERC165) returns (bool) {
        return interfaceId == type(IOFT).interfaceId || interfaceId == type(IERC20).interfaceId || super.supportsInterface(interfaceId);
    }

    function circulatingSupply() public view virtual override returns (uint) {
        return totalSupply();
    }

    function _debitFrom(address _from, uint16, bytes memory, uint _amount) internal virtual override {
        address spender = _msgSender();
        if (_from != spender) {
            uint allowedSpend = allowance(_from, spender);
            require (allowedSpend >= _amount);
        }
        _burn(_from, _amount);
    }

    function _creditTo(uint16, address _toAddress, uint _amount) internal virtual override {
        _mint(_toAddress, _amount);
    }
}

File 3 of 17 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 4 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 5 of 17 : OFTCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../lzApp/NonblockingLzApp.sol";
import "./IOFTCore.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

abstract contract OFTCore is NonblockingLzApp, ERC165, IOFTCore {
    constructor(address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {}

    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IOFTCore).interfaceId || super.supportsInterface(interfaceId);
    }

    function estimateSendFee(uint16 _dstChainId, bytes memory _toAddress, uint _amount, bool _useZro, bytes memory _adapterParams) public view virtual override returns (uint nativeFee, uint zroFee) {
        // mock the payload for send()
        bytes memory payload = abi.encode(_toAddress, _amount);
        return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams);
    }

    function sendFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _amount, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) public payable virtual override {
        _send(_from, _dstChainId, _toAddress, _amount, _refundAddress, _zroPaymentAddress, _adapterParams);
    }

    function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {
        // decode and load the toAddress
        (bytes memory toAddressBytes, uint amount) = abi.decode(_payload, (bytes, uint));
        address toAddress;
        assembly {
            toAddress := mload(add(toAddressBytes, 20))
        }

        _creditTo(_srcChainId, toAddress, amount);

        emit ReceiveFromChain(_srcChainId, _srcAddress, toAddress, amount, _nonce);
    }

    function _send(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _amount, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) internal virtual {
        _debitFrom(_from, _dstChainId, _toAddress, _amount);

        bytes memory payload = abi.encode(_toAddress, _amount);
        _lzSend(_dstChainId, payload, _refundAddress, _zroPaymentAddress, _adapterParams);

        uint64 nonce = lzEndpoint.getOutboundNonce(_dstChainId, address(this));
        emit SendToChain(_from, _dstChainId, _toAddress, _amount, nonce);
    }

    function _debitFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _amount) internal virtual;

    function _creditTo(uint16 _srcChainId, address _toAddress, uint _amount) internal virtual;
}

File 6 of 17 : IOFT.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IOFTCore.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/**
 * @dev Interface of the OFT standard
 */
interface IOFT is IOFTCore, IERC20 {

}

File 7 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @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);
}

File 8 of 17 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 9 of 17 : 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;
    }
}

File 10 of 17 : NonblockingLzApp.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./LzApp.sol";

/*
 * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel
 * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking
 * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)
 */
abstract contract NonblockingLzApp is LzApp {
    constructor(address _endpoint) LzApp(_endpoint) {}

    mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32))) public failedMessages;

    event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload);

    // overriding the virtual function in LzReceiver
    function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override {
        // try-catch all errors/exceptions
        try this.nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload) {
            // do nothing
        } catch {
            // error / exception
            failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);
            emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload);
        }
    }

    function nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) public virtual {
        // only internal transaction
        require(_msgSender() == address(this), "NonblockingLzApp: caller must be LzApp");
        _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    //@notice override this function
    function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;

    function retryMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) public payable virtual {
        // assert there is message to retry
        bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];
        require(payloadHash != bytes32(0), "NonblockingLzApp: no stored message");
        require(keccak256(_payload) == payloadHash, "NonblockingLzApp: invalid payload");
        // clear the stored message
        failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);
        // execute the message. revert if it fails again
        _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }
}

File 11 of 17 : IOFTCore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

/**
 * @dev Interface of the IOFT core standard
 */
interface IOFTCore is IERC165 {
    /**
     * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`)
     * _dstChainId - L0 defined chain id to send tokens too
     * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain
     * _amount - amount of the tokens to transfer
     * _useZro - indicates to use zro to pay L0 fees
     * _adapterParam - flexible bytes array to indicate messaging adapter services in L0
     */
    function estimateSendFee(uint16 _dstChainId, bytes calldata _toAddress, uint _amount, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee);

    /**
     * @dev send `_amount` amount of token to (`_dstChainId`, `_toAddress`) from `_from`
     * `_from` the owner of token
     * `_dstChainId` the destination chain identifier
     * `_toAddress` can be any size depending on the `dstChainId`.
     * `_amount` the quantity of tokens in wei
     * `_refundAddress` the address LayerZero refunds if too much message fee is sent
     * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token)
     * `_adapterParams` is a flexible bytes array to indicate messaging adapter services
     */
    function sendFrom(address _from, uint16 _dstChainId, bytes calldata _toAddress, uint _amount, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;

    /**
     * @dev returns the circulating amount of tokens on current chain
     */
    function circulatingSupply() external view returns (uint);

    /**
     * @dev Emitted when `_amount` tokens are moved from the `_sender` to (`_dstChainId`, `_toAddress`)
     * `_nonce` is the outbound nonce
     */
    event SendToChain(address indexed _sender, uint16 indexed _dstChainId, bytes indexed _toAddress, uint _amount, uint64 _nonce);

    /**
     * @dev Emitted when `_amount` tokens are received from `_srcChainId` into the `_toAddress` on the local chain.
     * `_nonce` is the inbound nonce.
     */
    event ReceiveFromChain(uint16 indexed _srcChainId, bytes indexed _srcAddress, address indexed _toAddress, uint _amount, uint64 _nonce);
}

File 12 of 17 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 13 of 17 : LzApp.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/ILayerZeroReceiver.sol";
import "../interfaces/ILayerZeroUserApplicationConfig.sol";
import "../interfaces/ILayerZeroEndpoint.sol";

/*
 * a generic LzReceiver implementation
 */
abstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig {
    ILayerZeroEndpoint public immutable lzEndpoint;

    mapping(uint16 => bytes) public trustedRemoteLookup;

    event SetTrustedRemote(uint16 _srcChainId, bytes _srcAddress);

    constructor(address _endpoint) {
        lzEndpoint = ILayerZeroEndpoint(_endpoint);
    }

    function lzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) public virtual override {
        // lzReceive must be called by the endpoint for security
        require(_msgSender() == address(lzEndpoint), "LzApp: invalid endpoint caller");

        bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];
        // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.
        require(_srcAddress.length == trustedRemote.length && keccak256(_srcAddress) == keccak256(trustedRemote), "LzApp: invalid source sending contract");

        _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging
    function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual;

    function _lzSend(uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) internal virtual {
        bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];
        require(trustedRemote.length != 0, "LzApp: destination chain is not a trusted source");
        lzEndpoint.send{value: msg.value}(_dstChainId, trustedRemote, _payload, _refundAddress, _zroPaymentAddress, _adapterParams);
    }

    //---------------------------UserApplication config----------------------------------------
    function getConfig(uint16 _version, uint16 _chainId, address, uint _configType) external view returns (bytes memory) {
        return lzEndpoint.getConfig(_version, _chainId, address(this), _configType);
    }

    // generic config for LayerZero user Application
    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external override onlyOwner {
        lzEndpoint.setConfig(_version, _chainId, _configType, _config);
    }

    function setSendVersion(uint16 _version) external override onlyOwner {
        lzEndpoint.setSendVersion(_version);
    }

    function setReceiveVersion(uint16 _version) external override onlyOwner {
        lzEndpoint.setReceiveVersion(_version);
    }

    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner {
        lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);
    }

    // allow owner to set it multiple times.
    function setTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external onlyOwner {
        trustedRemoteLookup[_srcChainId] = _srcAddress;
        emit SetTrustedRemote(_srcChainId, _srcAddress);
    }

    //--------------------------- VIEW FUNCTION ----------------------------------------

    function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) {
        bytes memory trustedSource = trustedRemoteLookup[_srcChainId];
        return keccak256(trustedSource) == keccak256(_srcAddress);
    }
}

File 14 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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);
    }
}

File 15 of 17 : ILayerZeroReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface ILayerZeroReceiver {
    // @notice LayerZero 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 _nonce - the ordered message nonce
    // @param _payload - the signed payload is the UA bytes has encoded to be sent
    function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;
}

File 16 of 17 : ILayerZeroUserApplicationConfig.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface ILayerZeroUserApplicationConfig {
    // @notice set the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _configType - type of configuration. every messaging library has its own convention.
    // @param _config - configuration in the bytes. can encode arbitrary content.
    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;

    // @notice set the send() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setSendVersion(uint16 _version) external;

    // @notice set the lzReceive() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setReceiveVersion(uint16 _version) external;

    // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
    // @param _srcChainId - the chainId of the source chain
    // @param _srcAddress - the contract address of the source contract at the source chain
    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;
}

File 17 of 17 : ILayerZeroEndpoint.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

import "./ILayerZeroUserApplicationConfig.sol";

interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
    // @notice send a LayerZero message to the specified address at a LayerZero endpoint.
    // @param _dstChainId - the destination chain identifier
    // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
    // @param _payload - a custom bytes payload to send to the destination contract
    // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
    // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
    // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
    function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;

    // @notice used by the messaging library to publish verified payload
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source contract (as bytes) at the source chain
    // @param _dstAddress - the address on destination chain
    // @param _nonce - the unbound message ordering nonce
    // @param _gasLimit - the gas limit for external contract execution
    // @param _payload - verified payload to send to the destination contract
    function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;

    // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);

    // @notice get the outboundNonce from this source chain which, consequently, is always an EVM
    // @param _srcAddress - the source chain contract address
    function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);

    // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
    // @param _dstChainId - the destination chain identifier
    // @param _userApplication - the user app address on this EVM chain
    // @param _payload - the custom message to send over LayerZero
    // @param _payInZRO - if false, user app pays the protocol fee in native token
    // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
    function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);

    // @notice get this Endpoint's immutable source identifier
    function getChainId() external view returns (uint16);

    // @notice the interface to retry failed message on this Endpoint destination
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    // @param _payload - the payload to be retried
    function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;

    // @notice query if any STORED payload (message blocking) at the endpoint.
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);

    // @notice query if the _libraryAddress is valid for sending msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getSendLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the _libraryAddress is valid for receiving msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getReceiveLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the non-reentrancy guard for send() is on
    // @return true if the guard is on. false otherwise
    function isSendingPayload() external view returns (bool);

    // @notice query if the non-reentrancy guard for receive() is on
    // @return true if the guard is on. false otherwise
    function isReceivingPayload() external view returns (bool);

    // @notice get the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _userApplication - the contract address of the user application
    // @param _configType - type of configuration. every messaging library has its own convention.
    function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);

    // @notice get the send() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getSendVersion(address _userApplication) external view returns (uint16);

    // @notice get the lzReceive() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getReceiveVersion(address _userApplication) external view returns (uint16);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract OFT","name":"_token","type":"address"},{"internalType":"address","name":"_taker","type":"address"},{"internalType":"address","name":"_treasury","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint16","name":"dstChainId","type":"uint16"}],"name":"Sent","type":"event"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"bytes","name":"_toAddress","type":"bytes"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_useZro","type":"bool"},{"internalType":"bytes","name":"_adapterParams","type":"bytes"}],"name":"estimateSendFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"dstChainId","type":"uint16"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"send","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"togglePause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract OFT","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060405161081938038061081983398101604081905261002f9161007c565b60018054336001600160a01b0319918216179091556003805482166001600160a01b03938416179055600280548216938316939093179092556000805490921692169190911790556100e1565b60008060006060848603121561009157600080fd5b835161009c816100c9565b60208501519093506100ad816100c9565b60408501519092506100be816100c9565b809150509250925092565b6001600160a01b03811681146100de57600080fd5b50565b610729806100f06000396000f3fe60806040526004361061004a5760003560e01c80632a205e3d1461004f578063b187bd2614610082578063c4ae3168146100b3578063d6bf315a146100ca578063fc0c546a146100dd575b600080fd5b34801561005b57600080fd5b5061006f61006a366004610510565b610115565b6040519081526020015b60405180910390f35b34801561008e57600080fd5b506000546100a390600160a01b900460ff1681565b6040519015158152602001610079565b3480156100bf57600080fd5b506100c86101a9565b005b6100c86100d83660046104c5565b6101e1565b3480156100e957600080fd5b506000546100fd906001600160a01b031681565b6040516001600160a01b039091168152602001610079565b60008054604051632a205e3d60e01b815282916001600160a01b031690632a205e3d9061014e908a908a908a908a908a90600401610694565b604080518083038186803b15801561016557600080fd5b505afa158015610179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019d91906105c0565b50979650505050505050565b6001546001600160a01b031633146101c057600080fd5b6000805460ff60a01b198116600160a01b9182900460ff1615909102179055565b600054600160a01b900460ff16156102295760405162461bcd60e51b815260206004820152600660248201526514105554d15160d21b60448201526064015b60405180910390fd5b600081116102625760405162461bcd60e51b81526004016102209060208082526004908201526303c3d20360e41b604082015260600190565b600054604051636eb1769f60e11b815233600482015230602482015282916001600160a01b03169063dd62ed3e9060440160206040518083038186803b1580156102ab57600080fd5b505afa1580156102bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e391906105a7565b10156102ee57600080fd5b6000546002546001600160a01b039182169163519056369134913391889116821461032e576001600160a01b03871615610328578661033b565b3361033b565b6003546001600160a01b03165b60405160200161035e919060609190911b6001600160601b031916815260140190565b60408051601f19818403018152602083018252600080845291516001600160e01b031960e089901b16815261039d95949391928a923392600401610631565b6000604051808303818588803b1580156103b657600080fd5b505af11580156103ca573d6000803e3d6000fd5b5050604080513381526020810186905261ffff8816918101919091527fb6ca02dbd7998ce1fdc2275c9aa00d1a757ec6301c3e6c6d968fe6065445818b935060600191506104159050565b60405180910390a1505050565b600082601f83011261043357600080fd5b81356001600160401b038082111561044d5761044d6106dd565b604051601f8301601f19908116603f01168101908282118183101715610475576104756106dd565b8160405283815286602085880101111561048e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b803561ffff811681146104c057600080fd5b919050565b6000806000606084860312156104da57600080fd5b6104e3846104ae565b925060208401356001600160a01b03811681146104ff57600080fd5b929592945050506040919091013590565b600080600080600060a0868803121561052857600080fd5b610531866104ae565b945060208601356001600160401b038082111561054d57600080fd5b61055989838a01610422565b95506040880135945060608801359150811515821461057757600080fd5b9092506080870135908082111561058d57600080fd5b5061059a88828901610422565b9150509295509295909350565b6000602082840312156105b957600080fd5b5051919050565b600080604083850312156105d357600080fd5b505080516020909101519092909150565b6000815180845260005b8181101561060a576020818501810151868301820152016105ee565b8181111561061c576000602083870101525b50601f01601f19169290920160200192915050565b600060018060a01b03808a16835261ffff8916602084015260e0604084015261065d60e08401896105e4565b876060850152818716608085015281861660a085015283810360c085015261068581866105e4565b9b9a5050505050505050505050565b61ffff8616815260a0602082015260006106b160a08301876105e4565b856040840152841515606084015282810360808401526106d181856105e4565b98975050505050505050565b634e487b7160e01b600052604160045260246000fdfea26469706673582212209fb42204844ca726d094cea4484853d5c064b7868db0464a5e325b44f0050cd864736f6c63430008070033000000000000000000000000c72633f995e98ac3bb8a89e6a9c4af335c3d6e44000000000000000000000000e6958b0a579870276b9fcabdc74323359933ae3c000000000000000000000000dd936cd61b75a7e0226e60d3c12b974144133e4d

Deployed Bytecode

0x60806040526004361061004a5760003560e01c80632a205e3d1461004f578063b187bd2614610082578063c4ae3168146100b3578063d6bf315a146100ca578063fc0c546a146100dd575b600080fd5b34801561005b57600080fd5b5061006f61006a366004610510565b610115565b6040519081526020015b60405180910390f35b34801561008e57600080fd5b506000546100a390600160a01b900460ff1681565b6040519015158152602001610079565b3480156100bf57600080fd5b506100c86101a9565b005b6100c86100d83660046104c5565b6101e1565b3480156100e957600080fd5b506000546100fd906001600160a01b031681565b6040516001600160a01b039091168152602001610079565b60008054604051632a205e3d60e01b815282916001600160a01b031690632a205e3d9061014e908a908a908a908a908a90600401610694565b604080518083038186803b15801561016557600080fd5b505afa158015610179573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019d91906105c0565b50979650505050505050565b6001546001600160a01b031633146101c057600080fd5b6000805460ff60a01b198116600160a01b9182900460ff1615909102179055565b600054600160a01b900460ff16156102295760405162461bcd60e51b815260206004820152600660248201526514105554d15160d21b60448201526064015b60405180910390fd5b600081116102625760405162461bcd60e51b81526004016102209060208082526004908201526303c3d20360e41b604082015260600190565b600054604051636eb1769f60e11b815233600482015230602482015282916001600160a01b03169063dd62ed3e9060440160206040518083038186803b1580156102ab57600080fd5b505afa1580156102bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e391906105a7565b10156102ee57600080fd5b6000546002546001600160a01b039182169163519056369134913391889116821461032e576001600160a01b03871615610328578661033b565b3361033b565b6003546001600160a01b03165b60405160200161035e919060609190911b6001600160601b031916815260140190565b60408051601f19818403018152602083018252600080845291516001600160e01b031960e089901b16815261039d95949391928a923392600401610631565b6000604051808303818588803b1580156103b657600080fd5b505af11580156103ca573d6000803e3d6000fd5b5050604080513381526020810186905261ffff8816918101919091527fb6ca02dbd7998ce1fdc2275c9aa00d1a757ec6301c3e6c6d968fe6065445818b935060600191506104159050565b60405180910390a1505050565b600082601f83011261043357600080fd5b81356001600160401b038082111561044d5761044d6106dd565b604051601f8301601f19908116603f01168101908282118183101715610475576104756106dd565b8160405283815286602085880101111561048e57600080fd5b836020870160208301376000602085830101528094505050505092915050565b803561ffff811681146104c057600080fd5b919050565b6000806000606084860312156104da57600080fd5b6104e3846104ae565b925060208401356001600160a01b03811681146104ff57600080fd5b929592945050506040919091013590565b600080600080600060a0868803121561052857600080fd5b610531866104ae565b945060208601356001600160401b038082111561054d57600080fd5b61055989838a01610422565b95506040880135945060608801359150811515821461057757600080fd5b9092506080870135908082111561058d57600080fd5b5061059a88828901610422565b9150509295509295909350565b6000602082840312156105b957600080fd5b5051919050565b600080604083850312156105d357600080fd5b505080516020909101519092909150565b6000815180845260005b8181101561060a576020818501810151868301820152016105ee565b8181111561061c576000602083870101525b50601f01601f19169290920160200192915050565b600060018060a01b03808a16835261ffff8916602084015260e0604084015261065d60e08401896105e4565b876060850152818716608085015281861660a085015283810360c085015261068581866105e4565b9b9a5050505050505050505050565b61ffff8616815260a0602082015260006106b160a08301876105e4565b856040840152841515606084015282810360808401526106d181856105e4565b98975050505050505050565b634e487b7160e01b600052604160045260246000fdfea26469706673582212209fb42204844ca726d094cea4484853d5c064b7868db0464a5e325b44f0050cd864736f6c63430008070033

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

000000000000000000000000c72633f995e98ac3bb8a89e6a9c4af335c3d6e44000000000000000000000000e6958b0a579870276b9fcabdc74323359933ae3c000000000000000000000000dd936cd61b75a7e0226e60d3c12b974144133e4d

-----Decoded View---------------
Arg [0] : _token (address): 0xC72633F995e98Ac3BB8a89e6a9C4Af335C3D6E44
Arg [1] : _taker (address): 0xe6958B0A579870276B9FcABDC74323359933AE3c
Arg [2] : _treasury (address): 0xdd936Cd61B75a7e0226e60D3c12B974144133e4d

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000c72633f995e98ac3bb8a89e6a9c4af335c3d6e44
Arg [1] : 000000000000000000000000e6958b0a579870276b9fcabdc74323359933ae3c
Arg [2] : 000000000000000000000000dd936cd61b75a7e0226e60d3c12b974144133e4d


Block Transaction Difficulty 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

Txn 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.