Source Code
Latest 25 from a total of 348 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Un Stake | 24173544 | 83 days ago | IN | 0 ETH | 0.00000856 | ||||
| Un Stake | 24173489 | 83 days ago | IN | 0 ETH | 0.00000463 | ||||
| Un Stake | 24116159 | 91 days ago | IN | 0 ETH | 0.00000795 | ||||
| Un Stake | 23180201 | 222 days ago | IN | 0 ETH | 0.00002777 | ||||
| Un Stake | 22958317 | 253 days ago | IN | 0 ETH | 0.00013801 | ||||
| Un Stake | 22958263 | 253 days ago | IN | 0 ETH | 0.00010411 | ||||
| Stake | 22764616 | 280 days ago | IN | 0 ETH | 0.0001178 | ||||
| Un Stake | 22679177 | 292 days ago | IN | 0 ETH | 0.00025759 | ||||
| Stake | 22635906 | 298 days ago | IN | 0 ETH | 0.00023759 | ||||
| Stake | 22500365 | 317 days ago | IN | 0 ETH | 0.00172575 | ||||
| Stake | 22500247 | 317 days ago | IN | 0 ETH | 0.00065046 | ||||
| Un Stake | 22465134 | 322 days ago | IN | 0 ETH | 0.00018327 | ||||
| Un Stake | 22465079 | 322 days ago | IN | 0 ETH | 0.00031438 | ||||
| Un Stake | 22443843 | 325 days ago | IN | 0 ETH | 0.00012978 | ||||
| Un Stake | 22443790 | 325 days ago | IN | 0 ETH | 0.00014271 | ||||
| Un Stake | 22436748 | 326 days ago | IN | 0 ETH | 0.00020219 | ||||
| Un Stake | 22429717 | 327 days ago | IN | 0 ETH | 0.00007134 | ||||
| Un Stake | 22429662 | 327 days ago | IN | 0 ETH | 0.00008641 | ||||
| Un Stake | 22422586 | 328 days ago | IN | 0 ETH | 0.00009456 | ||||
| Un Stake | 22415453 | 329 days ago | IN | 0 ETH | 0.00004536 | ||||
| Un Stake | 22415398 | 329 days ago | IN | 0 ETH | 0.0000446 | ||||
| Stake | 22380819 | 334 days ago | IN | 0 ETH | 0.00006667 | ||||
| Stake | 22350468 | 338 days ago | IN | 0 ETH | 0.00007933 | ||||
| Claim All | 22350416 | 338 days ago | IN | 0 ETH | 0.00008741 | ||||
| Un Stake | 22343947 | 339 days ago | IN | 0 ETH | 0.00011931 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers.
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
|||
|---|---|---|---|---|---|---|---|---|
| Transfer | 24173544 | 83 days ago | 0 ETH | |||||
| Mint | 24173544 | 83 days ago | 0 ETH | |||||
| Mint | 24173544 | 83 days ago | 0 ETH | |||||
| Transfer | 24173489 | 83 days ago | 0 ETH | |||||
| Mint | 24173489 | 83 days ago | 0 ETH | |||||
| Mint | 24173489 | 83 days ago | 0 ETH | |||||
| Transfer | 24116159 | 91 days ago | 0 ETH | |||||
| Mint | 24116159 | 91 days ago | 0 ETH | |||||
| Mint | 24116159 | 91 days ago | 0 ETH | |||||
| Transfer | 23180201 | 222 days ago | 0 ETH | |||||
| Mint | 23180201 | 222 days ago | 0 ETH | |||||
| Mint | 23180201 | 222 days ago | 0 ETH | |||||
| Transfer | 22958317 | 253 days ago | 0 ETH | |||||
| Mint | 22958317 | 253 days ago | 0 ETH | |||||
| Mint | 22958317 | 253 days ago | 0 ETH | |||||
| Transfer | 22958263 | 253 days ago | 0 ETH | |||||
| Mint | 22958263 | 253 days ago | 0 ETH | |||||
| Mint | 22958263 | 253 days ago | 0 ETH | |||||
| Transfer From | 22764616 | 280 days ago | 0 ETH | |||||
| Owner Of | 22764616 | 280 days ago | 0 ETH | |||||
| Owner Of | 22764616 | 280 days ago | 0 ETH | |||||
| Mint | 22764616 | 280 days ago | 0 ETH | |||||
| Mint | 22764616 | 280 days ago | 0 ETH | |||||
| Transfer | 22679177 | 292 days ago | 0 ETH | |||||
| Mint | 22679177 | 292 days ago | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
MamiStakeV3
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.22;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
interface RewardsToken {
function mint(address, uint256) external;
}
contract MamiStakeV3 is Ownable, ReentrancyGuard {
struct Pool {
address nftAddress;
address tokenAddress;
uint256 tokenAmount;
uint256 start;
uint256 rate;
address rewardsTokenAddress;
uint256 stakedAmount;
bool passRequired;
uint256[] sharePoolIds;
uint256 max;
}
struct User {
uint256 last;
uint256 amount;
uint256 remain;
}
mapping(uint256 => Pool) public poolInfos;
//poolId => user addrs
mapping(uint256 => address[]) public poolAddrs;
//poolId => user address => User
mapping(uint256 => mapping(address => User)) public poolUsers;
//poolId => pass token id => user address
mapping(uint256 => mapping(uint256 => address)) public passUsed;
//poolId => stake token id => user address
mapping(uint256 => mapping(uint256 => address)) public tokenUsed;
//poolId => stake token id => pass token id
mapping(uint256 => mapping(uint256 => uint256)) public tokenPassRelation;
//poolId => total claimed
mapping(uint256 => uint256) public totalClaimed;
IERC721 public passAddress;
address public foundation;
constructor() Ownable(msg.sender) {
//foundation
foundation = 0xB03167F37319F2C67Dd3062fc1482044205484d1;
//test
// address tokenAddress = 0x5195b2709770180903b7aCB3841B081Ec7b6DfFf;
// address nftAddress = 0xd3427F2F46cCa277FFBe068fc0a1B417750AcC33;
// passAddress = IERC721(0x12c771b96080f243B3e3E0D9643F38FBEb029E24);
//main
address tokenAddress = 0x8983CF891867942d06AD6CEb9B9002de860E202d;
address nftAddress = 0xbc77f3A44f19113845B2870ce9E72f612D77DC17;
passAddress = IERC721(0xd6591bBb8A4867cEa5ec732f9c30379C4A8bE730);
uint256[] memory sharePoolIds0 = new uint256[](1);
sharePoolIds0[0] = 1;
uint256[] memory sharePoolIds1 = new uint256[](1);
sharePoolIds1[0] = 0;
setPool(
0,
nftAddress,
tokenAddress,
40000 ether,
block.number,
8.8 ether,
tokenAddress,
false,
sharePoolIds0,
50000000 ether
);
setPool(
1,
nftAddress,
tokenAddress,
40000 ether,
block.number,
10 ether,
tokenAddress,
true,
sharePoolIds1,
50000000 ether
);
}
function stake(
uint256 poolId,
uint256[] calldata stakeTokenIds,
uint256[] calldata passTokenIds
) external checkPool(poolId) {
Pool storage pool = poolInfos[poolId];
claim(poolId);
bool userExist;
for (uint256 i = 0; i < poolAddrs[poolId].length; i++) {
if (poolAddrs[poolId][i] == msg.sender) {
userExist = true;
break;
}
}
if (!userExist) {
genUser(poolId);
}
for (uint256 i = 0; i < stakeTokenIds.length; i++) {
require(
msg.sender ==
IERC721(pool.nftAddress).ownerOf(stakeTokenIds[i]),
"You dont owner this nft"
);
require(
tokenUsed[poolId][stakeTokenIds[i]] == address(0),
"Stake token id used"
);
for (uint256 y = 0; y < pool.sharePoolIds.length; y++) {
require(
tokenUsed[pool.sharePoolIds[y]][stakeTokenIds[i]] ==
address(0),
"The nft already staked"
);
}
tokenUsed[poolId][stakeTokenIds[i]] = msg.sender;
if (pool.passRequired) {
require(
passTokenIds.length == stakeTokenIds.length,
"Invalid length pass and token ids"
);
require(
msg.sender == IERC721(passAddress).ownerOf(passTokenIds[i]),
"You dont owner this pass"
);
require(
passUsed[poolId][passTokenIds[i]] == address(0),
"Stake pass id used"
);
for (uint256 y = 0; y < pool.sharePoolIds.length; y++) {
require(
passUsed[pool.sharePoolIds[y]][passTokenIds[i]] ==
address(0),
"The pass already staked"
);
}
passUsed[poolId][passTokenIds[i]] = msg.sender;
tokenPassRelation[poolId][stakeTokenIds[i]] = passTokenIds[i];
}
}
poolUsers[poolId][msg.sender].amount += stakeTokenIds.length;
pool.stakedAmount += stakeTokenIds.length;
IERC20(pool.tokenAddress).transferFrom(
msg.sender,
address(this),
pool.tokenAmount * stakeTokenIds.length
);
}
function genUser(uint256 poolId) private {
poolUsers[poolId][msg.sender] = User(block.number, 0, 0);
poolAddrs[poolId].push(msg.sender);
}
function unStake(
uint256 poolId,
uint256[] calldata unStakeTokenIds
) external checkPool(poolId) {
Pool storage pool = poolInfos[poolId];
claim(poolId);
for (uint256 i = 0; i < unStakeTokenIds.length; i++) {
require(
tokenUsed[poolId][unStakeTokenIds[i]] == msg.sender,
"Stake token id not used by you"
);
tokenUsed[poolId][unStakeTokenIds[i]] = address(0);
if (pool.passRequired) {
uint256 passTokenId = tokenPassRelation[poolId][
unStakeTokenIds[i]
];
passUsed[poolId][passTokenId] = address(0);
}
}
poolUsers[poolId][msg.sender].amount -= unStakeTokenIds.length;
pool.stakedAmount -= unStakeTokenIds.length;
IERC20(pool.tokenAddress).transfer(
msg.sender,
pool.tokenAmount * unStakeTokenIds.length
);
}
function claim(uint256 poolId) public checkPool(poolId) {
_sync(poolId);
Pool memory pool = poolInfos[poolId];
User storage user = poolUsers[poolId][msg.sender];
if (totalClaimed[poolId] + user.remain >= pool.max) {
user.remain = pool.max - totalClaimed[poolId];
}
if (user.remain > 0) {
uint256 fee = user.remain / 20;
RewardsToken(pool.rewardsTokenAddress).mint(foundation, fee);
RewardsToken(pool.rewardsTokenAddress).mint(
msg.sender,
user.remain - fee
);
totalClaimed[poolId] += user.remain;
user.remain = 0;
}
}
function claimAll(uint256[] calldata poolIds) public {
for (uint256 i = 0; i < poolIds.length; i++) {
claim(poolIds[i]);
}
}
function setPool(
uint256 poolId,
address nftAddress,
address tokenAddress,
uint256 tokenAmount,
uint256 start,
uint256 rate,
address rewardsTokenAddress,
bool passRequired,
uint256[] memory sharePoolIds,
uint256 max
) public onlyOwner {
poolInfos[poolId] = Pool(
nftAddress,
tokenAddress,
tokenAmount,
start,
rate,
rewardsTokenAddress,
0,
passRequired,
sharePoolIds,
max
);
}
modifier checkPool(uint256 poolId) {
Pool memory pool = poolInfos[poolId];
require(pool.tokenAddress != address(0), "Pool not exist");
require(pool.start <= block.number, "Pool not start");
_;
}
function _sync(uint256 poolId) private {
uint256 pendingRemain = getPendingRemain(poolId, msg.sender);
User storage user = poolUsers[poolId][msg.sender];
user.remain += pendingRemain;
user.last = block.number;
}
function getPendingRemain(
uint256 poolId,
address account
) public view returns (uint256) {
uint256 pendingRemain = 0;
Pool memory pool = poolInfos[poolId];
if (pool.stakedAmount > 0) {
User memory user = poolUsers[poolId][account];
uint256 last = pool.start > user.last ? pool.start : user.last;
pendingRemain =
((block.number - last) * user.amount * pool.rate) /
pool.stakedAmount;
}
return pendingRemain;
}
function getSharedTokenIds(
uint256 poolId
) public view returns (uint256[] memory) {
return poolInfos[poolId].sharePoolIds;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. 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;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 value) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
* a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
* {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
* a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the address zero.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @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;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
constructor() {
_status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"poolIds","type":"uint256[]"}],"name":"claimAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"foundation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"getPendingRemain","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"getSharedTokenIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"passAddress","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"passUsed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolAddrs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfos","outputs":[{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"address","name":"rewardsTokenAddress","type":"address"},{"internalType":"uint256","name":"stakedAmount","type":"uint256"},{"internalType":"bool","name":"passRequired","type":"bool"},{"internalType":"uint256","name":"max","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"poolUsers","outputs":[{"internalType":"uint256","name":"last","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"remain","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"rate","type":"uint256"},{"internalType":"address","name":"rewardsTokenAddress","type":"address"},{"internalType":"bool","name":"passRequired","type":"bool"},{"internalType":"uint256[]","name":"sharePoolIds","type":"uint256[]"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"setPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256[]","name":"stakeTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"passTokenIds","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenPassRelation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenUsed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256[]","name":"unStakeTokenIds","type":"uint256[]"}],"name":"unStake","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801562000010575f80fd5b5033806200003857604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6200004381620001af565b506001808055600a80546001600160a01b031990811673b03167f37319f2c67dd3062fc1482044205484d1179091556009805490911673d6591bbb8a4867cea5ec732f9c30379c4a8be73017905560408051828152808201909152738983cf891867942d06ad6ceb9b9002de860e202d9173bc77f3a44f19113845b2870ce9e72f612d77dc17915f91602080830190803683370190505090506001815f81518110620000f357620000f362000413565b60209081029190910101526040805160018082528183019092525f918160200160208202803683370190505090505f815f8151811062000137576200013762000413565b6020908102919091010152620001735f8486690878678326eac900000043677a1fe1602770000083868a6a295be96e64066972000000620001fe565b620001a560018486690878678326eac900000043678ac7230489e800008386896a295be96e64066972000000620001fe565b5050505062000427565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620002086200037f565b6040518061014001604052808a6001600160a01b03168152602001896001600160a01b03168152602001888152602001878152602001868152602001856001600160a01b031681526020015f815260200184151581526020018381526020018281525060025f8c81526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020155606082015181600301556080820151816004015560a0820151816005015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c0820151816006015560e0820151816007015f6101000a81548160ff02191690831515021790555061010082015181600801908051906020019062000364929190620003af565b50610120820151816009015590505050505050505050505050565b5f546001600160a01b03163314620003ad5760405163118cdaa760e01b81523360048201526024016200002f565b565b828054828255905f5260205f20908101928215620003eb579160200282015b82811115620003eb578251825591602001919060010190620003ce565b50620003f9929150620003fd565b5090565b5b80821115620003f9575f8155600101620003fe565b634e487b7160e01b5f52603260045260245ffd5b611e5880620004355f395ff3fe608060405234801561000f575f80fd5b506004361061011c575f3560e01c806353776ea9116100a95780637bdb37c51161006e5780637bdb37c5146103835780638da5cb5b146103b6578063e07a1f5f146103c6578063eaab2c3f146103d9578063f2fde38b146103f8575f80fd5b806353776ea91461027d578063689d84e41461029057806368f07399146103555780636e7bbb0314610368578063715018a61461037b575f80fd5b80632bdea41f116100ef5780632bdea41f146101fa5780632eb306401461020d57806330dac80214610237578063379607f51461025757806341fbb0501461026a575f80fd5b8063182bb58714610120578063202cc23c1461017057806328c77820146101c45780632b5b8e5f146101d9575b5f80fd5b61015361012e36600461199a565b600660209081525f92835260408084209091529082529020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101a961017e3660046119ce565b600460209081525f928352604080842090915290825290208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610167565b6101d76101d2366004611a44565b61040b565b005b6101ec6101e73660046119ce565b610443565b604051908152602001610167565b6101d7610208366004611a83565b6105d5565b6101ec61021b36600461199a565b600760209081525f928352604080842090915290825290205481565b61024a610245366004611acb565b61096e565b6040516101679190611ae2565b6101d7610265366004611acb565b6109d0565b600a54610153906001600160a01b031681565b61015361028b36600461199a565b610d76565b6102fc61029e366004611acb565b600260208190525f91825260409091208054600182015492820154600383015460048401546005850154600686015460078701546009909701546001600160a01b039687169887169795969495939490921692909160ff9091169089565b604080516001600160a01b039a8b168152988a1660208a01528801969096526060870194909452608086019290925290941660a084015260c083019390935291151560e082015261010081019190915261012001610167565b600954610153906001600160a01b031681565b6101d7610376366004611b46565b610daa565b6101d7610f27565b61015361039136600461199a565b600560209081525f92835260408084209091529082529020546001600160a01b031681565b5f546001600160a01b0316610153565b6101d76103d4366004611c82565b610f3a565b6101ec6103e7366004611acb565b60086020525f908152604090205481565b6101d7610406366004611cf6565b61183d565b5f5b8181101561043e5761043683838381811061042a5761042a611d18565b905060200201356109d0565b60010161040d565b505050565b5f82815260026020818152604080842081516101408101835281546001600160a01b039081168252600183015481168286015294820154818401526003820154606082015260048201546080820152600582015490941660a0850152600681015460c0850152600781015460ff16151560e08501526008810180548351818602810186019094528084528695869590946101008601939092909183018282801561050a57602002820191905f5260205f20905b8154815260200190600101908083116104f6575b5050505050815260200160098201548152505090505f8160c0015111156105cb575f8581526004602090815260408083206001600160a01b038816845282528083208151606080820184528254808352600184015495830195909552600290920154928101929092528401519092911061058557815161058b565b82606001515b90508260c001518360800151836020015183436105a89190611d40565b6105b29190611d53565b6105bc9190611d53565b6105c69190611d6a565b935050505b5090505b92915050565b5f83815260026020818152604080842081516101408101835281546001600160a01b039081168252600183015481168286015294820154818401526003820154606082015260048201546080820152600582015490941660a0850152600681015460c0850152600781015460ff16151560e08501526008810180548351818602810186019094528084528996959492936101008601939092919083018282801561069c57602002820191905f5260205f20905b815481526020019060010190808311610688575b5050509183525050600991909101546020918201528101519091506001600160a01b03166106e55760405162461bcd60e51b81526004016106dc90611d89565b60405180910390fd5b43816060015111156107095760405162461bcd60e51b81526004016106dc90611db1565b5f85815260026020526040902061071f866109d0565b5f5b84811015610884575f878152600660205260408120339188888581811061074a5761074a611d18565b602090810292909201358352508101919091526040015f20546001600160a01b0316146107b95760405162461bcd60e51b815260206004820152601e60248201527f5374616b6520746f6b656e206964206e6f74207573656420627920796f75000060448201526064016106dc565b5f878152600660205260408120818888858181106107d9576107d9611d18565b602090810292909201358352508101919091526040015f2080546001600160a01b0319166001600160a01b0392909216919091179055600782015460ff161561087c575f8781526007602052604081208188888581811061083c5761083c611d18565b602090810292909201358352508181019290925260409081015f908120548b825260058452828220908252909252902080546001600160a01b0319169055505b600101610721565b505f868152600460209081526040808320338452909152812060010180548692906108b0908490611d40565b90915550506006810180548591905f906108cb908490611d40565b9091555050600181015460028201546001600160a01b039091169063a9059cbb9033906108f9908890611d53565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610941573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109659190611dd9565b50505050505050565b5f818152600260209081526040918290206008018054835181840281018401909452808452606093928301828280156109c457602002820191905f5260205f20905b8154815260200190600101908083116109b0575b50505050509050919050565b5f81815260026020818152604080842081516101408101835281546001600160a01b039081168252600183015481168286015294820154818401526003820154606082015260048201546080820152600582015490941660a0850152600681015460c0850152600781015460ff16151560e085015260088101805483518186028101860190945280845287969594929361010086019390929190830182828015610a9757602002820191905f5260205f20905b815481526020019060010190808311610a83575b5050509183525050600991909101546020918201528101519091506001600160a01b0316610ad75760405162461bcd60e51b81526004016106dc90611d89565b4381606001511115610afb5760405162461bcd60e51b81526004016106dc90611db1565b610b048361187a565b5f83815260026020818152604080842081516101408101835281546001600160a01b039081168252600183015481168286015294820154818401526003820154606082015260048201546080820152600582015490941660a0850152600681015460c0850152600781015460ff16151560e085015260088101805483518186028101860190945280845291936101008601939290830182828015610bc557602002820191905f5260205f20905b815481526020019060010190808311610bb1575b5050509183525050600991909101546020918201525f868152600482526040808220338352835280822061012085015160028201548a85526008909552919092205493945090929091610c1791611df4565b10610c40575f85815260086020526040902054610120830151610c3a9190611d40565b60028201555b600281015415610d6f575f60148260020154610c5c9190611d6a565b60a0840151600a546040516340c10f1960e01b81526001600160a01b0391821660048201526024810184905292935016906340c10f19906044015f604051808303815f87803b158015610cad575f80fd5b505af1158015610cbf573d5f803e3d5ffd5b505050508260a001516001600160a01b03166340c10f1933838560020154610ce79190611d40565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044015f604051808303815f87803b158015610d2a575f80fd5b505af1158015610d3c573d5f803e3d5ffd5b50505060028301545f888152600860205260408120805492935091610d62908490611df4565b90915550505f6002830155505b5050505050565b6003602052815f5260405f208181548110610d8f575f80fd5b5f918252602090912001546001600160a01b03169150829050565b610db26118c2565b6040518061014001604052808a6001600160a01b03168152602001896001600160a01b03168152602001888152602001878152602001868152602001856001600160a01b031681526020015f815260200184151581526020018381526020018281525060025f8c81526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020155606082015181600301556080820151816004015560a0820151816005015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c0820151816006015560e0820151816007015f6101000a81548160ff021916908315150217905550610100820151816008019080519060200190610f0c92919061193d565b50610120820151816009015590505050505050505050505050565b610f2f6118c2565b610f385f6118ee565b565b5f85815260026020818152604080842081516101408101835281546001600160a01b039081168252600183015481168286015294820154818401526003820154606082015260048201546080820152600582015490941660a0850152600681015460c0850152600781015460ff16151560e08501526008810180548351818602810186019094528084528b96959492936101008601939092919083018282801561100157602002820191905f5260205f20905b815481526020019060010190808311610fed575b5050509183525050600991909101546020918201528101519091506001600160a01b03166110415760405162461bcd60e51b81526004016106dc90611d89565b43816060015111156110655760405162461bcd60e51b81526004016106dc90611db1565b5f87815260026020526040902061107b886109d0565b5f805b5f8a8152600360205260409020548110156110df575f8a81526003602052604090208054339190839081106110b5576110b5611d18565b5f918252602090912001546001600160a01b0316036110d757600191506110df565b60010161107e565b508061115757604080516060810182524381525f60208083018281528385018381528e8452600483528584203380865290845286852095518655915160018087019190915590516002909501949094558d83526003825293822080549384018155825290200180546001600160a01b03191690911790555b5f5b878110156117455782546001600160a01b0316636352211e8a8a8481811061118357611183611d18565b905060200201356040518263ffffffff1660e01b81526004016111a891815260200190565b602060405180830381865afa1580156111c3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111e79190611e07565b6001600160a01b0316336001600160a01b0316146112475760405162461bcd60e51b815260206004820152601760248201527f596f7520646f6e74206f776e65722074686973206e667400000000000000000060448201526064016106dc565b5f8a8152600660205260408120818b8b8581811061126757611267611d18565b602090810292909201358352508101919091526040015f20546001600160a01b0316146112cc5760405162461bcd60e51b815260206004820152601360248201527214dd185ad9481d1bdad95b881a59081d5cd959606a1b60448201526064016106dc565b5f5b6008840154811015611395575f6001600160a01b031660065f8660080184815481106112fc576112fc611d18565b905f5260205f20015481526020019081526020015f205f8c8c8681811061132557611325611d18565b602090810292909201358352508101919091526040015f20546001600160a01b03161461138d5760405162461bcd60e51b8152602060048201526016602482015275151a19481b999d08185b1c9958591e481cdd185ad95960521b60448201526064016106dc565b6001016112ce565b505f8a815260066020526040812033918b8b858181106113b7576113b7611d18565b602090810292909201358352508101919091526040015f2080546001600160a01b0319166001600160a01b0392909216919091179055600783015460ff161561173d578588146114535760405162461bcd60e51b815260206004820152602160248201527f496e76616c6964206c656e677468207061737320616e6420746f6b656e2069646044820152607360f81b60648201526084016106dc565b6009546001600160a01b0316636352211e88888481811061147657611476611d18565b905060200201356040518263ffffffff1660e01b815260040161149b91815260200190565b602060405180830381865afa1580156114b6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114da9190611e07565b6001600160a01b0316336001600160a01b03161461153a5760405162461bcd60e51b815260206004820152601860248201527f596f7520646f6e74206f776e657220746869732070617373000000000000000060448201526064016106dc565b5f8a81526005602052604081208189898581811061155a5761155a611d18565b602090810292909201358352508101919091526040015f20546001600160a01b0316146115be5760405162461bcd60e51b815260206004820152601260248201527114dd185ad9481c185cdcc81a59081d5cd95960721b60448201526064016106dc565b5f5b600884015481101561168e575f6001600160a01b031660055f8660080184815481106115ee576115ee611d18565b905f5260205f20015481526020019081526020015f205f8a8a8681811061161757611617611d18565b602090810292909201358352508101919091526040015f20546001600160a01b0316146116865760405162461bcd60e51b815260206004820152601760248201527f546865207061737320616c7265616479207374616b656400000000000000000060448201526064016106dc565b6001016115c0565b505f8a815260056020526040812033918989858181106116b0576116b0611d18565b9050602002013581526020019081526020015f205f6101000a8154816001600160a01b0302191690836001600160a01b031602179055508686828181106116f9576116f9611d18565b9050602002013560075f8c81526020019081526020015f205f8b8b8581811061172457611724611d18565b9050602002013581526020019081526020015f20819055505b600101611159565b505f89815260046020908152604080832033845290915281206001018054899290611771908490611df4565b90915550506006820180548891905f9061178c908490611df4565b9091555050600182015460028301546001600160a01b03909116906323b872dd90339030906117bc908c90611d53565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af115801561180d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118319190611dd9565b50505050505050505050565b6118456118c2565b6001600160a01b03811661186e57604051631e4fbdf760e01b81525f60048201526024016106dc565b611877816118ee565b50565b5f6118858233610443565b5f838152600460209081526040808320338452909152812060028101805493945090928492906118b6908490611df4565b90915550504390555050565b5f546001600160a01b03163314610f385760405163118cdaa760e01b81523360048201526024016106dc565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054828255905f5260205f20908101928215611976579160200282015b8281111561197657825182559160200191906001019061195b565b50611982929150611986565b5090565b5b80821115611982575f8155600101611987565b5f80604083850312156119ab575f80fd5b50508035926020909101359150565b6001600160a01b0381168114611877575f80fd5b5f80604083850312156119df575f80fd5b8235915060208301356119f1816119ba565b809150509250929050565b5f8083601f840112611a0c575f80fd5b50813567ffffffffffffffff811115611a23575f80fd5b6020830191508360208260051b8501011115611a3d575f80fd5b9250929050565b5f8060208385031215611a55575f80fd5b823567ffffffffffffffff811115611a6b575f80fd5b611a77858286016119fc565b90969095509350505050565b5f805f60408486031215611a95575f80fd5b83359250602084013567ffffffffffffffff811115611ab2575f80fd5b611abe868287016119fc565b9497909650939450505050565b5f60208284031215611adb575f80fd5b5035919050565b602080825282518282018190525f9190848201906040850190845b81811015611b1957835183529284019291840191600101611afd565b50909695505050505050565b8015158114611877575f80fd5b634e487b7160e01b5f52604160045260245ffd5b5f805f805f805f805f806101408b8d031215611b60575f80fd5b8a35995060208b0135611b72816119ba565b985060408b0135611b82816119ba565b975060608b0135965060808b0135955060a08b0135945060c08b0135611ba7816119ba565b935060e08b0135611bb781611b25565b92506101008b013567ffffffffffffffff80821115611bd4575f80fd5b818d0191508d601f830112611be7575f80fd5b813581811115611bf957611bf9611b32565b604051601f19603f8360051b011681018181108482111715611c1d57611c1d611b32565b6040528181526020808201935060059290921b8401909101908f821115611c42575f80fd5b6020840193505b81841015611c64578335835260209384019390920191611c49565b809550505050506101208b013590509295989b9194979a5092959850565b5f805f805f60608688031215611c96575f80fd5b85359450602086013567ffffffffffffffff80821115611cb4575f80fd5b611cc089838a016119fc565b90965094506040880135915080821115611cd8575f80fd5b50611ce5888289016119fc565b969995985093965092949392505050565b5f60208284031215611d06575f80fd5b8135611d11816119ba565b9392505050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156105cf576105cf611d2c565b80820281158282048414176105cf576105cf611d2c565b5f82611d8457634e487b7160e01b5f52601260045260245ffd5b500490565b6020808252600e908201526d141bdbdb081b9bdd08195e1a5cdd60921b604082015260600190565b6020808252600e908201526d141bdbdb081b9bdd081cdd185c9d60921b604082015260600190565b5f60208284031215611de9575f80fd5b8151611d1181611b25565b808201808211156105cf576105cf611d2c565b5f60208284031215611e17575f80fd5b8151611d11816119ba56fea2646970667358221220fa585b7bb41a70db026940a344f604714149f1a3cabd3dac7d30ff27c55d9d6f64736f6c63430008160033
Deployed Bytecode
0x608060405234801561000f575f80fd5b506004361061011c575f3560e01c806353776ea9116100a95780637bdb37c51161006e5780637bdb37c5146103835780638da5cb5b146103b6578063e07a1f5f146103c6578063eaab2c3f146103d9578063f2fde38b146103f8575f80fd5b806353776ea91461027d578063689d84e41461029057806368f07399146103555780636e7bbb0314610368578063715018a61461037b575f80fd5b80632bdea41f116100ef5780632bdea41f146101fa5780632eb306401461020d57806330dac80214610237578063379607f51461025757806341fbb0501461026a575f80fd5b8063182bb58714610120578063202cc23c1461017057806328c77820146101c45780632b5b8e5f146101d9575b5f80fd5b61015361012e36600461199a565b600660209081525f92835260408084209091529082529020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101a961017e3660046119ce565b600460209081525f928352604080842090915290825290208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610167565b6101d76101d2366004611a44565b61040b565b005b6101ec6101e73660046119ce565b610443565b604051908152602001610167565b6101d7610208366004611a83565b6105d5565b6101ec61021b36600461199a565b600760209081525f928352604080842090915290825290205481565b61024a610245366004611acb565b61096e565b6040516101679190611ae2565b6101d7610265366004611acb565b6109d0565b600a54610153906001600160a01b031681565b61015361028b36600461199a565b610d76565b6102fc61029e366004611acb565b600260208190525f91825260409091208054600182015492820154600383015460048401546005850154600686015460078701546009909701546001600160a01b039687169887169795969495939490921692909160ff9091169089565b604080516001600160a01b039a8b168152988a1660208a01528801969096526060870194909452608086019290925290941660a084015260c083019390935291151560e082015261010081019190915261012001610167565b600954610153906001600160a01b031681565b6101d7610376366004611b46565b610daa565b6101d7610f27565b61015361039136600461199a565b600560209081525f92835260408084209091529082529020546001600160a01b031681565b5f546001600160a01b0316610153565b6101d76103d4366004611c82565b610f3a565b6101ec6103e7366004611acb565b60086020525f908152604090205481565b6101d7610406366004611cf6565b61183d565b5f5b8181101561043e5761043683838381811061042a5761042a611d18565b905060200201356109d0565b60010161040d565b505050565b5f82815260026020818152604080842081516101408101835281546001600160a01b039081168252600183015481168286015294820154818401526003820154606082015260048201546080820152600582015490941660a0850152600681015460c0850152600781015460ff16151560e08501526008810180548351818602810186019094528084528695869590946101008601939092909183018282801561050a57602002820191905f5260205f20905b8154815260200190600101908083116104f6575b5050505050815260200160098201548152505090505f8160c0015111156105cb575f8581526004602090815260408083206001600160a01b038816845282528083208151606080820184528254808352600184015495830195909552600290920154928101929092528401519092911061058557815161058b565b82606001515b90508260c001518360800151836020015183436105a89190611d40565b6105b29190611d53565b6105bc9190611d53565b6105c69190611d6a565b935050505b5090505b92915050565b5f83815260026020818152604080842081516101408101835281546001600160a01b039081168252600183015481168286015294820154818401526003820154606082015260048201546080820152600582015490941660a0850152600681015460c0850152600781015460ff16151560e08501526008810180548351818602810186019094528084528996959492936101008601939092919083018282801561069c57602002820191905f5260205f20905b815481526020019060010190808311610688575b5050509183525050600991909101546020918201528101519091506001600160a01b03166106e55760405162461bcd60e51b81526004016106dc90611d89565b60405180910390fd5b43816060015111156107095760405162461bcd60e51b81526004016106dc90611db1565b5f85815260026020526040902061071f866109d0565b5f5b84811015610884575f878152600660205260408120339188888581811061074a5761074a611d18565b602090810292909201358352508101919091526040015f20546001600160a01b0316146107b95760405162461bcd60e51b815260206004820152601e60248201527f5374616b6520746f6b656e206964206e6f74207573656420627920796f75000060448201526064016106dc565b5f878152600660205260408120818888858181106107d9576107d9611d18565b602090810292909201358352508101919091526040015f2080546001600160a01b0319166001600160a01b0392909216919091179055600782015460ff161561087c575f8781526007602052604081208188888581811061083c5761083c611d18565b602090810292909201358352508181019290925260409081015f908120548b825260058452828220908252909252902080546001600160a01b0319169055505b600101610721565b505f868152600460209081526040808320338452909152812060010180548692906108b0908490611d40565b90915550506006810180548591905f906108cb908490611d40565b9091555050600181015460028201546001600160a01b039091169063a9059cbb9033906108f9908890611d53565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610941573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109659190611dd9565b50505050505050565b5f818152600260209081526040918290206008018054835181840281018401909452808452606093928301828280156109c457602002820191905f5260205f20905b8154815260200190600101908083116109b0575b50505050509050919050565b5f81815260026020818152604080842081516101408101835281546001600160a01b039081168252600183015481168286015294820154818401526003820154606082015260048201546080820152600582015490941660a0850152600681015460c0850152600781015460ff16151560e085015260088101805483518186028101860190945280845287969594929361010086019390929190830182828015610a9757602002820191905f5260205f20905b815481526020019060010190808311610a83575b5050509183525050600991909101546020918201528101519091506001600160a01b0316610ad75760405162461bcd60e51b81526004016106dc90611d89565b4381606001511115610afb5760405162461bcd60e51b81526004016106dc90611db1565b610b048361187a565b5f83815260026020818152604080842081516101408101835281546001600160a01b039081168252600183015481168286015294820154818401526003820154606082015260048201546080820152600582015490941660a0850152600681015460c0850152600781015460ff16151560e085015260088101805483518186028101860190945280845291936101008601939290830182828015610bc557602002820191905f5260205f20905b815481526020019060010190808311610bb1575b5050509183525050600991909101546020918201525f868152600482526040808220338352835280822061012085015160028201548a85526008909552919092205493945090929091610c1791611df4565b10610c40575f85815260086020526040902054610120830151610c3a9190611d40565b60028201555b600281015415610d6f575f60148260020154610c5c9190611d6a565b60a0840151600a546040516340c10f1960e01b81526001600160a01b0391821660048201526024810184905292935016906340c10f19906044015f604051808303815f87803b158015610cad575f80fd5b505af1158015610cbf573d5f803e3d5ffd5b505050508260a001516001600160a01b03166340c10f1933838560020154610ce79190611d40565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044015f604051808303815f87803b158015610d2a575f80fd5b505af1158015610d3c573d5f803e3d5ffd5b50505060028301545f888152600860205260408120805492935091610d62908490611df4565b90915550505f6002830155505b5050505050565b6003602052815f5260405f208181548110610d8f575f80fd5b5f918252602090912001546001600160a01b03169150829050565b610db26118c2565b6040518061014001604052808a6001600160a01b03168152602001896001600160a01b03168152602001888152602001878152602001868152602001856001600160a01b031681526020015f815260200184151581526020018381526020018281525060025f8c81526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020155606082015181600301556080820151816004015560a0820151816005015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c0820151816006015560e0820151816007015f6101000a81548160ff021916908315150217905550610100820151816008019080519060200190610f0c92919061193d565b50610120820151816009015590505050505050505050505050565b610f2f6118c2565b610f385f6118ee565b565b5f85815260026020818152604080842081516101408101835281546001600160a01b039081168252600183015481168286015294820154818401526003820154606082015260048201546080820152600582015490941660a0850152600681015460c0850152600781015460ff16151560e08501526008810180548351818602810186019094528084528b96959492936101008601939092919083018282801561100157602002820191905f5260205f20905b815481526020019060010190808311610fed575b5050509183525050600991909101546020918201528101519091506001600160a01b03166110415760405162461bcd60e51b81526004016106dc90611d89565b43816060015111156110655760405162461bcd60e51b81526004016106dc90611db1565b5f87815260026020526040902061107b886109d0565b5f805b5f8a8152600360205260409020548110156110df575f8a81526003602052604090208054339190839081106110b5576110b5611d18565b5f918252602090912001546001600160a01b0316036110d757600191506110df565b60010161107e565b508061115757604080516060810182524381525f60208083018281528385018381528e8452600483528584203380865290845286852095518655915160018087019190915590516002909501949094558d83526003825293822080549384018155825290200180546001600160a01b03191690911790555b5f5b878110156117455782546001600160a01b0316636352211e8a8a8481811061118357611183611d18565b905060200201356040518263ffffffff1660e01b81526004016111a891815260200190565b602060405180830381865afa1580156111c3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111e79190611e07565b6001600160a01b0316336001600160a01b0316146112475760405162461bcd60e51b815260206004820152601760248201527f596f7520646f6e74206f776e65722074686973206e667400000000000000000060448201526064016106dc565b5f8a8152600660205260408120818b8b8581811061126757611267611d18565b602090810292909201358352508101919091526040015f20546001600160a01b0316146112cc5760405162461bcd60e51b815260206004820152601360248201527214dd185ad9481d1bdad95b881a59081d5cd959606a1b60448201526064016106dc565b5f5b6008840154811015611395575f6001600160a01b031660065f8660080184815481106112fc576112fc611d18565b905f5260205f20015481526020019081526020015f205f8c8c8681811061132557611325611d18565b602090810292909201358352508101919091526040015f20546001600160a01b03161461138d5760405162461bcd60e51b8152602060048201526016602482015275151a19481b999d08185b1c9958591e481cdd185ad95960521b60448201526064016106dc565b6001016112ce565b505f8a815260066020526040812033918b8b858181106113b7576113b7611d18565b602090810292909201358352508101919091526040015f2080546001600160a01b0319166001600160a01b0392909216919091179055600783015460ff161561173d578588146114535760405162461bcd60e51b815260206004820152602160248201527f496e76616c6964206c656e677468207061737320616e6420746f6b656e2069646044820152607360f81b60648201526084016106dc565b6009546001600160a01b0316636352211e88888481811061147657611476611d18565b905060200201356040518263ffffffff1660e01b815260040161149b91815260200190565b602060405180830381865afa1580156114b6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114da9190611e07565b6001600160a01b0316336001600160a01b03161461153a5760405162461bcd60e51b815260206004820152601860248201527f596f7520646f6e74206f776e657220746869732070617373000000000000000060448201526064016106dc565b5f8a81526005602052604081208189898581811061155a5761155a611d18565b602090810292909201358352508101919091526040015f20546001600160a01b0316146115be5760405162461bcd60e51b815260206004820152601260248201527114dd185ad9481c185cdcc81a59081d5cd95960721b60448201526064016106dc565b5f5b600884015481101561168e575f6001600160a01b031660055f8660080184815481106115ee576115ee611d18565b905f5260205f20015481526020019081526020015f205f8a8a8681811061161757611617611d18565b602090810292909201358352508101919091526040015f20546001600160a01b0316146116865760405162461bcd60e51b815260206004820152601760248201527f546865207061737320616c7265616479207374616b656400000000000000000060448201526064016106dc565b6001016115c0565b505f8a815260056020526040812033918989858181106116b0576116b0611d18565b9050602002013581526020019081526020015f205f6101000a8154816001600160a01b0302191690836001600160a01b031602179055508686828181106116f9576116f9611d18565b9050602002013560075f8c81526020019081526020015f205f8b8b8581811061172457611724611d18565b9050602002013581526020019081526020015f20819055505b600101611159565b505f89815260046020908152604080832033845290915281206001018054899290611771908490611df4565b90915550506006820180548891905f9061178c908490611df4565b9091555050600182015460028301546001600160a01b03909116906323b872dd90339030906117bc908c90611d53565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303815f875af115801561180d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118319190611dd9565b50505050505050505050565b6118456118c2565b6001600160a01b03811661186e57604051631e4fbdf760e01b81525f60048201526024016106dc565b611877816118ee565b50565b5f6118858233610443565b5f838152600460209081526040808320338452909152812060028101805493945090928492906118b6908490611df4565b90915550504390555050565b5f546001600160a01b03163314610f385760405163118cdaa760e01b81523360048201526024016106dc565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054828255905f5260205f20908101928215611976579160200282015b8281111561197657825182559160200191906001019061195b565b50611982929150611986565b5090565b5b80821115611982575f8155600101611987565b5f80604083850312156119ab575f80fd5b50508035926020909101359150565b6001600160a01b0381168114611877575f80fd5b5f80604083850312156119df575f80fd5b8235915060208301356119f1816119ba565b809150509250929050565b5f8083601f840112611a0c575f80fd5b50813567ffffffffffffffff811115611a23575f80fd5b6020830191508360208260051b8501011115611a3d575f80fd5b9250929050565b5f8060208385031215611a55575f80fd5b823567ffffffffffffffff811115611a6b575f80fd5b611a77858286016119fc565b90969095509350505050565b5f805f60408486031215611a95575f80fd5b83359250602084013567ffffffffffffffff811115611ab2575f80fd5b611abe868287016119fc565b9497909650939450505050565b5f60208284031215611adb575f80fd5b5035919050565b602080825282518282018190525f9190848201906040850190845b81811015611b1957835183529284019291840191600101611afd565b50909695505050505050565b8015158114611877575f80fd5b634e487b7160e01b5f52604160045260245ffd5b5f805f805f805f805f806101408b8d031215611b60575f80fd5b8a35995060208b0135611b72816119ba565b985060408b0135611b82816119ba565b975060608b0135965060808b0135955060a08b0135945060c08b0135611ba7816119ba565b935060e08b0135611bb781611b25565b92506101008b013567ffffffffffffffff80821115611bd4575f80fd5b818d0191508d601f830112611be7575f80fd5b813581811115611bf957611bf9611b32565b604051601f19603f8360051b011681018181108482111715611c1d57611c1d611b32565b6040528181526020808201935060059290921b8401909101908f821115611c42575f80fd5b6020840193505b81841015611c64578335835260209384019390920191611c49565b809550505050506101208b013590509295989b9194979a5092959850565b5f805f805f60608688031215611c96575f80fd5b85359450602086013567ffffffffffffffff80821115611cb4575f80fd5b611cc089838a016119fc565b90965094506040880135915080821115611cd8575f80fd5b50611ce5888289016119fc565b969995985093965092949392505050565b5f60208284031215611d06575f80fd5b8135611d11816119ba565b9392505050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156105cf576105cf611d2c565b80820281158282048414176105cf576105cf611d2c565b5f82611d8457634e487b7160e01b5f52601260045260245ffd5b500490565b6020808252600e908201526d141bdbdb081b9bdd08195e1a5cdd60921b604082015260600190565b6020808252600e908201526d141bdbdb081b9bdd081cdd185c9d60921b604082015260600190565b5f60208284031215611de9575f80fd5b8151611d1181611b25565b808201808211156105cf576105cf611d2c565b5f60208284031215611e17575f80fd5b8151611d11816119ba56fea2646970667358221220fa585b7bb41a70db026940a344f604714149f1a3cabd3dac7d30ff27c55d9d6f64736f6c63430008160033
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.