false
false
0

Contract Address Details

0xC348F894d0E939FE72c467156E6d7DcbD6f16e21

Token
Experimental Finance Token (EXFI)
Creator
0x1bfb1f–14a2f7 at 0x95f7aa–60dfcd
Balance
0 SGB
Tokens
Fetching tokens...
Transactions
236,065 Transactions
Transfers
24 Transfers
Gas Used
11,083,004,505
Last Balance Update
62879353
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
YieldFlareProxy




Optimization enabled
true
Compiler version
v0.8.9+commit.e5eed63a




Optimization runs
200
EVM Version
default




Verified at
2022-01-04T07:18:08.019711Z

Constructor Arguments

0000000000000000000000009c138fd9e9707e8133b425b7bcc8582fced1a5da000000000000000000000000085f5ae2695a84a5d146adb43d8c73218821ad17

Arg [0] (address) : 0x9c138fd9e9707e8133b425b7bcc8582fced1a5da
Arg [1] (address) : 0x085f5ae2695a84a5d146adb43d8c73218821ad17

              

Contract source code

// SPDX-License-Identifier: MIT
pragma solidity =0.8.9;

interface IFRC20 {
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function increaseAllowance(address spender, uint256 addedValue) external returns (bool);
    function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool);
    
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}
            

/**
   Uniswap's Ownable contract fork (commit 0db76e9):
   remove using Context, add two step ownership verification
   https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
*/

abstract contract Ownable {
    address internal _owner;
    address internal _newOwner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    constructor (address ownerAddress) {
        require(ownerAddress != address(0), "Ownable: zero address");
        _owner = ownerAddress;
        emit OwnershipTransferred(address(0), ownerAddress);
    }

    function owner() public view virtual returns (address) {
        return _owner;
    }

    function newOwner() public view virtual returns (address) {
        return _newOwner;
    }

    modifier onlyOwner() {
        require(owner() == msg.sender, "Ownable: caller is not the owner");
        _;
    }

    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    function transferOwnership(address transferOwner) public onlyOwner {
        require(transferOwner != newOwner());
        _newOwner = transferOwner;
    }

    function acceptOwnership() virtual public {
        require(msg.sender == newOwner(), "Ownable: caller is not the new owner");
        emit OwnershipTransferred(_owner, _newOwner);
        _owner = _newOwner;
        _newOwner = address(0);
    }
}


     
/**
   Open Zeppelin's Address contract, commit 93438ec
   https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol
   Add checkContract function to revert execution if the address is not a contract
*/
 
