FTM Price: $0.40 (-0.35%)
Gas: 19 Gwei

Contract

0x36076f9afbf33227307aD784B4e81023f77f221f
 

Overview

FTM Balance

Fantom LogoFantom LogoFantom Logo0 FTM

FTM Value

$0.00

Token Holdings

Sponsored

Transaction Hash
Method
Block
From
To
Value
Upgrade355437362022-04-08 11:56:58685 days 16 hrs ago1649419018IN
0x36076f...f77f221f
0 FTM0.0124514162.604
Upgrade355225102022-04-08 6:05:21685 days 22 hrs ago1649397921IN
0x36076f...f77f221f
0 FTM0.01461961190.8591
Upgrade353673082022-04-06 9:09:23687 days 19 hrs ago1649236163IN
0x36076f...f77f221f
0 FTM0.05670766740.5506
Upgrade353261222022-04-05 20:43:00688 days 8 hrs ago1649191380IN
0x36076f...f77f221f
0 FTM0.01102878231.454
Upgrade353261172022-04-05 20:42:56688 days 8 hrs ago1649191376IN
0x36076f...f77f221f
0 FTM0.01772636231.454
Upgrade352510162022-04-04 23:31:04689 days 5 hrs ago1649115064IN
0x36076f...f77f221f
0 FTM0.01230761160.7263
Upgrade352501592022-04-04 23:17:48689 days 5 hrs ago1649114268IN
0x36076f...f77f221f
0 FTM0.01254242163.7927
Upgrade352429962022-04-04 21:22:19689 days 7 hrs ago1649107339IN
0x36076f...f77f221f
0 FTM0.01172461153.0889
Upgrade340129352022-03-21 11:06:09703 days 17 hrs ago1647860769IN
0x36076f...f77f221f
0 FTM0.01025255133.8261
Upgrade337935922022-03-18 23:54:29706 days 4 hrs ago1647647669IN
0x36076f...f77f221f
0 FTM0.01144354185.7748
Upgrade323043422022-03-01 21:05:23723 days 7 hrs ago1646168723IN
0x36076f...f77f221f
0 FTM0.03774087492.7072
Upgrade318169932022-02-23 20:50:20729 days 7 hrs ago1645649420IN
0x36076f...f77f221f
0 FTM0.07221998942.832
Upgrade311540192022-02-16 16:56:22736 days 11 hrs ago1645030582IN
0x36076f...f77f221f
0 FTM0.0217157283.4542
Upgrade309646132022-02-14 17:53:49738 days 10 hrs ago1644861229IN
0x36076f...f77f221f
0 FTM0.01137915184.7296
Upgrade303727072022-02-08 16:15:22744 days 12 hrs ago1644336922IN
0x36076f...f77f221f
0 FTM0.0302551394.9804
Upgrade299689942022-02-04 10:17:33748 days 18 hrs ago1643969853IN
0x36076f...f77f221f
0 FTM0.01753672228.9061
Upgrade296484772022-02-01 4:37:22752 days 6 mins ago1643690242IN
0x36076f...f77f221f
0 FTM0.01642798214.4674
Upgrade292838272022-01-28 12:37:12755 days 16 hrs ago1643373432IN
0x36076f...f77f221f
0 FTM0.02248461293.4907
Upgrade292657372022-01-28 8:08:04755 days 20 hrs ago1643357284IN
0x36076f...f77f221f
0 FTM0.02519685328.945
Upgrade291583042022-01-27 4:01:18757 days 42 mins ago1643256078IN
0x36076f...f77f221f
0 FTM0.03316306356.2588
Upgrade291582652022-01-27 4:00:45757 days 43 mins ago1643256045IN
0x36076f...f77f221f
0 FTM0.03811091357.5569
Upgrade290167352022-01-25 15:41:17758 days 13 hrs ago1643125277IN
0x36076f...f77f221f
0 FTM0.06601085861.6368
Upgrade287500922022-01-22 19:12:57761 days 9 hrs ago1642878777IN
0x36076f...f77f221f
0 FTM0.062909981,021.4816
Upgrade285440662022-01-20 12:41:59763 days 16 hrs ago1642682519IN
0x36076f...f77f221f
0 FTM0.01731123280.9216
Upgrade285401262022-01-20 11:49:30763 days 16 hrs ago1642679370IN
0x36076f...f77f221f
0 FTM0.02510659327.664
View all transactions

Latest 1 internal transaction

Parent Txn Hash Block From To Value
101606212021-06-20 9:23:49977 days 19 hrs ago1624181029  Contract Creation0 FTM
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 ftmscan.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  ]
[ 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.