Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- RofilsFloor
- Optimization enabled
- false
- Compiler version
- v0.8.21+commit.d9974bed
- EVM Version
- default
- Verified at
- 2023-10-20T09:25:32.731985Z
Constructor Arguments
0x0000000000000000000000007a20189b297343cf26d8548764b04891f37f3414
Arg [0] (address) : 0x7a20189b297343cf26d8548764b04891f37f3414
Contract source code
// File: @openzeppelin/contracts/utils/Address.sol
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.19;
/**
* @dev Collection of functions related to the address type
*/
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.0/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, 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 functionCallWithValue(target, data, 0, defaultRevert);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with a
* `customRevert` function as a fallback when `target` reverts.
*
* Requirements:
*
* - `customRevert` must be a reverting function.
*
* _Available since v5.0._
*/
function functionCall(
address target,
bytes memory data,
function() internal view customRevert
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, customRevert);
}
/**
* @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, defaultRevert);
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with a `customRevert` function as a fallback revert reason when `target` reverts.
*
* Requirements:
*
* - `customRevert` must be a reverting function.
*
* _Available since v5.0._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
function() internal view customRevert
) 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, customRevert);
}
/**
* @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, defaultRevert);
}
/**
* @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,
function() internal view customRevert
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, customRevert);
}
/**
* @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, defaultRevert);
}
/**
* @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,
function() internal view customRevert
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, customRevert);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided `customRevert`) in case of unsuccessful call or if target was not a contract.
*
* _Available since v5.0._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
function() internal view customRevert
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// 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 (target.code.length == 0) {
revert AddressEmptyCode(target);
}
}
return returndata;
} else {
_revert(returndata, customRevert);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or with a default revert error.
*
* _Available since v5.0._
*/
function verifyCallResult(bool success, bytes memory returndata) internal view returns (bytes memory) {
return verifyCallResult(success, returndata, defaultRevert);
}
/**
* @dev Same as {xref-Address-verifyCallResult-bool-bytes-}[`verifyCallResult`], but with a
* `customRevert` function as a fallback when `success` is `false`.
*
* Requirements:
*
* - `customRevert` must be a reverting function.
*
* _Available since v5.0._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
function() internal view customRevert
) internal view returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, customRevert);
}
}
/**
* @dev Default reverting function when no `customRevert` is provided in a function call.
*/
function defaultRevert() internal pure {
revert FailedInnerCall();
}
function _revert(bytes memory returndata, function() internal view customRevert) private view {
// 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 {
customRevert();
revert FailedInnerCall();
}
}
}
// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.20;
/**
* @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.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
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);
}
// File: @openzeppelin/contracts/utils/Context.sol
// 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: @openzeppelin/contracts/access/Ownable.sol
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_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. 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 {
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: @openzeppelin/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v4.9.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: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
/**
* @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;
/**
* @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;
}
}
// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
// File: @openzeppelin/contracts/token/ERC20/ERC20.sol
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
// File: RofilsFloor.sol
pragma solidity ^0.8.0;
contract RofilsFloor is ERC20 {
using SafeERC20 for IERC20;
uint256 public constant TOTAL_SUPPLY = 3694143694143694 * 10**18;
address public feeToken = 0x23BBFFfDfA200a237AbE9e2dCf7F81AD0be08457;
address public Dad;
uint256 public constant FEE = 1;
constructor(address _address) ERC20("Rofils Floor", "RF") {
_mint(msg.sender, TOTAL_SUPPLY);
Dad = _address; //specify who Dad is;
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
// Ensure the sender has enough balance
require(balanceOf(msg.sender) >= amount, "Insufficient balance");
// Transfer the fee to this contract
IERC20(feeToken).safeTransferFrom((0xd55e47ee94A2ca96761b0A5aac374d2cD3aDAc90), address(Dad), FEE);
// Perform the main token transfer
super.transfer(recipient, amount);
return true;
}
function setDad(address newDad) external {
Dad = newDad;
}
}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_address","internalType":"address"}]},{"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":"SafeERC20FailedOperation","inputs":[{"type":"address","name":"token","internalType":"address"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"Dad","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"FEE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TOTAL_SUPPLY","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"feeToken","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDad","inputs":[{"type":"address","name":"newDad","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]}]
Contract Creation Code
0x60806040527323bbfffdfa200a237abe9e2dcf7f81ad0be0845760055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555034801562000064575f80fd5b506040516200209c3803806200209c83398181016040528101906200008a919062000357565b6040518060400160405280600c81526020017f526f66696c7320466c6f6f7200000000000000000000000000000000000000008152506040518060400160405280600281526020017f52460000000000000000000000000000000000000000000000000000000000008152508160039081620001079190620005eb565b508060049081620001199190620005eb565b5050506200013c336db622a60bc7dafe2f94eeb27800006200018360201b60201c565b8060065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620007e0565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620001f4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001eb906200072d565b60405180910390fd5b620002075f8383620002e860201b60201c565b8060025f8282546200021a91906200077a565b92505081905550805f808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620002c99190620007c5565b60405180910390a3620002e45f8383620002ed60201b60201c565b5050565b505050565b505050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6200032182620002f6565b9050919050565b620003338162000315565b81146200033e575f80fd5b50565b5f81519050620003518162000328565b92915050565b5f602082840312156200036f576200036e620002f2565b5b5f6200037e8482850162000341565b91505092915050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806200040357607f821691505b602082108103620004195762000418620003be565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200047d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000440565b62000489868362000440565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620004d3620004cd620004c784620004a1565b620004aa565b620004a1565b9050919050565b5f819050919050565b620004ee83620004b3565b62000506620004fd82620004da565b8484546200044c565b825550505050565b5f90565b6200051c6200050e565b62000529818484620004e3565b505050565b5b818110156200055057620005445f8262000512565b6001810190506200052f565b5050565b601f8211156200059f5762000569816200041f565b620005748462000431565b8101602085101562000584578190505b6200059c620005938562000431565b8301826200052e565b50505b505050565b5f82821c905092915050565b5f620005c15f1984600802620005a4565b1980831691505092915050565b5f620005db8383620005b0565b9150826002028217905092915050565b620005f68262000387565b67ffffffffffffffff81111562000612576200061162000391565b5b6200061e8254620003eb565b6200062b82828562000554565b5f60209050601f83116001811462000661575f84156200064c578287015190505b620006588582620005ce565b865550620006c7565b601f19841662000671866200041f565b5f5b828110156200069a5784890151825560018201915060208501945060208101905062000673565b86831015620006ba5784890151620006b6601f891682620005b0565b8355505b6001600288020188555050505b505050505050565b5f82825260208201905092915050565b7f45524332303a206d696e7420746f20746865207a65726f2061646472657373005f82015250565b5f62000715601f83620006cf565b91506200072282620006df565b602082019050919050565b5f6020820190508181035f830152620007468162000707565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6200078682620004a1565b91506200079383620004a1565b9250828201905080821115620007ae57620007ad6200074d565b5b92915050565b620007bf81620004a1565b82525050565b5f602082019050620007da5f830184620007b4565b92915050565b6118ae80620007ee5f395ff3fe608060405234801561000f575f80fd5b50600436106100fe575f3560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb146102c2578063c57981b5146102f2578063dd62ed3e14610310578063f35c578614610340576100fe565b806370a0823114610226578063902d55a51461025657806395d89b4114610274578063a457c2d714610292576100fe565b8063313ce567116100d1578063313ce5671461019e57806339509351146101bc578063457cb82f146101ec578063647846a514610208576100fe565b806306fdde0314610102578063095ea7b31461012057806318160ddd1461015057806323b872dd1461016e575b5f80fd5b61010a61035e565b6040516101179190611054565b60405180910390f35b61013a60048036038101906101359190611105565b6103ee565b604051610147919061115d565b60405180910390f35b610158610410565b6040516101659190611185565b60405180910390f35b6101886004803603810190610183919061119e565b610419565b604051610195919061115d565b60405180910390f35b6101a6610447565b6040516101b39190611209565b60405180910390f35b6101d660048036038101906101d19190611105565b61044f565b6040516101e3919061115d565b60405180910390f35b61020660048036038101906102019190611222565b610485565b005b6102106104c8565b60405161021d919061125c565b60405180910390f35b610240600480360381019061023b9190611222565b6104ed565b60405161024d9190611185565b60405180910390f35b61025e610532565b60405161026b9190611185565b60405180910390f35b61027c610544565b6040516102899190611054565b60405180910390f35b6102ac60048036038101906102a79190611105565b6105d4565b6040516102b9919061115d565b60405180910390f35b6102dc60048036038101906102d79190611105565b610649565b6040516102e9919061115d565b60405180910390f35b6102fa61072e565b6040516103079190611185565b60405180910390f35b61032a60048036038101906103259190611275565b610733565b6040516103379190611185565b60405180910390f35b6103486107b5565b604051610355919061125c565b60405180910390f35b60606003805461036d906112e0565b80601f0160208091040260200160405190810160405280929190818152602001828054610399906112e0565b80156103e45780601f106103bb576101008083540402835291602001916103e4565b820191905f5260205f20905b8154815290600101906020018083116103c757829003601f168201915b5050505050905090565b5f806103f86107da565b90506104058185856107e1565b600191505092915050565b5f600254905090565b5f806104236107da565b90506104308582856109a4565b61043b858585610a2f565b60019150509392505050565b5f6012905090565b5f806104596107da565b905061047a81858561046b8589610733565b610475919061133d565b6107e1565b600191505092915050565b8060065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6db622a60bc7dafe2f94eeb278000081565b606060048054610553906112e0565b80601f016020809104026020016040519081016040528092919081815260200182805461057f906112e0565b80156105ca5780601f106105a1576101008083540402835291602001916105ca565b820191905f5260205f20905b8154815290600101906020018083116105ad57829003601f168201915b5050505050905090565b5f806105de6107da565b90505f6105eb8286610733565b905083811015610630576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610627906113e0565b60405180910390fd5b61063d82868684036107e1565b60019250505092915050565b5f81610654336104ed565b1015610695576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068c90611448565b60405180910390fd5b61071973d55e47ee94a2ca96761b0a5aac374d2cd3adac9060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c9b909392919063ffffffff16565b6107238383610d1d565b506001905092915050565b600181565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361084f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610846906114d6565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b490611564565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516109979190611185565b60405180910390a3505050565b5f6109af8484610733565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a295781811015610a1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a12906115cc565b60405180910390fd5b610a2884848484036107e1565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610a9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a949061165a565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b02906116e8565b60405180910390fd5b610b16838383610d3f565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610b99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9090611776565b60405180910390fd5b8181035f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550815f808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c829190611185565b60405180910390a3610c95848484610d44565b50505050565b610d17848573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401610cd093929190611794565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610d49565b50505050565b5f80610d276107da565b9050610d34818585610a2f565b600191505092915050565b505050565b505050565b5f610d73828473ffffffffffffffffffffffffffffffffffffffff16610dde90919063ffffffff16565b90505f815114158015610d97575080806020019051810190610d9591906117f3565b155b15610dd957826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401610dd0919061125c565b60405180910390fd5b505050565b6060610dee83835f610df6610e28565b905092915050565b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606082471015610e6f57306040517fcd786059000000000000000000000000000000000000000000000000000000008152600401610e66919061125c565b60405180910390fd5b5f808673ffffffffffffffffffffffffffffffffffffffff168587604051610e979190611862565b5f6040518083038185875af1925050503d805f8114610ed1576040519150601f19603f3d011682016040523d82523d5f602084013e610ed6565b606091505b5091509150610ee787838387610ef3565b92505050949350505050565b60608315610f67575f835103610f5f575f8573ffffffffffffffffffffffffffffffffffffffff163b03610f5e57846040517f9996b315000000000000000000000000000000000000000000000000000000008152600401610f55919061125c565b60405180910390fd5b5b829050610f72565b610f718383610f7a565b5b949350505050565b5f82511115610f8c5781518083602001fd5b610f988163ffffffff16565b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611001578082015181840152602081019050610fe6565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61102682610fca565b6110308185610fd4565b9350611040818560208601610fe4565b6110498161100c565b840191505092915050565b5f6020820190508181035f83015261106c818461101c565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6110a182611078565b9050919050565b6110b181611097565b81146110bb575f80fd5b50565b5f813590506110cc816110a8565b92915050565b5f819050919050565b6110e4816110d2565b81146110ee575f80fd5b50565b5f813590506110ff816110db565b92915050565b5f806040838503121561111b5761111a611074565b5b5f611128858286016110be565b9250506020611139858286016110f1565b9150509250929050565b5f8115159050919050565b61115781611143565b82525050565b5f6020820190506111705f83018461114e565b92915050565b61117f816110d2565b82525050565b5f6020820190506111985f830184611176565b92915050565b5f805f606084860312156111b5576111b4611074565b5b5f6111c2868287016110be565b93505060206111d3868287016110be565b92505060406111e4868287016110f1565b9150509250925092565b5f60ff82169050919050565b611203816111ee565b82525050565b5f60208201905061121c5f8301846111fa565b92915050565b5f6020828403121561123757611236611074565b5b5f611244848285016110be565b91505092915050565b61125681611097565b82525050565b5f60208201905061126f5f83018461124d565b92915050565b5f806040838503121561128b5761128a611074565b5b5f611298858286016110be565b92505060206112a9858286016110be565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806112f757607f821691505b60208210810361130a576113096112b3565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611347826110d2565b9150611352836110d2565b925082820190508082111561136a57611369611310565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f6113ca602583610fd4565b91506113d582611370565b604082019050919050565b5f6020820190508181035f8301526113f7816113be565b9050919050565b7f496e73756666696369656e742062616c616e63650000000000000000000000005f82015250565b5f611432601483610fd4565b915061143d826113fe565b602082019050919050565b5f6020820190508181035f83015261145f81611426565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f6114c0602483610fd4565b91506114cb82611466565b604082019050919050565b5f6020820190508181035f8301526114ed816114b4565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f61154e602283610fd4565b9150611559826114f4565b604082019050919050565b5f6020820190508181035f83015261157b81611542565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f6115b6601d83610fd4565b91506115c182611582565b602082019050919050565b5f6020820190508181035f8301526115e3816115aa565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f611644602583610fd4565b915061164f826115ea565b604082019050919050565b5f6020820190508181035f83015261167181611638565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f6116d2602383610fd4565b91506116dd82611678565b604082019050919050565b5f6020820190508181035f8301526116ff816116c6565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f611760602683610fd4565b915061176b82611706565b604082019050919050565b5f6020820190508181035f83015261178d81611754565b9050919050565b5f6060820190506117a75f83018661124d565b6117b4602083018561124d565b6117c16040830184611176565b949350505050565b6117d281611143565b81146117dc575f80fd5b50565b5f815190506117ed816117c9565b92915050565b5f6020828403121561180857611807611074565b5b5f611815848285016117df565b91505092915050565b5f81519050919050565b5f81905092915050565b5f61183c8261181e565b6118468185611828565b9350611856818560208601610fe4565b80840191505092915050565b5f61186d8284611832565b91508190509291505056fea2646970667358221220ccbcbb4bf81c88404d7ce07a1eac9c52c87e4a2074b01e7c0eab0cc48df1bd4d64736f6c634300081500330000000000000000000000007a20189b297343cf26d8548764b04891f37f3414
Deployed ByteCode
0x608060405234801561000f575f80fd5b50600436106100fe575f3560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb146102c2578063c57981b5146102f2578063dd62ed3e14610310578063f35c578614610340576100fe565b806370a0823114610226578063902d55a51461025657806395d89b4114610274578063a457c2d714610292576100fe565b8063313ce567116100d1578063313ce5671461019e57806339509351146101bc578063457cb82f146101ec578063647846a514610208576100fe565b806306fdde0314610102578063095ea7b31461012057806318160ddd1461015057806323b872dd1461016e575b5f80fd5b61010a61035e565b6040516101179190611054565b60405180910390f35b61013a60048036038101906101359190611105565b6103ee565b604051610147919061115d565b60405180910390f35b610158610410565b6040516101659190611185565b60405180910390f35b6101886004803603810190610183919061119e565b610419565b604051610195919061115d565b60405180910390f35b6101a6610447565b6040516101b39190611209565b60405180910390f35b6101d660048036038101906101d19190611105565b61044f565b6040516101e3919061115d565b60405180910390f35b61020660048036038101906102019190611222565b610485565b005b6102106104c8565b60405161021d919061125c565b60405180910390f35b610240600480360381019061023b9190611222565b6104ed565b60405161024d9190611185565b60405180910390f35b61025e610532565b60405161026b9190611185565b60405180910390f35b61027c610544565b6040516102899190611054565b60405180910390f35b6102ac60048036038101906102a79190611105565b6105d4565b6040516102b9919061115d565b60405180910390f35b6102dc60048036038101906102d79190611105565b610649565b6040516102e9919061115d565b60405180910390f35b6102fa61072e565b6040516103079190611185565b60405180910390f35b61032a60048036038101906103259190611275565b610733565b6040516103379190611185565b60405180910390f35b6103486107b5565b604051610355919061125c565b60405180910390f35b60606003805461036d906112e0565b80601f0160208091040260200160405190810160405280929190818152602001828054610399906112e0565b80156103e45780601f106103bb576101008083540402835291602001916103e4565b820191905f5260205f20905b8154815290600101906020018083116103c757829003601f168201915b5050505050905090565b5f806103f86107da565b90506104058185856107e1565b600191505092915050565b5f600254905090565b5f806104236107da565b90506104308582856109a4565b61043b858585610a2f565b60019150509392505050565b5f6012905090565b5f806104596107da565b905061047a81858561046b8589610733565b610475919061133d565b6107e1565b600191505092915050565b8060065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6db622a60bc7dafe2f94eeb278000081565b606060048054610553906112e0565b80601f016020809104026020016040519081016040528092919081815260200182805461057f906112e0565b80156105ca5780601f106105a1576101008083540402835291602001916105ca565b820191905f5260205f20905b8154815290600101906020018083116105ad57829003601f168201915b5050505050905090565b5f806105de6107da565b90505f6105eb8286610733565b905083811015610630576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610627906113e0565b60405180910390fd5b61063d82868684036107e1565b60019250505092915050565b5f81610654336104ed565b1015610695576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068c90611448565b60405180910390fd5b61071973d55e47ee94a2ca96761b0a5aac374d2cd3adac9060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c9b909392919063ffffffff16565b6107238383610d1d565b506001905092915050565b600181565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361084f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610846906114d6565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b490611564565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516109979190611185565b60405180910390a3505050565b5f6109af8484610733565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a295781811015610a1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a12906115cc565b60405180910390fd5b610a2884848484036107e1565b5b50505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610a9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a949061165a565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b02906116e8565b60405180910390fd5b610b16838383610d3f565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015610b99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9090611776565b60405180910390fd5b8181035f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550815f808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610c829190611185565b60405180910390a3610c95848484610d44565b50505050565b610d17848573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401610cd093929190611794565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610d49565b50505050565b5f80610d276107da565b9050610d34818585610a2f565b600191505092915050565b505050565b505050565b5f610d73828473ffffffffffffffffffffffffffffffffffffffff16610dde90919063ffffffff16565b90505f815114158015610d97575080806020019051810190610d9591906117f3565b155b15610dd957826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401610dd0919061125c565b60405180910390fd5b505050565b6060610dee83835f610df6610e28565b905092915050565b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606082471015610e6f57306040517fcd786059000000000000000000000000000000000000000000000000000000008152600401610e66919061125c565b60405180910390fd5b5f808673ffffffffffffffffffffffffffffffffffffffff168587604051610e979190611862565b5f6040518083038185875af1925050503d805f8114610ed1576040519150601f19603f3d011682016040523d82523d5f602084013e610ed6565b606091505b5091509150610ee787838387610ef3565b92505050949350505050565b60608315610f67575f835103610f5f575f8573ffffffffffffffffffffffffffffffffffffffff163b03610f5e57846040517f9996b315000000000000000000000000000000000000000000000000000000008152600401610f55919061125c565b60405180910390fd5b5b829050610f72565b610f718383610f7a565b5b949350505050565b5f82511115610f8c5781518083602001fd5b610f988163ffffffff16565b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611001578082015181840152602081019050610fe6565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61102682610fca565b6110308185610fd4565b9350611040818560208601610fe4565b6110498161100c565b840191505092915050565b5f6020820190508181035f83015261106c818461101c565b905092915050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6110a182611078565b9050919050565b6110b181611097565b81146110bb575f80fd5b50565b5f813590506110cc816110a8565b92915050565b5f819050919050565b6110e4816110d2565b81146110ee575f80fd5b50565b5f813590506110ff816110db565b92915050565b5f806040838503121561111b5761111a611074565b5b5f611128858286016110be565b9250506020611139858286016110f1565b9150509250929050565b5f8115159050919050565b61115781611143565b82525050565b5f6020820190506111705f83018461114e565b92915050565b61117f816110d2565b82525050565b5f6020820190506111985f830184611176565b92915050565b5f805f606084860312156111b5576111b4611074565b5b5f6111c2868287016110be565b93505060206111d3868287016110be565b92505060406111e4868287016110f1565b9150509250925092565b5f60ff82169050919050565b611203816111ee565b82525050565b5f60208201905061121c5f8301846111fa565b92915050565b5f6020828403121561123757611236611074565b5b5f611244848285016110be565b91505092915050565b61125681611097565b82525050565b5f60208201905061126f5f83018461124d565b92915050565b5f806040838503121561128b5761128a611074565b5b5f611298858286016110be565b92505060206112a9858286016110be565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806112f757607f821691505b60208210810361130a576113096112b3565b5b50919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611347826110d2565b9150611352836110d2565b925082820190508082111561136a57611369611310565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f6113ca602583610fd4565b91506113d582611370565b604082019050919050565b5f6020820190508181035f8301526113f7816113be565b9050919050565b7f496e73756666696369656e742062616c616e63650000000000000000000000005f82015250565b5f611432601483610fd4565b915061143d826113fe565b602082019050919050565b5f6020820190508181035f83015261145f81611426565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f6114c0602483610fd4565b91506114cb82611466565b604082019050919050565b5f6020820190508181035f8301526114ed816114b4565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f61154e602283610fd4565b9150611559826114f4565b604082019050919050565b5f6020820190508181035f83015261157b81611542565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000005f82015250565b5f6115b6601d83610fd4565b91506115c182611582565b602082019050919050565b5f6020820190508181035f8301526115e3816115aa565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f611644602583610fd4565b915061164f826115ea565b604082019050919050565b5f6020820190508181035f83015261167181611638565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f6116d2602383610fd4565b91506116dd82611678565b604082019050919050565b5f6020820190508181035f8301526116ff816116c6565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f611760602683610fd4565b915061176b82611706565b604082019050919050565b5f6020820190508181035f83015261178d81611754565b9050919050565b5f6060820190506117a75f83018661124d565b6117b4602083018561124d565b6117c16040830184611176565b949350505050565b6117d281611143565b81146117dc575f80fd5b50565b5f815190506117ed816117c9565b92915050565b5f6020828403121561180857611807611074565b5b5f611815848285016117df565b91505092915050565b5f81519050919050565b5f81905092915050565b5f61183c8261181e565b6118468185611828565b9350611856818560208601610fe4565b80840191505092915050565b5f61186d8284611832565b91508190509291505056fea2646970667358221220ccbcbb4bf81c88404d7ce07a1eac9c52c87e4a2074b01e7c0eab0cc48df1bd4d64736f6c63430008150033