/**
 * @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;
    }

    function checkContract(address _account) internal view {
        require(_account != address(0), "Account cannot be zero address");
        require(isContract(_account), "Account code size cannot be zero");
    }

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

            
abstract contract YieldFlareStorage is Ownable {
    mapping (address => uint256) internal _balances;
    mapping (address => mapping (address => uint256)) internal _allowances;
    mapping (address => bool) internal _frozen;

    uint256 internal _totalSupply = 110000000 * 1e18;
    string internal _name = "Experimental Finance Token";
    string internal _symbol = "EXFI";
    uint8 internal _decimals = 18;

    uint public minSendInterval;
    uint public maxSendAmount;
    mapping (address => uint) public userLastTransfer;

    // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;
    mapping(address => uint) public nonces;
    
    event FreezeAccount (address indexed account);
    event UnfreezeAccount (address indexed account);
    event UpdateMinSendInterval(uint indexed previousMinSendInterval, uint indexed newMinSendInterval);
    event UpdateMaxSendAmount(uint indexed previousMaxSendAmount, uint indexed newMaxSendAmount);

    constructor(address _owner) Ownable(_owner) { }
}

contract YieldFlareProxy is YieldFlareStorage {
    address public target;
    
    constructor(address _newOwner, address _newTarget) YieldFlareStorage(_newOwner) {
        _setTarget(_newTarget);
    }

    fallback() external payable {
        if (gasleft() <= 2300) {
            return;
        }

        address target_ = target;
        bytes memory data = msg.data;
        assembly {
            let result := delegatecall(gas(), target_, add(data, 0x20), mload(data), 0, 0)
            let size := returndatasize()
            let ptr := mload(0x40)
            returndatacopy(ptr, 0, size)
            switch result
            case 0 { revert(ptr, size) }
            default { return(ptr, size) }
        }
    }

    function setTarget(address _newTarget) public onlyOwner {
        _setTarget(_newTarget);
    }

    function _setTarget(address _newTarget) internal {
        require(Address.isContract(_newTarget), "target not a contract");
        target = _newTarget;
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_newOwner","internalType":"address"},{"type":"address","name":"_newTarget","internalType":"address"}]},{"type":"event","name":"FreezeAccount","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"UnfreezeAccount","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"UpdateMaxSendAmount","inputs":[{"type":"uint256","name":"previousMaxSendAmount","internalType":"uint256","indexed":true},{"type":"uint256","name":"newMaxSendAmount","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"UpdateMinSendInterval","inputs":[{"type":"uint256","name":"previousMinSendInterval","internalType":"uint256","indexed":true},{"type":"uint256","name":"newMinSendInterval","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"fallback","stateMutability":"payable"},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"PERMIT_TYPEHASH","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"acceptOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxSendAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minSendInterval","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"newOwner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nonces","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTarget","inputs":[{"type":"address","name":"_newTarget","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"target","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"transferOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"userLastTransfer","inputs":[{"type":"address","name":"","internalType":"address"}]}]
              

Contract Creation Code

0x6a5afd67f2dc0e1b2e00000060055560c0604052601a60808190527f4578706572696d656e74616c2046696e616e636520546f6b656e00000000000060a090815261004d91600691906101f1565b50604080518082019091526004808252634558464960e01b6020909201918252610079916007916101f1565b506008805460ff1916601217905534801561009357600080fd5b506040516109033803806109038339810160408190526100b2916102a6565b81806001600160a01b03811661010f5760405162461bcd60e51b815260206004820152601560248201527f4f776e61626c653a207a65726f2061646472657373000000000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061016390508161016a565b5050610314565b61017d816101eb60201b6104d71760201c565b6101c95760405162461bcd60e51b815260206004820152601560248201527f746172676574206e6f74206120636f6e747261637400000000000000000000006044820152606401610106565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b8280546101fd906102d9565b90600052602060002090601f01602090048101928261021f5760008555610265565b82601f1061023857805160ff1916838001178555610265565b82800160010185558215610265579182015b8281111561026557825182559160200191906001019061024a565b50610271929150610275565b5090565b5b808211156102715760008155600101610276565b80516001600160a01b03811681146102a157600080fd5b919050565b600080604083850312156102b957600080fd5b6102c28361028a565b91506102d06020840161028a565b90509250929050565b600181811c908216806102ed57607f821691505b6020821081141561030e57634e487b7160e01b600052602260045260246000fd5b50919050565b6105e0806103236000396000f3fe6080604052600436106100a75760003560e01c80638da5cb5b116100645780638da5cb5b1461020a578063c4deaddb1461023c578063cbb84f9e14610252578063d4b8399214610268578063d4ee1d9014610288578063f2fde38b146102a6576100a7565b8063028235341461011d57806330adf81f1461015d578063715018a614610191578063776d1a01146101a857806379ba5097146101c85780637ecebe00146101dd575b6108fc5a116100b257005b600d5460408051602036601f81018290048202830182019093528282526001600160a01b0390931692600092839181908401838280828437600092018290525084519495509384935091505060208401855af43d604051816000823e828015610119578282f35b8282fd5b34801561012957600080fd5b5061014a610138366004610545565b600b6020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561016957600080fd5b5061014a7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561019d57600080fd5b506101a66102c6565b005b3480156101b457600080fd5b506101a66101c3366004610545565b610352565b3480156101d457600080fd5b506101a6610397565b3480156101e957600080fd5b5061014a6101f8366004610545565b600c6020526000908152604090205481565b34801561021657600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610154565b34801561024857600080fd5b5061014a600a5481565b34801561025e57600080fd5b5061014a60095481565b34801561027457600080fd5b50600d54610224906001600160a01b031681565b34801561029457600080fd5b506001546001600160a01b0316610224565b3480156102b257600080fd5b506101a66102c1366004610545565b610461565b336102d96000546001600160a01b031690565b6001600160a01b0316146103085760405162461bcd60e51b81526004016102ff90610575565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b336103656000546001600160a01b031690565b6001600160a01b03161461038b5760405162461bcd60e51b81526004016102ff90610575565b610394816104dd565b50565b6001546001600160a01b031633146103fd5760405162461bcd60e51b8152602060048201526024808201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206e6577206f6044820152633bb732b960e11b60648201526084016102ff565b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b336104746000546001600160a01b031690565b6001600160a01b03161461049a5760405162461bcd60e51b81526004016102ff90610575565b6001546001600160a01b03828116911614156104b557600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b803b6105235760405162461bcd60e51b81526020600482015260156024820152741d185c99d95d081b9bdd08184818dbdb9d1c9858dd605a1b60448201526064016102ff565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b60006020828403121561055757600080fd5b81356001600160a01b038116811461056e57600080fd5b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220d901291130457802f0153215c437f2414c3cb0000be1b9631576b5835358fe4d64736f6c634300080900330000000000000000000000009c138fd9e9707e8133b425b7bcc8582fced1a5da000000000000000000000000085f5ae2695a84a5d146adb43d8c73218821ad17

Deployed ByteCode

0x6080604052600436106100a75760003560e01c80638da5cb5b116100645780638da5cb5b1461020a578063c4deaddb1461023c578063cbb84f9e14610252578063d4b8399214610268578063d4ee1d9014610288578063f2fde38b146102a6576100a7565b8063028235341461011d57806330adf81f1461015d578063715018a614610191578063776d1a01146101a857806379ba5097146101c85780637ecebe00146101dd575b6108fc5a116100b257005b600d5460408051602036601f81018290048202830182019093528282526001600160a01b0390931692600092839181908401838280828437600092018290525084519495509384935091505060208401855af43d604051816000823e828015610119578282f35b8282fd5b34801561012957600080fd5b5061014a610138366004610545565b600b6020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561016957600080fd5b5061014a7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b34801561019d57600080fd5b506101a66102c6565b005b3480156101b457600080fd5b506101a66101c3366004610545565b610352565b3480156101d457600080fd5b506101a6610397565b3480156101e957600080fd5b5061014a6101f8366004610545565b600c6020526000908152604090205481565b34801561021657600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610154565b34801561024857600080fd5b5061014a600a5481565b34801561025e57600080fd5b5061014a60095481565b34801561027457600080fd5b50600d54610224906001600160a01b031681565b34801561029457600080fd5b506001546001600160a01b0316610224565b3480156102b257600080fd5b506101a66102c1366004610545565b610461565b336102d96000546001600160a01b031690565b6001600160a01b0316146103085760405162461bcd60e51b81526004016102ff90610575565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b336103656000546001600160a01b031690565b6001600160a01b03161461038b5760405162461bcd60e51b81526004016102ff90610575565b610394816104dd565b50565b6001546001600160a01b031633146103fd5760405162461bcd60e51b8152602060048201526024808201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206e6577206f6044820152633bb732b960e11b60648201526084016102ff565b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b336104746000546001600160a01b031690565b6001600160a01b03161461049a5760405162461bcd60e51b81526004016102ff90610575565b6001546001600160a01b03828116911614156104b557600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b803b6105235760405162461bcd60e51b81526020600482015260156024820152741d185c99d95d081b9bdd08184818dbdb9d1c9858dd605a1b60448201526064016102ff565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b60006020828403121561055757600080fd5b81356001600160a01b038116811461056e57600080fd5b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220d901291130457802f0153215c437f2414c3cb0000be1b9631576b5835358fe4d64736f6c63430008090033