Multichain Info
Latest 25 from a total of 61,203 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Emergency Withdr... | 32680776 | 3 days ago | IN | 0 APE | 0.00530926 | ||||
| Emergency Withdr... | 32680775 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680773 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680772 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680771 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680770 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680768 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680764 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680763 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680762 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680760 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680758 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680756 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680754 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680752 | 3 days ago | IN | 0 APE | 0.00753611 | ||||
| Emergency Withdr... | 32680746 | 3 days ago | IN | 0 APE | 0.00530926 | ||||
| Emergency Withdr... | 32680742 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680741 | 3 days ago | IN | 0 APE | 0.00579734 | ||||
| Emergency Withdr... | 32680739 | 3 days ago | IN | 0 APE | 0.00753611 | ||||
| Emergency Withdr... | 32680736 | 3 days ago | IN | 0 APE | 0.00704803 | ||||
| Emergency Withdr... | 32680735 | 3 days ago | IN | 0 APE | 0.00578096 | ||||
| Emergency Withdr... | 32680734 | 3 days ago | IN | 0 APE | 0.00626904 | ||||
| Emergency Withdr... | 32680733 | 3 days ago | IN | 0 APE | 0.00800782 | ||||
| Emergency Withdr... | 32680732 | 3 days ago | IN | 0 APE | 0.00377365 | ||||
| Spin | 32002031 | 21 days ago | IN | 0 APE | 0.01254948 |
View more zero value Internal Transactions in Advanced View mode
Cross-Chain Transactions
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
contract ZardsPrizeWheel is AccessControl, ReentrancyGuard {
using ECDSA for bytes32;
bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");
IERC20 public spinToken;
uint256 public spinPrice;
address public priceSigner;
uint256 public priceBufferTime = 2 minutes;
event SpinExecuted(
address indexed user,
string spinId,
uint256 price,
uint256 priceTime
);
event GiftSent(
address indexed user,
string spinId,
address gift,
uint256 tokenId,
bool isERC721
);
event PriceSignerUpdated(address indexed oldSigner, address indexed newSigner);
event PriceBufferTimeUpdated(uint256 oldTime, uint256 newTime);
struct Gift {
address contractAddress;
uint256 tokenId;
bool isERC721;
}
mapping(string => bool) public usedSpinIds;
mapping(string => address) public spinIdToUser;
error InvalidSignature();
error PriceExpired();
error SpinIdUsed();
error InvalidSpinId();
error TransferFailed();
error InvalidSigner();
error InvalidBufferTime();
constructor(
address _spinToken,
uint256 _spinPrice,
address _priceSigner
) {
if (_priceSigner == address(0)) revert InvalidSigner();
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(OPERATOR_ROLE, msg.sender);
_grantRole(DEFAULT_ADMIN_ROLE, 0xEAC0beFf1a4bF3Fc36FC8c03d838DAD009cC60d9);
_grantRole(OPERATOR_ROLE, 0xEAC0beFf1a4bF3Fc36FC8c03d838DAD009cC60d9);
spinToken = IERC20(_spinToken);
spinPrice = _spinPrice;
priceSigner = _priceSigner;
}
function setSpinToken(address _newToken) external onlyRole(DEFAULT_ADMIN_ROLE) {
spinToken = IERC20(_newToken);
}
function setSpinPrice(uint256 _newPrice) external onlyRole(DEFAULT_ADMIN_ROLE) {
spinPrice = _newPrice;
}
function setPriceSigner(address _newSigner) external onlyRole(DEFAULT_ADMIN_ROLE) {
if (_newSigner == address(0)) revert InvalidSigner();
address oldSigner = priceSigner;
priceSigner = _newSigner;
emit PriceSignerUpdated(oldSigner, _newSigner);
}
function setPriceBufferTime(uint256 _newTime) external onlyRole(DEFAULT_ADMIN_ROLE) {
if (_newTime == 0) revert InvalidBufferTime();
uint256 oldTime = priceBufferTime;
priceBufferTime = _newTime;
emit PriceBufferTimeUpdated(oldTime, _newTime);
}
function addOperator(address operator) external onlyRole(DEFAULT_ADMIN_ROLE) {
grantRole(OPERATOR_ROLE, operator);
}
function removeOperator(address operator) external onlyRole(DEFAULT_ADMIN_ROLE) {
revokeRole(OPERATOR_ROLE, operator);
}
function _verifySpinSignature(
string calldata spinId,
uint256 price,
uint256 priceTime,
bytes calldata signature
) private view {
if (block.timestamp > priceTime + priceBufferTime) revert PriceExpired();
bytes32 messageHash = keccak256(
abi.encodePacked(spinId, price, priceTime)
);
bytes32 ethSignedMessageHash = keccak256(
abi.encodePacked("\x19Ethereum Signed Message:\n32", messageHash)
);
address signer = ethSignedMessageHash.recover(signature);
if (signer != priceSigner) revert InvalidSignature();
}
function spin(
string calldata spinId,
uint256 price,
uint256 priceTime,
bytes calldata signature
) external nonReentrant {
if (usedSpinIds[spinId]) revert SpinIdUsed();
_verifySpinSignature(spinId, price, priceTime, signature);
if (!spinToken.transferFrom(msg.sender, address(this), price)) {
revert TransferFailed();
}
usedSpinIds[spinId] = true;
spinIdToUser[spinId] = msg.sender;
emit SpinExecuted(msg.sender, spinId, price, priceTime);
}
function sendGift(
string calldata spinId,
address giftAddress,
uint256 tokenId,
bool isERC721,
bytes calldata signature
) external onlyRole(OPERATOR_ROLE) nonReentrant {
if (!usedSpinIds[spinId]) revert InvalidSpinId();
address user = spinIdToUser[spinId];
bytes32 messageHash = keccak256(
abi.encodePacked(spinId, giftAddress, tokenId, isERC721)
);
bytes32 ethSignedMessageHash = keccak256(
abi.encodePacked("\x19Ethereum Signed Message:\n32", messageHash)
);
address signer = ethSignedMessageHash.recover(signature);
if (!hasRole(DEFAULT_ADMIN_ROLE, signer)) revert InvalidSignature();
if (isERC721) {
IERC721(giftAddress).transferFrom(address(this), user, tokenId);
} else {
if (!IERC20(giftAddress).transfer(user, tokenId)) {
revert TransferFailed();
}
}
emit GiftSent(user, spinId, giftAddress, tokenId, isERC721);
}
function emergencyWithdraw(
address token,
uint256 amount,
bool isERC721
) external onlyRole(DEFAULT_ADMIN_ROLE) {
if (isERC721) {
IERC721(token).transferFrom(address(this), msg.sender, amount);
} else {
if (!IERC20(token).transfer(msg.sender, amount)) {
revert TransferFailed();
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `_msgSender()` is missing `role`.
* Overriding this function changes the behavior of the {onlyRole} modifier.
*
* Format of the revert message is described in {_checkRole}.
*
* _Available since v4.6._
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(account),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* May emit a {RoleGranted} event.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// 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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the 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);
}// 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;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.0;
import "../Strings.sol";
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV // Deprecated in v4.8
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// 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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1);
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator,
Rounding rounding
) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10**64) {
value /= 10**64;
result += 64;
}
if (value >= 10**32) {
value /= 10**32;
result += 32;
}
if (value >= 10**16) {
value /= 10**16;
result += 16;
}
if (value >= 10**8) {
value /= 10**8;
result += 8;
}
if (value >= 10**4) {
value /= 10**4;
result += 4;
}
if (value >= 10**2) {
value /= 10**2;
result += 2;
}
if (value >= 10**1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _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) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @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] = _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);
}
}{
"evmVersion": "paris",
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_spinToken","type":"address"},{"internalType":"uint256","name":"_spinPrice","type":"uint256"},{"internalType":"address","name":"_priceSigner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidBufferTime","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[],"name":"InvalidSpinId","type":"error"},{"inputs":[],"name":"PriceExpired","type":"error"},{"inputs":[],"name":"SpinIdUsed","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"string","name":"spinId","type":"string"},{"indexed":false,"internalType":"address","name":"gift","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isERC721","type":"bool"}],"name":"GiftSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTime","type":"uint256"}],"name":"PriceBufferTimeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldSigner","type":"address"},{"indexed":true,"internalType":"address","name":"newSigner","type":"address"}],"name":"PriceSignerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"string","name":"spinId","type":"string"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"priceTime","type":"uint256"}],"name":"SpinExecuted","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"addOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"isERC721","type":"bool"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceBufferTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"removeOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"spinId","type":"string"},{"internalType":"address","name":"giftAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"isERC721","type":"bool"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"sendGift","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTime","type":"uint256"}],"name":"setPriceBufferTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newSigner","type":"address"}],"name":"setPriceSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setSpinPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newToken","type":"address"}],"name":"setSpinToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"spinId","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"priceTime","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"spin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"spinIdToUser","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"spinPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"spinToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"usedSpinIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
6080604052607860055534801561001557600080fd5b5060405161302c38038061302c833981810160405281019061003791906103da565b60018081905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036100a4576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100b76000801b336101e360201b60201c565b6100e77f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929336101e360201b60201c565b61010e6000801b73eac0beff1a4bf3fc36fc8c03d838dad009cc60d96101e360201b60201c565b6101527f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92973eac0beff1a4bf3fc36fc8c03d838dad009cc60d96101e360201b60201c565b82600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160038190555080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505061042d565b6101f382826102cf60201b60201c565b6102cb57600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061027061033960201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061037182610346565b9050919050565b61038181610366565b811461038c57600080fd5b50565b60008151905061039e81610378565b92915050565b6000819050919050565b6103b7816103a4565b81146103c257600080fd5b50565b6000815190506103d4816103ae565b92915050565b6000806000606084860312156103f3576103f2610341565b5b60006104018682870161038f565b9350506020610412868287016103c5565b92505060406104238682870161038f565b9150509250925092565b612bf08061043c6000396000f3fe608060405234801561001057600080fd5b506004361061014c5760003560e01c806363323ddd116100c3578063ac8a584a1161007c578063ac8a584a14610387578063d547741f146103a3578063d77b2307146103bf578063e1465a1c146103db578063f5b541a6146103f7578063fbf23222146104155761014c565b806363323ddd146102c957806387e2fa02146102e557806391d14854146103015780639870d7fe146103315780639d9114651461034d578063a217fddf146103695761014c565b80632f2ff15d116101155780632f2ff15d1461021d57806336568abe146102395780633ff0c871146102555780634b934ca2146102715780634b9b20a81461028f5780635913dec9146102ab5761014c565b80626f4daa1461015157806301ffc9a71461016f578063039e08a11461019f5780631c38a607146101bd578063248a9ca3146101ed575b600080fd5b610159610445565b6040516101669190611add565b60405180910390f35b61018960048036038101906101849190611b64565b61046b565b6040516101969190611bac565b60405180910390f35b6101a76104e5565b6040516101b49190611c26565b60405180910390f35b6101d760048036038101906101d29190611d87565b61050b565b6040516101e49190611bac565b60405180910390f35b61020760048036038101906102029190611e06565b610541565b6040516102149190611e42565b60405180910390f35b61023760048036038101906102329190611e89565b610560565b005b610253600480360381019061024e9190611e89565b610581565b005b61026f600480360381019061026a9190611eff565b610604565b005b61027961061c565b6040516102869190611f3b565b60405180910390f35b6102a960048036038101906102a49190611f56565b610622565b005b6102b3610674565b6040516102c09190611f3b565b60405180910390f35b6102e360048036038101906102de9190611f56565b61067a565b005b6102ff60048036038101906102fa9190612065565b6107b4565b005b61031b60048036038101906103169190611e89565b610b26565b6040516103289190611bac565b60405180910390f35b61034b60048036038101906103469190611f56565b610b90565b005b61036760048036038101906103629190612121565b610bcb565b005b610371610d0d565b60405161037e9190611e42565b60405180910390f35b6103a1600480360381019061039c9190611f56565b610d14565b005b6103bd60048036038101906103b89190611e89565b610d4f565b005b6103d960048036038101906103d49190612174565b610d70565b005b6103f560048036038101906103f09190611eff565b610fbf565b005b6103ff611052565b60405161040c9190611e42565b60405180910390f35b61042f600480360381019061042a9190611d87565b611076565b60405161043c9190611add565b60405180910390f35b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104de57506104dd826110bf565b5b9050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6006818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900460ff1681565b6000806000838152602001908152602001600020600101549050919050565b61056982610541565b61057281611129565b61057c838361113d565b505050565b61058961121d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ed9061229e565b60405180910390fd5b6106008282611225565b5050565b6000801b61061181611129565b816003819055505050565b60035481565b6000801b61062f81611129565b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60055481565b6000801b61068781611129565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036106ed576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f91b3e9e03ed7deaa0d93d391d1ebeb3411d104c8648f6c996d8d5f71afcfd6d460405160405180910390a3505050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9296107de81611129565b6107e6611306565b600688886040516107f89291906122ee565b908152602001604051809103902060009054906101000a900460ff1661084a576040517fac577b3e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006007898960405161085e9291906122ee565b908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089898989896040516020016108aa9594939291906123b8565b6040516020818303038152906040528051906020012090506000816040516020016108d59190612471565b604051602081830303815290604052805190602001209050600061094687878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508361135590919063ffffffff16565b90506109556000801b82610b26565b61098b576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8715610a05578973ffffffffffffffffffffffffffffffffffffffff166323b872dd30868c6040518463ffffffff1660e01b81526004016109ce93929190612497565b600060405180830381600087803b1580156109e857600080fd5b505af11580156109fc573d6000803e3d6000fd5b50505050610aba565b8973ffffffffffffffffffffffffffffffffffffffff1663a9059cbb858b6040518363ffffffff1660e01b8152600401610a409291906124ce565b6020604051808303816000875af1158015610a5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a83919061250c565b610ab9576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b8373ffffffffffffffffffffffffffffffffffffffff167ff0ea3ec89654160f6acce45065d5f1670dbe3441cbc151dcfae2a0124070f48c8d8d8d8d8d604051610b08959493929190612566565b60405180910390a250505050610b1c61137c565b5050505050505050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000801b610b9d81611129565b610bc77f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92983610560565b5050565b6000801b610bd881611129565b8115610c52578373ffffffffffffffffffffffffffffffffffffffff166323b872dd3033866040518463ffffffff1660e01b8152600401610c1b93929190612497565b600060405180830381600087803b158015610c3557600080fd5b505af1158015610c49573d6000803e3d6000fd5b50505050610d07565b8373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856040518363ffffffff1660e01b8152600401610c8d9291906124ce565b6020604051808303816000875af1158015610cac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd0919061250c565b610d06576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b6000801b81565b6000801b610d2181611129565b610d4b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92983610d4f565b5050565b610d5882610541565b610d6181611129565b610d6b8383611225565b505050565b610d78611306565b60068686604051610d8a9291906122ee565b908152602001604051809103902060009054906101000a900460ff1615610ddd576040517f3cc6262700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610deb868686868686611385565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330876040518463ffffffff1660e01b8152600401610e4a93929190612497565b6020604051808303816000875af1158015610e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8d919061250c565b610ec3576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160068787604051610ed79291906122ee565b908152602001604051809103902060006101000a81548160ff0219169083151502179055503360078787604051610f0f9291906122ee565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167fe82c7d29ddb0ccd3dfc891501a0bd6acaf1a46032417eb4b7669d990c53e51ea87878787604051610fa794939291906125b4565b60405180910390a2610fb761137c565b505050505050565b6000801b610fcc81611129565b60008203611006576040517fb9298d3100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006005549050826005819055507fae9f6e01c5d624e34e50de1dda5c7d6a5bd5c236cdb8b960436445c2949e188d81846040516110459291906125f4565b60405180910390a1505050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b6007818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61113a8161113561121d565b611515565b50565b6111478282610b26565b61121957600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506111be61121d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b61122f8282610b26565b1561130257600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506112a761121d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b60026001540361134b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134290612669565b60405180910390fd5b6002600181905550565b6000806000611364858561159a565b91509150611371816115eb565b819250505092915050565b60018081905550565b6005548361139391906126b8565b4211156113cc576040517f2d07c67300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000868686866040516020016113e594939291906126ec565b6040516020818303038152906040528051906020012090506000816040516020016114109190612471565b604051602081830303815290604052805190602001209050600061148185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508361135590919063ffffffff16565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461150a576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b61151f8282610b26565b6115965761152c81611751565b61153a8360001c602061177e565b60405160200161154b929190612825565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158d9190612898565b60405180910390fd5b5050565b60008060418351036115db5760008060006020860151925060408601519150606086015160001a90506115cf878285856119ba565b945094505050506115e4565b60006002915091505b9250929050565b600060048111156115ff576115fe6128ba565b5b816004811115611612576116116128ba565b5b031561174e576001600481111561162c5761162b6128ba565b5b81600481111561163f5761163e6128ba565b5b0361167f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167690612935565b60405180910390fd5b60026004811115611693576116926128ba565b5b8160048111156116a6576116a56128ba565b5b036116e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116dd906129a1565b60405180910390fd5b600360048111156116fa576116f96128ba565b5b81600481111561170d5761170c6128ba565b5b0361174d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174490612a33565b60405180910390fd5b5b50565b60606117778273ffffffffffffffffffffffffffffffffffffffff16601460ff1661177e565b9050919050565b6060600060028360026117919190612a53565b61179b91906126b8565b67ffffffffffffffff8111156117b4576117b3611c5c565b5b6040519080825280601f01601f1916602001820160405280156117e65781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061181e5761181d612a95565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061188257611881612a95565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026118c29190612a53565b6118cc91906126b8565b90505b600181111561196c577f3031323334353637383961626364656600000000000000000000000000000000600f86166010811061190e5761190d612a95565b5b1a60f81b82828151811061192557611924612a95565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061196590612ac4565b90506118cf565b50600084146119b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a790612b39565b60405180910390fd5b8091505092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156119f5576000600391509150611a93565b600060018787878760405160008152602001604052604051611a1a9493929190612b75565b6020604051602081039080840390855afa158015611a3c573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a8a57600060019250925050611a93565b80600092509250505b94509492505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611ac782611a9c565b9050919050565b611ad781611abc565b82525050565b6000602082019050611af26000830184611ace565b92915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611b4181611b0c565b8114611b4c57600080fd5b50565b600081359050611b5e81611b38565b92915050565b600060208284031215611b7a57611b79611b02565b5b6000611b8884828501611b4f565b91505092915050565b60008115159050919050565b611ba681611b91565b82525050565b6000602082019050611bc16000830184611b9d565b92915050565b6000819050919050565b6000611bec611be7611be284611a9c565b611bc7565b611a9c565b9050919050565b6000611bfe82611bd1565b9050919050565b6000611c1082611bf3565b9050919050565b611c2081611c05565b82525050565b6000602082019050611c3b6000830184611c17565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611c9482611c4b565b810181811067ffffffffffffffff82111715611cb357611cb2611c5c565b5b80604052505050565b6000611cc6611af8565b9050611cd28282611c8b565b919050565b600067ffffffffffffffff821115611cf257611cf1611c5c565b5b611cfb82611c4b565b9050602081019050919050565b82818337600083830152505050565b6000611d2a611d2584611cd7565b611cbc565b905082815260208101848484011115611d4657611d45611c46565b5b611d51848285611d08565b509392505050565b600082601f830112611d6e57611d6d611c41565b5b8135611d7e848260208601611d17565b91505092915050565b600060208284031215611d9d57611d9c611b02565b5b600082013567ffffffffffffffff811115611dbb57611dba611b07565b5b611dc784828501611d59565b91505092915050565b6000819050919050565b611de381611dd0565b8114611dee57600080fd5b50565b600081359050611e0081611dda565b92915050565b600060208284031215611e1c57611e1b611b02565b5b6000611e2a84828501611df1565b91505092915050565b611e3c81611dd0565b82525050565b6000602082019050611e576000830184611e33565b92915050565b611e6681611abc565b8114611e7157600080fd5b50565b600081359050611e8381611e5d565b92915050565b60008060408385031215611ea057611e9f611b02565b5b6000611eae85828601611df1565b9250506020611ebf85828601611e74565b9150509250929050565b6000819050919050565b611edc81611ec9565b8114611ee757600080fd5b50565b600081359050611ef981611ed3565b92915050565b600060208284031215611f1557611f14611b02565b5b6000611f2384828501611eea565b91505092915050565b611f3581611ec9565b82525050565b6000602082019050611f506000830184611f2c565b92915050565b600060208284031215611f6c57611f6b611b02565b5b6000611f7a84828501611e74565b91505092915050565b600080fd5b600080fd5b60008083601f840112611fa357611fa2611c41565b5b8235905067ffffffffffffffff811115611fc057611fbf611f83565b5b602083019150836001820283011115611fdc57611fdb611f88565b5b9250929050565b611fec81611b91565b8114611ff757600080fd5b50565b60008135905061200981611fe3565b92915050565b60008083601f84011261202557612024611c41565b5b8235905067ffffffffffffffff81111561204257612041611f83565b5b60208301915083600182028301111561205e5761205d611f88565b5b9250929050565b600080600080600080600060a0888a03121561208457612083611b02565b5b600088013567ffffffffffffffff8111156120a2576120a1611b07565b5b6120ae8a828b01611f8d565b975097505060206120c18a828b01611e74565b95505060406120d28a828b01611eea565b94505060606120e38a828b01611ffa565b935050608088013567ffffffffffffffff81111561210457612103611b07565b5b6121108a828b0161200f565b925092505092959891949750929550565b60008060006060848603121561213a57612139611b02565b5b600061214886828701611e74565b935050602061215986828701611eea565b925050604061216a86828701611ffa565b9150509250925092565b6000806000806000806080878903121561219157612190611b02565b5b600087013567ffffffffffffffff8111156121af576121ae611b07565b5b6121bb89828a01611f8d565b965096505060206121ce89828a01611eea565b94505060406121df89828a01611eea565b935050606087013567ffffffffffffffff811115612200576121ff611b07565b5b61220c89828a0161200f565b92509250509295509295509295565b600082825260208201905092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000612288602f8361221b565b91506122938261222c565b604082019050919050565b600060208201905081810360008301526122b78161227b565b9050919050565b600081905092915050565b60006122d583856122be565b93506122e2838584611d08565b82840190509392505050565b60006122fb8284866122c9565b91508190509392505050565b60008160601b9050919050565b600061231f82612307565b9050919050565b600061233182612314565b9050919050565b61234961234482611abc565b612326565b82525050565b6000819050919050565b61236a61236582611ec9565b61234f565b82525050565b60008160f81b9050919050565b600061238882612370565b9050919050565b600061239a8261237d565b9050919050565b6123b26123ad82611b91565b61238f565b82525050565b60006123c58287896122c9565b91506123d18286612338565b6014820191506123e18285612359565b6020820191506123f182846123a1565b6001820191508190509695505050505050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b600061243a601c836122be565b915061244582612404565b601c82019050919050565b6000819050919050565b61246b61246682611dd0565b612450565b82525050565b600061247c8261242d565b9150612488828461245a565b60208201915081905092915050565b60006060820190506124ac6000830186611ace565b6124b96020830185611ace565b6124c66040830184611f2c565b949350505050565b60006040820190506124e36000830185611ace565b6124f06020830184611f2c565b9392505050565b60008151905061250681611fe3565b92915050565b60006020828403121561252257612521611b02565b5b6000612530848285016124f7565b91505092915050565b6000612545838561221b565b9350612552838584611d08565b61255b83611c4b565b840190509392505050565b60006080820190508181036000830152612581818789612539565b90506125906020830186611ace565b61259d6040830185611f2c565b6125aa6060830184611b9d565b9695505050505050565b600060608201905081810360008301526125cf818688612539565b90506125de6020830185611f2c565b6125eb6040830184611f2c565b95945050505050565b60006040820190506126096000830185611f2c565b6126166020830184611f2c565b9392505050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000612653601f8361221b565b915061265e8261261d565b602082019050919050565b6000602082019050818103600083015261268281612646565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006126c382611ec9565b91506126ce83611ec9565b92508282019050808211156126e6576126e5612689565b5b92915050565b60006126f98286886122c9565b91506127058285612359565b6020820191506127158284612359565b60208201915081905095945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b600061275d6017836122be565b915061276882612727565b601782019050919050565b600081519050919050565b60005b8381101561279c578082015181840152602081019050612781565b60008484015250505050565b60006127b382612773565b6127bd81856122be565b93506127cd81856020860161277e565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b600061280f6011836122be565b915061281a826127d9565b601182019050919050565b600061283082612750565b915061283c82856127a8565b915061284782612802565b915061285382846127a8565b91508190509392505050565b600061286a82612773565b612874818561221b565b935061288481856020860161277e565b61288d81611c4b565b840191505092915050565b600060208201905081810360008301526128b2818461285f565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b600061291f60188361221b565b915061292a826128e9565b602082019050919050565b6000602082019050818103600083015261294e81612912565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b600061298b601f8361221b565b915061299682612955565b602082019050919050565b600060208201905081810360008301526129ba8161297e565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000612a1d60228361221b565b9150612a28826129c1565b604082019050919050565b60006020820190508181036000830152612a4c81612a10565b9050919050565b6000612a5e82611ec9565b9150612a6983611ec9565b9250828202612a7781611ec9565b91508282048414831517612a8e57612a8d612689565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612acf82611ec9565b915060008203612ae257612ae1612689565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000612b2360208361221b565b9150612b2e82612aed565b602082019050919050565b60006020820190508181036000830152612b5281612b16565b9050919050565b600060ff82169050919050565b612b6f81612b59565b82525050565b6000608082019050612b8a6000830187611e33565b612b976020830186612b66565b612ba46040830185611e33565b612bb16060830184611e33565b9594505050505056fea2646970667358221220dfc91913e1cd726c9f42c4eb0fd53a77ab0e74dec65b3ab5bf9c7bac2fea3e3264736f6c634300081c0033000000000000000000000000f53798f58ec60571d2ca58add7d97621a7bab82c0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000eac0beff1a4bf3fc36fc8c03d838dad009cc60d9
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061014c5760003560e01c806363323ddd116100c3578063ac8a584a1161007c578063ac8a584a14610387578063d547741f146103a3578063d77b2307146103bf578063e1465a1c146103db578063f5b541a6146103f7578063fbf23222146104155761014c565b806363323ddd146102c957806387e2fa02146102e557806391d14854146103015780639870d7fe146103315780639d9114651461034d578063a217fddf146103695761014c565b80632f2ff15d116101155780632f2ff15d1461021d57806336568abe146102395780633ff0c871146102555780634b934ca2146102715780634b9b20a81461028f5780635913dec9146102ab5761014c565b80626f4daa1461015157806301ffc9a71461016f578063039e08a11461019f5780631c38a607146101bd578063248a9ca3146101ed575b600080fd5b610159610445565b6040516101669190611add565b60405180910390f35b61018960048036038101906101849190611b64565b61046b565b6040516101969190611bac565b60405180910390f35b6101a76104e5565b6040516101b49190611c26565b60405180910390f35b6101d760048036038101906101d29190611d87565b61050b565b6040516101e49190611bac565b60405180910390f35b61020760048036038101906102029190611e06565b610541565b6040516102149190611e42565b60405180910390f35b61023760048036038101906102329190611e89565b610560565b005b610253600480360381019061024e9190611e89565b610581565b005b61026f600480360381019061026a9190611eff565b610604565b005b61027961061c565b6040516102869190611f3b565b60405180910390f35b6102a960048036038101906102a49190611f56565b610622565b005b6102b3610674565b6040516102c09190611f3b565b60405180910390f35b6102e360048036038101906102de9190611f56565b61067a565b005b6102ff60048036038101906102fa9190612065565b6107b4565b005b61031b60048036038101906103169190611e89565b610b26565b6040516103289190611bac565b60405180910390f35b61034b60048036038101906103469190611f56565b610b90565b005b61036760048036038101906103629190612121565b610bcb565b005b610371610d0d565b60405161037e9190611e42565b60405180910390f35b6103a1600480360381019061039c9190611f56565b610d14565b005b6103bd60048036038101906103b89190611e89565b610d4f565b005b6103d960048036038101906103d49190612174565b610d70565b005b6103f560048036038101906103f09190611eff565b610fbf565b005b6103ff611052565b60405161040c9190611e42565b60405180910390f35b61042f600480360381019061042a9190611d87565b611076565b60405161043c9190611add565b60405180910390f35b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104de57506104dd826110bf565b5b9050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6006818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900460ff1681565b6000806000838152602001908152602001600020600101549050919050565b61056982610541565b61057281611129565b61057c838361113d565b505050565b61058961121d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ed9061229e565b60405180910390fd5b6106008282611225565b5050565b6000801b61061181611129565b816003819055505050565b60035481565b6000801b61062f81611129565b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60055481565b6000801b61068781611129565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036106ed576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f91b3e9e03ed7deaa0d93d391d1ebeb3411d104c8648f6c996d8d5f71afcfd6d460405160405180910390a3505050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9296107de81611129565b6107e6611306565b600688886040516107f89291906122ee565b908152602001604051809103902060009054906101000a900460ff1661084a576040517fac577b3e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006007898960405161085e9291906122ee565b908152602001604051809103902060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600089898989896040516020016108aa9594939291906123b8565b6040516020818303038152906040528051906020012090506000816040516020016108d59190612471565b604051602081830303815290604052805190602001209050600061094687878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508361135590919063ffffffff16565b90506109556000801b82610b26565b61098b576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8715610a05578973ffffffffffffffffffffffffffffffffffffffff166323b872dd30868c6040518463ffffffff1660e01b81526004016109ce93929190612497565b600060405180830381600087803b1580156109e857600080fd5b505af11580156109fc573d6000803e3d6000fd5b50505050610aba565b8973ffffffffffffffffffffffffffffffffffffffff1663a9059cbb858b6040518363ffffffff1660e01b8152600401610a409291906124ce565b6020604051808303816000875af1158015610a5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a83919061250c565b610ab9576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b8373ffffffffffffffffffffffffffffffffffffffff167ff0ea3ec89654160f6acce45065d5f1670dbe3441cbc151dcfae2a0124070f48c8d8d8d8d8d604051610b08959493929190612566565b60405180910390a250505050610b1c61137c565b5050505050505050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000801b610b9d81611129565b610bc77f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92983610560565b5050565b6000801b610bd881611129565b8115610c52578373ffffffffffffffffffffffffffffffffffffffff166323b872dd3033866040518463ffffffff1660e01b8152600401610c1b93929190612497565b600060405180830381600087803b158015610c3557600080fd5b505af1158015610c49573d6000803e3d6000fd5b50505050610d07565b8373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33856040518363ffffffff1660e01b8152600401610c8d9291906124ce565b6020604051808303816000875af1158015610cac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd0919061250c565b610d06576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b6000801b81565b6000801b610d2181611129565b610d4b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92983610d4f565b5050565b610d5882610541565b610d6181611129565b610d6b8383611225565b505050565b610d78611306565b60068686604051610d8a9291906122ee565b908152602001604051809103902060009054906101000a900460ff1615610ddd576040517f3cc6262700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610deb868686868686611385565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330876040518463ffffffff1660e01b8152600401610e4a93929190612497565b6020604051808303816000875af1158015610e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8d919061250c565b610ec3576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160068787604051610ed79291906122ee565b908152602001604051809103902060006101000a81548160ff0219169083151502179055503360078787604051610f0f9291906122ee565b908152602001604051809103902060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167fe82c7d29ddb0ccd3dfc891501a0bd6acaf1a46032417eb4b7669d990c53e51ea87878787604051610fa794939291906125b4565b60405180910390a2610fb761137c565b505050505050565b6000801b610fcc81611129565b60008203611006576040517fb9298d3100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006005549050826005819055507fae9f6e01c5d624e34e50de1dda5c7d6a5bd5c236cdb8b960436445c2949e188d81846040516110459291906125f4565b60405180910390a1505050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b6007818051602081018201805184825260208301602085012081835280955050505050506000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61113a8161113561121d565b611515565b50565b6111478282610b26565b61121957600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506111be61121d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b61122f8282610b26565b1561130257600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506112a761121d565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b60026001540361134b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134290612669565b60405180910390fd5b6002600181905550565b6000806000611364858561159a565b91509150611371816115eb565b819250505092915050565b60018081905550565b6005548361139391906126b8565b4211156113cc576040517f2d07c67300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000868686866040516020016113e594939291906126ec565b6040516020818303038152906040528051906020012090506000816040516020016114109190612471565b604051602081830303815290604052805190602001209050600061148185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508361135590919063ffffffff16565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461150a576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050505050565b61151f8282610b26565b6115965761152c81611751565b61153a8360001c602061177e565b60405160200161154b929190612825565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158d9190612898565b60405180910390fd5b5050565b60008060418351036115db5760008060006020860151925060408601519150606086015160001a90506115cf878285856119ba565b945094505050506115e4565b60006002915091505b9250929050565b600060048111156115ff576115fe6128ba565b5b816004811115611612576116116128ba565b5b031561174e576001600481111561162c5761162b6128ba565b5b81600481111561163f5761163e6128ba565b5b0361167f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167690612935565b60405180910390fd5b60026004811115611693576116926128ba565b5b8160048111156116a6576116a56128ba565b5b036116e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116dd906129a1565b60405180910390fd5b600360048111156116fa576116f96128ba565b5b81600481111561170d5761170c6128ba565b5b0361174d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174490612a33565b60405180910390fd5b5b50565b60606117778273ffffffffffffffffffffffffffffffffffffffff16601460ff1661177e565b9050919050565b6060600060028360026117919190612a53565b61179b91906126b8565b67ffffffffffffffff8111156117b4576117b3611c5c565b5b6040519080825280601f01601f1916602001820160405280156117e65781602001600182028036833780820191505090505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061181e5761181d612a95565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061188257611881612a95565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600060018460026118c29190612a53565b6118cc91906126b8565b90505b600181111561196c577f3031323334353637383961626364656600000000000000000000000000000000600f86166010811061190e5761190d612a95565b5b1a60f81b82828151811061192557611924612a95565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c94508061196590612ac4565b90506118cf565b50600084146119b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a790612b39565b60405180910390fd5b8091505092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c11156119f5576000600391509150611a93565b600060018787878760405160008152602001604052604051611a1a9493929190612b75565b6020604051602081039080840390855afa158015611a3c573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a8a57600060019250925050611a93565b80600092509250505b94509492505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611ac782611a9c565b9050919050565b611ad781611abc565b82525050565b6000602082019050611af26000830184611ace565b92915050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611b4181611b0c565b8114611b4c57600080fd5b50565b600081359050611b5e81611b38565b92915050565b600060208284031215611b7a57611b79611b02565b5b6000611b8884828501611b4f565b91505092915050565b60008115159050919050565b611ba681611b91565b82525050565b6000602082019050611bc16000830184611b9d565b92915050565b6000819050919050565b6000611bec611be7611be284611a9c565b611bc7565b611a9c565b9050919050565b6000611bfe82611bd1565b9050919050565b6000611c1082611bf3565b9050919050565b611c2081611c05565b82525050565b6000602082019050611c3b6000830184611c17565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611c9482611c4b565b810181811067ffffffffffffffff82111715611cb357611cb2611c5c565b5b80604052505050565b6000611cc6611af8565b9050611cd28282611c8b565b919050565b600067ffffffffffffffff821115611cf257611cf1611c5c565b5b611cfb82611c4b565b9050602081019050919050565b82818337600083830152505050565b6000611d2a611d2584611cd7565b611cbc565b905082815260208101848484011115611d4657611d45611c46565b5b611d51848285611d08565b509392505050565b600082601f830112611d6e57611d6d611c41565b5b8135611d7e848260208601611d17565b91505092915050565b600060208284031215611d9d57611d9c611b02565b5b600082013567ffffffffffffffff811115611dbb57611dba611b07565b5b611dc784828501611d59565b91505092915050565b6000819050919050565b611de381611dd0565b8114611dee57600080fd5b50565b600081359050611e0081611dda565b92915050565b600060208284031215611e1c57611e1b611b02565b5b6000611e2a84828501611df1565b91505092915050565b611e3c81611dd0565b82525050565b6000602082019050611e576000830184611e33565b92915050565b611e6681611abc565b8114611e7157600080fd5b50565b600081359050611e8381611e5d565b92915050565b60008060408385031215611ea057611e9f611b02565b5b6000611eae85828601611df1565b9250506020611ebf85828601611e74565b9150509250929050565b6000819050919050565b611edc81611ec9565b8114611ee757600080fd5b50565b600081359050611ef981611ed3565b92915050565b600060208284031215611f1557611f14611b02565b5b6000611f2384828501611eea565b91505092915050565b611f3581611ec9565b82525050565b6000602082019050611f506000830184611f2c565b92915050565b600060208284031215611f6c57611f6b611b02565b5b6000611f7a84828501611e74565b91505092915050565b600080fd5b600080fd5b60008083601f840112611fa357611fa2611c41565b5b8235905067ffffffffffffffff811115611fc057611fbf611f83565b5b602083019150836001820283011115611fdc57611fdb611f88565b5b9250929050565b611fec81611b91565b8114611ff757600080fd5b50565b60008135905061200981611fe3565b92915050565b60008083601f84011261202557612024611c41565b5b8235905067ffffffffffffffff81111561204257612041611f83565b5b60208301915083600182028301111561205e5761205d611f88565b5b9250929050565b600080600080600080600060a0888a03121561208457612083611b02565b5b600088013567ffffffffffffffff8111156120a2576120a1611b07565b5b6120ae8a828b01611f8d565b975097505060206120c18a828b01611e74565b95505060406120d28a828b01611eea565b94505060606120e38a828b01611ffa565b935050608088013567ffffffffffffffff81111561210457612103611b07565b5b6121108a828b0161200f565b925092505092959891949750929550565b60008060006060848603121561213a57612139611b02565b5b600061214886828701611e74565b935050602061215986828701611eea565b925050604061216a86828701611ffa565b9150509250925092565b6000806000806000806080878903121561219157612190611b02565b5b600087013567ffffffffffffffff8111156121af576121ae611b07565b5b6121bb89828a01611f8d565b965096505060206121ce89828a01611eea565b94505060406121df89828a01611eea565b935050606087013567ffffffffffffffff811115612200576121ff611b07565b5b61220c89828a0161200f565b92509250509295509295509295565b600082825260208201905092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000612288602f8361221b565b91506122938261222c565b604082019050919050565b600060208201905081810360008301526122b78161227b565b9050919050565b600081905092915050565b60006122d583856122be565b93506122e2838584611d08565b82840190509392505050565b60006122fb8284866122c9565b91508190509392505050565b60008160601b9050919050565b600061231f82612307565b9050919050565b600061233182612314565b9050919050565b61234961234482611abc565b612326565b82525050565b6000819050919050565b61236a61236582611ec9565b61234f565b82525050565b60008160f81b9050919050565b600061238882612370565b9050919050565b600061239a8261237d565b9050919050565b6123b26123ad82611b91565b61238f565b82525050565b60006123c58287896122c9565b91506123d18286612338565b6014820191506123e18285612359565b6020820191506123f182846123a1565b6001820191508190509695505050505050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b600061243a601c836122be565b915061244582612404565b601c82019050919050565b6000819050919050565b61246b61246682611dd0565b612450565b82525050565b600061247c8261242d565b9150612488828461245a565b60208201915081905092915050565b60006060820190506124ac6000830186611ace565b6124b96020830185611ace565b6124c66040830184611f2c565b949350505050565b60006040820190506124e36000830185611ace565b6124f06020830184611f2c565b9392505050565b60008151905061250681611fe3565b92915050565b60006020828403121561252257612521611b02565b5b6000612530848285016124f7565b91505092915050565b6000612545838561221b565b9350612552838584611d08565b61255b83611c4b565b840190509392505050565b60006080820190508181036000830152612581818789612539565b90506125906020830186611ace565b61259d6040830185611f2c565b6125aa6060830184611b9d565b9695505050505050565b600060608201905081810360008301526125cf818688612539565b90506125de6020830185611f2c565b6125eb6040830184611f2c565b95945050505050565b60006040820190506126096000830185611f2c565b6126166020830184611f2c565b9392505050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000612653601f8361221b565b915061265e8261261d565b602082019050919050565b6000602082019050818103600083015261268281612646565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006126c382611ec9565b91506126ce83611ec9565b92508282019050808211156126e6576126e5612689565b5b92915050565b60006126f98286886122c9565b91506127058285612359565b6020820191506127158284612359565b60208201915081905095945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b600061275d6017836122be565b915061276882612727565b601782019050919050565b600081519050919050565b60005b8381101561279c578082015181840152602081019050612781565b60008484015250505050565b60006127b382612773565b6127bd81856122be565b93506127cd81856020860161277e565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b600061280f6011836122be565b915061281a826127d9565b601182019050919050565b600061283082612750565b915061283c82856127a8565b915061284782612802565b915061285382846127a8565b91508190509392505050565b600061286a82612773565b612874818561221b565b935061288481856020860161277e565b61288d81611c4b565b840191505092915050565b600060208201905081810360008301526128b2818461285f565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b600061291f60188361221b565b915061292a826128e9565b602082019050919050565b6000602082019050818103600083015261294e81612912565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b600061298b601f8361221b565b915061299682612955565b602082019050919050565b600060208201905081810360008301526129ba8161297e565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000612a1d60228361221b565b9150612a28826129c1565b604082019050919050565b60006020820190508181036000830152612a4c81612a10565b9050919050565b6000612a5e82611ec9565b9150612a6983611ec9565b9250828202612a7781611ec9565b91508282048414831517612a8e57612a8d612689565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612acf82611ec9565b915060008203612ae257612ae1612689565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000612b2360208361221b565b9150612b2e82612aed565b602082019050919050565b60006020820190508181036000830152612b5281612b16565b9050919050565b600060ff82169050919050565b612b6f81612b59565b82525050565b6000608082019050612b8a6000830187611e33565b612b976020830186612b66565b612ba46040830185611e33565b612bb16060830184611e33565b9594505050505056fea2646970667358221220dfc91913e1cd726c9f42c4eb0fd53a77ab0e74dec65b3ab5bf9c7bac2fea3e3264736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f53798f58ec60571d2ca58add7d97621a7bab82c0000000000000000000000000000000000000000000000000000000000002710000000000000000000000000eac0beff1a4bf3fc36fc8c03d838dad009cc60d9
-----Decoded View---------------
Arg [0] : _spinToken (address): 0xf53798F58EC60571d2cA58AdD7d97621A7bAb82C
Arg [1] : _spinPrice (uint256): 10000
Arg [2] : _priceSigner (address): 0xEAC0beFf1a4bF3Fc36FC8c03d838DAD009cC60d9
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000f53798f58ec60571d2ca58add7d97621a7bab82c
Arg [1] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [2] : 000000000000000000000000eac0beff1a4bf3fc36fc8c03d838dad009cc60d9
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.