ETH Price: $3,704.30 (-2.01%)
Gas: 9 Gwei

Contract

0xae033e6811854e64FbAD475EE3af7C94dcD2F01b
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Change Trustee158843392022-11-02 19:11:23568 days ago1667416283IN
0xae033e68...4dcD2F01b
0 ETH0.0006482622.37030204
0x60806040158843152022-11-02 19:06:35568 days ago1667415995IN
 Create: StudentIDGeneratorCodeback
0 ETH0.0367694125.00495415

Advanced mode:
Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StudentIDGeneratorCodeback

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : StudentIDGeneratorCodeback.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract StudentIDGeneratorCodeback {
  address public trustee;
  uint256 public balance;

  using Strings for uint256;
  using SafeMath for uint256;

  event CodebackDeployed(address _creator, address _trustee, string _message);
  // This only works for ETH and ERC721.SafeTransferFrom, not ERC20 or ERC721.TransferFrom. To get all tip events, will have to monitor for token transfer events to all known Codeback addresses
  event CodebackTipReceived(address _from, address _token, uint _amount);
  event CodebackTipClaimed(address _to, address _token, uint _amount);
  event CodebackUsed(address _from);
  event CodebackTrusteeChanged(address _from, address _to);

  constructor(address trusteeWallet) {
    trustee = trusteeWallet;
    emit CodebackDeployed(msg.sender, trustee, "Codeback Deployed");
  }

  receive() payable external {
    balance += msg.value;
    emit CodebackTipReceived(msg.sender, address(0x0000000000000000000000000000000000000000), msg.value);
  }

  function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes memory _data) public virtual returns (bytes4) {
      emit CodebackTipReceived(_from, msg.sender, 1);
      return this.onERC721Received.selector;
  }

  function withdraw(uint amount, address payable destAddr) public {
    require(msg.sender == trustee, "Only the trustee can withdraw funds");
    require(amount <= balance, "Insufficient funds");

    destAddr.transfer(amount);
    balance -= amount;
    emit CodebackTipClaimed(msg.sender, address(0x0000000000000000000000000000000000000000), amount);
  }

  function withdrawERC20(IERC20 token, uint amount, address payable destAddr) public {
    require(msg.sender == trustee, "Only the trustee can withdraw tokens");
    uint256 erc20balance = token.balanceOf(address(this));
    require(amount <= erc20balance, "Insufficient funds");

    token.transfer(destAddr, amount);
    emit CodebackTipClaimed(msg.sender, address(token), amount);
  }

  function withdrawERC721(IERC721 token, uint tokenId, address payable destAddr) public {
    require(msg.sender == trustee, "Only the trustee can withdraw tokens");
    require(token.ownerOf(tokenId) == address(this));

    token.safeTransferFrom(address(this), destAddr, tokenId);
    emit CodebackTipClaimed(msg.sender, address(token), 1);
  }

  function changeTrustee(address newTrustee) public {
    require(msg.sender == trustee, "Only the trustee can change the trustee");
    require(newTrustee != trustee, "New trustee must be different from current trustee");
    trustee = newTrustee;
    emit CodebackTrusteeChanged(msg.sender, newTrustee);

  }

  function generateRandomStudentId(string memory _identifier) private pure returns (uint256) {
    return uint256(keccak256(abi.encodePacked(_identifier))) % 10**24; //10 is modulus and 24 is student id digits based on number of layers
  }

  function setStudentId(uint256 tokenId, address wallet) public returns (uint256) {
    emit CodebackUsed(msg.sender);
    return uint256(generateRandomStudentId(string(abi.encodePacked(tokenId.toString(), wallet))));
  } 

}

