Source Code
Latest 25 from a total of 382 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Harvest All | 17444802 | 1001 days ago | IN | 0 ETH | 0.00330678 | ||||
| Batch Withdraw | 16871233 | 1082 days ago | IN | 0 ETH | 0.00491411 | ||||
| Batch Withdraw | 16871230 | 1082 days ago | IN | 0 ETH | 0.00684937 | ||||
| Batch Withdraw | 16866704 | 1082 days ago | IN | 0 ETH | 0.00678298 | ||||
| Harvest All | 16866704 | 1082 days ago | IN | 0 ETH | 0.00209531 | ||||
| Harvest All | 16367026 | 1152 days ago | IN | 0 ETH | 0.00191179 | ||||
| Batch Withdraw | 16232261 | 1171 days ago | IN | 0 ETH | 0.00444703 | ||||
| Harvest All | 16232258 | 1171 days ago | IN | 0 ETH | 0.00176055 | ||||
| Batch Withdraw | 16093227 | 1191 days ago | IN | 0 ETH | 0.00405004 | ||||
| Batch Withdraw | 15967447 | 1208 days ago | IN | 0 ETH | 0.00461823 | ||||
| Harvest All | 15967444 | 1208 days ago | IN | 0 ETH | 0.00202615 | ||||
| Batch Withdraw | 15942096 | 1212 days ago | IN | 0 ETH | 0.00450578 | ||||
| Harvest All | 15912306 | 1216 days ago | IN | 0 ETH | 0.00096891 | ||||
| Harvest All | 15912305 | 1216 days ago | IN | 0 ETH | 0.00097372 | ||||
| Harvest All | 15912304 | 1216 days ago | IN | 0 ETH | 0.00227475 | ||||
| Batch Withdraw | 15861470 | 1223 days ago | IN | 0 ETH | 0.00193293 | ||||
| Batch Withdraw | 15824578 | 1228 days ago | IN | 0 ETH | 0.00221115 | ||||
| Harvest All | 15824573 | 1228 days ago | IN | 0 ETH | 0.0012669 | ||||
| Batch Withdraw | 15754055 | 1238 days ago | IN | 0 ETH | 0.00353806 | ||||
| Batch Withdraw | 15662667 | 1251 days ago | IN | 0 ETH | 0.00264213 | ||||
| Batch Withdraw | 15454301 | 1282 days ago | IN | 0 ETH | 0.01329739 | ||||
| Harvest All | 15327096 | 1302 days ago | IN | 0 ETH | 0.00035108 | ||||
| Batch Withdraw | 15327092 | 1302 days ago | IN | 0 ETH | 0.00526181 | ||||
| Batch Withdraw | 15184871 | 1324 days ago | IN | 0 ETH | 0.00232435 | ||||
| Harvest All | 15184868 | 1324 days ago | IN | 0 ETH | 0.0011087 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BunnyStakingContract
Compiler Version
v0.8.7+commit.e28d00a7
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2022-01-31
*/
// File: @openzeppelin/contracts/security/ReentrancyGuard.sol
// OpenZeppelin Contracts v4.4.1 (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() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
// File: @openzeppelin/contracts/utils/structs/EnumerableSet.sol
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)
pragma solidity ^0.8.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping(bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
// Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
if (lastIndex != toDeleteIndex) {
bytes32 lastvalue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastvalue;
// Update the index for the moved value
set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
return _values(set._inner);
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
assembly {
result := store
}
return result;
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
assembly {
result := store
}
return result;
}
}
// File: contracts/BunnyStaking.sol
pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;
interface ERC1155 /* is ERC165 */ {
/**
@dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
The `_operator` argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender).
The `_from` argument MUST be the address of the holder whose balance is decreased.
The `_to` argument MUST be the address of the recipient whose balance is increased.
The `_id` argument MUST be the token type being transferred.
The `_value` argument MUST be the number of tokens the holder balance is decreased by and match what the recipient balance is increased by.
When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
*/
event TransferSingle(address indexed _operator, address indexed _from, address indexed _to, uint256 _id, uint256 _value);
/**
@dev Either `TransferSingle` or `TransferBatch` MUST emit when tokens are transferred, including zero value transfers as well as minting or burning (see "Safe Transfer Rules" section of the standard).
The `_operator` argument MUST be the address of an account/contract that is approved to make the transfer (SHOULD be msg.sender).
The `_from` argument MUST be the address of the holder whose balance is decreased.
The `_to` argument MUST be the address of the recipient whose balance is increased.
The `_ids` argument MUST be the list of tokens being transferred.
The `_values` argument MUST be the list of number of tokens (matching the list and order of tokens specified in _ids) the holder balance is decreased by and match what the recipient balance is increased by.
When minting/creating tokens, the `_from` argument MUST be set to `0x0` (i.e. zero address).
When burning/destroying tokens, the `_to` argument MUST be set to `0x0` (i.e. zero address).
*/
event TransferBatch(address indexed _operator, address indexed _from, address indexed _to, uint256[] _ids, uint256[] _values);
/**
@dev MUST emit when approval for a second party/operator address to manage all tokens for an owner address is enabled or disabled (absence of an event assumes disabled).
*/
event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);
/**
@dev MUST emit when the URI is updated for a token ID.
URIs are defined in RFC 3986.
The URI MUST point to a JSON file that conforms to the "ERC-1155 Metadata URI JSON Schema".
*/
event URI(string _value, uint256 indexed _id);
/**
@notice Transfers `_value` amount of an `_id` from the `_from` address to the `_to` address specified (with safety call).
@dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
MUST revert if `_to` is the zero address.
MUST revert if balance of holder for token `_id` is lower than the `_value` sent.
MUST revert on any other error.
MUST emit the `TransferSingle` event to reflect the balance change (see "Safe Transfer Rules" section of the standard).
After the above conditions are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call `onERC1155Received` on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
@param _from Source address
@param _to Target address
@param _id ID of the token type
@param _value Transfer amount
@param _data Additional data with no specified format, MUST be sent unaltered in call to `onERC1155Received` on `_to`
*/
function safeTransferFrom(address _from, address _to, uint256 _id, uint256 _value, bytes calldata _data) external;
/**
@notice Transfers `_values` amount(s) of `_ids` from the `_from` address to the `_to` address specified (with safety call).
@dev Caller must be approved to manage the tokens being transferred out of the `_from` account (see "Approval" section of the standard).
MUST revert if `_to` is the zero address.
MUST revert if length of `_ids` is not the same as length of `_values`.
MUST revert if any of the balance(s) of the holder(s) for token(s) in `_ids` is lower than the respective amount(s) in `_values` sent to the recipient.
MUST revert on any other error.
MUST emit `TransferSingle` or `TransferBatch` event(s) such that all the balance changes are reflected (see "Safe Transfer Rules" section of the standard).
Balance changes and events MUST follow the ordering of the arrays (_ids[0]/_values[0] before _ids[1]/_values[1], etc).
After the above conditions for the transfer(s) in the batch are met, this function MUST check if `_to` is a smart contract (e.g. code size > 0). If so, it MUST call the relevant `ERC1155TokenReceiver` hook(s) on `_to` and act appropriately (see "Safe Transfer Rules" section of the standard).
@param _from Source address
@param _to Target address
@param _ids IDs of each token type (order and length must match _values array)
@param _values Transfer amounts per token type (order and length must match _ids array)
@param _data Additional data with no specified format, MUST be sent unaltered in call to the `ERC1155TokenReceiver` hook(s) on `_to`
*/
function safeBatchTransferFrom(address _from, address _to, uint256[] calldata _ids, uint256[] calldata _values, bytes calldata _data) external;
/**
@notice Get the balance of an account's tokens.
@param _owner The address of the token holder
@param _id ID of the token
@return The _owner's balance of the token type requested
*/
function balanceOf(address _owner, uint256 _id) external view returns (uint256);
/**
@notice Get the balance of multiple account/token pairs
@param _owners The addresses of the token holders
@param _ids ID of the tokens
@return The _owner's balance of the token types requested (i.e. balance for each (owner, id) pair)
*/
function balanceOfBatch(address[] calldata _owners, uint256[] calldata _ids) external view returns (uint256[] memory);
/**
@notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.
@dev MUST emit the ApprovalForAll event on success.
@param _operator Address to add to the set of authorized operators
@param _approved True if the operator is approved, false to revoke approval
*/
function setApprovalForAll(address _operator, bool _approved) external;
/**
@notice Queries the approval status of an operator for a given owner.
@param _owner The owner of the tokens
@param _operator Address of authorized operator
@return True if the operator is approved, false if not
*/
function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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 `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);
/**
* @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);
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line max-line-length
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
// File: contracts/libs/Initializable.sol
pragma solidity ^0.8.0;
library EnumerableSetUpgradeable {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
// When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
// so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.
bytes32 lastvalue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastvalue;
// Update the index for the moved value
set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
}
contract Initializable {
bool inited = false;
modifier initializer() {
require(!inited, "already inited");
_;
inited = true;
}
}
// File: contracts/libs/EIP712Base.sol
pragma solidity ^0.8.0;
contract EIP712Base is Initializable {
struct EIP712Domain {
string name;
string version;
address verifyingContract;
bytes32 salt;
}
string constant public ERC712_VERSION = "1";
bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(
bytes(
"EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
)
);
bytes32 internal domainSeperator;
// supposed to be called once while initializing.
// one of the contracts that inherits this contract follows proxy pattern
// so it is not possible to do this in a constructor
function _initializeEIP712(
string memory name
)
internal
initializer
{
_setDomainSeperator(name);
}
function _setDomainSeperator(string memory name) internal {
domainSeperator = keccak256(
abi.encode(
EIP712_DOMAIN_TYPEHASH,
keccak256(bytes(name)),
keccak256(bytes(ERC712_VERSION)),
address(this),
bytes32(getChainId())
)
);
}
function getDomainSeperator() public view returns (bytes32) {
return domainSeperator;
}
function getChainId() public view returns (uint256) {
uint256 id;
assembly {
id := chainid()
}
return id;
}
/**
* Accept message hash and returns hash message in EIP712 compatible form
* So that it can be used to recover signer from signature signed using EIP712 formatted data
* https://eips.ethereum.org/EIPS/eip-712
* "\\x19" makes the encoding deterministic
* "\\x01" is the version byte to make it compatible to EIP-191
*/
function toTypedMessageHash(bytes32 messageHash)
internal
view
returns (bytes32)
{
return
keccak256(
abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash)
);
}
}
// File: contracts/libs/ContentMixin.sol
pragma solidity ^0.8.0;
abstract contract ContextMixin {
function msgSender()
internal
view
returns (address payable sender)
{
if (msg.sender == address(this)) {
bytes memory array = msg.data;
uint256 index = msg.data.length;
assembly {
// Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
sender := and(
mload(add(array, index)),
0xffffffffffffffffffffffffffffffffffffffff
)
}
} else {
sender = payable(msg.sender);
}
return sender;
}
}
// File: openzeppelin-solidity/contracts/utils/math/SafeMath.sol
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
// File: contracts/libs/NativeMetaTransaction.sol
pragma solidity ^0.8.0;
contract NativeMetaTransaction is EIP712Base {
using SafeMath for uint256;
bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(
bytes(
"MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
)
);
event MetaTransactionExecuted(
address userAddress,
address payable relayerAddress,
bytes functionSignature
);
mapping(address => uint256) nonces;
/*
* Meta transaction structure.
* No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
* He should call the desired function directly in that case.
*/
struct MetaTransaction {
uint256 nonce;
address from;
bytes functionSignature;
}
function executeMetaTransaction(
address userAddress,
bytes memory functionSignature,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) public payable returns (bytes memory) {
MetaTransaction memory metaTx = MetaTransaction({
nonce: nonces[userAddress],
from: userAddress,
functionSignature: functionSignature
});
require(
verify(userAddress, metaTx, sigR, sigS, sigV),
"Signer and signature do not match"
);
// increase nonce for user (to avoid re-use)
nonces[userAddress] = nonces[userAddress].add(1);
emit MetaTransactionExecuted(
userAddress,
payable(msg.sender),
functionSignature
);
// Append userAddress and relayer address at the end to extract it from calling context
(bool success, bytes memory returnData) = address(this).call(
abi.encodePacked(functionSignature, userAddress)
);
require(success, "Function call not successful");
return returnData;
}
function hashMetaTransaction(MetaTransaction memory metaTx)
internal
pure
returns (bytes32)
{
return
keccak256(
abi.encode(
META_TRANSACTION_TYPEHASH,
metaTx.nonce,
metaTx.from,
keccak256(metaTx.functionSignature)
)
);
}
function getNonce(address user) public view returns (uint256 nonce) {
nonce = nonces[user];
}
function verify(
address signer,
MetaTransaction memory metaTx,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) internal view returns (bool) {
require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER");
return
signer ==
ecrecover(
toTypedMessageHash(hashMetaTransaction(metaTx)),
sigV,
sigR,
sigS
);
}
}
// File: openzeppelin-solidity/contracts/utils/Strings.sol
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}
// File: openzeppelin-solidity/contracts/utils/Context.sol
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
// File: openzeppelin-solidity/contracts/access/Ownable.sol
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// File: openzeppelin-solidity/contracts/utils/Address.sol
pragma solidity ^0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// File: openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
// File: openzeppelin-solidity/contracts/utils/introspection/IERC165.sol
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
// File: openzeppelin-solidity/contracts/utils/introspection/ERC165.sol
pragma solidity ^0.8.0;
/**
* @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;
}
}
// File: openzeppelin-solidity/contracts/token/ERC721/IERC721.sol
pragma solidity ^0.8.0;
/**
* @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`, 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 be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @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 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);
/**
* @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;
}
// File: openzeppelin-solidity/contracts/token/ERC721/extensions/IERC721Enumerable.sol
pragma solidity ^0.8.0;
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}
interface FadeAwayBunnyNFT is IERC721 {
function bunnies(uint256 _id) external view returns (bytes32, uint64, uint32, uint32, uint16);
}
interface IPillToken is IERC20 {
function mint(address _user, uint256 _amount) external;
}
contract BunnyStakingContract is Ownable, ReentrancyGuard, IERC721Receiver {
using SafeMath for uint256;
using SafeERC20 for IPillToken;
using EnumerableSet for EnumerableSet.UintSet;
// Info of each user.
struct UserInfo {
uint256 amount;
uint256 harvestedReward;
mapping(uint256 => AppliedItem) item;
EnumerableSet.UintSet nftIds;
mapping(uint256 => uint256) lastRewardBlock;
}
struct AppliedItem {
uint256 endBlock;
uint256 itemId;
}
struct FadeAwayBunny {
bytes32 genes;
uint64 birthTime;
uint32 matronId;
uint32 sireId;
uint16 generation;
}
IPillToken public rewardToken;
FadeAwayBunnyNFT public nftAddress;
ERC1155 public itemAddress;
mapping(address => UserInfo) userInfo;
mapping(uint256 => uint16) public itemRate; // same with rewardRate, 10000 = 100%
uint256 public finalRewardBlock; // The block number when token rewarding has to end.
uint256 public rewardPerDay = 100 * 1e18; // 100 PILL per day
uint256 public itemEffectBlock = 50400; // 7 days with 12s each block
uint256 public blockPerDay = 7200; // 1 day with 12s each block
address burnAddress = 0x000000000000000000000000000000000000dEaD;
event Deposit(address indexed user, uint256 indexed nftId, uint256 indexed itemId);
event Withdraw(address indexed user, uint256 indexed nftId);
event Harvest(address indexed user, uint256 indexed nftId, uint256 amount);
event ApplyItem(address indexed user, uint256 indexed nftId, uint256 indexed itemId);
constructor(
IPillToken _rewardToken,
FadeAwayBunnyNFT _nftAddress,
uint256 _finalRewardBlock
) {
rewardToken = _rewardToken;
nftAddress = _nftAddress;
finalRewardBlock = _finalRewardBlock;
}
// Update item effect block by the owner
function setItemEffectBlock(uint256 _itemEffectBlock) public onlyOwner {
itemEffectBlock = _itemEffectBlock;
}
// Update reward rate by the owner
function setRewardPerDay(uint256 _rewardPerDay) public onlyOwner {
rewardPerDay = _rewardPerDay;
}
// Update final reward block by the owner
function setFinalRewardBlock(uint256 _finalRewardBlock) public onlyOwner {
finalRewardBlock = _finalRewardBlock;
}
function getUserInfo(address _user) external view returns (uint256, uint256) {
UserInfo storage user = userInfo[_user];
return (user.amount, user.harvestedReward);
}
function getApliedItemInfo(address _user, uint256 _tokenId ) external view returns (AppliedItem memory) {
UserInfo storage user = userInfo[_user];
return user.item[_tokenId];
}
//check deposited nft.
function depositsOf(address _user)
external
view
returns (uint256[] memory)
{
UserInfo storage user = userInfo[_user];
EnumerableSet.UintSet storage depositSet = user.nftIds;
uint256[] memory tokenIds = new uint256[] (depositSet.length());
for (uint256 i; i < depositSet.length(); i++) {
tokenIds[i] = depositSet.at(i);
}
return tokenIds;
}
function deposit(uint256 _nftId, uint256 _itemId) public {
UserInfo storage user = userInfo[msg.sender];
nftAddress.safeTransferFrom(address(msg.sender), address(this), _nftId);
user.amount = user.amount.add(1);
user.lastRewardBlock[_nftId] = block.number;
user.nftIds.add(_nftId);
if (_itemId != 0) {
applyItem(_nftId, _itemId);
}
}
function batchDeposit(uint256[] memory _nftIds) public nonReentrant {
uint256 i;
for (i = 0; i < _nftIds.length; i++) {
deposit(_nftIds[i], 0);
}
}
function viewNftRate(uint256 _nftId) public view returns (uint16) {
(bytes32 genes, , , , uint16 generation) = nftAddress.bunnies(_nftId);
if (generation == 0) {
return 10000;
}
bytes2[2] memory earnRate = [bytes2(0), 0];
assembly {
mstore(earnRate, genes)
mstore(add(earnRate, 2), genes)
}
uint16 earnRateInt = uint16(earnRate[1]);
if (earnRateInt < 180) {
return 10000;
} else if (earnRateInt < 231) {
return 15000;
} else {
return 20000;
}
}
function isUserStakedNft(address _user, uint256 _nftId) public view returns (bool) {
UserInfo storage user = userInfo[_user];
return user.nftIds.contains(_nftId);
}
function viewReward(address _user, uint256 _nftId) public view returns (uint256) {
UserInfo storage user = userInfo[_user];
uint16 nftRate = viewNftRate(_nftId);
uint256 maxBlock;
if (block.number > finalRewardBlock) {
maxBlock = finalRewardBlock;
} else {
maxBlock = block.number;
}
if (user.lastRewardBlock[_nftId] >= maxBlock) {
return 0;
}
if (user.item[_nftId].itemId != 0 && user.lastRewardBlock[_nftId] <= user.item[_nftId].endBlock) {
if (maxBlock <= user.item[_nftId].endBlock) {
return rewardPerDay.mul(maxBlock - user.lastRewardBlock[_nftId]).mul(itemRate[user.item[_nftId].itemId]).mul(nftRate).div(1e8).div(blockPerDay);
} else {
uint256 itemPeriod = user.item[_nftId].endBlock - user.lastRewardBlock[_nftId];
uint256 normalPeriod = maxBlock - user.item[_nftId].endBlock;
uint256 tmpItemRate = itemRate[user.item[_nftId].itemId];
uint256 itemPeriodReward = rewardPerDay.mul(itemPeriod).mul(tmpItemRate).mul(nftRate).div(1e8).div(blockPerDay);
uint256 normalPeriodReward = rewardPerDay.mul(normalPeriod).mul(nftRate).div(10000).div(blockPerDay);
return itemPeriodReward + normalPeriodReward;
}
} else {
return rewardPerDay.mul(maxBlock - user.lastRewardBlock[_nftId]).mul(nftRate).div(10000).div(blockPerDay);
}
}
function harvest(uint256 _nftId) public {
require(isUserStakedNft(msg.sender, _nftId), "harvest:: this nft is not yours");
UserInfo storage user = userInfo[msg.sender];
uint256 reward = viewReward(msg.sender, _nftId);
if (reward == 0) {
return;
}
user.lastRewardBlock[_nftId] = block.number;
user.harvestedReward = user.harvestedReward + reward;
rewardToken.mint(msg.sender, reward);
emit Harvest(msg.sender, _nftId, reward);
}
function harvestAll() public nonReentrant {
UserInfo storage user = userInfo[msg.sender];
EnumerableSet.UintSet storage depositSet = user.nftIds;
for (uint256 i; i < depositSet.length(); i++) {
harvest(depositSet.at(i));
}
}
function batchHarvest(uint256[] memory _nftIds) public nonReentrant {
uint256 i;
for (i = 0; i < _nftIds.length; i++) {
harvest(_nftIds[i]);
}
}
function batchWithdraw(uint256[] memory _nftIds) public nonReentrant {
uint256 i;
for (i = 0; i < _nftIds.length; i++) {
withdraw(_nftIds[i]);
}
}
function withdraw(uint256 _nftId) public {
require(isUserStakedNft(msg.sender, _nftId), "withdraw:: this nft is not yours");
UserInfo storage user = userInfo[msg.sender];
harvest(_nftId);
user.amount = user.amount.sub(1);
nftAddress.safeTransferFrom(address(this), address(msg.sender), _nftId);
user.nftIds.remove(_nftId);
emit Withdraw(msg.sender, _nftId);
}
function applyItem(uint256 _nftId, uint256 _itemId) public nonReentrant {
require(isUserStakedNft(msg.sender, _nftId), "applyItem:: this nft is not yours!");
require(itemAddress.balanceOf(msg.sender, _itemId) > 0, "applyItem:: you dont own the item!");
UserInfo storage user = userInfo[msg.sender];
require(block.number >= user.item[_nftId].endBlock, "applyItem:: only 1 ecstasy can be used at a time!");
harvest(_nftId);
itemAddress.safeTransferFrom(address(msg.sender), burnAddress, _itemId, 1, "");
user.item[_nftId].endBlock = block.number + itemEffectBlock;
user.item[_nftId].itemId = _itemId;
emit ApplyItem(msg.sender, _nftId, _itemId);
}
function onERC721Received(
address,
address,
uint256,
bytes calldata
) external pure override returns (bytes4) {
return IERC721Receiver.onERC721Received.selector;
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IPillToken","name":"_rewardToken","type":"address"},{"internalType":"contract FadeAwayBunnyNFT","name":"_nftAddress","type":"address"},{"internalType":"uint256","name":"_finalRewardBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"ApplyItem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"nftId","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"uint256","name":"_itemId","type":"uint256"}],"name":"applyItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_nftIds","type":"uint256[]"}],"name":"batchDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_nftIds","type":"uint256[]"}],"name":"batchHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_nftIds","type":"uint256[]"}],"name":"batchWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"blockPerDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"uint256","name":"_itemId","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"depositsOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalRewardBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getApliedItemInfo","outputs":[{"components":[{"internalType":"uint256","name":"endBlock","type":"uint256"},{"internalType":"uint256","name":"itemId","type":"uint256"}],"internalType":"struct BunnyStakingContract.AppliedItem","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_nftId","type":"uint256"}],"name":"isUserStakedNft","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"itemAddress","outputs":[{"internalType":"contract ERC1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"itemEffectBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"itemRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftAddress","outputs":[{"internalType":"contract FadeAwayBunnyNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IPillToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_finalRewardBlock","type":"uint256"}],"name":"setFinalRewardBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_itemEffectBlock","type":"uint256"}],"name":"setItemEffectBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPerDay","type":"uint256"}],"name":"setRewardPerDay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"}],"name":"viewNftRate","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_nftId","type":"uint256"}],"name":"viewReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405268056bc75e2d6310000060085561c4e0600955611c20600a55600b80546001600160a01b03191661dead1790553480156200003e57600080fd5b5060405162001a5c38038062001a5c8339810160408190526200006191620000f9565b6200006c33620000a9565b60018055600280546001600160a01b039485166001600160a01b03199182161790915560038054939094169216919091179091556007556200015a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000606084860312156200010f57600080fd5b83516200011c8162000141565b60208501519093506200012f8162000141565b80925050604084015190509250925092565b6001600160a01b03811681146200015757600080fd5b50565b6118f2806200016a6000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806390c35a9311610104578063bfad226a116100a2578063e49352fe11610071578063e49352fe1461043f578063f2fde38b14610448578063f7c618c11461045b578063f7e9fb631461046e57600080fd5b8063bfad226a146103e6578063ddc63262146103f9578063e2bbb1581461040c578063e3a9db1a1461041f57600080fd5b80639c038e76116100de5780639c038e761461039d578063af8f42b8146103a6578063b0b5f730146103af578063bf7f332e146103d357600080fd5b806390c35a93146103645780639744256b146103775780639b6d31c71461038a57600080fd5b80635bf8633a11610171578063715018a61161014b578063715018a61461033057806372e55399146103385780638da5cb5b1461034b5780638ed955b91461035c57600080fd5b80635bf8633a146102995780636032c3fb146102c45780636386c1c7146102ea57600080fd5b80633442d8ad116101ad5780633442d8ad14610239578063378da8591461025c5780633e3a9f201461026f578063491a30f91461028257600080fd5b8063150b7a02146101d45780631e51d569146102115780632e1a7d4d14610226575b600080fd5b6101f36101e23660046114d3565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b61022461021f366004611598565b6104e7565b005b6102246102343660046116d5565b610562565b61024c61024736600461156e565b610689565b6040519015158152602001610208565b61022461026a3660046116d5565b6106b8565b61022461027d366004611707565b6106e7565b61028b60075481565b604051908152602001610208565b6003546102ac906001600160a01b031681565b6040516001600160a01b039091168152602001610208565b6102d76102d23660046116d5565b6109c3565b60405161ffff9091168152602001610208565b61031b6102f83660046114b8565b6001600160a01b0316600090815260056020526040902080546001909101549091565b60408051928352602083019190915201610208565b610224610ac1565b610224610346366004611598565b610af7565b6000546001600160a01b03166102ac565b610224610b5f565b6102246103723660046116d5565b610bd5565b6004546102ac906001600160a01b031681565b6102246103983660046116d5565b610c04565b61028b60095481565b61028b60085481565b6102d76103bd3660046116d5565b60066020526000908152604090205461ffff1681565b6102246103e1366004611598565b610c33565b61028b6103f436600461156e565b610c9b565b6102246104073660046116d5565b610eeb565b61022461041a366004611707565b61102f565b61043261042d3660046114b8565b6110f2565b6040516102089190611729565b61028b600a5481565b6102246104563660046114b8565b6111b4565b6002546102ac906001600160a01b031681565b6104cc61047c36600461156e565b604080518082018252600080825260209182018190526001600160a01b03949094168452600581528184209284526002909201825291829020825180840190935280548352600101549082015290565b60408051825181526020928301519281019290925201610208565b600260015414156105135760405162461bcd60e51b815260040161050a906117a2565b60405180910390fd5b600260015560005b815181101561055a5761054882828151811061053957610539611890565b6020026020010151600061102f565b8061055281611849565b91505061051b565b505060018055565b61056c3382610689565b6105b85760405162461bcd60e51b815260206004820181905260248201527f77697468647261773a3a2074686973206e6674206973206e6f7420796f757273604482015260640161050a565b3360009081526005602052604090206105d082610eeb565b80546105dd90600161124f565b8155600354604051632142170760e11b8152306004820152336024820152604481018490526001600160a01b03909116906342842e0e90606401600060405180830381600087803b15801561063157600080fd5b505af1158015610645573d6000803e3d6000fd5b50610657925050506003820183611262565b50604051829033907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436490600090a35050565b6001600160a01b03821660009081526005602052604081206106ae600382018461126e565b9150505b92915050565b6000546001600160a01b031633146106e25760405162461bcd60e51b815260040161050a9061176d565b600955565b6002600154141561070a5760405162461bcd60e51b815260040161050a906117a2565b60026001556107193383610689565b6107705760405162461bcd60e51b815260206004820152602260248201527f6170706c794974656d3a3a2074686973206e6674206973206e6f7420796f7572604482015261732160f01b606482015260840161050a565b60048054604051627eeac760e11b81523392810192909252602482018390526000916001600160a01b039091169062fdd58e9060440160206040518083038186803b1580156107be57600080fd5b505afa1580156107d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f691906116ee565b1161084e5760405162461bcd60e51b815260206004820152602260248201527f6170706c794974656d3a3a20796f7520646f6e74206f776e20746865206974656044820152616d2160f01b606482015260840161050a565b33600090815260056020908152604080832085845260028101909252909120544310156108d75760405162461bcd60e51b815260206004820152603160248201527f6170706c794974656d3a3a206f6e6c79203120656373746173792063616e206260448201527065207573656420617420612074696d652160781b606482015260840161050a565b6108e083610eeb565b60048054600b54604051637921219560e11b815233938101939093526001600160a01b039081166024840152604483018590526001606484015260a06084840152600060a4840152169063f242432a9060c401600060405180830381600087803b15801561094d57600080fd5b505af1158015610961573d6000803e3d6000fd5b505050506009544361097391906117d9565b6000848152600283016020526040808220928355600190920184905590518391859133917f876aa8a72ace7ae39101d4957250d89245f71b814b52354a12e1a116ac1eb27c91a450506001805550565b60035460405163cf7bc71760e01b815260048101839052600091829182916001600160a01b03169063cf7bc7179060240160a06040518083038186803b158015610a0c57600080fd5b505afa158015610a20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a44919061165d565b945050505091508061ffff1660001415610a6357506127109392505050565b60408051808201909152600060208201908152838252600282018490525160f01c60b4811015610a9a575061271095945050505050565b60e78161ffff161015610ab45750613a9895945050505050565b50614e2095945050505050565b6000546001600160a01b03163314610aeb5760405162461bcd60e51b815260040161050a9061176d565b610af56000611286565b565b60026001541415610b1a5760405162461bcd60e51b815260040161050a906117a2565b600260015560005b815181101561055a57610b4d828281518110610b4057610b40611890565b6020026020010151610562565b80610b5781611849565b915050610b22565b60026001541415610b825760405162461bcd60e51b815260040161050a906117a2565b60026001553360009081526005602052604081209060038201905b610ba6826112d6565b811015610bcc57610bba61040783836112e0565b80610bc481611849565b915050610b9d565b50506001805550565b6000546001600160a01b03163314610bff5760405162461bcd60e51b815260040161050a9061176d565b600855565b6000546001600160a01b03163314610c2e5760405162461bcd60e51b815260040161050a9061176d565b600755565b60026001541415610c565760405162461bcd60e51b815260040161050a906117a2565b600260015560005b815181101561055a57610c89828281518110610c7c57610c7c611890565b6020026020010151610eeb565b80610c9381611849565b915050610c5e565b6001600160a01b038216600090815260056020526040812081610cbd846109c3565b90506000600754431115610cd45750600754610cd7565b50435b60008581526005840160205260409020548111610cfa57600093505050506106b2565b600085815260028401602052604090206001015415801590610d3957506000858152600284016020908152604080832054600587019092529091205411155b15610eb35760008581526002840160205260409020548111610dd157600a546000868152600285016020908152604080832060010154835260068252808320548984526005880190925290912054610dc79291610dc1916305f5e10091839161ffff808a1692610dbb929116908290610db2908b611832565b600854906112ec565b906112ec565b906112f8565b93505050506106b2565b600085815260058401602090815260408083205460028701909252822054610df99190611832565b600087815260028601602052604081205491925090610e189084611832565b600088815260028701602090815260408083206001015483526006909152812054600a5460085493945061ffff91821693610e6b92610dc1916305f5e100918391908c1690610dbb90899082908d6112ec565b90506000610e98600a54610dc1612710610dc18b61ffff16610dbb8a6008546112ec90919063ffffffff16565b9050610ea481836117d9565b985050505050505050506106b2565b610dc7600a54610dc1612710610dc18661ffff16610dbb8960050160008d81526020019081526020016000205488610db29190611832565b610ef53382610689565b610f415760405162461bcd60e51b815260206004820152601f60248201527f686172766573743a3a2074686973206e6674206973206e6f7420796f75727300604482015260640161050a565b33600081815260056020526040812091610f5b9084610c9b565b905080610f6757505050565b600083815260058301602052604090204390556001820154610f8a9082906117d9565b60018301556002546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015610fdb57600080fd5b505af1158015610fef573d6000803e3d6000fd5b50506040518381528592503391507f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae06609249549060200160405180910390a3505050565b33600081815260056020526040908190206003549151632142170760e11b8152600481019390935230602484015260448301859052916001600160a01b03909116906342842e0e90606401600060405180830381600087803b15801561109457600080fd5b505af11580156110a8573d6000803e3d6000fd5b505082546110ba925090506001611304565b8155600083815260058201602052604090204390556110dc6003820184611310565b5081156110ed576110ed83836106e7565b505050565b6001600160a01b0381166000908152600560205260408120606091600382019061111b826112d6565b67ffffffffffffffff811115611133576111336118a6565b60405190808252806020026020018201604052801561115c578160200160208202803683370190505b50905060005b61116b836112d6565b8110156111ab5761117c83826112e0565b82828151811061118e5761118e611890565b6020908102919091010152806111a381611849565b915050611162565b50949350505050565b6000546001600160a01b031633146111de5760405162461bcd60e51b815260040161050a9061176d565b6001600160a01b0381166112435760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161050a565b61124c81611286565b50565b600061125b8284611832565b9392505050565b600061125b838361131c565b6000818152600183016020526040812054151561125b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006106b2825490565b600061125b838361140f565b600061125b8284611813565b600061125b82846117f1565b600061125b82846117d9565b600061125b8383611439565b60008181526001830160205260408120548015611405576000611340600183611832565b855490915060009061135490600190611832565b90508181146113b957600086600001828154811061137457611374611890565b906000526020600020015490508087600001848154811061139757611397611890565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806113ca576113ca61187a565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106b2565b60009150506106b2565b600082600001828154811061142657611426611890565b9060005260206000200154905092915050565b6000818152600183016020526040812054611480575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106b2565b5060006106b2565b80356001600160a01b038116811461149f57600080fd5b919050565b805163ffffffff8116811461149f57600080fd5b6000602082840312156114ca57600080fd5b61125b82611488565b6000806000806000608086880312156114eb57600080fd5b6114f486611488565b945061150260208701611488565b935060408601359250606086013567ffffffffffffffff8082111561152657600080fd5b818801915088601f83011261153a57600080fd5b81358181111561154957600080fd5b89602082850101111561155b57600080fd5b9699959850939650602001949392505050565b6000806040838503121561158157600080fd5b61158a83611488565b946020939093013593505050565b600060208083850312156115ab57600080fd5b823567ffffffffffffffff808211156115c357600080fd5b818501915085601f8301126115d757600080fd5b8135818111156115e9576115e96118a6565b8060051b604051601f19603f8301168101818110858211171561160e5761160e6118a6565b604052828152858101935084860182860187018a101561162d57600080fd5b600095505b83861015611650578035855260019590950194938601938601611632565b5098975050505050505050565b600080600080600060a0868803121561167557600080fd5b85519450602086015167ffffffffffffffff8116811461169457600080fd5b93506116a2604087016114a4565b92506116b0606087016114a4565b9150608086015161ffff811681146116c757600080fd5b809150509295509295909350565b6000602082840312156116e757600080fd5b5035919050565b60006020828403121561170057600080fd5b5051919050565b6000806040838503121561171a57600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b8181101561176157835183529284019291840191600101611745565b50909695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600082198211156117ec576117ec611864565b500190565b60008261180e57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561182d5761182d611864565b500290565b60008282101561184457611844611864565b500390565b600060001982141561185d5761185d611864565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220954d64f56592a7da177a8dbc41c7de92803069baa1adaaa06499511464536b2f64736f6c63430008070033000000000000000000000000d8cce39be1a3fb15c648dbf13ba4c47b77e1d873000000000000000000000000b49b0a61725a69f36f06c394720dea462e797fb4000000000000000000000000000000000000000000000000000009184e18d1a2
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c806390c35a9311610104578063bfad226a116100a2578063e49352fe11610071578063e49352fe1461043f578063f2fde38b14610448578063f7c618c11461045b578063f7e9fb631461046e57600080fd5b8063bfad226a146103e6578063ddc63262146103f9578063e2bbb1581461040c578063e3a9db1a1461041f57600080fd5b80639c038e76116100de5780639c038e761461039d578063af8f42b8146103a6578063b0b5f730146103af578063bf7f332e146103d357600080fd5b806390c35a93146103645780639744256b146103775780639b6d31c71461038a57600080fd5b80635bf8633a11610171578063715018a61161014b578063715018a61461033057806372e55399146103385780638da5cb5b1461034b5780638ed955b91461035c57600080fd5b80635bf8633a146102995780636032c3fb146102c45780636386c1c7146102ea57600080fd5b80633442d8ad116101ad5780633442d8ad14610239578063378da8591461025c5780633e3a9f201461026f578063491a30f91461028257600080fd5b8063150b7a02146101d45780631e51d569146102115780632e1a7d4d14610226575b600080fd5b6101f36101e23660046114d3565b630a85bd0160e11b95945050505050565b6040516001600160e01b031990911681526020015b60405180910390f35b61022461021f366004611598565b6104e7565b005b6102246102343660046116d5565b610562565b61024c61024736600461156e565b610689565b6040519015158152602001610208565b61022461026a3660046116d5565b6106b8565b61022461027d366004611707565b6106e7565b61028b60075481565b604051908152602001610208565b6003546102ac906001600160a01b031681565b6040516001600160a01b039091168152602001610208565b6102d76102d23660046116d5565b6109c3565b60405161ffff9091168152602001610208565b61031b6102f83660046114b8565b6001600160a01b0316600090815260056020526040902080546001909101549091565b60408051928352602083019190915201610208565b610224610ac1565b610224610346366004611598565b610af7565b6000546001600160a01b03166102ac565b610224610b5f565b6102246103723660046116d5565b610bd5565b6004546102ac906001600160a01b031681565b6102246103983660046116d5565b610c04565b61028b60095481565b61028b60085481565b6102d76103bd3660046116d5565b60066020526000908152604090205461ffff1681565b6102246103e1366004611598565b610c33565b61028b6103f436600461156e565b610c9b565b6102246104073660046116d5565b610eeb565b61022461041a366004611707565b61102f565b61043261042d3660046114b8565b6110f2565b6040516102089190611729565b61028b600a5481565b6102246104563660046114b8565b6111b4565b6002546102ac906001600160a01b031681565b6104cc61047c36600461156e565b604080518082018252600080825260209182018190526001600160a01b03949094168452600581528184209284526002909201825291829020825180840190935280548352600101549082015290565b60408051825181526020928301519281019290925201610208565b600260015414156105135760405162461bcd60e51b815260040161050a906117a2565b60405180910390fd5b600260015560005b815181101561055a5761054882828151811061053957610539611890565b6020026020010151600061102f565b8061055281611849565b91505061051b565b505060018055565b61056c3382610689565b6105b85760405162461bcd60e51b815260206004820181905260248201527f77697468647261773a3a2074686973206e6674206973206e6f7420796f757273604482015260640161050a565b3360009081526005602052604090206105d082610eeb565b80546105dd90600161124f565b8155600354604051632142170760e11b8152306004820152336024820152604481018490526001600160a01b03909116906342842e0e90606401600060405180830381600087803b15801561063157600080fd5b505af1158015610645573d6000803e3d6000fd5b50610657925050506003820183611262565b50604051829033907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436490600090a35050565b6001600160a01b03821660009081526005602052604081206106ae600382018461126e565b9150505b92915050565b6000546001600160a01b031633146106e25760405162461bcd60e51b815260040161050a9061176d565b600955565b6002600154141561070a5760405162461bcd60e51b815260040161050a906117a2565b60026001556107193383610689565b6107705760405162461bcd60e51b815260206004820152602260248201527f6170706c794974656d3a3a2074686973206e6674206973206e6f7420796f7572604482015261732160f01b606482015260840161050a565b60048054604051627eeac760e11b81523392810192909252602482018390526000916001600160a01b039091169062fdd58e9060440160206040518083038186803b1580156107be57600080fd5b505afa1580156107d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f691906116ee565b1161084e5760405162461bcd60e51b815260206004820152602260248201527f6170706c794974656d3a3a20796f7520646f6e74206f776e20746865206974656044820152616d2160f01b606482015260840161050a565b33600090815260056020908152604080832085845260028101909252909120544310156108d75760405162461bcd60e51b815260206004820152603160248201527f6170706c794974656d3a3a206f6e6c79203120656373746173792063616e206260448201527065207573656420617420612074696d652160781b606482015260840161050a565b6108e083610eeb565b60048054600b54604051637921219560e11b815233938101939093526001600160a01b039081166024840152604483018590526001606484015260a06084840152600060a4840152169063f242432a9060c401600060405180830381600087803b15801561094d57600080fd5b505af1158015610961573d6000803e3d6000fd5b505050506009544361097391906117d9565b6000848152600283016020526040808220928355600190920184905590518391859133917f876aa8a72ace7ae39101d4957250d89245f71b814b52354a12e1a116ac1eb27c91a450506001805550565b60035460405163cf7bc71760e01b815260048101839052600091829182916001600160a01b03169063cf7bc7179060240160a06040518083038186803b158015610a0c57600080fd5b505afa158015610a20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a44919061165d565b945050505091508061ffff1660001415610a6357506127109392505050565b60408051808201909152600060208201908152838252600282018490525160f01c60b4811015610a9a575061271095945050505050565b60e78161ffff161015610ab45750613a9895945050505050565b50614e2095945050505050565b6000546001600160a01b03163314610aeb5760405162461bcd60e51b815260040161050a9061176d565b610af56000611286565b565b60026001541415610b1a5760405162461bcd60e51b815260040161050a906117a2565b600260015560005b815181101561055a57610b4d828281518110610b4057610b40611890565b6020026020010151610562565b80610b5781611849565b915050610b22565b60026001541415610b825760405162461bcd60e51b815260040161050a906117a2565b60026001553360009081526005602052604081209060038201905b610ba6826112d6565b811015610bcc57610bba61040783836112e0565b80610bc481611849565b915050610b9d565b50506001805550565b6000546001600160a01b03163314610bff5760405162461bcd60e51b815260040161050a9061176d565b600855565b6000546001600160a01b03163314610c2e5760405162461bcd60e51b815260040161050a9061176d565b600755565b60026001541415610c565760405162461bcd60e51b815260040161050a906117a2565b600260015560005b815181101561055a57610c89828281518110610c7c57610c7c611890565b6020026020010151610eeb565b80610c9381611849565b915050610c5e565b6001600160a01b038216600090815260056020526040812081610cbd846109c3565b90506000600754431115610cd45750600754610cd7565b50435b60008581526005840160205260409020548111610cfa57600093505050506106b2565b600085815260028401602052604090206001015415801590610d3957506000858152600284016020908152604080832054600587019092529091205411155b15610eb35760008581526002840160205260409020548111610dd157600a546000868152600285016020908152604080832060010154835260068252808320548984526005880190925290912054610dc79291610dc1916305f5e10091839161ffff808a1692610dbb929116908290610db2908b611832565b600854906112ec565b906112ec565b906112f8565b93505050506106b2565b600085815260058401602090815260408083205460028701909252822054610df99190611832565b600087815260028601602052604081205491925090610e189084611832565b600088815260028701602090815260408083206001015483526006909152812054600a5460085493945061ffff91821693610e6b92610dc1916305f5e100918391908c1690610dbb90899082908d6112ec565b90506000610e98600a54610dc1612710610dc18b61ffff16610dbb8a6008546112ec90919063ffffffff16565b9050610ea481836117d9565b985050505050505050506106b2565b610dc7600a54610dc1612710610dc18661ffff16610dbb8960050160008d81526020019081526020016000205488610db29190611832565b610ef53382610689565b610f415760405162461bcd60e51b815260206004820152601f60248201527f686172766573743a3a2074686973206e6674206973206e6f7420796f75727300604482015260640161050a565b33600081815260056020526040812091610f5b9084610c9b565b905080610f6757505050565b600083815260058301602052604090204390556001820154610f8a9082906117d9565b60018301556002546040516340c10f1960e01b8152336004820152602481018390526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015610fdb57600080fd5b505af1158015610fef573d6000803e3d6000fd5b50506040518381528592503391507f71bab65ced2e5750775a0613be067df48ef06cf92a496ebf7663ae06609249549060200160405180910390a3505050565b33600081815260056020526040908190206003549151632142170760e11b8152600481019390935230602484015260448301859052916001600160a01b03909116906342842e0e90606401600060405180830381600087803b15801561109457600080fd5b505af11580156110a8573d6000803e3d6000fd5b505082546110ba925090506001611304565b8155600083815260058201602052604090204390556110dc6003820184611310565b5081156110ed576110ed83836106e7565b505050565b6001600160a01b0381166000908152600560205260408120606091600382019061111b826112d6565b67ffffffffffffffff811115611133576111336118a6565b60405190808252806020026020018201604052801561115c578160200160208202803683370190505b50905060005b61116b836112d6565b8110156111ab5761117c83826112e0565b82828151811061118e5761118e611890565b6020908102919091010152806111a381611849565b915050611162565b50949350505050565b6000546001600160a01b031633146111de5760405162461bcd60e51b815260040161050a9061176d565b6001600160a01b0381166112435760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161050a565b61124c81611286565b50565b600061125b8284611832565b9392505050565b600061125b838361131c565b6000818152600183016020526040812054151561125b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006106b2825490565b600061125b838361140f565b600061125b8284611813565b600061125b82846117f1565b600061125b82846117d9565b600061125b8383611439565b60008181526001830160205260408120548015611405576000611340600183611832565b855490915060009061135490600190611832565b90508181146113b957600086600001828154811061137457611374611890565b906000526020600020015490508087600001848154811061139757611397611890565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806113ca576113ca61187a565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506106b2565b60009150506106b2565b600082600001828154811061142657611426611890565b9060005260206000200154905092915050565b6000818152600183016020526040812054611480575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556106b2565b5060006106b2565b80356001600160a01b038116811461149f57600080fd5b919050565b805163ffffffff8116811461149f57600080fd5b6000602082840312156114ca57600080fd5b61125b82611488565b6000806000806000608086880312156114eb57600080fd5b6114f486611488565b945061150260208701611488565b935060408601359250606086013567ffffffffffffffff8082111561152657600080fd5b818801915088601f83011261153a57600080fd5b81358181111561154957600080fd5b89602082850101111561155b57600080fd5b9699959850939650602001949392505050565b6000806040838503121561158157600080fd5b61158a83611488565b946020939093013593505050565b600060208083850312156115ab57600080fd5b823567ffffffffffffffff808211156115c357600080fd5b818501915085601f8301126115d757600080fd5b8135818111156115e9576115e96118a6565b8060051b604051601f19603f8301168101818110858211171561160e5761160e6118a6565b604052828152858101935084860182860187018a101561162d57600080fd5b600095505b83861015611650578035855260019590950194938601938601611632565b5098975050505050505050565b600080600080600060a0868803121561167557600080fd5b85519450602086015167ffffffffffffffff8116811461169457600080fd5b93506116a2604087016114a4565b92506116b0606087016114a4565b9150608086015161ffff811681146116c757600080fd5b809150509295509295909350565b6000602082840312156116e757600080fd5b5035919050565b60006020828403121561170057600080fd5b5051919050565b6000806040838503121561171a57600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b8181101561176157835183529284019291840191600101611745565b50909695505050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600082198211156117ec576117ec611864565b500190565b60008261180e57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561182d5761182d611864565b500290565b60008282101561184457611844611864565b500390565b600060001982141561185d5761185d611864565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220954d64f56592a7da177a8dbc41c7de92803069baa1adaaa06499511464536b2f64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d8cce39be1a3fb15c648dbf13ba4c47b77e1d873000000000000000000000000b49b0a61725a69f36f06c394720dea462e797fb4000000000000000000000000000000000000000000000000000009184e18d1a2
-----Decoded View---------------
Arg [0] : _rewardToken (address): 0xD8cCe39Be1a3Fb15C648dBF13ba4c47b77e1d873
Arg [1] : _nftAddress (address): 0xb49B0A61725A69f36f06c394720DEa462E797Fb4
Arg [2] : _finalRewardBlock (uint256): 9999994114466
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d8cce39be1a3fb15c648dbf13ba4c47b77e1d873
Arg [1] : 000000000000000000000000b49b0a61725a69f36f06c394720dea462e797fb4
Arg [2] : 000000000000000000000000000000000000000000000000000009184e18d1a2
Deployed Bytecode Sourcemap
73712:8755:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;82245:219;;;;;;:::i;:::-;-1:-1:-1;;;82245:219:0;;;;;;;;;;;-1:-1:-1;;;;;;6566:33:1;;;6548:52;;6536:2;6521:18;82245:219:0;;;;;;;;77446:192;;;;;;:::i;:::-;;:::i;:::-;;81092:416;;;;;;:::i;:::-;;:::i;78242:191::-;;;;;;:::i;:::-;;:::i;:::-;;;6377:14:1;;6370:22;6352:41;;6340:2;6325:18;78242:191:0;6212:187:1;75692:122:0;;;;;;:::i;:::-;;:::i;81516:721::-;;;;;;:::i;:::-;;:::i;74663:31::-;;;;;;;;;11016:25:1;;;11004:2;10989:18;74663:31:0;10870:177:1;74458:34:0;;;;;-1:-1:-1;;;;;74458:34:0;;;;;;-1:-1:-1;;;;;4232:32:1;;;4214:51;;4202:2;4187:18;74458:34:0;4068:203:1;77646:588:0;;;;;;:::i;:::-;;:::i;:::-;;;10851:6:1;10839:19;;;10821:38;;10809:2;10794:18;77646:588:0;10677:188:1;76161:190:0;;;;;;:::i;:::-;-1:-1:-1;;;;;76273:15:0;76220:7;76273:15;;;:8;:15;;;;;76309:11;;76322:20;;;;;76309:11;;76161:190;;;;;11226:25:1;;;11282:2;11267:18;;11260:34;;;;11199:18;76161:190:0;11052:248:1;56127:94:0;;;:::i;80893:191::-;;;;;;:::i;:::-;;:::i;55476:87::-;55522:7;55549:6;-1:-1:-1;;;;;55549:6:0;55476:87;;80420:268;;;:::i;75862:110::-;;;;;;:::i;:::-;;:::i;74499:26::-;;;;;-1:-1:-1;;;;;74499:26:0;;;76027:126;;;;;;:::i;:::-;;:::i;74821:38::-;;;;;;74754:40;;;;;;74576:42;;;;;;:::i;:::-;;;;;;;;;;;;;;;;80696:189;;;;;;:::i;:::-;;:::i;78441:1453::-;;;;;;:::i;:::-;;:::i;79902:510::-;;;;;;:::i;:::-;;:::i;77032:406::-;;;;;;:::i;:::-;;:::i;76596:428::-;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;74896:33::-;;;;;;56376:192;;;;;;:::i;:::-;;:::i;74422:29::-;;;;;-1:-1:-1;;;;;74422:29:0;;;76359:199;;;;;;:::i;:::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;76498:15:0;;;;;;:8;:15;;;;;76531:19;;;:9;;;;:19;;;;;;76524:26;;;;;;;;;;;;;;;;;;;;76359:199;;;;;10589:13:1;;10571:32;;10659:4;10647:17;;;10641:24;10619:20;;;10612:54;;;;10544:18;76359:199:0;10367:305:1;77446:192:0;1812:1;2410:7;;:19;;2402:63;;;;-1:-1:-1;;;2402:63:0;;;;;;;:::i;:::-;;;;;;;;;1812:1;2543:7;:18;77525:9:::1;77545:86;77561:7;:14;77557:1;:18;77545:86;;;77597:22;77605:7;77613:1;77605:10;;;;;;;;:::i;:::-;;;;;;;77617:1;77597:7;:22::i;:::-;77577:3:::0;::::1;::::0;::::1;:::i;:::-;;;;77545:86;;;-1:-1:-1::0;;1768:1:0;2722:22;;77446:192::o;81092:416::-;81150:35;81166:10;81178:6;81150:15;:35::i;:::-;81142:80;;;;-1:-1:-1;;;81142:80:0;;7903:2:1;81142:80:0;;;7885:21:1;;;7922:18;;;7915:30;7981:34;7961:18;;;7954:62;8033:18;;81142:80:0;7701:356:1;81142:80:0;81264:10;81231:21;81255:20;;;:8;:20;;;;;81284:15;81292:6;81284:7;:15::i;:::-;81322:11;;:18;;81338:1;81322:15;:18::i;:::-;81308:32;;81349:10;;:71;;-1:-1:-1;;;81349:71:0;;81385:4;81349:71;;;4516:34:1;81400:10:0;4566:18:1;;;4559:43;4618:18;;;4611:34;;;-1:-1:-1;;;;;81349:10:0;;;;:27;;4451:18:1;;81349:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;81429:26:0;;-1:-1:-1;;;81429:11:0;;;81448:6;81429:18;:26::i;:::-;-1:-1:-1;81472:28:0;;81493:6;;81481:10;;81472:28;;;;;81133:375;81092:416;:::o;78242:191::-;-1:-1:-1;;;;;78358:15:0;;78319:4;78358:15;;;:8;:15;;;;;78397:28;:11;;;78418:6;78397:20;:28::i;:::-;78390:35;;;78242:191;;;;;:::o;75692:122::-;55522:7;55549:6;-1:-1:-1;;;;;55549:6:0;54336:10;55696:23;55688:68;;;;-1:-1:-1;;;55688:68:0;;;;;;;:::i;:::-;75772:15:::1;:34:::0;75692:122::o;81516:721::-;1812:1;2410:7;;:19;;2402:63;;;;-1:-1:-1;;;2402:63:0;;;;;;;:::i;:::-;1812:1;2543:7;:18;81605:35:::1;81621:10;81633:6:::0;81605:15:::1;:35::i;:::-;81597:82;;;::::0;-1:-1:-1;;;81597:82:0;;8682:2:1;81597:82:0::1;::::0;::::1;8664:21:1::0;8721:2;8701:18;;;8694:30;8760:34;8740:18;;;8733:62;-1:-1:-1;;;8811:18:1;;;8804:32;8853:19;;81597:82:0::1;8480:398:1::0;81597:82:0::1;81696:11;::::0;;:42:::1;::::0;-1:-1:-1;;;81696:42:0;;81718:10:::1;81696:42:::0;;::::1;5470:51:1::0;;;;5537:18;;;5530:34;;;81741:1:0::1;::::0;-1:-1:-1;;;;;81696:11:0;;::::1;::::0;:21:::1;::::0;5443:18:1;;81696:42:0::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:46;81688:93;;;::::0;-1:-1:-1;;;81688:93:0;;9446:2:1;81688:93:0::1;::::0;::::1;9428:21:1::0;9485:2;9465:18;;;9458:30;9524:34;9504:18;;;9497:62;-1:-1:-1;;;9575:18:1;;;9568:32;9617:19;;81688:93:0::1;9244:398:1::0;81688:93:0::1;81823:10;81790:21;81814:20:::0;;;:8:::1;:20;::::0;;;;;;;81867:17;;;:9:::1;::::0;::::1;:17:::0;;;;;;:26;81851:12:::1;:42;;81843:104;;;::::0;-1:-1:-1;;;81843:104:0;;8264:2:1;81843:104:0::1;::::0;::::1;8246:21:1::0;8303:2;8283:18;;;8276:30;8342:34;8322:18;;;8315:62;-1:-1:-1;;;8393:18:1;;;8386:47;8450:19;;81843:104:0::1;8062:413:1::0;81843:104:0::1;81964:15;81972:6;81964:7;:15::i;:::-;81988:11;::::0;;82038::::1;::::0;81988:78:::1;::::0;-1:-1:-1;;;81988:78:0;;82025:10:::1;81988:78:::0;;::::1;4997:34:1::0;;;;-1:-1:-1;;;;;82038:11:0;;::::1;5047:18:1::0;;;5040:43;5099:18;;;5092:34;;;81988:11:0;5142:18:1;;;5135:34;4977:3;5185:19;;;5178:32;-1:-1:-1;5226:19:1;;;5219:30;81988:11:0::1;::::0;:28:::1;::::0;5266:19:1;;81988:78:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;82119:15;;82104:12;:30;;;;:::i;:::-;82075:17;::::0;;;:9:::1;::::0;::::1;:17;::::0;;;;;:59;;;82143:24:::1;::::0;;::::1;:34:::0;;;82191:38;;82170:7;;82085:6;;82201:10:::1;::::0;82191:38:::1;::::0;::::1;-1:-1:-1::0;;1768:1:0;2722:22;;-1:-1:-1;81516:721:0:o;77646:588::-;77764:10;;:26;;-1:-1:-1;;;77764:26:0;;;;;11016:25:1;;;77704:6:0;;;;;;-1:-1:-1;;;;;77764:10:0;;:18;;10989::1;;77764:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;77721:69;;;;;;;77805:10;:15;;77819:1;77805:15;77801:54;;;-1:-1:-1;77840:5:0;;77646:588;-1:-1:-1;;;77646:588:0:o;77801:54::-;77865:42;;;;;;;;;-1:-1:-1;77865:42:0;;;;;;77936:23;;;77990:1;77976:16;;77969:31;;;78047:11;78040:19;;78088:3;78074:17;;78070:157;;;-1:-1:-1;78111:5:0;;77646:588;-1:-1:-1;;;;;77646:588:0:o;78070:157::-;78150:3;78136:11;:17;;;78132:95;;;-1:-1:-1;78173:5:0;;77646:588;-1:-1:-1;;;;;77646:588:0:o;78132:95::-;-1:-1:-1;78212:5:0;;77646:588;-1:-1:-1;;;;;77646:588:0:o;56127:94::-;55522:7;55549:6;-1:-1:-1;;;;;55549:6:0;54336:10;55696:23;55688:68;;;;-1:-1:-1;;;55688:68:0;;;;;;;:::i;:::-;56192:21:::1;56210:1;56192:9;:21::i;:::-;56127:94::o:0;80893:191::-;1812:1;2410:7;;:19;;2402:63;;;;-1:-1:-1;;;2402:63:0;;;;;;;:::i;:::-;1812:1;2543:7;:18;80973:9:::1;80993:84;81009:7;:14;81005:1;:18;80993:84;;;81045:20;81054:7;81062:1;81054:10;;;;;;;;:::i;:::-;;;;;;;81045:8;:20::i;:::-;81025:3:::0;::::1;::::0;::::1;:::i;:::-;;;;80993:84;;80420:268:::0;1812:1;2410:7;;:19;;2402:63;;;;-1:-1:-1;;;2402:63:0;;;;;;;:::i;:::-;1812:1;2543:7;:18;80504:10:::1;80471:21;80495:20:::0;;;:8:::1;:20;::::0;;;;;80567:11:::1;::::0;::::1;::::0;80589:92:::1;80609:19;:10;:17;:19::i;:::-;80605:1;:23;80589:92;;;80646:25;80654:16;:10:::0;80668:1;80654:13:::1;:16::i;80646:25::-;80630:3:::0;::::1;::::0;::::1;:::i;:::-;;;;80589:92;;;-1:-1:-1::0;;1768:1:0;2722:22;;-1:-1:-1;80420:268:0:o;75862:110::-;55522:7;55549:6;-1:-1:-1;;;;;55549:6:0;54336:10;55696:23;55688:68;;;;-1:-1:-1;;;55688:68:0;;;;;;;:::i;:::-;75936:12:::1;:28:::0;75862:110::o;76027:126::-;55522:7;55549:6;-1:-1:-1;;;;;55549:6:0;54336:10;55696:23;55688:68;;;;-1:-1:-1;;;55688:68:0;;;;;;;:::i;:::-;76109:16:::1;:36:::0;76027:126::o;80696:189::-;1812:1;2410:7;;:19;;2402:63;;;;-1:-1:-1;;;2402:63:0;;;;;;;:::i;:::-;1812:1;2543:7;:18;80775:9:::1;80795:83;80811:7;:14;80807:1;:18;80795:83;;;80847:19;80855:7;80863:1;80855:10;;;;;;;;:::i;:::-;;;;;;;80847:7;:19::i;:::-;80827:3:::0;::::1;::::0;::::1;:::i;:::-;;;;80795:83;;78441:1453:::0;-1:-1:-1;;;;;78555:15:0;;78513:7;78555:15;;;:8;:15;;;;;78513:7;78596:19;78608:6;78596:11;:19::i;:::-;78579:36;;78624:16;78670;;78655:12;:31;78651:135;;;-1:-1:-1;78710:16:0;;78651:135;;;-1:-1:-1;78764:12:0;78651:135;78800:28;;;;:20;;;:28;;;;;;:40;-1:-1:-1;78796:75:0;;78860:1;78853:8;;;;;;;78796:75;78885:17;;;;:9;;;:17;;;;;:24;;;:29;;;;:91;;-1:-1:-1;78950:17:0;;;;:9;;;:17;;;;;;;;:26;78918:20;;;:28;;;;;;;:58;;78885:91;78881:1006;;;79005:17;;;;:9;;;:17;;;;;:26;78993:38;;78989:757;;79177:11;;79115:34;79124:17;;;:9;;;:17;;;;;;;;:24;;;79115:34;;:8;:34;;;;;;79081:28;;;:20;;;:28;;;;;;;79053:136;;79177:11;79053:119;;79168:3;;79053:119;;:110;;;;;:97;;79115:34;;;79053:97;;79070:39;;:8;:39;:::i;:::-;79053:12;;;:16;:57::i;:::-;:61;;:97::i;:110::-;:114;;:119::i;:136::-;79046:143;;;;;;;78989:757;79220:18;79270:28;;;:20;;;:28;;;;;;;;;79241:9;;;:17;;;;;:26;:57;;79270:28;79241:57;:::i;:::-;79311:20;79345:17;;;:9;;;:17;;;;;:26;79220:78;;-1:-1:-1;79311:20:0;79334:37;;:8;:37;:::i;:::-;79384:19;79415:17;;;:9;;;:17;;;;;;;;:24;;;79406:34;;:8;:34;;;;;;79552:11;;79480:12;;79311:60;;-1:-1:-1;79406:34:0;;;;;79480:84;;:67;;79543:3;;79480:67;;:58;;;;:45;;79406:34;;79480:45;;79497:10;79480:16;:28::i;:84::-;79453:111;;79577:26;79606:71;79665:11;;79606:54;79654:5;79606:43;79641:7;79606:43;;:30;79623:12;79606;;:16;;:30;;;;:::i;:71::-;79577:100;-1:-1:-1;79697:37:0;79577:100;79697:16;:37;:::i;:::-;79690:44;;;;;;;;;;;;78881:1006;79779:98;79865:11;;79779:81;79854:5;79779:70;79841:7;79779:70;;:57;79807:4;:20;;:28;79828:6;79807:28;;;;;;;;;;;;79796:8;:39;;;;:::i;79902:510::-;79959:35;79975:10;79987:6;79959:15;:35::i;:::-;79951:79;;;;-1:-1:-1;;;79951:79:0;;10209:2:1;79951:79:0;;;10191:21:1;10248:2;10228:18;;;10221:30;10287:33;10267:18;;;10260:61;10338:18;;79951:79:0;10007:355:1;79951:79:0;80072:10;80039:21;80063:20;;;:8;:20;;;;;;80109:30;;80132:6;80109:10;:30::i;:::-;80092:47;-1:-1:-1;80154:11:0;80150:44;;80178:7;;79902:510;:::o;80150:44::-;80204:28;;;;:20;;;:28;;;;;80235:12;80204:43;;80279:20;;;;:29;;80302:6;;80279:29;:::i;:::-;80256:20;;;:52;80317:11;;:36;;-1:-1:-1;;;80317:36:0;;80334:10;80317:36;;;5470:51:1;5537:18;;;5530:34;;;-1:-1:-1;;;;;80317:11:0;;;;:16;;5443:18:1;;80317:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;80369:35:0;;11016:25:1;;;80389:6:0;;-1:-1:-1;80377:10:0;;-1:-1:-1;80369:35:0;;11004:2:1;10989:18;80369:35:0;;;;;;;79942:470;;79902:510;:::o;77032:406::-;77131:10;77098:21;77122:20;;;:8;:20;;;;;;;77153:10;;:71;;-1:-1:-1;;;77153:71:0;;;;;4516:34:1;;;;77210:4:0;4566:18:1;;;4559:43;4618:18;;;4611:34;;;77122:20:0;-1:-1:-1;;;;;77153:10:0;;;;:27;;4451:18:1;;77153:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;77247:11:0;;:18;;-1:-1:-1;77247:11:0;-1:-1:-1;77263:1:0;77247:15;:18::i;:::-;77233:32;;:11;77274:28;;;:20;;;:28;;;;;77305:12;77274:43;;77332:23;:11;;;77295:6;77332:15;:23::i;:::-;-1:-1:-1;77370:12:0;;77366:65;;77395:26;77405:6;77413:7;77395:9;:26::i;:::-;77089:349;77032:406;;:::o;76596:428::-;-1:-1:-1;;;;;76733:15:0;;76709:21;76733:15;;;:8;:15;;;;;76677:16;;76800:11;;;;76863:19;76800:11;76863:17;:19::i;:::-;76848:35;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;76848:35:0;;76820:63;;76899:9;76894:97;76914:19;:10;:17;:19::i;:::-;76910:1;:23;76894:97;;;76965:16;:10;76979:1;76965:13;:16::i;:::-;76951:8;76960:1;76951:11;;;;;;;;:::i;:::-;;;;;;;;;;:30;76935:3;;;;:::i;:::-;;;;76894:97;;;-1:-1:-1;77008:8:0;76596:428;-1:-1:-1;;;;76596:428:0:o;56376:192::-;55522:7;55549:6;-1:-1:-1;;;;;55549:6:0;54336:10;55696:23;55688:68;;;;-1:-1:-1;;;55688:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;56465:22:0;::::1;56457:73;;;::::0;-1:-1:-1;;;56457:73:0;;7496:2:1;56457:73:0::1;::::0;::::1;7478:21:1::0;7535:2;7515:18;;;7508:30;7574:34;7554:18;;;7547:62;-1:-1:-1;;;7625:18:1;;;7618:36;7671:19;;56457:73:0::1;7294:402:1::0;56457:73:0::1;56541:19;56551:8;56541:9;:19::i;:::-;56376:192:::0;:::o;44668:98::-;44726:7;44753:5;44757:1;44753;:5;:::i;:::-;44746:12;44668:98;-1:-1:-1;;;44668:98:0:o;13456:137::-;13526:4;13550:35;13558:3;13578:5;13550:7;:35::i;13679:146::-;13756:4;6739:19;;;:12;;;:19;;;;;;:24;;13780:37;6642:129;56576:173;56632:16;56651:6;;-1:-1:-1;;;;;56668:17:0;;;-1:-1:-1;;;;;;56668:17:0;;;;;;56701:40;;56651:6;;;;;;;56701:40;;56632:16;56701:40;56621:128;56576:173;:::o;13911:114::-;13971:7;13998:19;14006:3;6940:18;;6857:109;14379:137;14450:7;14485:22;14489:3;14501:5;14485:3;:22::i;45025:98::-;45083:7;45110:5;45114:1;45110;:5;:::i;45424:98::-;45482:7;45509:5;45513:1;45509;:5;:::i;44287:98::-;44345:7;44372:5;44376:1;44372;:5;:::i;13149:131::-;13216:4;13240:32;13245:3;13265:5;13240:4;:32::i;5136:1420::-;5202:4;5341:19;;;:12;;;:19;;;;;;5377:15;;5373:1176;;5752:21;5776:14;5789:1;5776:10;:14;:::i;:::-;5825:18;;5752:38;;-1:-1:-1;5805:17:0;;5825:22;;5846:1;;5825:22;:::i;:::-;5805:42;;5881:13;5868:9;:26;5864:405;;5915:17;5935:3;:11;;5947:9;5935:22;;;;;;;;:::i;:::-;;;;;;;;;5915:42;;6089:9;6060:3;:11;;6072:13;6060:26;;;;;;;;:::i;:::-;;;;;;;;;;;;:38;;;;6174:23;;;:12;;;:23;;;;;:36;;;5864:405;6350:17;;:3;;:17;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;6445:3;:12;;:19;6458:5;6445:19;;;;;;;;;;;6438:26;;;6488:4;6481:11;;;;;;;5373:1176;6532:5;6525:12;;;;;7320:120;7387:7;7414:3;:11;;7426:5;7414:18;;;;;;;;:::i;:::-;;;;;;;;;7407:25;;7320:120;;;;:::o;4546:414::-;4609:4;6739:19;;;:12;;;:19;;;;;;4626:327;;-1:-1:-1;4669:23:0;;;;;;;;:11;:23;;;;;;;;;;;;;4852:18;;4830:19;;;:12;;;:19;;;;;;:40;;;;4885:11;;4626:327;-1:-1:-1;4936:5:0;4929:12;;14:173:1;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:70;;177:1;174;167:12;111:70;14:173;;;:::o;192:167::-;270:13;;323:10;312:22;;302:33;;292:61;;349:1;346;339:12;364:186;423:6;476:2;464:9;455:7;451:23;447:32;444:52;;;492:1;489;482:12;444:52;515:29;534:9;515:29;:::i;555:808::-;652:6;660;668;676;684;737:3;725:9;716:7;712:23;708:33;705:53;;;754:1;751;744:12;705:53;777:29;796:9;777:29;:::i;:::-;767:39;;825:38;859:2;848:9;844:18;825:38;:::i;:::-;815:48;;910:2;899:9;895:18;882:32;872:42;;965:2;954:9;950:18;937:32;988:18;1029:2;1021:6;1018:14;1015:34;;;1045:1;1042;1035:12;1015:34;1083:6;1072:9;1068:22;1058:32;;1128:7;1121:4;1117:2;1113:13;1109:27;1099:55;;1150:1;1147;1140:12;1099:55;1190:2;1177:16;1216:2;1208:6;1205:14;1202:34;;;1232:1;1229;1222:12;1202:34;1277:7;1272:2;1263:6;1259:2;1255:15;1251:24;1248:37;1245:57;;;1298:1;1295;1288:12;1245:57;555:808;;;;-1:-1:-1;555:808:1;;-1:-1:-1;1329:2:1;1321:11;;1351:6;555:808;-1:-1:-1;;;555:808:1:o;1368:254::-;1436:6;1444;1497:2;1485:9;1476:7;1472:23;1468:32;1465:52;;;1513:1;1510;1503:12;1465:52;1536:29;1555:9;1536:29;:::i;:::-;1526:39;1612:2;1597:18;;;;1584:32;;-1:-1:-1;;;1368:254:1:o;1627:1126::-;1711:6;1742:2;1785;1773:9;1764:7;1760:23;1756:32;1753:52;;;1801:1;1798;1791:12;1753:52;1841:9;1828:23;1870:18;1911:2;1903:6;1900:14;1897:34;;;1927:1;1924;1917:12;1897:34;1965:6;1954:9;1950:22;1940:32;;2010:7;2003:4;1999:2;1995:13;1991:27;1981:55;;2032:1;2029;2022:12;1981:55;2068:2;2055:16;2090:2;2086;2083:10;2080:36;;;2096:18;;:::i;:::-;2142:2;2139:1;2135:10;2174:2;2168:9;2237:2;2233:7;2228:2;2224;2220:11;2216:25;2208:6;2204:38;2292:6;2280:10;2277:22;2272:2;2260:10;2257:18;2254:46;2251:72;;;2303:18;;:::i;:::-;2339:2;2332:22;2389:18;;;2423:15;;;;-1:-1:-1;2458:11:1;;;2488;;;2484:20;;2481:33;-1:-1:-1;2478:53:1;;;2527:1;2524;2517:12;2478:53;2549:1;2540:10;;2559:163;2573:2;2570:1;2567:9;2559:163;;;2630:17;;2618:30;;2591:1;2584:9;;;;;2668:12;;;;2700;;2559:163;;;-1:-1:-1;2741:6:1;1627:1126;-1:-1:-1;;;;;;;;1627:1126:1:o;2758:678::-;2860:6;2868;2876;2884;2892;2945:3;2933:9;2924:7;2920:23;2916:33;2913:53;;;2962:1;2959;2952:12;2913:53;2991:9;2985:16;2975:26;;3044:2;3033:9;3029:18;3023:25;3088:18;3081:5;3077:30;3070:5;3067:41;3057:69;;3122:1;3119;3112:12;3057:69;3145:5;-1:-1:-1;3169:48:1;3213:2;3198:18;;3169:48;:::i;:::-;3159:58;;3236:48;3280:2;3269:9;3265:18;3236:48;:::i;:::-;3226:58;;3329:3;3318:9;3314:19;3308:26;3378:6;3369:7;3365:20;3356:7;3353:33;3343:61;;3400:1;3397;3390:12;3343:61;3423:7;3413:17;;;2758:678;;;;;;;;:::o;3441:180::-;3500:6;3553:2;3541:9;3532:7;3528:23;3524:32;3521:52;;;3569:1;3566;3559:12;3521:52;-1:-1:-1;3592:23:1;;3441:180;-1:-1:-1;3441:180:1:o;3626:184::-;3696:6;3749:2;3737:9;3728:7;3724:23;3720:32;3717:52;;;3765:1;3762;3755:12;3717:52;-1:-1:-1;3788:16:1;;3626:184;-1:-1:-1;3626:184:1:o;3815:248::-;3883:6;3891;3944:2;3932:9;3923:7;3919:23;3915:32;3912:52;;;3960:1;3957;3950:12;3912:52;-1:-1:-1;;3983:23:1;;;4053:2;4038:18;;;4025:32;;-1:-1:-1;3815:248:1:o;5575:632::-;5746:2;5798:21;;;5868:13;;5771:18;;;5890:22;;;5717:4;;5746:2;5969:15;;;;5943:2;5928:18;;;5717:4;6012:169;6026:6;6023:1;6020:13;6012:169;;;6087:13;;6075:26;;6156:15;;;;6121:12;;;;6048:1;6041:9;6012:169;;;-1:-1:-1;6198:3:1;;5575:632;-1:-1:-1;;;;;;5575:632:1:o;8883:356::-;9085:2;9067:21;;;9104:18;;;9097:30;9163:34;9158:2;9143:18;;9136:62;9230:2;9215:18;;8883:356::o;9647:355::-;9849:2;9831:21;;;9888:2;9868:18;;;9861:30;9927:33;9922:2;9907:18;;9900:61;9993:2;9978:18;;9647:355::o;11305:128::-;11345:3;11376:1;11372:6;11369:1;11366:13;11363:39;;;11382:18;;:::i;:::-;-1:-1:-1;11418:9:1;;11305:128::o;11438:217::-;11478:1;11504;11494:132;;11548:10;11543:3;11539:20;11536:1;11529:31;11583:4;11580:1;11573:15;11611:4;11608:1;11601:15;11494:132;-1:-1:-1;11640:9:1;;11438:217::o;11660:168::-;11700:7;11766:1;11762;11758:6;11754:14;11751:1;11748:21;11743:1;11736:9;11729:17;11725:45;11722:71;;;11773:18;;:::i;:::-;-1:-1:-1;11813:9:1;;11660:168::o;11833:125::-;11873:4;11901:1;11898;11895:8;11892:34;;;11906:18;;:::i;:::-;-1:-1:-1;11943:9:1;;11833:125::o;11963:135::-;12002:3;-1:-1:-1;;12023:17:1;;12020:43;;;12043:18;;:::i;:::-;-1:-1:-1;12090:1:1;12079:13;;11963:135::o;12103:127::-;12164:10;12159:3;12155:20;12152:1;12145:31;12195:4;12192:1;12185:15;12219:4;12216:1;12209:15;12235:127;12296:10;12291:3;12287:20;12284:1;12277:31;12327:4;12324:1;12317:15;12351:4;12348:1;12341:15;12367:127;12428:10;12423:3;12419:20;12416:1;12409:31;12459:4;12456:1;12449:15;12483:4;12480:1;12473:15;12499:127;12560:10;12555:3;12551:20;12548:1;12541:31;12591:4;12588:1;12581:15;12615:4;12612:1;12605:15
Swarm Source
ipfs://954d64f56592a7da177a8dbc41c7de92803069baa1adaaa06499511464536b2f
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.