false
false
0

Contract Address Details

0x112c37126c035E1De37346f5b6005494Ef80506e

Contract Name
Bankroll
Creator
0xc95ce5–f2b68d at 0xbdcc54–f91dc5
Balance
1,029.5 FTN ( )
Tokens
Fetching tokens...
Transactions
10 Transactions
Transfers
0 Transfers
Gas Used
318,520
Last Balance Update
3873764
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
Bankroll




Optimization enabled
true
Compiler version
v0.8.20+commit.a1b79de6




Optimization runs
200
EVM Version
london




Verified at
2024-05-20T14:20:17.725337Z

Contract source code

pragma solidity 0.8.20;


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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

interface IERC20 {
    /**
     * @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);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the value of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}

interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
     *   {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

library SafeERC20 {
    using Address for address;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

interface IBankroll {
    function sendFTN(address _to, uint256 _amount) external;

    function sendERC20(IERC20 _token, address _to, uint256 _amount) external;

    function sendERC721(IERC721 _token, address _to, uint256 _id) external;
}

// SPDX-License-Identifier: MIT
/**
 * @title Bankroll
 * @dev Manages a bankroll for game contracts, allowing withdrawals of FTN, ERC20 tokens, and ERC721 tokens.
 */
contract Bankroll is Ownable, IBankroll {
    using Address for address payable;
    using SafeERC20 for IERC20;

    mapping(address => bool) public gameContracts;

    /**
     * @dev Modifier to restrict functions to only registered game contracts.
     */
    modifier onlyGameContract() {
        require(
            gameContracts[msg.sender],
            "Sender is not a registered game contract"
        );
        _;
    }

    /**
     * @dev Contract constructor.
     */
    constructor() Ownable(msg.sender) {}

    /**
     * @dev Fallback function to receive Ether.
     */
    receive() external payable {}

    /**
     * @dev Sets the registration status of a game contract.
     * @param _gameContract The address of the game contract.
     * @param _status The registration status to set.
     * @notice Only the owner of this contract can set the registration status of game contracts.
     */
    function setGameContract(
        address _gameContract,
        bool _status
    ) external onlyOwner {
        gameContracts[_gameContract] = _status;
    }

    /**
     * @dev Withdraws FTN (Ether) from the contract.
     * @param _amount The amount of FTN to withdraw.
     * @notice Only the owner of this contract can call this function.
     */
    function withdrawFTN(uint256 _amount) external onlyOwner {
        payable(msg.sender).sendValue(_amount);
    }

    /**
     * @dev Withdraws ERC20 tokens from the contract.
     * @param _token The address of the ERC20 token.
     * @param _amount The amount of ERC20 tokens to withdraw.
     * @notice Only the owner of this contract can call this function.
     */
    function withdrawToken(IERC20 _token, uint256 _amount) external onlyOwner {
        _token.safeTransfer(msg.sender, _amount);
    }

    /**
     * @dev Withdraws ERC721 tokens from the contract.
     * @param _token The address of the ERC721 token.
     * @param _tokenId The ID of the ERC721 token to withdraw.
     * @notice Only the owner of this contract can call this function.
     */
    function withdrawERC721(
        IERC721 _token,
        uint256 _tokenId
    ) external onlyOwner {
        _token.safeTransferFrom(address(this), msg.sender, _tokenId);
    }

    /**
     * @dev Sends FTN (Ether) to a specified address.
     * @param _to The address to send FTN to.
     * @param _amount The amount of FTN to send.
     * @notice Only registered game contracts can call this function.
     */
    function sendFTN(address _to, uint256 _amount) public onlyGameContract {
        payable(_to).sendValue(_amount);
    }

    /**
     * @dev Sends ERC20 tokens to a specified address.
     * @param _token The address of the ERC20 token.
     * @param _to The address to send ERC20 tokens to.
     * @param _amount The amount of ERC20 tokens to send.
     * @notice Only registered game contracts can call this function.
     */
    function sendERC20(
        IERC20 _token,
        address _to,
        uint256 _amount
    ) public onlyGameContract {
        _token.safeTransfer(_to, _amount);
    }

    /**
     * @dev Sends ERC721 tokens to a specified address.
     * @param _token The address of the ERC721 token.
     * @param _to The address to send ERC721 tokens to.
     * @param _id The ID of the ERC721 token to send.
     * @notice Only registered game contracts can call this function.
     */
    function sendERC721(
        IERC721 _token,
        address _to,
        uint256 _id
    ) public onlyGameContract {
        _token.safeTransferFrom(address(this), _to, _id);
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"error","name":"AddressEmptyCode","inputs":[{"type":"address","name":"target","internalType":"address"}]},{"type":"error","name":"AddressInsufficientBalance","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"error","name":"FailedInnerCall","inputs":[]},{"type":"error","name":"OwnableInvalidOwner","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"error","name":"OwnableUnauthorizedAccount","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"error","name":"SafeERC20FailedOperation","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"gameContracts","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":"sendERC20","inputs":[{"type":"address","name":"_token","internalType":"contract IERC20"},{"type":"address","name":"_to","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"sendERC721","inputs":[{"type":"address","name":"_token","internalType":"contract IERC721"},{"type":"address","name":"_to","internalType":"address"},{"type":"uint256","name":"_id","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"sendFTN","inputs":[{"type":"address","name":"_to","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setGameContract","inputs":[{"type":"address","name":"_gameContract","internalType":"address"},{"type":"bool","name":"_status","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawERC721","inputs":[{"type":"address","name":"_token","internalType":"contract IERC721"},{"type":"uint256","name":"_tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawFTN","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawToken","inputs":[{"type":"address","name":"_token","internalType":"contract IERC20"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

Verify & Publish
0x608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610948806100a56000396000f3fe6080604052600436106100a05760003560e01c80638f975a64116100645780638f975a64146101705780639e281a9814610190578063b2c30afa146101b0578063b72ac8ea146101d0578063f2fde38b146101f0578063f3e414f81461021057600080fd5b8063030f8a09146100ac5780633a8aa684146100ce5780636ddd474d146100ee578063715018a6146101335780638da5cb5b1461014857600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c73660046107a2565b610230565b005b3480156100da57600080fd5b506100cc6100e93660046107db565b610263565b3480156100fa57600080fd5b5061011e6101093660046107f4565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561013f57600080fd5b506100cc610278565b34801561015457600080fd5b506000546040516001600160a01b03909116815260200161012a565b34801561017c57600080fd5b506100cc61018b366004610811565b61028c565b34801561019c57600080fd5b506100cc6101ab366004610852565b6102dd565b3480156101bc57600080fd5b506100cc6101cb366004610852565b6102fd565b3480156101dc57600080fd5b506100cc6101eb366004610811565b61033f565b3480156101fc57600080fd5b506100cc61020b3660046107f4565b6103db565b34801561021c57600080fd5b506100cc61022b366004610852565b610416565b610238610488565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b61026b610488565b61027533826104b5565b50565b610280610488565b61028a600061054c565b565b3360009081526001602052604090205460ff166102c45760405162461bcd60e51b81526004016102bb9061087e565b60405180910390fd5b6102d86001600160a01b038416838361059c565b505050565b6102e5610488565b6102f96001600160a01b038316338361059c565b5050565b3360009081526001602052604090205460ff1661032c5760405162461bcd60e51b81526004016102bb9061087e565b6102f96001600160a01b038316826104b5565b3360009081526001602052604090205460ff1661036e5760405162461bcd60e51b81526004016102bb9061087e565b604051632142170760e11b81523060048201526001600160a01b038381166024830152604482018390528416906342842e0e90606401600060405180830381600087803b1580156103be57600080fd5b505af11580156103d2573d6000803e3d6000fd5b50505050505050565b6103e3610488565b6001600160a01b03811661040d57604051631e4fbdf760e01b8152600060048201526024016102bb565b6102758161054c565b61041e610488565b604051632142170760e11b8152306004820152336024820152604481018290526001600160a01b038316906342842e0e90606401600060405180830381600087803b15801561046c57600080fd5b505af1158015610480573d6000803e3d6000fd5b505050505050565b6000546001600160a01b0316331461028a5760405163118cdaa760e01b81523360048201526024016102bb565b804710156104d85760405163cd78605960e01b81523060048201526024016102bb565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610525576040519150601f19603f3d011682016040523d82523d6000602084013e61052a565b606091505b50509050806102d857604051630a12f52160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092019092526020810180516001600160e01b031663a9059cbb60e01b1790526102d8918591906000906105fa90841683610648565b9050805160001415801561061f57508080602001905181019061061d91906108c6565b155b156102d857604051635274afe760e01b81526001600160a01b03841660048201526024016102bb565b60606106568383600061065d565b9392505050565b6060814710156106825760405163cd78605960e01b81523060048201526024016102bb565b600080856001600160a01b0316848660405161069e91906108e3565b60006040518083038185875af1925050503d80600081146106db576040519150601f19603f3d011682016040523d82523d6000602084013e6106e0565b606091505b50915091506106f08683836106fa565b9695505050505050565b60608261070f5761070a82610756565b610656565b815115801561072657506001600160a01b0384163b155b1561074f57604051639996b31560e01b81526001600160a01b03851660048201526024016102bb565b5080610656565b8051156107665780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b038116811461027557600080fd5b801515811461027557600080fd5b600080604083850312156107b557600080fd5b82356107c08161077f565b915060208301356107d081610794565b809150509250929050565b6000602082840312156107ed57600080fd5b5035919050565b60006020828403121561080657600080fd5b81356106568161077f565b60008060006060848603121561082657600080fd5b83356108318161077f565b925060208401356108418161077f565b929592945050506040919091013590565b6000806040838503121561086557600080fd5b82356108708161077f565b946020939093013593505050565b60208082526028908201527f53656e646572206973206e6f74206120726567697374657265642067616d652060408201526718dbdb9d1c9858dd60c21b606082015260800190565b6000602082840312156108d857600080fd5b815161065681610794565b6000825160005b8181101561090457602081860181015185830152016108ea565b50600092019182525091905056fea26469706673582212200a040436723099898011fa7e9980a21c9e77efc3b530e8c9233b756c23d12e7464736f6c63430008140033

Deployed ByteCode

0x6080604052600436106100a05760003560e01c80638f975a64116100645780638f975a64146101705780639e281a9814610190578063b2c30afa146101b0578063b72ac8ea146101d0578063f2fde38b146101f0578063f3e414f81461021057600080fd5b8063030f8a09146100ac5780633a8aa684146100ce5780636ddd474d146100ee578063715018a6146101335780638da5cb5b1461014857600080fd5b366100a757005b600080fd5b3480156100b857600080fd5b506100cc6100c73660046107a2565b610230565b005b3480156100da57600080fd5b506100cc6100e93660046107db565b610263565b3480156100fa57600080fd5b5061011e6101093660046107f4565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561013f57600080fd5b506100cc610278565b34801561015457600080fd5b506000546040516001600160a01b03909116815260200161012a565b34801561017c57600080fd5b506100cc61018b366004610811565b61028c565b34801561019c57600080fd5b506100cc6101ab366004610852565b6102dd565b3480156101bc57600080fd5b506100cc6101cb366004610852565b6102fd565b3480156101dc57600080fd5b506100cc6101eb366004610811565b61033f565b3480156101fc57600080fd5b506100cc61020b3660046107f4565b6103db565b34801561021c57600080fd5b506100cc61022b366004610852565b610416565b610238610488565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b61026b610488565b61027533826104b5565b50565b610280610488565b61028a600061054c565b565b3360009081526001602052604090205460ff166102c45760405162461bcd60e51b81526004016102bb9061087e565b60405180910390fd5b6102d86001600160a01b038416838361059c565b505050565b6102e5610488565b6102f96001600160a01b038316338361059c565b5050565b3360009081526001602052604090205460ff1661032c5760405162461bcd60e51b81526004016102bb9061087e565b6102f96001600160a01b038316826104b5565b3360009081526001602052604090205460ff1661036e5760405162461bcd60e51b81526004016102bb9061087e565b604051632142170760e11b81523060048201526001600160a01b038381166024830152604482018390528416906342842e0e90606401600060405180830381600087803b1580156103be57600080fd5b505af11580156103d2573d6000803e3d6000fd5b50505050505050565b6103e3610488565b6001600160a01b03811661040d57604051631e4fbdf760e01b8152600060048201526024016102bb565b6102758161054c565b61041e610488565b604051632142170760e11b8152306004820152336024820152604481018290526001600160a01b038316906342842e0e90606401600060405180830381600087803b15801561046c57600080fd5b505af1158015610480573d6000803e3d6000fd5b505050505050565b6000546001600160a01b0316331461028a5760405163118cdaa760e01b81523360048201526024016102bb565b804710156104d85760405163cd78605960e01b81523060048201526024016102bb565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610525576040519150601f19603f3d011682016040523d82523d6000602084013e61052a565b606091505b50509050806102d857604051630a12f52160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092019092526020810180516001600160e01b031663a9059cbb60e01b1790526102d8918591906000906105fa90841683610648565b9050805160001415801561061f57508080602001905181019061061d91906108c6565b155b156102d857604051635274afe760e01b81526001600160a01b03841660048201526024016102bb565b60606106568383600061065d565b9392505050565b6060814710156106825760405163cd78605960e01b81523060048201526024016102bb565b600080856001600160a01b0316848660405161069e91906108e3565b60006040518083038185875af1925050503d80600081146106db576040519150601f19603f3d011682016040523d82523d6000602084013e6106e0565b606091505b50915091506106f08683836106fa565b9695505050505050565b60608261070f5761070a82610756565b610656565b815115801561072657506001600160a01b0384163b155b1561074f57604051639996b31560e01b81526001600160a01b03851660048201526024016102bb565b5080610656565b8051156107665780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b038116811461027557600080fd5b801515811461027557600080fd5b600080604083850312156107b557600080fd5b82356107c08161077f565b915060208301356107d081610794565b809150509250929050565b6000602082840312156107ed57600080fd5b5035919050565b60006020828403121561080657600080fd5b81356106568161077f565b60008060006060848603121561082657600080fd5b83356108318161077f565b925060208401356108418161077f565b929592945050506040919091013590565b6000806040838503121561086557600080fd5b82356108708161077f565b946020939093013593505050565b60208082526028908201527f53656e646572206973206e6f74206120726567697374657265642067616d652060408201526718dbdb9d1c9858dd60c21b606082015260800190565b6000602082840312156108d857600080fd5b815161065681610794565b6000825160005b8181101561090457602081860181015185830152016108ea565b50600092019182525091905056fea26469706673582212200a040436723099898011fa7e9980a21c9e77efc3b530e8c9233b756c23d12e7464736f6c63430008140033