Contract 0xa40278f4e300876c17eacec98c0ab7c5c0a4aef2 2

 
 
Txn Hash
Block
From
To
Value [Txn Fee]
0x1daa7f7d402f644f98265f27ff0bc44576ba1c5b6b506f639f9955538abc8b2b92089702021-07-16 14:14:3115 days 17 hrs ago0x598e630ea3e4c3de045ca0dd5f377565ec2f540c IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.000181655
0x981745a0bd8e01a25d4682ae5f18df79ad6cf6f64170af7564d57ace2bab603692089482021-07-16 14:13:2515 days 17 hrs ago0x6b54fbcafa1e4824a6ba004208ffe5fb8acccfe8 IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.00010033
0xe5d3742ae588d70e9d5647d52d13ac0d5fd2362c1ec1ca97d71342d1368e39df92089462021-07-16 14:13:1915 days 17 hrs ago0x6b54fbcafa1e4824a6ba004208ffe5fb8acccfe8 IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.000087075
0xba4e69a484265707d191ef00dd7ec59e9423c63d35963ff885d543521bf2fca992089452021-07-16 14:13:1615 days 17 hrs ago0x6b54fbcafa1e4824a6ba004208ffe5fb8acccfe8 IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.00010033
0x96ce3e20f5a6f9864b9508771f92645fac2c7d5a2f39211eb218440ef19143a792089442021-07-16 14:13:1315 days 17 hrs ago0x6b54fbcafa1e4824a6ba004208ffe5fb8acccfe8 IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.000082705
0x53bbdc1692b1961ba4f3c028aad20d4cbcdd59280aaaf56ebdf355bbb5bd8ff292089132021-07-16 14:11:4015 days 17 hrs ago0x598e630ea3e4c3de045ca0dd5f377565ec2f540c IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.00033334
0xc8995ef3e43fb606bba60a9ba29f5b7ed0a4497669a82051148b9b62ce38e40792089002021-07-16 14:11:0115 days 17 hrs ago0xa79d0978addc6cb72bd6003f566497d633c8cac3 IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.00128378
0x955219303ef7af60dd265d296c8ef0f73a4b4fe3d377200d1e3fdd352a7bde9f92084302021-07-16 13:47:3115 days 18 hrs ago0x2bd2dd74b3e069c59350ebca4216c30909c69083 IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.001387985
0xa642e6856272ff1aa9bf6361a300f4289cfec543a04f6928b7cf74f7fee6e7a292076852021-07-16 13:10:1615 days 18 hrs ago0x598e630ea3e4c3de045ca0dd5f377565ec2f540c IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.00015247
0xcd34963761444e9b2b164e7c5e6d3e8b2073f97399a1a2590909445831e8e15a92076732021-07-16 13:09:4015 days 18 hrs ago0x598e630ea3e4c3de045ca0dd5f377565ec2f540c IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.000156245
0x5ace3313b237ee494e24548a64012354a780f9643a7800885dc98d050a15877a92076632021-07-16 13:09:1015 days 18 hrs ago0x598e630ea3e4c3de045ca0dd5f377565ec2f540c IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.0001834
0xd3e0806e4d7d083e9c6cd71b7ca27691b55638e3aa1a17599e4e9856ebc5b49992073392021-07-16 12:52:5815 days 19 hrs ago0x835e5c4b6ab3c4554d5458827fae89c1e84040c8 IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.000521022
0x78ec57da93a95b016014c3b52a5486908a9bf309e55e74eebe0d9cc05c06a9d192073282021-07-16 12:52:2515 days 19 hrs ago0x42db5e69201aa5bebe81d89f9cd529f45ad7fb37 IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.000134076
0xd39059a4a9c943a4d53e47110a59d225ffe4587a2e96fd2e1933c739beb5569d92073162021-07-16 12:51:4915 days 19 hrs ago0x54382c8c87de8641718a9535ce3c3268250e3aec IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.001312925
0xb1f8a1a2fc5fcbf415e14923e0648c4c19ac600d085d5137fbfa2481c826e43092073032021-07-16 12:51:1015 days 19 hrs ago0xa967314fff11dfd6f2aeda9dfa6cf2b41cd9c37c IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.000134076
0xa0401187bd2debaf3f33b929d532dd16ef06118cd1b72134d05a7327f049f7f392072922021-07-16 12:50:3715 days 19 hrs ago0x1f8168a6fa99830172b738134616fba08207cf9c IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.001312985
0xab1a7f8ae234806d9e88d494801dfd7db8f449b8f4c6f74beaa9bbd7b2a0f9b792072912021-07-16 12:50:3415 days 19 hrs ago0x42db5e69201aa5bebe81d89f9cd529f45ad7fb37 IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.000553248
0xdb666a3c7131939aacd2fabef62057666c79f2754feabaf5a2135f9b1805dec992072892021-07-16 12:50:2815 days 19 hrs ago0xa967314fff11dfd6f2aeda9dfa6cf2b41cd9c37c IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.000134076
0x6aef9d239c0557b68dad6cb63b407359a16e391a93f386927ccea640350cdfa392072442021-07-16 12:48:1315 days 19 hrs ago0x42db5e69201aa5bebe81d89f9cd529f45ad7fb37 IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.000134076
0x9498c352ea94c17ff180792341bdd2ae3051ef5a1d11c73fe605f2cc86e1c64792072322021-07-16 12:47:3715 days 19 hrs ago0x2c053da177fc0b87f87d812a643f3205e79e16ea IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.001237985
0x669f938f32d77597e1610f7f249638ca96603ba334b0e63b3c55b6c73fee33b592072102021-07-16 12:46:3115 days 19 hrs ago0x6ea2f80bdf4ad3f0add325ea3b2dc8e60a73ef2e IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.000553248
0x0d72af6c177873bf5cf3547202c6f8d056299c7f000bce8a7b719fa46e0bd1fe92071812021-07-16 12:45:0415 days 19 hrs ago0x78187b10f5c974b665119372a88111d5bb69e253 IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.001312805
0x2cba3cafbbccd236ad17dfc768241460a2b44f97ef793be4ea8fbe10e4edcde592071232021-07-16 12:42:1015 days 19 hrs ago0x6ea2f80bdf4ad3f0add325ea3b2dc8e60a73ef2e IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.000134076
0xe613e976dbeb5117ce2d786f15d8e650440558a423ab48b0955e87489debfd6c92071112021-07-16 12:41:3415 days 19 hrs ago0x5a4c3009114faa2998891f326d9dd8a1063e37bf IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.001312985
0x65c7a40fa284084fe7d57553c3d7ee05942e04c3d9d9f56c71d527d492f2ddcb92071112021-07-16 12:41:3415 days 19 hrs ago0x42db5e69201aa5bebe81d89f9cd529f45ad7fb37 IN  0xa40278f4e300876c17eacec98c0ab7c5c0a4aef20 BNB0.00052095
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Bridge

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : Bridge.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";

