MATIC Price: $1.01 (+0.10%)
Gas: 83 GWei
 

Overview

MATIC Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 MATIC

MATIC Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
Upgrade277700122022-04-30 21:33:01670 days 3 hrs ago1651354381IN
0x1FBd13...DE5fFAF8
0 MATIC0.0033890333.27866296
Upgrade269914822022-04-11 2:32:34689 days 22 hrs ago1649644354IN
0x1FBd13...DE5fFAF8
0 MATIC0.0024017930.04577792
Upgrade269820612022-04-10 20:53:09690 days 3 hrs ago1649623989IN
0x1FBd13...DE5fFAF8
0 MATIC0.0027251534.09080003
Upgrade268690012022-04-07 23:17:00693 days 1 hr ago1649373420IN
0x1FBd13...DE5fFAF8
0 MATIC0.0031050731.99060001
Upgrade263175732022-03-24 19:49:57707 days 4 hrs ago1648151397IN
0x1FBd13...DE5fFAF8
0 MATIC0.0024048130.06999999
Upgrade260481662022-03-17 18:34:43714 days 6 hrs ago1647542083IN
0x1FBd13...DE5fFAF8
0 MATIC0.003078231.72166227
Upgrade260239292022-03-17 2:07:06714 days 22 hrs ago1647482826IN
0x1FBd13...DE5fFAF8
0 MATIC0.0032293433.27099998
Upgrade258709592022-03-12 17:42:02719 days 7 hrs ago1647106922IN
0x1FBd13...DE5fFAF8
0 MATIC0.0030137431.04969996
Upgrade257495012022-03-09 3:19:51722 days 21 hrs ago1646795991IN
0x1FBd13...DE5fFAF8
0 MATIC0.0034725635.7767816
Upgrade256567292022-03-06 19:04:40725 days 5 hrs ago1646593480IN
0x1FBd13...DE5fFAF8
0 MATIC0.003114232.08469
Upgrade255685512022-03-04 11:01:09727 days 13 hrs ago1646391669IN
0x1FBd13...DE5fFAF8
0 MATIC0.0031873732.84671175
Upgrade255191712022-03-03 4:26:51728 days 20 hrs ago1646281611IN
0x1FBd13...DE5fFAF8
0 MATIC0.0030089231
Upgrade250159162022-02-16 16:30:36743 days 8 hrs ago1645029036IN
0x1FBd13...DE5fFAF8
0 MATIC0.0036631137.74464269
Upgrade248057622022-02-11 7:44:13748 days 17 hrs ago1644565453IN
0x1FBd13...DE5fFAF8
0 MATIC0.0028310929.1679
Upgrade247894872022-02-10 21:14:26749 days 3 hrs ago1644527666IN
0x1FBd13...DE5fFAF8
0 MATIC0.0031634232.59174653
Upgrade247786852022-02-10 14:35:46749 days 10 hrs ago1644503746IN
0x1FBd13...DE5fFAF8
0 MATIC0.01052569108.44296629
Upgrade246105342022-02-06 8:35:33753 days 16 hrs ago1644136533IN
0x1FBd13...DE5fFAF8
0 MATIC0.000184272.30520501
Upgrade245563022022-02-04 22:21:18755 days 2 hrs ago1644013278IN
0x1FBd13...DE5fFAF8
0 MATIC0.0048024160.07671945
Upgrade242987262022-01-29 9:24:56761 days 15 hrs ago1643448296IN
0x1FBd13...DE5fFAF8
0 MATIC0.00027392.8227001
Upgrade242051262022-01-27 0:24:47764 days 22 mins ago1643243087IN
0x1FBd13...DE5fFAF8
0 MATIC0.0029179330.06999996
Upgrade240296322022-01-22 14:57:13768 days 9 hrs ago1642863433IN
0x1FBd13...DE5fFAF8
0 MATIC0.02135618220.08065081
Upgrade239624332022-01-20 22:04:21770 days 2 hrs ago1642716261IN
0x1FBd13...DE5fFAF8
0 MATIC0.08481382874.02688655
Upgrade239458202022-01-20 12:21:17770 days 12 hrs ago1642681277IN
0x1FBd13...DE5fFAF8
0 MATIC0.00828429103.5873975
Upgrade239417862022-01-20 9:57:53770 days 14 hrs ago1642672673IN
0x1FBd13...DE5fFAF8
0 MATIC0.0037886147.37303555
Upgrade239414952022-01-20 9:47:51770 days 14 hrs ago1642672071IN
0x1FBd13...DE5fFAF8
0 MATIC0.0063873165.798379
View all transactions

