ETH Price: $4,001.41 (+0.21%)

Contract

0x8726606A5C4F65a25BE5f75B02894CD930a97cD6
 

Overview

ETH Balance

1 wei

Eth Value

Less Than $0.01 (@ $4,001.41/ETH)

Multichain Info

No addresses found
Age:30D
Amount:Between 1-10
Reset Filter

Transaction Hash
Method
Block
From
To

There are no matching entries

Update your filters to view other transactions

Latest 4 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
120237302021-03-12 12:42:311366 days ago1615552951
0x8726606A...930a97cD6
9.81610366 ETH
119335602021-02-26 15:09:001380 days ago1614352140
0x8726606A...930a97cD6
1.70250653 ETH
119335402021-02-26 15:05:041380 days ago1614351904
0x8726606A...930a97cD6
11.51861019 ETH
118141922021-02-08 6:36:081398 days ago1612766168  Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x1AE85aA1...8bF612b76
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
BondTokenCollateralizedEth

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 20000 runs

Other Settings:
constantinople EvmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-02-20
*/

pragma solidity 0.6.6;

// File: contracts/util/TransferETHInterface.sol




interface TransferETHInterface {
    receive() external payable;

    event LogTransferETH(address indexed from, address indexed to, uint256 value);
}

// File: contracts/util/TransferETH.sol




abstract contract TransferETH is TransferETHInterface {
    receive() external payable override {
        emit LogTransferETH(msg.sender, address(this), msg.value);
    }

    function _hasSufficientBalance(uint256 amount) internal view returns (bool ok) {
        address thisContract = address(this);
        return amount <= thisContract.balance;
    }

    /**
     * @notice transfer `amount` ETH to the `recipient` account with emitting log
     */
    function _transferETH(
        address payable recipient,
        uint256 amount,
        string memory errorMessage
    ) internal {
        require(_hasSufficientBalance(amount), errorMessage);
        (bool success, ) = recipient.call{value: amount}(""); // solhint-disable-line avoid-low-level-calls
        require(success, "transferring Ether failed");
        emit LogTransferETH(address(this), recipient, amount);
    }

    function _transferETH(address payable recipient, uint256 amount) internal {
        _transferETH(recipient, amount, "TransferETH: transfer amount exceeds balance");
    }
}

// File: @openzeppelin/contracts/GSN/Context.sol



/*
 * @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 GSN 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.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }

    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol



/**
 * @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: @openzeppelin/contracts/math/SafeMath.sol



/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/utils/Address.sol


/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

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

// File: @openzeppelin/contracts/token/ERC20/ERC20.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 {ERC20MinterPauser}.
 *
 * 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 {
    using SafeMath for uint256;
    using Address for address;

    mapping (address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name, string memory symbol) public {
        _name = name;
        _symbol = symbol;
        _decimals = 18;
    }

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view 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 {_setupDecimals} is
     * called.
     *
     * 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 returns (uint8) {
        return _decimals;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view 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);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        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].add(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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        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);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(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 = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(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);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is 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 Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal {
        _decimals = decimals_;
    }

    /**
     * @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: @openzeppelin/contracts/access/Ownable.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.
 */
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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view 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;
    }
}

// File: contracts/bondToken/BondTokenInterface.sol






interface BondTokenInterface is IERC20 {
    event LogExpire(uint128 rateNumerator, uint128 rateDenominator, bool firstTime);

    function mint(address account, uint256 amount) external returns (bool success);

    function expire(uint128 rateNumerator, uint128 rateDenominator)
        external
        returns (bool firstTime);

    function simpleBurn(address account, uint256 amount) external returns (bool success);

    function burn(uint256 amount) external returns (bool success);

    function burnAll() external returns (uint256 amount);

    function getRate() external view returns (uint128 rateNumerator, uint128 rateDenominator);
}

// File: contracts/bondToken/BondToken.sol