import "./Trustable.sol";

contract Bridge is Trustable {
    using EnumerableSet for EnumerableSet.UintSet;
    using SafeERC20 for ERC20;

    struct Order {
        uint id;
        uint16 tokenId;
        address sender;
        address target;
        uint amount;
        uint8 decimals;
        uint8 destination;
    }

    struct Token {
        ERC20 token;
        uint16 fee;
        uint feeBase;
        address feeTarget;
        uint minAmount;
        uint maxAmount;
        uint dailyLimit;
        uint bonus;
    }

    struct UserStats {
        uint transfered;
        uint limitFrom;
    }

    event OrderCreated(uint indexed id, Order order, uint fee);
    event OrderCompleted(uint indexed id, uint8 indexed dstFrom);

    uint nextOrderId = 0;
    uint16 tokensLength = 0;

    mapping (uint16 => Token) public tokens;
    mapping (uint16 => mapping (address => UserStats)) public stats;
    mapping (uint => Order) public orders;
    EnumerableSet.UintSet private orderIds;
    mapping (bytes32 => bool) public completed;

    function setToken(
        uint16 tokenId,
        ERC20 token,
        uint16 fee,
        uint feeBase,
        address feeTarget,
        uint minAmount,
        uint maxAmount,
        uint dailyLimit,
        uint8 inputDecimals
    ) external onlyOwner {
        require(fee <= 10000, "invalid fee");
        tokens[tokenId] = Token(
            token,
            fee,
            convertAmount(token, feeBase, inputDecimals),
            feeTarget,
            convertAmount(token, minAmount, inputDecimals),
            convertAmount(token, maxAmount, inputDecimals),
            convertAmount(token, dailyLimit, inputDecimals),
            0
        );
        if (tokenId + 1 > tokensLength) {
            tokensLength = tokenId + 1;
        }
    }

    function convertAmount(ERC20 token, uint amount, uint decimals) view internal returns (uint) {
        return amount * (10 ** token.decimals()) / (10 ** decimals);
    }

    function setFee(uint16 tokenId, uint16 fee) external onlyOwner {
        require(fee <= 10000, "invalid fee");
        tokens[tokenId].fee = fee;
    }

    function setFeeBase(uint16 tokenId, uint feeBase, uint8 inputDecimals) external onlyOwner {
        tokens[tokenId].feeBase = convertAmount(tokens[tokenId].token, feeBase, inputDecimals);
    }

    function setFeeTarget(uint16 tokenId, address feeTarget) external onlyOwner {
        tokens[tokenId].feeTarget = feeTarget;
    }

    function setDailyLimit(uint16 tokenId, uint dailyLimit, uint8 inputDecimals) external onlyOwner {
        tokens[tokenId].dailyLimit = convertAmount(tokens[tokenId].token, dailyLimit, inputDecimals);
    }

    function setMinAmount(uint16 tokenId, uint minAmount, uint8 inputDecimals) external onlyOwner {
        tokens[tokenId].minAmount = convertAmount(tokens[tokenId].token, minAmount, inputDecimals);
    }

    function setMaxAmount(uint16 tokenId, uint maxAmount, uint8 inputDecimals) external onlyOwner {
        tokens[tokenId].maxAmount = convertAmount(tokens[tokenId].token, maxAmount, inputDecimals);
    }

    function setBonus(uint16 tokenId, uint bonus) external onlyOwner {
        tokens[tokenId].bonus = bonus;
    }

    function create(uint16 tokenId, uint amount, uint8 destination, address target) external {
        Token storage tok = tokens[tokenId];
        require(address(tok.token) != address(0), "unknown token");

        require(amount >= tok.minAmount, "amount lower than mininum");
        require(amount <= tok.maxAmount, "amount greater than mininum");

        UserStats storage st = stats[tokenId][msg.sender];

        bool lastIsOld = st.limitFrom + 24 hours < block.timestamp;
        if (lastIsOld) {
            st.limitFrom = block.timestamp;
            st.transfered = 0;
        }
        require(st.transfered + amount <= tok.dailyLimit, "daily limit exceed");
        st.transfered += amount;

        uint feeAmount = tok.feeBase + amount * tok.fee / 10000;
        if (feeAmount > 0) {
            tok.token.safeTransferFrom(msg.sender, tok.feeTarget, feeAmount);
        }

        amount = amount - feeAmount;
        tok.token.safeTransferFrom(msg.sender, address(this), amount);

        orders[nextOrderId] = Order(
            nextOrderId,
            tokenId,
            msg.sender,
            target,
            amount,
            tok.token.decimals(),
            destination
        );
        orderIds.add(nextOrderId);

        emit OrderCreated(nextOrderId, orders[nextOrderId], feeAmount);
        nextOrderId++;
    }

    function close(uint orderId) external onlyTrusted {
        orderIds.remove(orderId);
    }

    function completeOrder(uint orderId, uint8 dstFrom, uint16 tokenId, address payable to, uint amount, uint decimals) external onlyTrusted {
        bytes32 orderHash = keccak256(abi.encodePacked(orderId, dstFrom));
        require (completed[orderHash] == false, "already transfered");

        Token storage tok = tokens[tokenId];
        require(address(tok.token) != address(0), "unknown token");

        tok.token.safeTransfer(to, convertAmount(tok.token, amount, decimals));
        completed[orderHash] = true;

        uint bonus = Math.min(tok.bonus, address(this).balance);
        if (bonus > 0) {
            to.transfer(bonus);
        }

        emit OrderCompleted(orderId, dstFrom);
    }

    function withdraw(uint16 tokenId, address to, uint amount, uint8 inputDecimals) external onlyTrusted {
        Token storage tok = tokens[tokenId];
        tok.token.safeTransfer(to, convertAmount(tok.token, amount, inputDecimals));
    }

    function isCompleted(uint orderId, uint8 dstFrom) external view returns (bool) {
        return completed[keccak256(abi.encodePacked(orderId, dstFrom))];
    }

    function listOrders() external view returns (Order[] memory) {
        Order[] memory list = new Order[](orderIds.length());
        for (uint i = 0; i < orderIds.length(); i++) {
            list[i] = orders[orderIds.at(i)];
        }

        return list;
    }

    function listTokensNames() external view returns (string[] memory) {
        string[] memory list = new string[](tokensLength);
        for (uint16 i = 0; i < tokensLength; i++) {
            if (address(tokens[i].token) != address(0)) {
                list[i] = tokens[i].token.symbol();
            }
        }

        return list;
    }


    receive() external payable {}
}