Parent Txn Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ElkUpgrade

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at polygonscan.com on 2021-06-22
*/

// Sources flattened with hardhat v2.1.1 https://hardhat.org

// File @openzeppelin/contracts/utils/[email protected]


pragma solidity >=0.6.0 <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 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.
 */
abstract contract Context {
    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/access/[email protected]


pragma solidity >=0.6.0 <0.8.0;

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


// File @openzeppelin/contracts/math/[email protected]


pragma solidity >=0.6.0 <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 @openzeppelin/contracts/math/[email protected]


pragma solidity >=0.6.0 <0.8.0;

/**
 * @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, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @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) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * 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);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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/token/ERC20/[email protected]


pragma solidity >=0.6.0 <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 @openzeppelin/contracts/utils/[email protected]


pragma solidity >=0.6.2 <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 @openzeppelin/contracts/token/ERC20/[email protected]


pragma solidity >=0.6.0 <0.8.0;



/**
 * @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 SafeMath for uint256;
    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).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _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 @openzeppelin/contracts/utils/[email protected]


pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}


// File contracts/ElkUpgrade.sol

pragma solidity ^0.7.6;





contract ElkUpgrade is ReentrancyGuard, Ownable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    /* ========== STATE VARIABLES ========== */
    
    IERC20 public fromToken;
    IERC20 public toToken;
    
    bool public upgradeStatus;
    
    /* ========== CONSTRUCTOR ========== */

    constructor(address fromToken_, address toToken_, bool upgradeStatus_) public {
        fromToken = IERC20(fromToken_);
        toToken = IERC20(toToken_);
        upgradeStatus = upgradeStatus_;
        emit UpgradeStatusChanged(upgradeStatus);
    }

    /* ========== MUTATIVE FUNCTIONS ========== */

    function upgrade(uint256 amount) external nonReentrant {
        require(amount > 0, "ElkUpgrade::upgrade: cannot upgrade 0!");
        require(upgradeStatus, "ElkUpgrade::upgrade: currently not accepting upgrades!");
        require(fromToken.balanceOf(msg.sender) >= amount, "ElkUpgrade::upgrade: not enough balance in sender's wallet!");
        require(toToken.balanceOf(address(this)) >= amount, "ElkUpgrade::upgrade: not enough balance in upgrade contract wallet!");
        fromToken.safeTransferFrom(msg.sender, address(this), amount);
        toToken.safeTransfer(msg.sender, amount);
        emit Upgraded(msg.sender, amount);
    }

    /* ========== RESTRICTED FUNCTIONS ========== */
    
    function recover(address tokenAddress, uint256 tokenAmount) external onlyOwner {
        IERC20(tokenAddress).safeTransfer(owner(), tokenAmount);
        emit Recovered(tokenAddress, tokenAmount);
    }

    function setSwapStatus(bool status) external onlyOwner {
        if (status != upgradeStatus) {
            upgradeStatus = status;
            emit UpgradeStatusChanged(upgradeStatus);
        }
    }

    /* ========== EVENTS ========== */

    event Upgraded(address indexed user, uint256 amount);
    event Recovered(address token, uint256 amount);
    event UpgradeStatusChanged(bool status);
    
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"fromToken_","type":"address"},{"internalType":"address","name":"toToken_","type":"address"},{"internalType":"bool","name":"upgradeStatus_","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"UpgradeStatusChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"fromToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"recover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"setSwapStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upgradeStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051610efb380380610efb8339818101604052606081101561003357600080fd5b50805160208201516040909201516001600090815591929161005361012e565b600180546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600280546001600160a01b038086166001600160a01b03199283161790925560038054841515600160a01b90810260ff60a01b199588169290941691909117939093169190911790819055604080519290910460ff1615158252517f160cf1407e48a5f810cb201e036aefe6c40b4b78b14ac192551af8d956eafd069181900360200190a1505050610132565b3390565b610dba806101416000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c80635705ae43116100765780638da5cb5b1161005b5780638da5cb5b14610146578063d4d543c51461014e578063f2fde38b1461016a576100a3565b80635705ae4314610112578063715018a61461013e576100a3565b806332a46857146100a857806335ed71a8146100cc5780633c930575146100ed57806345977d03146100f5575b600080fd5b6100b0610190565b604080516001600160a01b039092168252519081900360200190f35b6100eb600480360360208110156100e257600080fd5b5035151561019f565b005b6100b06102a7565b6100eb6004803603602081101561010b57600080fd5b50356102b6565b6100eb6004803603604081101561012857600080fd5b506001600160a01b03813516906020013561056a565b6100eb610642565b6100b061070d565b61015661071c565b604080519115158252519081900360200190f35b6100eb6004803603602081101561018057600080fd5b50356001600160a01b031661072c565b6002546001600160a01b031681565b6101a761084e565b6001600160a01b03166101b861070d565b6001600160a01b031614610213576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600360149054906101000a900460ff161515811515146102a45760038054821515600160a01b9081027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9092169190911791829055604080519190920460ff161515815290517f160cf1407e48a5f810cb201e036aefe6c40b4b78b14ac192551af8d956eafd069181900360200190a15b50565b6003546001600160a01b031681565b6002600054141561030e576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000558061034f5760405162461bcd60e51b8152600401808060200182810382526026815260200180610cff6026913960400191505060405180910390fd5b600354600160a01b900460ff166103975760405162461bcd60e51b8152600401808060200182810382526036815260200180610d256036913960400191505060405180910390fd5b600254604080516370a0823160e01b8152336004820152905183926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156103e157600080fd5b505afa1580156103f5573d6000803e3d6000fd5b505050506040513d602081101561040b57600080fd5b5051101561044a5760405162461bcd60e51b815260040180806020018281038252603b815260200180610c5b603b913960400191505060405180910390fd5b600354604080516370a0823160e01b8152306004820152905183926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561049457600080fd5b505afa1580156104a8573d6000803e3d6000fd5b505050506040513d60208110156104be57600080fd5b505110156104fd5760405162461bcd60e51b8152600401808060200182810382526043815260200180610cbc6043913960600191505060405180910390fd5b600254610515906001600160a01b0316333084610852565b60035461052c906001600160a01b031633836108e0565b60408051828152905133917f5887ab9161c3be2fe962b73e068a9f29082efb6daf2bfcbd3f064bc34d1ef1b7919081900360200190a2506001600055565b61057261084e565b6001600160a01b031661058361070d565b6001600160a01b0316146105de576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6105fa6105e961070d565b6001600160a01b03841690836108e0565b604080516001600160a01b03841681526020810183905281517f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28929181900390910190a15050565b61064a61084e565b6001600160a01b031661065b61070d565b6001600160a01b0316146106b6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36001805473ffffffffffffffffffffffffffffffffffffffff19169055565b6001546001600160a01b031690565b600354600160a01b900460ff1681565b61073461084e565b6001600160a01b031661074561070d565b6001600160a01b0316146107a0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166107e55760405162461bcd60e51b8152600401808060200182810382526026815260200180610c356026913960400191505060405180910390fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526108da908590610965565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610960908490610965565b505050565b60006109ba826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610a169092919063ffffffff16565b805190915015610960578080602001905160208110156109d957600080fd5b50516109605760405162461bcd60e51b815260040180806020018281038252602a815260200180610d5b602a913960400191505060405180910390fd5b6060610a258484600085610a2f565b90505b9392505050565b606082471015610a705760405162461bcd60e51b8152600401808060200182810382526026815260200180610c966026913960400191505060405180910390fd5b610a7985610b8a565b610aca576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310610b085780518252601f199092019160209182019101610ae9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610b6a576040519150601f19603f3d011682016040523d82523d6000602084013e610b6f565b606091505b5091509150610b7f828286610b90565b979650505050505050565b3b151590565b60608315610b9f575081610a28565b825115610baf5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610bf9578181015183820152602001610be1565b50505050905090810190601f168015610c265780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373456c6b557067726164653a3a757067726164653a206e6f7420656e6f7567682062616c616e636520696e2073656e64657227732077616c6c657421416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c456c6b557067726164653a3a757067726164653a206e6f7420656e6f7567682062616c616e636520696e207570677261646520636f6e74726163742077616c6c657421456c6b557067726164653a3a757067726164653a2063616e6e6f742075706772616465203021456c6b557067726164653a3a757067726164653a2063757272656e746c79206e6f7420616363657074696e67207570677261646573215361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206a4cc9790e848480198d124cadfb76b217bfe587ceb214a3cc6b51a2a18a854364736f6c63430007060033000000000000000000000000e1c8f3d529bea8e3fa1fac5b416335a2f998ee1c000000000000000000000000e1c110e1b1b4a1ded0caf3e42bfbdbb7b5d7ce1c0000000000000000000000000000000000000000000000000000000000000001

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100a35760003560e01c80635705ae43116100765780638da5cb5b1161005b5780638da5cb5b14610146578063d4d543c51461014e578063f2fde38b1461016a576100a3565b80635705ae4314610112578063715018a61461013e576100a3565b806332a46857146100a857806335ed71a8146100cc5780633c930575146100ed57806345977d03146100f5575b600080fd5b6100b0610190565b604080516001600160a01b039092168252519081900360200190f35b6100eb600480360360208110156100e257600080fd5b5035151561019f565b005b6100b06102a7565b6100eb6004803603602081101561010b57600080fd5b50356102b6565b6100eb6004803603604081101561012857600080fd5b506001600160a01b03813516906020013561056a565b6100eb610642565b6100b061070d565b61015661071c565b604080519115158252519081900360200190f35b6100eb6004803603602081101561018057600080fd5b50356001600160a01b031661072c565b6002546001600160a01b031681565b6101a761084e565b6001600160a01b03166101b861070d565b6001600160a01b031614610213576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600360149054906101000a900460ff161515811515146102a45760038054821515600160a01b9081027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9092169190911791829055604080519190920460ff161515815290517f160cf1407e48a5f810cb201e036aefe6c40b4b78b14ac192551af8d956eafd069181900360200190a15b50565b6003546001600160a01b031681565b6002600054141561030e576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b60026000558061034f5760405162461bcd60e51b8152600401808060200182810382526026815260200180610cff6026913960400191505060405180910390fd5b600354600160a01b900460ff166103975760405162461bcd60e51b8152600401808060200182810382526036815260200180610d256036913960400191505060405180910390fd5b600254604080516370a0823160e01b8152336004820152905183926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156103e157600080fd5b505afa1580156103f5573d6000803e3d6000fd5b505050506040513d602081101561040b57600080fd5b5051101561044a5760405162461bcd60e51b815260040180806020018281038252603b815260200180610c5b603b913960400191505060405180910390fd5b600354604080516370a0823160e01b8152306004820152905183926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561049457600080fd5b505afa1580156104a8573d6000803e3d6000fd5b505050506040513d60208110156104be57600080fd5b505110156104fd5760405162461bcd60e51b8152600401808060200182810382526043815260200180610cbc6043913960600191505060405180910390fd5b600254610515906001600160a01b0316333084610852565b60035461052c906001600160a01b031633836108e0565b60408051828152905133917f5887ab9161c3be2fe962b73e068a9f29082efb6daf2bfcbd3f064bc34d1ef1b7919081900360200190a2506001600055565b61057261084e565b6001600160a01b031661058361070d565b6001600160a01b0316146105de576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6105fa6105e961070d565b6001600160a01b03841690836108e0565b604080516001600160a01b03841681526020810183905281517f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28929181900390910190a15050565b61064a61084e565b6001600160a01b031661065b61070d565b6001600160a01b0316146106b6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36001805473ffffffffffffffffffffffffffffffffffffffff19169055565b6001546001600160a01b031690565b600354600160a01b900460ff1681565b61073461084e565b6001600160a01b031661074561070d565b6001600160a01b0316146107a0576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166107e55760405162461bcd60e51b8152600401808060200182810382526026815260200180610c356026913960400191505060405180910390fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526108da908590610965565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610960908490610965565b505050565b60006109ba826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610a169092919063ffffffff16565b805190915015610960578080602001905160208110156109d957600080fd5b50516109605760405162461bcd60e51b815260040180806020018281038252602a815260200180610d5b602a913960400191505060405180910390fd5b6060610a258484600085610a2f565b90505b9392505050565b606082471015610a705760405162461bcd60e51b8152600401808060200182810382526026815260200180610c966026913960400191505060405180910390fd5b610a7985610b8a565b610aca576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310610b085780518252601f199092019160209182019101610ae9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610b6a576040519150601f19603f3d011682016040523d82523d6000602084013e610b6f565b606091505b5091509150610b7f828286610b90565b979650505050505050565b3b151590565b60608315610b9f575081610a28565b825115610baf5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610bf9578181015183820152602001610be1565b50505050905090810190601f168015610c265780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373456c6b557067726164653a3a757067726164653a206e6f7420656e6f7567682062616c616e636520696e2073656e64657227732077616c6c657421416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c456c6b557067726164653a3a757067726164653a206e6f7420656e6f7567682062616c616e636520696e207570677261646520636f6e74726163742077616c6c657421456c6b557067726164653a3a757067726164653a2063616e6e6f742075706772616465203021456c6b557067726164653a3a757067726164653a2063757272656e746c79206e6f7420616363657074696e67207570677261646573215361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212206a4cc9790e848480198d124cadfb76b217bfe587ceb214a3cc6b51a2a18a854364736f6c63430007060033

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

000000000000000000000000e1c8f3d529bea8e3fa1fac5b416335a2f998ee1c000000000000000000000000e1c110e1b1b4a1ded0caf3e42bfbdbb7b5d7ce1c0000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : fromToken_ (address): 0xE1C8f3d529BEa8E3fA1FAC5B416335a2f998EE1C
Arg [1] : toToken_ (address): 0xE1C110E1B1b4A1deD0cAf3E42BfBdbB7b5d7cE1C
Arg [2] : upgradeStatus_ (bool): True

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000e1c8f3d529bea8e3fa1fac5b416335a2f998ee1c
Arg [1] : 000000000000000000000000e1c110e1b1b4a1ded0caf3e42bfbdbb7b5d7ce1c
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001


Deployed Bytecode Sourcemap

29102:1993:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29280:23;;;:::i;:::-;;;;-1:-1:-1;;;;;29280:23:0;;;;;;;;;;;;;;30678:206;;;;;;;;;;;;;;;;-1:-1:-1;30678:206:0;;;;:::i;:::-;;29310:21;;;:::i;29747:650::-;;;;;;;;;;;;;;;;-1:-1:-1;29747:650:0;;:::i;30465:205::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;30465:205:0;;;;;;;;:::i;2826:148::-;;;:::i;2175:87::-;;;:::i;29344:25::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;3129:244;;;;;;;;;;;;;;;;-1:-1:-1;3129:244:0;-1:-1:-1;;;;;3129:244:0;;:::i;29280:23::-;;;-1:-1:-1;;;;;29280:23:0;;:::o;30678:206::-;2406:12;:10;:12::i;:::-;-1:-1:-1;;;;;2395:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2395:23:0;;2387:68;;;;;-1:-1:-1;;;2387:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30758:13:::1;;;;;;;;;;;30748:23;;:6;:23;;;30744:133;;30788:13;:22:::0;;;::::1;;-1:-1:-1::0;;;30788:22:0;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;;;30830:35:::1;::::0;;30851:13;;;::::1;30788:22;30851:13;30830:35;;::::0;;;;::::1;::::0;;;;::::1;::::0;;::::1;30744:133;30678:206:::0;:::o;29310:21::-;;;-1:-1:-1;;;;;29310:21:0;;:::o;29747:650::-;28074:1;28680:7;;:19;;28672:63;;;;;-1:-1:-1;;;28672:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;28074:1;28813:7;:18;29821:10;29813:61:::1;;;;-1:-1:-1::0;;;29813:61:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29893:13;::::0;-1:-1:-1;;;29893:13:0;::::1;;;29885:80;;;;-1:-1:-1::0;;;29885:80:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29984:9;::::0;:31:::1;::::0;;-1:-1:-1;;;29984:31:0;;30004:10:::1;29984:31;::::0;::::1;::::0;;;30019:6;;-1:-1:-1;;;;;29984:9:0::1;::::0;:19:::1;::::0;:31;;;;;::::1;::::0;;;;;;;;:9;:31;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;29984:31:0;:41:::1;;29976:113;;;;-1:-1:-1::0;;;29976:113:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30108:7;::::0;:32:::1;::::0;;-1:-1:-1;;;30108:32:0;;30134:4:::1;30108:32;::::0;::::1;::::0;;;30144:6;;-1:-1:-1;;;;;30108:7:0::1;::::0;:17:::1;::::0;:32;;;;;::::1;::::0;;;;;;;;:7;:32;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;30108:32:0;:42:::1;;30100:122;;;;-1:-1:-1::0;;;30100:122:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30233:9;::::0;:61:::1;::::0;-1:-1:-1;;;;;30233:9:0::1;30260:10;30280:4;30287:6:::0;30233:26:::1;:61::i;:::-;30305:7;::::0;:40:::1;::::0;-1:-1:-1;;;;;30305:7:0::1;30326:10;30338:6:::0;30305:20:::1;:40::i;:::-;30361:28;::::0;;;;;;;30370:10:::1;::::0;30361:28:::1;::::0;;;;;::::1;::::0;;::::1;-1:-1:-1::0;28030:1:0;28992:7;:22;29747:650::o;30465:205::-;2406:12;:10;:12::i;:::-;-1:-1:-1;;;;;2395:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2395:23:0;;2387:68;;;;;-1:-1:-1;;;2387:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30555:55:::1;30589:7;:5;:7::i;:::-;-1:-1:-1::0;;;;;30555:33:0;::::1;::::0;30598:11;30555:33:::1;:55::i;:::-;30626:36;::::0;;-1:-1:-1;;;;;30626:36:0;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;;;;;;;;::::1;30465:205:::0;;:::o;2826:148::-;2406:12;:10;:12::i;:::-;-1:-1:-1;;;;;2395:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2395:23:0;;2387:68;;;;;-1:-1:-1;;;2387:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2917:6:::1;::::0;2896:40:::1;::::0;2933:1:::1;::::0;-1:-1:-1;;;;;2917:6:0::1;::::0;2896:40:::1;::::0;2933:1;;2896:40:::1;2947:6;:19:::0;;-1:-1:-1;;2947:19:0::1;::::0;;2826:148::o;2175:87::-;2248:6;;-1:-1:-1;;;;;2248:6:0;2175:87;:::o;29344:25::-;;;-1:-1:-1;;;29344:25:0;;;;;:::o;3129:244::-;2406:12;:10;:12::i;:::-;-1:-1:-1;;;;;2395:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2395:23:0;;2387:68;;;;;-1:-1:-1;;;2387:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3218:22:0;::::1;3210:73;;;;-1:-1:-1::0;;;3210:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3320:6;::::0;3299:38:::1;::::0;-1:-1:-1;;;;;3299:38:0;;::::1;::::0;3320:6:::1;::::0;3299:38:::1;::::0;3320:6:::1;::::0;3299:38:::1;3348:6;:17:::0;;-1:-1:-1;;3348:17:0::1;-1:-1:-1::0;;;;;3348:17:0;;;::::1;::::0;;;::::1;::::0;;3129:244::o;704:106::-;792:10;704:106;:::o;23428:205::-;23556:68;;;-1:-1:-1;;;;;23556:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23579:27;23556:68;;;23529:96;;23549:5;;23529:19;:96::i;:::-;23428:205;;;;:::o;23243:177::-;23353:58;;;-1:-1:-1;;;;;23353:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23376:23;23353:58;;;23326:86;;23346:5;;23326:19;:86::i;:::-;23243:177;;;:::o;25548:761::-;25972:23;25998:69;26026:4;25998:69;;;;;;;;;;;;;;;;;26006:5;-1:-1:-1;;;;;25998:27:0;;;:69;;;;;:::i;:::-;26082:17;;25972:95;;-1:-1:-1;26082:21:0;26078:224;;26224:10;26213:30;;;;;;;;;;;;;;;-1:-1:-1;26213:30:0;26205:85;;;;-1:-1:-1;;;26205:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18232:195;18335:12;18367:52;18389:6;18397:4;18403:1;18406:12;18367:21;:52::i;:::-;18360:59;;18232:195;;;;;;:::o;19284:530::-;19411:12;19469:5;19444:21;:30;;19436:81;;;;-1:-1:-1;;;19436:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19536:18;19547:6;19536:10;:18::i;:::-;19528:60;;;;;-1:-1:-1;;;19528:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;19662:12;19676:23;19703:6;-1:-1:-1;;;;;19703:11:0;19723:5;19731:4;19703:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;19703:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19661:75;;;;19754:52;19772:7;19781:10;19793:12;19754:17;:52::i;:::-;19747:59;19284:530;-1:-1:-1;;;;;;;19284:530:0:o;15314:422::-;15681:20;15720:8;;;15314:422::o;21824:742::-;21939:12;21968:7;21964:595;;;-1:-1:-1;21999:10:0;21992:17;;21964:595;22113:17;;:21;22109:439;;22376:10;22370:17;22437:15;22424:10;22420:2;22416:19;22409:44;22324:148;22519:12;22512:20;;-1:-1:-1;;;22512:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Swarm Source

ipfs://6a4cc9790e848480198d124cadfb76b217bfe587ceb214a3cc6b51a2a18a8543

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

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.