File 3 of 12 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
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) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            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) {
        unchecked {
            // 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) {
        unchecked {
            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) {
        unchecked {
            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) {
        return a + b;
    }

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

    /**
     * @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.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        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) {
        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) {
        unchecked {
            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.
     *
     * 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) {
        unchecked {
            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) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 4 of 12 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * 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 caller.
     *
     * 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);
}

File 5 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @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 {
        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 {
        _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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _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);
    }
}

File 6 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

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

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 12 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 8 of 12 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 9 of 12 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
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);
}

File 10 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^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 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) {
        return msg.sender;
    }

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

File 11 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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 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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 12 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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");

        (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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 13 of 12 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
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].
     */
    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);
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"trusteeWallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_creator","type":"address"},{"indexed":false,"internalType":"address","name":"_trustee","type":"address"},{"indexed":false,"internalType":"string","name":"_message","type":"string"}],"name":"CodebackDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"CodebackTipClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"address","name":"_token","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"CodebackTipReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"address","name":"_to","type":"address"}],"name":"CodebackTrusteeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"}],"name":"CodebackUsed","type":"event"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newTrustee","type":"address"}],"name":"changeTrustee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"wallet","type":"address"}],"name":"setStudentId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"trustee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"destAddr","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"destAddr","type":"address"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address payable","name":"destAddr","type":"address"}],"name":"withdrawERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5060405162001b5e38038062001b5e833981810160405281019062000037919062000143565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0fadac7cf99e27ed49f53c2f9d52fbb2fb08aadf8ee14a5bcf69d32ab4f99c6d3360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051620000ca929190620001e7565b60405180910390a15062000229565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200010b82620000de565b9050919050565b6200011d81620000fe565b81146200012957600080fd5b50565b6000815190506200013d8162000112565b92915050565b6000602082840312156200015c576200015b620000d9565b5b60006200016c848285016200012c565b91505092915050565b6200018081620000fe565b82525050565b600082825260208201905092915050565b7f436f64656261636b204465706c6f796564000000000000000000000000000000600082015250565b6000620001cf60118362000186565b9150620001dc8262000197565b602082019050919050565b6000606082019050620001fe600083018562000175565b6200020d602083018462000175565b81810360408301526200022081620001c0565b90509392505050565b61192580620002396000396000f3fe60806040526004361061007e5760003560e01c80635fc3ea0b1161004e5780635fc3ea0b146101ab5780637b9f76b5146101d4578063b69ef8a8146101fd578063fdf97cb214610228576100da565b8062f714ce146100df578063150b7a0214610108578063299a67fd14610145578063324716d614610182576100da565b366100da5734600160008282546100959190610c2a565b925050819055507f60562cb4a229434a45fcf3e7a3bb6f36d02f438ca2c278c263eed75d9cd97ae3336000346040516100d093929190610cae565b60405180910390a1005b600080fd5b3480156100eb57600080fd5b5061010660048036038101906101019190610d63565b610253565b005b34801561011457600080fd5b5061012f600480360381019061012a9190610f15565b6103c6565b60405161013c9190610fd3565b60405180910390f35b34801561015157600080fd5b5061016c60048036038101906101679190610fee565b610416565b604051610179919061102e565b60405180910390f35b34801561018e57600080fd5b506101a960048036038101906101a49190611049565b610489565b005b3480156101b757600080fd5b506101d260048036038101906101cd91906110b4565b610621565b005b3480156101e057600080fd5b506101fb60048036038101906101f69190611145565b610830565b005b34801561020957600080fd5b50610212610a1f565b60405161021f919061102e565b60405180910390f35b34801561023457600080fd5b5061023d610a25565b60405161024a9190611198565b60405180910390f35b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d890611236565b60405180910390fd5b600154821115610326576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031d906112a2565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505015801561036c573d6000803e3d6000fd5b50816001600082825461037f91906112c2565b925050819055507f09e1cb3a96c05a79e97f20af69c57f8d0be747b43b0f256f0e3ebf93ff6a2e9d336000846040516103ba93929190610cae565b60405180910390a15050565b60007f60562cb4a229434a45fcf3e7a3bb6f36d02f438ca2c278c263eed75d9cd97ae3843360016040516103fc9392919061133b565b60405180910390a163150b7a0260e01b9050949350505050565b60007f5a1cdaf607d40dbc9318857d913e9b9d5b0830dd97bd1df585b7581771ba34b7336040516104479190611198565b60405180910390a161048161045b84610a49565b8360405160200161046d92919061142b565b604051602081830303815290604052610ba9565b905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050e906114c5565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059c90611557565b60405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f8c09cf329d70df8f86c83bc018151b658238d6c0a0a930ae91ff6dc6c326e5083382604051610616929190611577565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a690611612565b60405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016106ea9190611198565b602060405180830381865afa158015610707573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072b9190611647565b905080831115610770576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610767906112a2565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83856040518363ffffffff1660e01b81526004016107ab9291906116c9565b6020604051808303816000875af11580156107ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ee919061172a565b507f09e1cb3a96c05a79e97f20af69c57f8d0be747b43b0f256f0e3ebf93ff6a2e9d33858560405161082293929190610cae565b60405180910390a150505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b590611612565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161090e919061102e565b602060405180830381865afa15801561092b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094f919061176c565b73ffffffffffffffffffffffffffffffffffffffff161461096f57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166342842e0e3083856040518463ffffffff1660e01b81526004016109ac93929190611799565b600060405180830381600087803b1580156109c657600080fd5b505af11580156109da573d6000803e3d6000fd5b505050507f09e1cb3a96c05a79e97f20af69c57f8d0be747b43b0f256f0e3ebf93ff6a2e9d33846001604051610a129392919061133b565b60405180910390a1505050565b60015481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060008203610a90576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050610ba4565b600082905060005b60008214610ac2578080610aab906117d0565b915050600a82610abb9190611847565b9150610a98565b60008167ffffffffffffffff811115610ade57610add610dea565b5b6040519080825280601f01601f191660200182016040528015610b105781602001600182028036833780820191505090505b5090505b60008514610b9d57600182610b2991906112c2565b9150600a85610b389190611878565b6030610b449190610c2a565b60f81b818381518110610b5a57610b596118a9565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85610b969190611847565b9450610b14565b8093505050505b919050565b600069d3c21bcecceda100000082604051602001610bc791906118d8565b6040516020818303038152906040528051906020012060001c610bea9190611878565b9050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610c3582610bf1565b9150610c4083610bf1565b9250828201905080821115610c5857610c57610bfb565b5b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c8982610c5e565b9050919050565b610c9981610c7e565b82525050565b610ca881610bf1565b82525050565b6000606082019050610cc36000830186610c90565b610cd06020830185610c90565b610cdd6040830184610c9f565b949350505050565b6000604051905090565b600080fd5b600080fd5b610d0281610bf1565b8114610d0d57600080fd5b50565b600081359050610d1f81610cf9565b92915050565b6000610d3082610c5e565b9050919050565b610d4081610d25565b8114610d4b57600080fd5b50565b600081359050610d5d81610d37565b92915050565b60008060408385031215610d7a57610d79610cef565b5b6000610d8885828601610d10565b9250506020610d9985828601610d4e565b9150509250929050565b610dac81610c7e565b8114610db757600080fd5b50565b600081359050610dc981610da3565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610e2282610dd9565b810181811067ffffffffffffffff82111715610e4157610e40610dea565b5b80604052505050565b6000610e54610ce5565b9050610e608282610e19565b919050565b600067ffffffffffffffff821115610e8057610e7f610dea565b5b610e8982610dd9565b9050602081019050919050565b82818337600083830152505050565b6000610eb8610eb384610e65565b610e4a565b905082815260208101848484011115610ed457610ed3610dd4565b5b610edf848285610e96565b509392505050565b600082601f830112610efc57610efb610dcf565b5b8135610f0c848260208601610ea5565b91505092915050565b60008060008060808587031215610f2f57610f2e610cef565b5b6000610f3d87828801610dba565b9450506020610f4e87828801610dba565b9350506040610f5f87828801610d10565b925050606085013567ffffffffffffffff811115610f8057610f7f610cf4565b5b610f8c87828801610ee7565b91505092959194509250565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610fcd81610f98565b82525050565b6000602082019050610fe86000830184610fc4565b92915050565b6000806040838503121561100557611004610cef565b5b600061101385828601610d10565b925050602061102485828601610dba565b9150509250929050565b60006020820190506110436000830184610c9f565b92915050565b60006020828403121561105f5761105e610cef565b5b600061106d84828501610dba565b91505092915050565b600061108182610c7e565b9050919050565b61109181611076565b811461109c57600080fd5b50565b6000813590506110ae81611088565b92915050565b6000806000606084860312156110cd576110cc610cef565b5b60006110db8682870161109f565b93505060206110ec86828701610d10565b92505060406110fd86828701610d4e565b9150509250925092565b600061111282610c7e565b9050919050565b61112281611107565b811461112d57600080fd5b50565b60008135905061113f81611119565b92915050565b60008060006060848603121561115e5761115d610cef565b5b600061116c86828701611130565b935050602061117d86828701610d10565b925050604061118e86828701610d4e565b9150509250925092565b60006020820190506111ad6000830184610c90565b92915050565b600082825260208201905092915050565b7f4f6e6c792074686520747275737465652063616e20776974686472617720667560008201527f6e64730000000000000000000000000000000000000000000000000000000000602082015250565b60006112206023836111b3565b915061122b826111c4565b604082019050919050565b6000602082019050818103600083015261124f81611213565b9050919050565b7f496e73756666696369656e742066756e64730000000000000000000000000000600082015250565b600061128c6012836111b3565b915061129782611256565b602082019050919050565b600060208201905081810360008301526112bb8161127f565b9050919050565b60006112cd82610bf1565b91506112d883610bf1565b92508282039050818111156112f0576112ef610bfb565b5b92915050565b6000819050919050565b6000819050919050565b600061132561132061131b846112f6565b611300565b610bf1565b9050919050565b6113358161130a565b82525050565b60006060820190506113506000830186610c90565b61135d6020830185610c90565b61136a604083018461132c565b949350505050565b600081519050919050565b600081905092915050565b60005b838110156113a657808201518184015260208101905061138b565b60008484015250505050565b60006113bd82611372565b6113c7818561137d565b93506113d7818560208601611388565b80840191505092915050565b60008160601b9050919050565b60006113fb826113e3565b9050919050565b600061140d826113f0565b9050919050565b61142561142082610c7e565b611402565b82525050565b600061143782856113b2565b91506114438284611414565b6014820191508190509392505050565b7f4f6e6c792074686520747275737465652063616e206368616e6765207468652060008201527f7472757374656500000000000000000000000000000000000000000000000000602082015250565b60006114af6027836111b3565b91506114ba82611453565b604082019050919050565b600060208201905081810360008301526114de816114a2565b9050919050565b7f4e65772074727573746565206d75737420626520646966666572656e7420667260008201527f6f6d2063757272656e7420747275737465650000000000000000000000000000602082015250565b60006115416032836111b3565b915061154c826114e5565b604082019050919050565b6000602082019050818103600083015261157081611534565b9050919050565b600060408201905061158c6000830185610c90565b6115996020830184610c90565b9392505050565b7f4f6e6c792074686520747275737465652063616e20776974686472617720746f60008201527f6b656e7300000000000000000000000000000000000000000000000000000000602082015250565b60006115fc6024836111b3565b9150611607826115a0565b604082019050919050565b6000602082019050818103600083015261162b816115ef565b9050919050565b60008151905061164181610cf9565b92915050565b60006020828403121561165d5761165c610cef565b5b600061166b84828501611632565b91505092915050565b600061168f61168a61168584610c5e565b611300565b610c5e565b9050919050565b60006116a182611674565b9050919050565b60006116b382611696565b9050919050565b6116c3816116a8565b82525050565b60006040820190506116de60008301856116ba565b6116eb6020830184610c9f565b9392505050565b60008115159050919050565b611707816116f2565b811461171257600080fd5b50565b600081519050611724816116fe565b92915050565b6000602082840312156117405761173f610cef565b5b600061174e84828501611715565b91505092915050565b60008151905061176681610da3565b92915050565b60006020828403121561178257611781610cef565b5b600061179084828501611757565b91505092915050565b60006060820190506117ae6000830186610c90565b6117bb60208301856116ba565b6117c86040830184610c9f565b949350505050565b60006117db82610bf1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361180d5761180c610bfb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061185282610bf1565b915061185d83610bf1565b92508261186d5761186c611818565b5b828204905092915050565b600061188382610bf1565b915061188e83610bf1565b92508261189e5761189d611818565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006118e482846113b2565b91508190509291505056fea26469706673582212206c684b63ee61490c0c78b18ea5fea515786458655bcf90348eadd4e3e09dd27b64736f6c63430008110033000000000000000000000000f23010f47da99304e106f91f691817a3d216b6f6