File 2 of 10 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.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 guidelines: functions revert instead
 * of 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 {
    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 defaut value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All three 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 returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual 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
     * overloaded;
     *
     * 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 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");
        _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");
        _approve(_msgSender(), spender, currentAllowance - subtractedValue);

        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is 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");
        _balances[sender] = senderBalance - amount;
        _balances[recipient] += amount;

        emit Transfer(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:
     *
     * - `to` 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);
    }

    /**
     * @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");
        _balances[account] = accountBalance - amount;
        _totalSupply -= amount;

        emit Transfer(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 to 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 { }
}

File 3 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 4 of 10 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 5 of 10 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

File 6 of 10 : Trustable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract Trustable is Ownable {
    mapping(address=>bool) public _isTrusted;
    modifier onlyTrusted {
        require(_isTrusted[msg.sender] || msg.sender == owner(), "not trusted");
        _;
    }

    function addTrusted(address user) public onlyOwner {
        _isTrusted[user] = true;
    }

    function removeTrusted(address user) public onlyOwner {
        _isTrusted[user] = false;
    }
}

File 7 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT

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 10 : Context.sol
// SPDX-License-Identifier: MIT

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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 9 of 10 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

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

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"dstFrom","type":"uint8"}],"name":"OrderCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint8","name":"destination","type":"uint8"}],"indexed":false,"internalType":"struct Bridge.Order","name":"order","type":"tuple"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"OrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_isTrusted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"addTrusted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"close","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"uint8","name":"dstFrom","type":"uint8"},{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"}],"name":"completeOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"completed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"destination","type":"uint8"},{"internalType":"address","name":"target","type":"address"}],"name":"create","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"uint8","name":"dstFrom","type":"uint8"}],"name":"isCompleted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"listOrders","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint8","name":"destination","type":"uint8"}],"internalType":"struct Bridge.Order[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"listTokensNames","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"orders","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint8","name":"destination","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"removeTrusted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"uint256","name":"bonus","type":"uint256"}],"name":"setBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"uint256","name":"dailyLimit","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"setDailyLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"uint16","name":"fee","type":"uint16"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"uint256","name":"feeBase","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"setFeeBase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"address","name":"feeTarget","type":"address"}],"name":"setFeeTarget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"setMaxAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"setMinAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"contract ERC20","name":"token","type":"address"},{"internalType":"uint16","name":"fee","type":"uint16"},{"internalType":"uint256","name":"feeBase","type":"uint256"},{"internalType":"address","name":"feeTarget","type":"address"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"dailyLimit","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"address","name":"","type":"address"}],"name":"stats","outputs":[{"internalType":"uint256","name":"transfered","type":"uint256"},{"internalType":"uint256","name":"limitFrom","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"tokens","outputs":[{"internalType":"contract ERC20","name":"token","type":"address"},{"internalType":"uint16","name":"fee","type":"uint16"},{"internalType":"uint256","name":"feeBase","type":"uint256"},{"internalType":"address","name":"feeTarget","type":"address"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"dailyLimit","type":"uint256"},{"internalType":"uint256","name":"bonus","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"tokenId","type":"uint16"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405260006002556003805461ffff1916905534801561002057600080fd5b50600061002b61007a565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061007e565b3390565b61281b8061008d6000396000f3fe60806040526004361061016a5760003560e01c8063a85c38ef116100d1578063db6587491161008a578063f1a348fe11610064578063f1a348fe1461044a578063f2fde38b1461046a578063f3c20de01461048a578063f6419d96146104be57610171565b8063db658749146103ea578063dd3705cc1461040a578063e923cd9b1461042a57610171565b8063a85c38ef14610309578063b2017c091461033c578063b5caa2c01461035c578063d4ad95d31461038a578063d4d0d6e6146103aa578063d55e62a0146103ca57610171565b80633eb6be21116101235780633eb6be21146102525780633ffd402c14610272578063715018a61461029257806384a2ded4146102a75780638da5cb5b146102c757806399b64de1146102e957610171565b80630aebeb4e14610176578063176091f4146101985780631c604551146101c3578063231d305e146101e3578063277b08b41461020357806327e021e81461022557610171565b3661017157005b600080fd5b34801561018257600080fd5b50610196610191366004611c1e565b6104de565b005b3480156101a457600080fd5b506101ad610548565b6040516101ba91906120b5565b60405180910390f35b3480156101cf57600080fd5b506101966101de366004611e67565b61069b565b3480156101ef57600080fd5b506101966101fe366004611ea6565b610725565b34801561020f57600080fd5b50610218610ab8565b6040516101ba9190612055565b34801561023157600080fd5b50610245610240366004611eeb565b610c28565b6040516101ba9190612158565b34801561025e57600080fd5b5061019661026d366004611e67565b610c73565b34801561027e57600080fd5b5061024561028d366004611be2565b610cfc565b34801561029e57600080fd5b50610196610d11565b3480156102b357600080fd5b506101966102c2366004611cf3565b610d9a565b3480156102d357600080fd5b506102dc610e10565b6040516101ba9190612004565b3480156102f557600080fd5b50610196610304366004611e0c565b610e1f565b34801561031557600080fd5b50610329610324366004611c1e565b610eb6565b6040516101ba979695949392919061250e565b34801561034857600080fd5b50610196610357366004611e67565b610f08565b34801561036857600080fd5b5061037c610377366004611cf3565b610f91565b6040516101ba929190612554565b34801561039657600080fd5b506101966103a5366004611e3e565b610fb5565b3480156103b657600080fd5b506101966103c5366004611be2565b61100e565b3480156103d657600080fd5b506101966103e5366004611be2565b611074565b3480156103f657600080fd5b50610196610405366004611d79565b6110d4565b34801561041657600080fd5b50610196610425366004611d29565b6112a6565b34801561043657600080fd5b50610196610445366004611e67565b611343565b34801561045657600080fd5b50610196610465366004611f0f565b6113cc565b34801561047657600080fd5b50610196610485366004611be2565b611574565b34801561049657600080fd5b506104aa6104a5366004611cd9565b611634565b6040516101ba989796959493929190612163565b3480156104ca57600080fd5b506102456104d9366004611c1e565b611687565b3360009081526001602052604090205460ff168061051457506104ff610e10565b6001600160a01b0316336001600160a01b0316145b6105395760405162461bcd60e51b8152600401610530906122af565b60405180910390fd5b61054460078261169c565b5050565b6060600061055660076116af565b67ffffffffffffffff81111561057c57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156105b557816020015b6105a2611b94565b81526020019060019003908161059a5790505b50905060005b6105c560076116af565b81101561069557600660006105db6007846116c2565b81526020808201929092526040908101600020815160e08101835281548152600182015461ffff811694820194909452620100009093046001600160a01b039081169284019290925260028101549091166060830152600381015460808301526004015460ff80821660a08401526101009091041660c0820152825183908390811061067757634e487b7160e01b600052603260045260246000fd5b6020026020010181905250808061068d90612777565b9150506105bb565b50905090565b6106a36116ce565b6001600160a01b03166106b4610e10565b6001600160a01b0316146106da5760405162461bcd60e51b81526004016105309061233f565b61ffff8316600090815260046020526040902054610705906001600160a01b03168360ff84166116d2565b61ffff909316600090815260046020819052604090912001929092555050565b61ffff8416600090815260046020526040902080546001600160a01b031661075f5760405162461bcd60e51b815260040161053090612458565b80600301548410156107835760405162461bcd60e51b815260040161053090612232565b80600401548411156107a75760405162461bcd60e51b815260040161053090612374565b61ffff851660009081526005602090815260408083203384529091528120600181015490919042906107dc9062015180612588565b10905080156107f057426001830155600082555b60058301548254610802908890612588565b11156108205760405162461bcd60e51b8152600401610530906123e2565b858260000160008282546108349190612588565b909155505082546000906127109061085790600160a01b900461ffff16896126e7565b61086191906125a0565b84600101546108709190612588565b905080156108985760028401548454610898916001600160a01b039182169133911684611777565b6108a28188612706565b84549097506108bc906001600160a01b031633308a611777565b6040518060e0016040528060025481526020018961ffff168152602001336001600160a01b03168152602001866001600160a01b031681526020018881526020018560000160009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561094d57600080fd5b505afa158015610961573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109859190611f71565b60ff90811682528881166020928301526002805460009081526006845260409081902085518155938501516001850180549287015161ffff1990931661ffff9092169190911762010000600160b01b031916620100006001600160a01b0393841602179055606085015184830180546001600160a01b031916919092161790556080840151600384015560a08401516004909301805460c09095015160ff199095169383169390931761ff001916610100949092169390930217905554610a4e906007906117d5565b506002546000818152600660205260409081902090517fe0fc39a26fb6298638d7fe229265134bc93a87d2e797982615f7b8e467a8709291610a9191859061247f565b60405180910390a260028054906000610aa983612777565b91905055505050505050505050565b60035460609060009061ffff1667ffffffffffffffff811115610aeb57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610b1e57816020015b6060815260200190600190039081610b095790505b50905060005b60035461ffff90811690821610156106955761ffff81166000908152600460205260409020546001600160a01b031615610c165761ffff811660009081526004602081905260408083205481516395d89b4160e01b815291516001600160a01b03909116936395d89b419383810193919291829003018186803b158015610baa57600080fd5b505afa158015610bbe573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610be69190810190611c36565b828261ffff1681518110610c0a57634e487b7160e01b600052603260045260246000fd5b60200260200101819052505b80610c2081612755565b915050610b24565b6000600960008484604051602001610c41929190611fe9565b60408051601f198184030181529181528151602092830120835290820192909252016000205460ff1690505b92915050565b610c7b6116ce565b6001600160a01b0316610c8c610e10565b6001600160a01b031614610cb25760405162461bcd60e51b81526004016105309061233f565b61ffff8316600090815260046020526040902054610cdd906001600160a01b03168360ff84166116d2565b61ffff9093166000908152600460205260409020600101929092555050565b60016020526000908152604090205460ff1681565b610d196116ce565b6001600160a01b0316610d2a610e10565b6001600160a01b031614610d505760405162461bcd60e51b81526004016105309061233f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b610da26116ce565b6001600160a01b0316610db3610e10565b6001600160a01b031614610dd95760405162461bcd60e51b81526004016105309061233f565b61ffff91909116600090815260046020526040902060020180546001600160a01b0319166001600160a01b03909216919091179055565b6000546001600160a01b031690565b610e276116ce565b6001600160a01b0316610e38610e10565b6001600160a01b031614610e5e5760405162461bcd60e51b81526004016105309061233f565b6127108161ffff161115610e845760405162461bcd60e51b81526004016105309061231a565b61ffff9182166000908152600460205260409020805492909116600160a01b0261ffff60a01b19909216919091179055565b60066020526000908152604090208054600182015460028301546003840154600490940154929361ffff831693620100009093046001600160a01b039081169392169160ff8082169161010090041687565b610f106116ce565b6001600160a01b0316610f21610e10565b6001600160a01b031614610f475760405162461bcd60e51b81526004016105309061233f565b61ffff8316600090815260046020526040902054610f72906001600160a01b03168360ff84166116d2565b61ffff9093166000908152600460205260409020600501929092555050565b60056020908152600092835260408084209091529082529020805460019091015482565b610fbd6116ce565b6001600160a01b0316610fce610e10565b6001600160a01b031614610ff45760405162461bcd60e51b81526004016105309061233f565b61ffff909116600090815260046020526040902060060155565b6110166116ce565b6001600160a01b0316611027610e10565b6001600160a01b03161461104d5760405162461bcd60e51b81526004016105309061233f565b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b61107c6116ce565b6001600160a01b031661108d610e10565b6001600160a01b0316146110b35760405162461bcd60e51b81526004016105309061233f565b6001600160a01b03166000908152600160205260409020805460ff19169055565b6110dc6116ce565b6001600160a01b03166110ed610e10565b6001600160a01b0316146111135760405162461bcd60e51b81526004016105309061233f565b6127108761ffff1611156111395760405162461bcd60e51b81526004016105309061231a565b604051806101000160405280896001600160a01b031681526020018861ffff16815260200161116c8a898560ff166116d2565b8152602001866001600160a01b0316815260200161118e8a878560ff166116d2565b81526020016111a18a868560ff166116d2565b81526020016111b48a858560ff166116d2565b81526000602091820181905261ffff808d168252600480845260409283902085518154958701518416600160a01b0261ffff60a01b196001600160a01b039283166001600160a01b0319988916171617825593860151600180830191909155606087015160028301805491909616961695909517909355608085015160038085019190915560a08601519184019190915560c0850151600584015560e09094015160069092019190915591549091169061126f908b90612562565b61ffff16111561129b57611284896001612562565b6003805461ffff191661ffff929092169190911790555b505050505050505050565b3360009081526001602052604090205460ff16806112dc57506112c7610e10565b6001600160a01b0316336001600160a01b0316145b6112f85760405162461bcd60e51b8152600401610530906122af565b61ffff84166000908152600460205260409020805461133c90859061132a906001600160a01b03168660ff87166116d2565b83546001600160a01b031691906117e1565b5050505050565b61134b6116ce565b6001600160a01b031661135c610e10565b6001600160a01b0316146113825760405162461bcd60e51b81526004016105309061233f565b61ffff83166000908152600460205260409020546113ad906001600160a01b03168360ff84166116d2565b61ffff9093166000908152600460205260409020600301929092555050565b3360009081526001602052604090205460ff168061140257506113ed610e10565b6001600160a01b0316336001600160a01b0316145b61141e5760405162461bcd60e51b8152600401610530906122af565b60008686604051602001611433929190611fe9565b60408051601f1981840301815291815281516020928301206000818152600990935291205490915060ff161561147b5760405162461bcd60e51b815260040161053090612206565b61ffff8516600090815260046020526040902080546001600160a01b03166114b55760405162461bcd60e51b815260040161053090612458565b80546114d190869061132a906001600160a01b031687876116d2565b6000828152600960205260408120805460ff1916600117905560068201546114f99047611805565b90508015611539576040516001600160a01b0387169082156108fc029083906000818181858888f19350505050158015611537573d6000803e3d6000fd5b505b60405160ff8916908a907f2bd2d9c5f8a1215c53d8d1e6eeed2a5edde1be47f27f9d43e053043628ecb31f90600090a3505050505050505050565b61157c6116ce565b6001600160a01b031661158d610e10565b6001600160a01b0316146115b35760405162461bcd60e51b81526004016105309061233f565b6001600160a01b0381166115d95760405162461bcd60e51b815260040161053090612269565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600460208190526000918252604090912080546001820154600283015460038401549484015460058501546006909501546001600160a01b0380861697600160a01b90960461ffff169694959316939088565b60096020526000908152604090205460ff1681565b60006116a8838361181b565b9392505050565b60006116ba82611938565b90505b919050565b60006116a8838361193c565b3390565b60006116df82600a612606565b846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561171857600080fd5b505afa15801561172c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117509190611f71565b61175b90600a612615565b61176590856126e7565b61176f91906125a0565b949350505050565b6117cf846323b872dd60e01b85858560405160240161179893929190612018565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611995565b50505050565b60006116a88383611a24565b6118008363a9059cbb60e01b848460405160240161179892919061203c565b505050565b600081831061181457816116a8565b5090919050565b6000818152600183016020526040812054801561192e57600061183f600183612706565b855490915060009061185390600190612706565b9050600086600001828154811061187a57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050808760000184815481106118ab57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001556118c2836001612588565b600082815260018901602052604090205586548790806118f257634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610c6d565b6000915050610c6d565b5490565b8154600090821061195f5760405162461bcd60e51b8152600401610530906121c4565b82600001828154811061198257634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60006119ea826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a6e9092919063ffffffff16565b8051909150156118005780806020019051810190611a089190611bfe565b6118005760405162461bcd60e51b81526004016105309061240e565b6000611a308383611a7d565b611a6657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c6d565b506000610c6d565b606061176f8484600085611a95565b60009081526001919091016020526040902054151590565b606082471015611ab75760405162461bcd60e51b8152600401610530906122d4565b611ac085611b55565b611adc5760405162461bcd60e51b8152600401610530906123ab565b600080866001600160a01b03168587604051611af89190611fcd565b60006040518083038185875af1925050503d8060008114611b35576040519150601f19603f3d011682016040523d82523d6000602084013e611b3a565b606091505b5091509150611b4a828286611b5b565b979650505050505050565b3b151590565b60608315611b6a5750816116a8565b825115611b7a5782518084602001fd5b8160405162461bcd60e51b815260040161053091906121b1565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b803561ffff811681146116bd57600080fd5b600060208284031215611bf3578081fd5b81356116a8816127be565b600060208284031215611c0f578081fd5b815180151581146116a8578182fd5b600060208284031215611c2f578081fd5b5035919050565b600060208284031215611c47578081fd5b815167ffffffffffffffff80821115611c5e578283fd5b818401915084601f830112611c71578283fd5b815181811115611c8357611c836127a8565b604051601f8201601f191681016020018381118282101715611ca757611ca76127a8565b604052818152838201602001871015611cbe578485fd5b611ccf826020830160208701612729565b9695505050505050565b600060208284031215611cea578081fd5b6116a882611bd0565b60008060408385031215611d05578081fd5b611d0e83611bd0565b91506020830135611d1e816127be565b809150509250929050565b60008060008060808587031215611d3e578182fd5b611d4785611bd0565b93506020850135611d57816127be565b9250604085013591506060850135611d6e816127d6565b939692955090935050565b60008060008060008060008060006101208a8c031215611d97578485fd5b611da08a611bd0565b985060208a0135611db0816127be565b9750611dbe60408b01611bd0565b965060608a0135955060808a0135611dd5816127be565b945060a08a0135935060c08a0135925060e08a013591506101008a0135611dfb816127d6565b809150509295985092959850929598565b60008060408385031215611e1e578182fd5b611e2783611bd0565b9150611e3560208401611bd0565b90509250929050565b60008060408385031215611e50578182fd5b611e5983611bd0565b946020939093013593505050565b600080600060608486031215611e7b578283fd5b611e8484611bd0565b9250602084013591506040840135611e9b816127d6565b809150509250925092565b60008060008060808587031215611ebb578081fd5b611ec485611bd0565b9350602085013592506040850135611edb816127d6565b91506060850135611d6e816127be565b60008060408385031215611efd578182fd5b823591506020830135611d1e816127d6565b60008060008060008060c08789031215611f27578384fd5b863595506020870135611f39816127d6565b9450611f4760408801611bd0565b93506060870135611f57816127be565b9598949750929560808101359460a0909101359350915050565b600060208284031215611f82578081fd5b81516116a8816127d6565b6001600160a01b03169052565b60008151808452611fb2816020860160208601612729565b601f01601f19169290920160200192915050565b60ff169052565b60008251611fdf818460208701612729565b9190910192915050565b91825260f81b6001600160f81b031916602082015260210190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6000602080830181845280855180835260408601915060408482028701019250838701855b828110156120a857603f19888603018452612096858351611f9a565b9450928501929085019060010161207a565b5092979650505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561214b578151805185528681015161ffff1687860152858101516001600160a01b0390811687870152606080830151909116908601526080808201519086015260a08082015160ff169086015260c0908101519061213681870183611fc6565b505060e09390930192908501906001016120d2565b5091979650505050505050565b901515815260200190565b6001600160a01b03988916815261ffff9790971660208801526040870195909552929095166060850152608084015260a083019390935260c082019290925260e08101919091526101000190565b6000602082526116a86020830184611f9a565b60208082526022908201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604082015261647360f01b606082015260800190565b602080825260129082015271185b1c9958591e481d1c985b9cd9995c995960721b604082015260600190565b60208082526019908201527f616d6f756e74206c6f776572207468616e206d696e696e756d00000000000000604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252600b908201526a1b9bdd081d1c9d5cdd195960aa1b604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252600b908201526a696e76616c69642066656560a81b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601b908201527f616d6f756e742067726561746572207468616e206d696e696e756d0000000000604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b60208082526012908201527119185a5b1e481b1a5b5a5d08195e18d9595960721b604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b6020808252600d908201526c3ab735b737bbb7103a37b5b2b760991b604082015260600190565b82548152600183015461ffff811660208301526101008201906124b260408401601083901c6001600160a01b0316611f8d565b506124c0600285015461271d565b6124cd6060840182611f8d565b506003840154608083015260048401546124ed60a0840160ff8316611fc6565b61250060c0840160ff8360081c16611fc6565b508260e08301529392505050565b96875261ffff9590951660208701526001600160a01b039384166040870152919092166060850152608084019190915260ff90811660a08401521660c082015260e00190565b918252602082015260400190565b600061ffff80831681851680830382111561257f5761257f612792565b01949350505050565b6000821982111561259b5761259b612792565b500190565b6000826125bb57634e487b7160e01b81526012600452602481fd5b500490565b80825b60018086116125d257506125fd565b8187048211156125e4576125e4612792565b808616156125f157918102915b9490941c9380026125c3565b94509492505050565b60006116a86000198484612623565b60006116a860001960ff8516845b600082612632575060016116a8565b8161263f575060006116a8565b8160018114612655576002811461265f5761268c565b60019150506116a8565b60ff84111561267057612670612792565b6001841b91508482111561268657612686612792565b506116a8565b5060208310610133831016604e8410600b84101617156126bf575081810a838111156126ba576126ba612792565b6116a8565b6126cc84848460016125c0565b8086048211156126de576126de612792565b02949350505050565b600081600019048311821515161561270157612701612792565b500290565b60008282101561271857612718612792565b500390565b6001600160a01b031690565b60005b8381101561274457818101518382015260200161272c565b838111156117cf5750506000910152565b600061ffff8083168181141561276d5761276d612792565b6001019392505050565b600060001982141561278b5761278b612792565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146127d357600080fd5b50565b60ff811681146127d357600080fdfea2646970667358221220d87948d7d778121e4908772ec9362354b2ba72a84357b479ca8543ac2c4e573964736f6c63430008000033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.