abstract contract BondToken is Ownable, BondTokenInterface, ERC20 {
    struct Frac128x128 {
        uint128 numerator;
        uint128 denominator;
    }

    Frac128x128 internal _rate;

    constructor(
        string memory name,
        string memory symbol,
        uint8 decimals
    ) public ERC20(name, symbol) {
        _setupDecimals(decimals);
    }

    function mint(address account, uint256 amount)
        public
        virtual
        override
        onlyOwner
        returns (bool success)
    {
        require(!_isExpired(), "this token contract has expired");
        _mint(account, amount);
        return true;
    }

    function transfer(address recipient, uint256 amount)
        public
        override(ERC20, IERC20)
        returns (bool success)
    {
        _transfer(msg.sender, recipient, amount);
        return true;
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public override(ERC20, IERC20) returns (bool success) {
        _transfer(sender, recipient, amount);
        _approve(
            sender,
            msg.sender,
            allowance(sender, msg.sender).sub(amount, "ERC20: transfer amount exceeds allowance")
        );
        return true;
    }

    /**
     * @dev Record the settlement price at maturity in the form of a fraction and let the bond
     * token expire.
     */
    function expire(uint128 rateNumerator, uint128 rateDenominator)
        public
        override
        onlyOwner
        returns (bool isFirstTime)
    {
        isFirstTime = !_isExpired();
        if (isFirstTime) {
            _setRate(Frac128x128(rateNumerator, rateDenominator));
        }

        emit LogExpire(rateNumerator, rateDenominator, isFirstTime);
    }

    function simpleBurn(address from, uint256 amount) public override onlyOwner returns (bool) {
        if (amount > balanceOf(from)) {
            return false;
        }

        _burn(from, amount);
        return true;
    }

    function burn(uint256 amount) public override returns (bool success) {
        if (!_isExpired()) {
            return false;
        }

        _burn(msg.sender, amount);

        if (_rate.numerator != 0) {
            uint8 decimalsOfCollateral = _getCollateralDecimals();
            uint256 withdrawAmount = _applyDecimalGap(amount, decimals(), decimalsOfCollateral)
                .mul(_rate.numerator)
                .div(_rate.denominator);

            _sendCollateralTo(msg.sender, withdrawAmount);
        }

        return true;
    }

    function burnAll() public override returns (uint256 amount) {
        amount = balanceOf(msg.sender);
        bool success = burn(amount);
        if (!success) {
            amount = 0;
        }
    }

    /**
     * @dev rateDenominator never be zero due to div() function, thus initial _rateDenominator is 0
     * can be used for flag of non-expired;
     */
    function _isExpired() internal view returns (bool) {
        return _rate.denominator != 0;
    }

    function getRate()
        public
        override
        view
        returns (uint128 rateNumerator, uint128 rateDenominator)
    {
        rateNumerator = _rate.numerator;
        rateDenominator = _rate.denominator;
    }

    function _setRate(Frac128x128 memory rate) internal {
        require(
            rate.denominator != 0,
            "system error: the exchange rate must be non-negative number"
        );
        _rate = rate;
    }

    /**
     * @dev removes a decimal gap from rate.
     */
    function _applyDecimalGap(
        uint256 baseAmount,
        uint8 decimalsOfBase,
        uint8 decimalsOfQuote
    ) internal pure returns (uint256 quoteAmount) {
        uint256 n;
        uint256 d;

        if (decimalsOfBase > decimalsOfQuote) {
            d = decimalsOfBase - decimalsOfQuote;
        } else if (decimalsOfBase < decimalsOfQuote) {
            n = decimalsOfQuote - decimalsOfBase;
        }

        // The consequent multiplication would overflow under extreme and non-blocking circumstances.
        require(n < 19 && d < 19, "decimal gap needs to be lower than 19");
        quoteAmount = baseAmount.mul(10**n).div(10**d);
    }

    function _getCollateralDecimals() internal virtual view returns (uint8);

    function _sendCollateralTo(address receiver, uint256 amount) internal virtual;
}

// File: contracts/bondToken/BondTokenCollateralizedEth.sol






contract BondTokenCollateralizedEth is BondToken, TransferETH {
    constructor(
        string memory name,
        string memory symbol,
        uint8 decimals
    ) public BondToken(name, symbol, decimals) {}

    function _getCollateralDecimals() internal override view returns (uint8) {
        return 18;
    }

    function _sendCollateralTo(address receiver, uint256 amount) internal override {
        _transferETH(payable(receiver), amount);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint128","name":"rateNumerator","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"rateDenominator","type":"uint128"},{"indexed":false,"internalType":"bool","name":"firstTime","type":"bool"}],"name":"LogExpire","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"LogTransferETH","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"burnAll","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"rateNumerator","type":"uint128"},{"internalType":"uint128","name":"rateDenominator","type":"uint128"}],"name":"expire","outputs":[{"internalType":"bool","name":"isFirstTime","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRate","outputs":[{"internalType":"uint128","name":"rateNumerator","type":"uint128"},{"internalType":"uint128","name":"rateDenominator","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"simpleBurn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x6080604052600436106101635760003560e01c8063715018a6116100c0578063a457c2d711610074578063dd62ed3e11610059578063dd62ed3e146105b5578063f05fcdf2146105fd578063f2fde38b14610643576101a1565b8063a457c2d714610529578063a9059cbb1461056f576101a1565b8063903d8e77116100a5578063903d8e77146104bb57806395d89b41146104ff5780639975038c14610514576101a1565b8063715018a6146104665780638da5cb5b1461047d576101a1565b8063395093511161011757806342966c68116100fc57806342966c68146103b8578063679aefce146103e257806370a0823114610426576101a1565b8063395093511461032c57806340c10f1914610372576101a1565b806318160ddd1161014857806318160ddd1461028a57806323b872dd146102b1578063313ce56714610301576101a1565b806306fdde03146101a6578063095ea7b314610230576101a1565b366101a157604080513481529051309133917fdd4e7375a5084e0c4cc4e1bfc7ba67beb26a368120ea78d2e0948123910bbf7c9181900360200190a3005b600080fd5b3480156101b257600080fd5b506101bb610683565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f55781810151838201526020016101dd565b50505050905090810190601f1680156102225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561023c57600080fd5b506102766004803603604081101561025357600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610737565b604080519115158252519081900360200190f35b34801561029657600080fd5b5061029f610755565b60408051918252519081900360200190f35b3480156102bd57600080fd5b50610276600480360360608110156102d457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561075b565b34801561030d57600080fd5b506103166107b0565b6040805160ff9092168252519081900360200190f35b34801561033857600080fd5b506102766004803603604081101561034f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81351690602001356107b9565b34801561037e57600080fd5b506102766004803603604081101561039557600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561081a565b3480156103c457600080fd5b50610276600480360360208110156103db57600080fd5b503561092b565b3480156103ee57600080fd5b506103f76109eb565b604080516fffffffffffffffffffffffffffffffff938416815291909216602082015281519081900390910190f35b34801561043257600080fd5b5061029f6004803603602081101561044957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610a1c565b34801561047257600080fd5b5061047b610a44565b005b34801561048957600080fd5b50610492610b44565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156104c757600080fd5b50610276600480360360408110156104de57600080fd5b506fffffffffffffffffffffffffffffffff81358116916020013516610b60565b34801561050b57600080fd5b506101bb610c9f565b34801561052057600080fd5b5061029f610d1e565b34801561053557600080fd5b506102766004803603604081101561054c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610d46565b34801561057b57600080fd5b506102766004803603604081101561059257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610dc1565b3480156105c157600080fd5b5061029f600480360360408110156105d857600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610dce565b34801561060957600080fd5b506102766004803603604081101561062057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610e06565b34801561064f57600080fd5b5061047b6004803603602081101561066657600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610ebb565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561072d5780601f106107025761010080835404028352916020019161072d565b820191906000526020600020905b81548152906001019060200180831161071057829003601f168201915b5050505050905090565b600061074b610744611045565b8484611049565b5060015b92915050565b60035490565b6000610768848484611190565b6107a684336107a185604051806060016040528060288152602001611d6a602891396107948a33610dce565b919063ffffffff61136e16565b611049565b5060019392505050565b60065460ff1690565b600061074b6107c6611045565b846107a185600260006107d7611045565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff61141f16565b6000610824611045565b60005473ffffffffffffffffffffffffffffffffffffffff9081169116146108ad57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6108b561149a565b1561092157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f7468697320746f6b656e20636f6e747261637420686173206578706972656400604482015290519081900360640190fd5b61074b83836114c8565b600061093561149a565b610941575060006109e6565b61094b3383611607565b6007546fffffffffffffffffffffffffffffffff16156109e257600061096f61175d565b6007549091506000906109d3906fffffffffffffffffffffffffffffffff70010000000000000000000000000000000082048116916109c791166109bb886109b56107b0565b88611762565b9063ffffffff61182416565b9063ffffffff61189716565b90506109df33826118d9565b50505b5060015b919050565b6007546fffffffffffffffffffffffffffffffff808216927001000000000000000000000000000000009092041690565b73ffffffffffffffffffffffffffffffffffffffff1660009081526001602052604090205490565b610a4c611045565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610ad557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b6000610b6a611045565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610bf357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610bfb61149a565b1590508015610c4557610c456040518060400160405280856fffffffffffffffffffffffffffffffff168152602001846fffffffffffffffffffffffffffffffff168152506118e7565b604080516fffffffffffffffffffffffffffffffff8086168252841660208201528215158183015290517fcdcd2e977c58a9c82d799c0986ab5c6fe48d43a9b96bbf60a654b46728c6f6679181900360600190a192915050565b60058054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561072d5780601f106107025761010080835404028352916020019161072d565b6000610d2933610a1c565b90506000610d368261092b565b905080610d4257600091505b5090565b600061074b610d53611045565b846107a185604051806060016040528060258152602001611e286025913960026000610d7d611045565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61136e16565b600061074b338484611190565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205490565b6000610e10611045565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610e9957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610ea283610a1c565b821115610eb15750600061074f565b61074b8383611607565b610ec3611045565b60005473ffffffffffffffffffffffffffffffffffffffff908116911614610f4c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8116610fb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611ca06026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3390565b73ffffffffffffffffffffffffffffffffffffffff83166110b5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611e046024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611121576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611cc66022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff83166111fc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611ddf6025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611268576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611c366023913960400191505060405180910390fd5b6112738383836119b9565b6112c381604051806060016040528060268152602001611ce86026913973ffffffffffffffffffffffffffffffffffffffff8616600090815260016020526040902054919063ffffffff61136e16565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600160205260408082209390935590841681522054611305908263ffffffff61141f16565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526001602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611417576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156113dc5781810151838201526020016113c4565b50505050905090810190601f1680156114095780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008282018381101561149357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60075470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16151590565b73ffffffffffffffffffffffffffffffffffffffff821661154a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611556600083836119b9565b600354611569908263ffffffff61141f16565b60035573ffffffffffffffffffffffffffffffffffffffff82166000908152600160205260409020546115a2908263ffffffff61141f16565b73ffffffffffffffffffffffffffffffffffffffff831660008181526001602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b73ffffffffffffffffffffffffffffffffffffffff8216611673576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611d926021913960400191505060405180910390fd5b61167f826000836119b9565b6116cf81604051806060016040528060228152602001611c7e6022913973ffffffffffffffffffffffffffffffffffffffff8516600090815260016020526040902054919063ffffffff61136e16565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260016020526040902055600354611708908263ffffffff6119be16565b60035560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b601290565b60008060008360ff168560ff161115611781575060ff83850316611798565b8360ff168560ff1610156117985784840360ff1691505b6013821080156117a85750601381105b6117fd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611c596025913960400191505060405180910390fd5b61181a81600a0a6109c784600a0a8961182490919063ffffffff16565b9695505050505050565b6000826118335750600061074f565b8282028284828161184057fe5b0414611493576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611d496021913960400191505060405180910390fd5b600061149383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611a00565b6118e38282611a7f565b5050565b60208101516fffffffffffffffffffffffffffffffff16611953576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180611d0e603b913960400191505060405180910390fd5b8051600780546020909301516fffffffffffffffffffffffffffffffff908116700100000000000000000000000000000000029281167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090941693909317909216179055565b505050565b600061149383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061136e565b60008183611a69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156113dc5781810151838201526020016113c4565b506000838581611a7557fe5b0495945050505050565b6118e382826040518060600160405280602c8152602001611db3602c9139611aa682611c2e565b8190611b0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482018181528351602484015283519092839260449091019190850190808383600083156113dc5781810151838201526020016113c4565b5060405160009073ffffffffffffffffffffffffffffffffffffffff85169084908381818185875af1925050503d8060008114611b66576040519150601f19603f3d011682016040523d82523d6000602084013e611b6b565b606091505b5050905080611bdb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f7472616e7366657272696e67204574686572206661696c656400000000000000604482015290519081900360640190fd5b60408051848152905173ffffffffffffffffffffffffffffffffffffffff86169130917fdd4e7375a5084e0c4cc4e1bfc7ba67beb26a368120ea78d2e0948123910bbf7c9181900360200190a350505050565b303110159056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373646563696d616c20676170206e6565647320746f206265206c6f776572207468616e20313945524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636573797374656d206572726f723a207468652065786368616e67652072617465206d757374206265206e6f6e2d6e65676174697665206e756d626572536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f20616464726573735472616e736665724554483a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212203c23b257e3ef11b12c715bd61fc423c39930aef3f353d81def868ffe5974a08b64736f6c63430006060033

Deployed Bytecode Sourcemap

31994:473:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;404:52;;;446:9;404:52;;;;439:4;;419:10;;404:52;;;;;;;;;31994:473;;12:1:-1;9;2:12;15510:83:0;;5:9:-1;2:2;;;27:1;24;17:12;2:2;15510:83:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;15510:83:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17616:169;;5:9:-1;2:2;;;27:1;24;17:12;2:2;17616:169:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;17616:169:0;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;16585:100;;5:9:-1;2:2;;;27:1;24;17:12;2:2;16585:100:0;;;:::i;:::-;;;;;;;;;;;;;;;;28285:414;;5:9:-1;2:2;;;27:1;24;17:12;2:2;28285:414:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;28285:414:0;;;;;;;;;;;;;;;;;;:::i;16437:83::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;16437:83:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;18989:218;;5:9:-1;2:2;;;27:1;24;17:12;2:2;18989:218:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;18989:218:0;;;;;;;;;:::i;27764:285::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;27764:285:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;27764:285:0;;;;;;;;;:::i;29474:565::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;29474:565:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;29474:565:0;;:::i;30534:234::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;30534:234:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16748:119;;5:9:-1;2:2;;;27:1;24;17:12;2:2;16748:119:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;16748:119:0;;;;:::i;26036:148::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;26036:148:0;;;:::i;:::-;;25394:79;;5:9:-1;2:2;;;27:1;24;17:12;2:2;25394:79:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;28843:383;;5:9:-1;2:2;;;27:1;24;17:12;2:2;28843:383:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;28843:383:0;;;;;;;;;;;:::i;15712:87::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;15712:87:0;;;:::i;30047:208::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;30047:208:0;;;:::i;19710:269::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;19710:269:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;19710:269:0;;;;;;;;;:::i;28057:220::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;28057:220:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;28057:220:0;;;;;;;;;:::i;17318:151::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;17318:151:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;17318:151:0;;;;;;;;;;;:::i;29234:232::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;29234:232:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;29234:232:0;;;;;;;;;:::i;26339:244::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;26339:244:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;26339:244:0;;;;:::i;15510:83::-;15580:5;15573:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15547:13;;15573:12;;15580:5;;15573:12;;15580:5;15573:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15510:83;:::o;17616:169::-;17699:4;17716:39;17725:12;:10;:12::i;:::-;17739:7;17748:6;17716:8;:39::i;:::-;-1:-1:-1;17773:4:0;17616:169;;;;;:::o;16585:100::-;16665:12;;16585:100;:::o;28285:414::-;28432:12;28457:36;28467:6;28475:9;28486:6;28457:9;:36::i;:::-;28504:165;28527:6;28548:10;28573:85;28607:6;28573:85;;;;;;;;;;;;;;;;;:29;28583:6;28591:10;28573:9;:29::i;:::-;:33;:85;;:33;:85;:::i;:::-;28504:8;:165::i;:::-;-1:-1:-1;28687:4:0;28285:414;;;;;:::o;16437:83::-;16503:9;;;;16437:83;:::o;18989:218::-;19077:4;19094:83;19103:12;:10;:12::i;:::-;19117:7;19126:50;19165:10;19126:11;:25;19138:12;:10;:12::i;:::-;19126:25;;;;;;;;;;;;;;;;;;-1:-1:-1;19126:25:0;;;:34;;;;;;;;;;;:50;:38;:50;:::i;27764:285::-;27899:12;25616;:10;:12::i;:::-;25606:6;;:22;:6;;;:22;;;25598:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27938:12:::1;:10;:12::i;:::-;27937:13;27929:57;;;::::0;;::::1;::::0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;27997:22;28003:7;28012:6;27997:5;:22::i;29474:565::-:0;29529:12;29559;:10;:12::i;:::-;29554:58;;-1:-1:-1;29595:5:0;29588:12;;29554:58;29624:25;29630:10;29642:6;29624:5;:25::i;:::-;29666:5;:15;;;:20;29662:346;;29703:26;29732:24;:22;:24::i;:::-;29916:5;:17;29703:53;;-1:-1:-1;29771:22:0;;29796:138;;29916:17;;;;;;;29796:97;;29877:15;29796:58;29813:6;29821:10;:8;:10::i;:::-;29833:20;29796:16;:58::i;:::-;:80;:97;:80;:97;:::i;:::-;:119;:138;:119;:138;:::i;:::-;29771:163;;29951:45;29969:10;29981:14;29951:17;:45::i;:::-;29662:346;;;-1:-1:-1;30027:4:0;29474:565;;;;:::o;30534:234::-;30699:5;:15;;;;;;30743:17;;;;;;30534:234::o;16748:119::-;16841:18;;16814:7;16841:18;;;:9;:18;;;;;;;16748:119::o;26036:148::-;25616:12;:10;:12::i;:::-;25606:6;;:22;:6;;;:22;;;25598:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26143:1:::1;26127:6:::0;;26106:40:::1;::::0;::::1;26127:6:::0;;::::1;::::0;26106:40:::1;::::0;26143:1;;26106:40:::1;26174:1;26157:19:::0;;;::::1;::::0;;26036:148::o;25394:79::-;25432:7;25459:6;;;25394:79;:::o;28843:383::-;28978:16;25616:12;:10;:12::i;:::-;25606:6;;:22;:6;;;:22;;;25598:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29027:12:::1;:10;:12::i;:::-;29026:13;29012:27;;29054:11;29050:97;;;29082:53;29091:43;;;;;;;;29103:13;29091:43;;;;;;29118:15;29091:43;;;;::::0;29082:8:::1;:53::i;:::-;29164:54;::::0;;::::1;::::0;;::::1;::::0;;;::::1;;::::0;::::1;::::0;;::::1;;::::0;;;;;;::::1;::::0;;;;;;;::::1;28843:383:::0;;;;:::o;15712:87::-;15784:7;15777:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15751:13;;15777:14;;15784:7;;15777:14;;15784:7;15777:14;;;;;;;;;;;;;;;;;;;;;;;;30047:208;30091:14;30127:21;30137:10;30127:9;:21::i;:::-;30118:30;;30159:12;30174;30179:6;30174:4;:12::i;:::-;30159:27;;30202:7;30197:51;;30235:1;30226:10;;30197:51;30047:208;;:::o;19710:269::-;19803:4;19820:129;19829:12;:10;:12::i;:::-;19843:7;19852:96;19891:15;19852:96;;;;;;;;;;;;;;;;;:11;:25;19864:12;:10;:12::i;:::-;19852:25;;;;;;;;;;;;;;;;;;-1:-1:-1;19852:25:0;;;:34;;;;;;;;;;;:96;;:38;:96;:::i;28057:220::-;28177:12;28207:40;28217:10;28229:9;28240:6;28207:9;:40::i;17318:151::-;17434:18;;;;17407:7;17434:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;17318:151::o;29234:232::-;29319:4;25616:12;:10;:12::i;:::-;25606:6;;:22;:6;;;:22;;;25598:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29349:15:::1;29359:4;29349:9;:15::i;:::-;29340:6;:24;29336:69;;;-1:-1:-1::0;29388:5:0::1;29381:12;;29336:69;29417:19;29423:4;29429:6;29417:5;:19::i;26339:244::-:0;25616:12;:10;:12::i;:::-;25606:6;;:22;:6;;;:22;;;25598:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26428:22:::1;::::0;::::1;26420:73;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26530:6;::::0;;26509:38:::1;::::0;::::1;::::0;;::::1;::::0;26530:6;::::1;::::0;26509:38:::1;::::0;::::1;26558:6;:17:::0;;;::::1;;::::0;;;::::1;::::0;;;::::1;::::0;;26339:244::o;2167:106::-;2255:10;2167:106;:::o;22857:346::-;22959:19;;;22951:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23038:21;;;23030:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23111:18;;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;23163:32;;;;;;;;;;;;;;;;;22857:346;;;:::o;20469:539::-;20575:20;;;20567:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20656:23;;;20648:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20732:47;20753:6;20761:9;20772:6;20732:20;:47::i;:::-;20812:71;20834:6;20812:71;;;;;;;;;;;;;;;;;:17;;;;;;;:9;:17;;;;;;;:71;;:21;:71;:::i;:::-;20792:17;;;;;;;;:9;:17;;;;;;:91;;;;20917:20;;;;;;;:32;;20942:6;20917:32;:24;:32;:::i;:::-;20894:20;;;;;;;;:9;:20;;;;;;;;;:55;;;;20965:35;;;;;;;20894:20;;20965:35;;;;;;;;;;;;;20469:539;;;:::o;7074:192::-;7160:7;7196:12;7188:6;;;;7180:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;7180:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;7232:5:0;;;7074:192::o;6187:181::-;6245:7;6277:5;;;6301:6;;;;6293:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6359:1;6187:181;-1:-1:-1;;;6187:181:0:o;30427:99::-;30496:5;:17;;;;;;:22;;;30427:99::o;21289:378::-;21373:21;;;21365:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21443:49;21472:1;21476:7;21485:6;21443:20;:49::i;:::-;21520:12;;:24;;21537:6;21520:24;:16;:24;:::i;:::-;21505:12;:39;21576:18;;;;;;;:9;:18;;;;;;:30;;21599:6;21576:30;:22;:30;:::i;:::-;21555:18;;;;;;;:9;:18;;;;;;;;:51;;;;21622:37;;;;;;;21555:18;;;;21622:37;;;;;;;;;;21289:378;;:::o;21999:418::-;22083:21;;;22075:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22155:49;22176:7;22193:1;22197:6;22155:20;:49::i;:::-;22238:68;22261:6;22238:68;;;;;;;;;;;;;;;;;:18;;;;;;;:9;:18;;;;;;;:68;;:22;:68;:::i;:::-;22217:18;;;;;;;:9;:18;;;;;:89;22332:12;;:24;;22349:6;22332:24;:16;:24;:::i;:::-;22317:12;:39;22372:37;;;;;;;;22398:1;;22372:37;;;;;;;;;;;;;21999:418;;:::o;32218:101::-;32309:2;32218:101;:::o;31072:676::-;31220:19;31252:9;31272;31315:15;31298:32;;:14;:32;;;31294:208;;;-1:-1:-1;31347:36:0;31351:32;;;31347:36;31294:208;;;31422:15;31405:32;;:14;:32;;;31401:101;;;31476:14;31458:15;:32;31454:36;;;;31401:101;31629:2;31625:1;:6;:16;;;;;31639:2;31635:1;:6;31625:16;31617:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31708:32;31738:1;31734:2;:5;31708:21;31727:1;31723:2;:5;31708:10;:14;;:21;;;;:::i;:32::-;31694:46;31072:676;-1:-1:-1;;;;;;31072:676:0:o;7517:471::-;7575:7;7820:6;7816:47;;-1:-1:-1;7850:1:0;7843:8;;7816:47;7887:5;;;7891:1;7887;:5;:1;7911:5;;;;;:10;7903:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8456:132;8514:7;8541:39;8545:1;8548;8541:39;;;;;;;;;;;;;;;;;:3;:39::i;32327:137::-;32417:39;32438:8;32449:6;32417:12;:39::i;:::-;32327:137;;:::o;30776:224::-;30861:16;;;;:21;;30839:130;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30980:12;;:5;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30776:224::o;24228:92::-;;;;:::o;6643:136::-;6701:7;6728:43;6732:1;6735;6728:43;;;;;;;;;;;;;;;;;:3;:43::i;9076:345::-;9162:7;9264:12;9257:5;9249:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;9249:28:0;;9288:9;9304:1;9300;:5;;;;;;;9076:345;-1:-1:-1;;;;;9076:345:0:o;1207:172::-;1292:79;1305:9;1316:6;1292:79;;;;;;;;;;;;;;;;;918:29;940:6;918:21;:29::i;:::-;949:12;910:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;910:52:0;-1:-1:-1;992:33:0;;974:12;;992:14;;;;1014:6;;974:12;992:33;974:12;992:33;1014:6;992:14;:33;;;;;;;12:1:-1;19;14:27;;;;67:4;61:11;56:16;;134:4;130:9;123:4;105:16;101:27;97:43;94:1;90:51;84:4;77:65;157:16;154:1;147:27;211:16;208:1;201:4;198:1;194:12;179:49;5:228;;14:27;32:4;27:9;;5:228;;973:52:0;;;1090:7;1082:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1143:48;;;;;;;;;;;;1166:4;;1143:48;;;;;;;;;763:436;;;;:::o;472:182::-;593:4;626:20;-1:-1:-1;616:30:0;;472:182::o

Swarm Source

ipfs://3c23b257e3ef11b12c715bd61fc423c39930aef3f353d81def868ffe5974a08b

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

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