Deployed Bytecode

0x60806040526004361061007e5760003560e01c80635fc3ea0b1161004e5780635fc3ea0b146101ab5780637b9f76b5146101d4578063b69ef8a8146101fd578063fdf97cb214610228576100da565b8062f714ce146100df578063150b7a0214610108578063299a67fd14610145578063324716d614610182576100da565b366100da5734600160008282546100959190610c2a565b925050819055507f60562cb4a229434a45fcf3e7a3bb6f36d02f438ca2c278c263eed75d9cd97ae3336000346040516100d093929190610cae565b60405180910390a1005b600080fd5b3480156100eb57600080fd5b5061010660048036038101906101019190610d63565b610253565b005b34801561011457600080fd5b5061012f600480360381019061012a9190610f15565b6103c6565b60405161013c9190610fd3565b60405180910390f35b34801561015157600080fd5b5061016c60048036038101906101679190610fee565b610416565b604051610179919061102e565b60405180910390f35b34801561018e57600080fd5b506101a960048036038101906101a49190611049565b610489565b005b3480156101b757600080fd5b506101d260048036038101906101cd91906110b4565b610621565b005b3480156101e057600080fd5b506101fb60048036038101906101f69190611145565b610830565b005b34801561020957600080fd5b50610212610a1f565b60405161021f919061102e565b60405180910390f35b34801561023457600080fd5b5061023d610a25565b60405161024a9190611198565b60405180910390f35b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d890611236565b60405180910390fd5b600154821115610326576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161031d906112a2565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505015801561036c573d6000803e3d6000fd5b50816001600082825461037f91906112c2565b925050819055507f09e1cb3a96c05a79e97f20af69c57f8d0be747b43b0f256f0e3ebf93ff6a2e9d336000846040516103ba93929190610cae565b60405180910390a15050565b60007f60562cb4a229434a45fcf3e7a3bb6f36d02f438ca2c278c263eed75d9cd97ae3843360016040516103fc9392919061133b565b60405180910390a163150b7a0260e01b9050949350505050565b60007f5a1cdaf607d40dbc9318857d913e9b9d5b0830dd97bd1df585b7581771ba34b7336040516104479190611198565b60405180910390a161048161045b84610a49565b8360405160200161046d92919061142b565b604051602081830303815290604052610ba9565b905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050e906114c5565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036105a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059c90611557565b60405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f8c09cf329d70df8f86c83bc018151b658238d6c0a0a930ae91ff6dc6c326e5083382604051610616929190611577565b60405180910390a150565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146106af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a690611612565b60405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016106ea9190611198565b602060405180830381865afa158015610707573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072b9190611647565b905080831115610770576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610767906112a2565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83856040518363ffffffff1660e01b81526004016107ab9291906116c9565b6020604051808303816000875af11580156107ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ee919061172a565b507f09e1cb3a96c05a79e97f20af69c57f8d0be747b43b0f256f0e3ebf93ff6a2e9d33858560405161082293929190610cae565b60405180910390a150505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b590611612565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161090e919061102e565b602060405180830381865afa15801561092b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094f919061176c565b73ffffffffffffffffffffffffffffffffffffffff161461096f57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff166342842e0e3083856040518463ffffffff1660e01b81526004016109ac93929190611799565b600060405180830381600087803b1580156109c657600080fd5b505af11580156109da573d6000803e3d6000fd5b505050507f09e1cb3a96c05a79e97f20af69c57f8d0be747b43b0f256f0e3ebf93ff6a2e9d33846001604051610a129392919061133b565b60405180910390a1505050565b60015481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060008203610a90576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050610ba4565b600082905060005b60008214610ac2578080610aab906117d0565b915050600a82610abb9190611847565b9150610a98565b60008167ffffffffffffffff811115610ade57610add610dea565b5b6040519080825280601f01601f191660200182016040528015610b105781602001600182028036833780820191505090505b5090505b60008514610b9d57600182610b2991906112c2565b9150600a85610b389190611878565b6030610b449190610c2a565b60f81b818381518110610b5a57610b596118a9565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85610b969190611847565b9450610b14565b8093505050505b919050565b600069d3c21bcecceda100000082604051602001610bc791906118d8565b6040516020818303038152906040528051906020012060001c610bea9190611878565b9050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610c3582610bf1565b9150610c4083610bf1565b9250828201905080821115610c5857610c57610bfb565b5b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610c8982610c5e565b9050919050565b610c9981610c7e565b82525050565b610ca881610bf1565b82525050565b6000606082019050610cc36000830186610c90565b610cd06020830185610c90565b610cdd6040830184610c9f565b949350505050565b6000604051905090565b600080fd5b600080fd5b610d0281610bf1565b8114610d0d57600080fd5b50565b600081359050610d1f81610cf9565b92915050565b6000610d3082610c5e565b9050919050565b610d4081610d25565b8114610d4b57600080fd5b50565b600081359050610d5d81610d37565b92915050565b60008060408385031215610d7a57610d79610cef565b5b6000610d8885828601610d10565b9250506020610d9985828601610d4e565b9150509250929050565b610dac81610c7e565b8114610db757600080fd5b50565b600081359050610dc981610da3565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610e2282610dd9565b810181811067ffffffffffffffff82111715610e4157610e40610dea565b5b80604052505050565b6000610e54610ce5565b9050610e608282610e19565b919050565b600067ffffffffffffffff821115610e8057610e7f610dea565b5b610e8982610dd9565b9050602081019050919050565b82818337600083830152505050565b6000610eb8610eb384610e65565b610e4a565b905082815260208101848484011115610ed457610ed3610dd4565b5b610edf848285610e96565b509392505050565b600082601f830112610efc57610efb610dcf565b5b8135610f0c848260208601610ea5565b91505092915050565b60008060008060808587031215610f2f57610f2e610cef565b5b6000610f3d87828801610dba565b9450506020610f4e87828801610dba565b9350506040610f5f87828801610d10565b925050606085013567ffffffffffffffff811115610f8057610f7f610cf4565b5b610f8c87828801610ee7565b91505092959194509250565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b610fcd81610f98565b82525050565b6000602082019050610fe86000830184610fc4565b92915050565b6000806040838503121561100557611004610cef565b5b600061101385828601610d10565b925050602061102485828601610dba565b9150509250929050565b60006020820190506110436000830184610c9f565b92915050565b60006020828403121561105f5761105e610cef565b5b600061106d84828501610dba565b91505092915050565b600061108182610c7e565b9050919050565b61109181611076565b811461109c57600080fd5b50565b6000813590506110ae81611088565b92915050565b6000806000606084860312156110cd576110cc610cef565b5b60006110db8682870161109f565b93505060206110ec86828701610d10565b92505060406110fd86828701610d4e565b9150509250925092565b600061111282610c7e565b9050919050565b61112281611107565b811461112d57600080fd5b50565b60008135905061113f81611119565b92915050565b60008060006060848603121561115e5761115d610cef565b5b600061116c86828701611130565b935050602061117d86828701610d10565b925050604061118e86828701610d4e565b9150509250925092565b60006020820190506111ad6000830184610c90565b92915050565b600082825260208201905092915050565b7f4f6e6c792074686520747275737465652063616e20776974686472617720667560008201527f6e64730000000000000000000000000000000000000000000000000000000000602082015250565b60006112206023836111b3565b915061122b826111c4565b604082019050919050565b6000602082019050818103600083015261124f81611213565b9050919050565b7f496e73756666696369656e742066756e64730000000000000000000000000000600082015250565b600061128c6012836111b3565b915061129782611256565b602082019050919050565b600060208201905081810360008301526112bb8161127f565b9050919050565b60006112cd82610bf1565b91506112d883610bf1565b92508282039050818111156112f0576112ef610bfb565b5b92915050565b6000819050919050565b6000819050919050565b600061132561132061131b846112f6565b611300565b610bf1565b9050919050565b6113358161130a565b82525050565b60006060820190506113506000830186610c90565b61135d6020830185610c90565b61136a604083018461132c565b949350505050565b600081519050919050565b600081905092915050565b60005b838110156113a657808201518184015260208101905061138b565b60008484015250505050565b60006113bd82611372565b6113c7818561137d565b93506113d7818560208601611388565b80840191505092915050565b60008160601b9050919050565b60006113fb826113e3565b9050919050565b600061140d826113f0565b9050919050565b61142561142082610c7e565b611402565b82525050565b600061143782856113b2565b91506114438284611414565b6014820191508190509392505050565b7f4f6e6c792074686520747275737465652063616e206368616e6765207468652060008201527f7472757374656500000000000000000000000000000000000000000000000000602082015250565b60006114af6027836111b3565b91506114ba82611453565b604082019050919050565b600060208201905081810360008301526114de816114a2565b9050919050565b7f4e65772074727573746565206d75737420626520646966666572656e7420667260008201527f6f6d2063757272656e7420747275737465650000000000000000000000000000602082015250565b60006115416032836111b3565b915061154c826114e5565b604082019050919050565b6000602082019050818103600083015261157081611534565b9050919050565b600060408201905061158c6000830185610c90565b6115996020830184610c90565b9392505050565b7f4f6e6c792074686520747275737465652063616e20776974686472617720746f60008201527f6b656e7300000000000000000000000000000000000000000000000000000000602082015250565b60006115fc6024836111b3565b9150611607826115a0565b604082019050919050565b6000602082019050818103600083015261162b816115ef565b9050919050565b60008151905061164181610cf9565b92915050565b60006020828403121561165d5761165c610cef565b5b600061166b84828501611632565b91505092915050565b600061168f61168a61168584610c5e565b611300565b610c5e565b9050919050565b60006116a182611674565b9050919050565b60006116b382611696565b9050919050565b6116c3816116a8565b82525050565b60006040820190506116de60008301856116ba565b6116eb6020830184610c9f565b9392505050565b60008115159050919050565b611707816116f2565b811461171257600080fd5b50565b600081519050611724816116fe565b92915050565b6000602082840312156117405761173f610cef565b5b600061174e84828501611715565b91505092915050565b60008151905061176681610da3565b92915050565b60006020828403121561178257611781610cef565b5b600061179084828501611757565b91505092915050565b60006060820190506117ae6000830186610c90565b6117bb60208301856116ba565b6117c86040830184610c9f565b949350505050565b60006117db82610bf1565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361180d5761180c610bfb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061185282610bf1565b915061185d83610bf1565b92508261186d5761186c611818565b5b828204905092915050565b600061188382610bf1565b915061188e83610bf1565b92508261189e5761189d611818565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006118e482846113b2565b91508190509291505056fea26469706673582212206c684b63ee61490c0c78b18ea5fea515786458655bcf90348eadd4e3e09dd27b64736f6c63430008110033

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

000000000000000000000000f23010f47da99304e106f91f691817a3d216b6f6

-----Decoded View---------------
Arg [0] : trusteeWallet (address): 0xF23010f47da99304E106F91F691817a3d216b6f6

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f23010f47da99304e106f91f691817a3d216b6f6


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.