Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 444 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Emergency Withdr... | 20642397 | 161 days ago | IN | 0 ETH | 0.00043124 | ||||
Emergency Withdr... | 20441863 | 189 days ago | IN | 0 ETH | 0.00101753 | ||||
Emergency Withdr... | 20391728 | 196 days ago | IN | 0 ETH | 0.00031954 | ||||
Emergency Withdr... | 19540655 | 315 days ago | IN | 0 ETH | 0.00233633 | ||||
Emergency Withdr... | 19391747 | 336 days ago | IN | 0 ETH | 0.00450873 | ||||
Emergency Withdr... | 19341627 | 343 days ago | IN | 0 ETH | 0.00419614 | ||||
Emergency Withdr... | 19291589 | 350 days ago | IN | 0 ETH | 0.00285842 | ||||
Emergency Withdr... | 19241748 | 357 days ago | IN | 0 ETH | 0.00214693 | ||||
Emergency Withdr... | 19142009 | 371 days ago | IN | 0 ETH | 0.00164403 | ||||
Emergency Withdr... | 19092077 | 378 days ago | IN | 0 ETH | 0.00139218 | ||||
Emergency Withdr... | 19042215 | 385 days ago | IN | 0 ETH | 0.00371768 | ||||
Emergency Withdr... | 18992114 | 392 days ago | IN | 0 ETH | 0.00202371 | ||||
Emergency Withdr... | 18942362 | 399 days ago | IN | 0 ETH | 0.00189814 | ||||
Emergency Withdr... | 18892530 | 406 days ago | IN | 0 ETH | 0.00187298 | ||||
Emergency Withdr... | 18842680 | 413 days ago | IN | 0 ETH | 0.00300377 | ||||
Emergency Withdr... | 18792813 | 420 days ago | IN | 0 ETH | 0.00855837 | ||||
Emergency Withdr... | 18642865 | 441 days ago | IN | 0 ETH | 0.00329061 | ||||
Emergency Withdr... | 18592896 | 448 days ago | IN | 0 ETH | 0.00205389 | ||||
Emergency Withdr... | 18542845 | 455 days ago | IN | 0 ETH | 0.00325799 | ||||
Emergency Withdr... | 18494561 | 462 days ago | IN | 0 ETH | 0.00080049 | ||||
Emergency Withdr... | 18494558 | 462 days ago | IN | 0 ETH | 0.00167715 | ||||
Set Signer | 18494556 | 462 days ago | IN | 0 ETH | 0.00040238 | ||||
Stake Ape Coin S... | 18449760 | 468 days ago | IN | 0 ETH | 0.00289431 | ||||
Claim Rewards | 18443678 | 469 days ago | IN | 0 ETH | 0.00589415 | ||||
Emergency Withdr... | 18442547 | 469 days ago | IN | 0 ETH | 0.00333738 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
B3LApeStaking
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {DashboardPair,DashboardStake} from "./structs/Structs.sol"; import {IERC721Minimal,IApeCoinStakingMinimal} from "./interfaces/Interfaces.sol"; contract B3LApeStaking is Ownable { using ECDSA for bytes32; uint private constant APE_COIN_PRECISION = 18; uint private MAX_APE_COIN_SINGLE_NFT_CAN_STAKE = 70 * (10 ** APE_COIN_PRECISION); // IERC20Minimal public immutable APE_COIN; // IApeCoinStakingMinimal public immutable APE_COIN_STAKING; IERC20 private immutable APE_COIN; IApeCoinStakingMinimal private immutable APE_COIN_STAKING; mapping(uint => uint) private claimedRewards; mapping(uint => uint) private stakedApeCoin; IERC721Minimal public immutable B3L; address private signer; event Staked(address indexed user, uint[] tokenIds, uint[] amounts); event Claim(address indexed user, uint[] tokenIds, uint[] amounts); constructor(address b3lAddress, address _signer, address ape_coin, address ape_coin_staking) { B3L = IERC721Minimal(b3lAddress); signer = _signer; APE_COIN = IERC20(ape_coin); APE_COIN_STAKING = IApeCoinStakingMinimal(ape_coin_staking); } //** STAKE FUNCTION **// function stakeApeCoin(uint[] calldata nftIds,uint expirationTimestamp,bytes calldata signature,uint[] calldata amounts) external { //Must own all the nftIds uint totalToStake; for(uint i = 0; i < nftIds.length; i++) { uint amount = amounts[i]; require(B3L.ownerOf(nftIds[i]) == msg.sender, "You do not own this NFT"); require(amount + stakedApeCoin[nftIds[i]] <= MAX_APE_COIN_SINGLE_NFT_CAN_STAKE, "You cannot stake more than 70 ApeCoin per NFT"); stakedApeCoin[nftIds[i]] += amount; totalToStake += amount; } bytes32 hash = keccak256(abi.encodePacked(nftIds,expirationTimestamp,true)); address signerAddress = hash.toEthSignedMessageHash().recover(signature); require(signerAddress == signer, "Invalid signature"); if(block.timestamp > expirationTimestamp) revert("Signature expired"); APE_COIN.transferFrom(msg.sender, address(this), totalToStake); // APE_COIN.approve(address(APE_COIN_STAKING), totalToStake); // APE_COIN_STAKING.depositSelfApeCoin(totalToStake); emit Staked(msg.sender, nftIds, amounts); } //** CLAIM REWARDS FUNCTION **// function claimRewards(uint[] calldata nftIds, uint[] calldata totalAmountsEarnedOverTimePerNFTIds,bytes calldata signature) external { bytes32 hash = keccak256(abi.encodePacked(nftIds,totalAmountsEarnedOverTimePerNFTIds,true)); address signerAddress = hash.toEthSignedMessageHash().recover(signature); require(signerAddress == signer, "Invalid signature"); uint totalAmountToClaim = 0; for(uint i = 0; i < nftIds.length; i++) { require(B3L.ownerOf(nftIds[i]) == msg.sender, "You do not own this NFT"); uint amountToClaim = totalAmountsEarnedOverTimePerNFTIds[i] - claimedRewards[nftIds[i]]; claimedRewards[nftIds[i]] += amountToClaim; totalAmountToClaim += amountToClaim; } APE_COIN.transfer(msg.sender, totalAmountToClaim); emit Claim(msg.sender, nftIds, totalAmountsEarnedOverTimePerNFTIds); } function withdrawAllApeAndClaimRewards(uint[] calldata nftIds, uint[] calldata totalAmountsEarnedOverTimePerNFTIds,bytes memory signature) external { bytes32 hash = keccak256(abi.encodePacked(nftIds,totalAmountsEarnedOverTimePerNFTIds,true)); address signerAddress = hash.toEthSignedMessageHash().recover(signature); require(signerAddress == signer, "Invalid signature"); uint totalAmountToClaim = 0; for(uint i = 0; i < nftIds.length; ++i) { require(B3L.ownerOf(nftIds[i]) == msg.sender, "You do not own this NFT"); uint amountToClaim = totalAmountsEarnedOverTimePerNFTIds[i] - claimedRewards[nftIds[i]]; claimedRewards[nftIds[i]] += amountToClaim; totalAmountToClaim += amountToClaim; totalAmountToClaim += stakedApeCoin[nftIds[i]]; stakedApeCoin[nftIds[i]] = 0; } require(totalAmountToClaim > 0, "You have already claimed all your rewards"); APE_COIN.transfer(msg.sender, totalAmountToClaim); emit Claim(msg.sender, nftIds, totalAmountsEarnedOverTimePerNFTIds); } //************ GETTERS ***************// function getClaimedRewardsForToken(uint tokenId) external view returns (uint) { return claimedRewards[tokenId]; } function getBatchClaimedRewardsForTokens(uint[] calldata tokenIds) external view returns (uint[] memory) { uint[] memory claimedRewardsForTokens = new uint[](tokenIds.length); for(uint i = 0; i < tokenIds.length; i++) { claimedRewardsForTokens[i] = claimedRewards[tokenIds[i]]; } return claimedRewardsForTokens; } function getStakedApeCoinForTokenId(uint tokenId) external view returns (uint) { return stakedApeCoin[tokenId]; } function getBatchStakedApeCoinForTokenIds(uint[] calldata tokenIds) external view returns (uint[] memory) { uint[] memory stakedApeCoinForTokens = new uint[](tokenIds.length); for(uint i = 0; i < tokenIds.length; i++) { stakedApeCoinForTokens[i] = stakedApeCoin[tokenIds[i]]; } return stakedApeCoinForTokens; } function getBatchAmountDeposited(uint[] calldata nftIds) external view returns (uint[] memory) { uint[] memory amountsDeposited = new uint[](nftIds.length); for(uint i = 0; i < nftIds.length; i++) { amountsDeposited[i] = stakedApeCoin[nftIds[i]]; } return amountsDeposited; } //***************** SETTERS *****************// function setSigner(address _signer) external onlyOwner { signer = _signer; } function setMaxApeCoinSingleNftCanStake(uint _maxApeCoinSingleNftCanStake) external onlyOwner { MAX_APE_COIN_SINGLE_NFT_CAN_STAKE = _maxApeCoinSingleNftCanStake; } //***************** GETTERS *****************// function getDashboardStake() public view returns (DashboardStake memory) { DashboardStake memory dashboardStake = APE_COIN_STAKING.getApeCoinStake(address(this)); return dashboardStake; } function getApeCoinAmountDepositedAndUnclaimedSelf() internal view returns(uint,uint){ DashboardStake memory dashboardStake = getDashboardStake(); uint amountDeposited = dashboardStake.deposited; uint amountUnclaimed = dashboardStake.unclaimed; return (amountDeposited, amountUnclaimed); } function getPendingRewardsForContract() external view returns (uint256) { return APE_COIN_STAKING.pendingRewards(0, address(this), 0); } function getDepositAmountInApeCoinContract() external view returns (uint256) { return getDashboardStake().deposited; } //***************** ONLY OWNER METHODS *****************// function withdrawApeCoin(uint amount,address to) external onlyOwner { APE_COIN_STAKING.withdrawApeCoin(amount, to); } function stakeApeCoinSelf(uint amount) external onlyOwner { APE_COIN.approve(address(APE_COIN_STAKING), amount); APE_COIN_STAKING.depositSelfApeCoin(amount); } function sendApeCoinToApeCoinStaking(uint amount) external onlyOwner { APE_COIN.transferFrom(msg.sender, address(this), amount); APE_COIN.approve(address(APE_COIN_STAKING), amount); APE_COIN_STAKING.depositSelfApeCoin(amount); } function claimAndRestakeOwnerOnly() external onlyOwner { DashboardStake memory dashboardStake = getDashboardStake(); uint amountDeposited = dashboardStake.deposited; uint amountUnclaimed = dashboardStake.unclaimed; APE_COIN_STAKING.withdrawSelfApeCoin(amountDeposited); APE_COIN.approve(address(APE_COIN_STAKING), amountDeposited + amountUnclaimed); APE_COIN_STAKING.depositSelfApeCoin(amountDeposited + amountUnclaimed); } function emergencyWithdraw() external onlyOwner { DashboardStake memory dashboardStake = getDashboardStake(); uint amountDeposited = dashboardStake.deposited; APE_COIN_STAKING.withdrawSelfApeCoin(amountDeposited); } function emergencyWithdrawAndSendToOwner() external onlyOwner { (uint amountDeposited,uint amountUnclaimed) = getApeCoinAmountDepositedAndUnclaimedSelf(); APE_COIN_STAKING.withdrawSelfApeCoin(amountDeposited); uint balance = APE_COIN.balanceOf(address(this)); APE_COIN.transfer(owner(),balance); } function emergencyWithdrawEverythingInside() external onlyOwner { uint balance = APE_COIN.balanceOf(address(this)); APE_COIN.transfer(owner(),balance); } function fundApeCoinNoStake(uint amount) external onlyOwner { APE_COIN.transferFrom(msg.sender, address(this), amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; import {DashboardStake,DashboardPair} from "../structs/Structs.sol"; interface IERC721Minimal { function ownerOf(uint tokenId) external view returns (address); function transferFrom(address from, address to, uint tokenId) external; } interface IApeCoinStakingMinimal { function depositSelfApeCoin(uint256 _amount) external; function getApeCoinStake(address _address) external view returns (DashboardStake memory); function pendingRewards(uint256 _poolId, address _address, uint256 _tokenId) external view returns (uint256); function withdrawApeCoin(uint256 _amount, address _recipient) external; function withdrawSelfApeCoin(uint256 _amount) external; function claimApeCoin(address _recipient) external; function claimSelfApeCoin() external; // function }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; struct DashboardStake { uint256 poolId; uint256 tokenId; uint256 deposited; uint256 unclaimed; uint256 rewards24hr; DashboardPair pair; } struct DashboardPair { uint256 mainTokenId; uint256 mainTypePoolId; }
{ "remappings": [ "/@openzeppelin/contracts-upgradeable/=lib/openzppelin/contracts-upgradeable/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "ERC721A/=lib/ERC721A/contracts/", "closedsea/=lib/closedsea/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/closedsea/lib/openzeppelin-contracts/lib/erc4626-tests/", "erc721a-upgradeable/=lib/closedsea/lib/erc721a-upgradeable/contracts/", "erc721a/=lib/ERC721A/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/closedsea/lib/openzeppelin-contracts-upgradeable/contracts/", "openzeppelin-contracts/=lib/closedsea/lib/openzeppelin-contracts/contracts/", "operator-filter-registry/=lib/closedsea/lib/operator-filter-registry/src/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"b3lAddress","type":"address"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"address","name":"ape_coin","type":"address"},{"internalType":"address","name":"ape_coin_staking","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"Claim","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":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"Staked","type":"event"},{"inputs":[],"name":"B3L","outputs":[{"internalType":"contract IERC721Minimal","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimAndRestakeOwnerOnly","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"nftIds","type":"uint256[]"},{"internalType":"uint256[]","name":"totalAmountsEarnedOverTimePerNFTIds","type":"uint256[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdrawAndSendToOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdrawEverythingInside","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"fundApeCoinNoStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"nftIds","type":"uint256[]"}],"name":"getBatchAmountDeposited","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"getBatchClaimedRewardsForTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"getBatchStakedApeCoinForTokenIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getClaimedRewardsForToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDashboardStake","outputs":[{"components":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"deposited","type":"uint256"},{"internalType":"uint256","name":"unclaimed","type":"uint256"},{"internalType":"uint256","name":"rewards24hr","type":"uint256"},{"components":[{"internalType":"uint256","name":"mainTokenId","type":"uint256"},{"internalType":"uint256","name":"mainTypePoolId","type":"uint256"}],"internalType":"struct DashboardPair","name":"pair","type":"tuple"}],"internalType":"struct DashboardStake","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDepositAmountInApeCoinContract","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPendingRewardsForContract","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getStakedApeCoinForTokenId","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"sendApeCoinToApeCoinStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxApeCoinSingleNftCanStake","type":"uint256"}],"name":"setMaxApeCoinSingleNftCanStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"nftIds","type":"uint256[]"},{"internalType":"uint256","name":"expirationTimestamp","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"stakeApeCoin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakeApeCoinSelf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"nftIds","type":"uint256[]"},{"internalType":"uint256[]","name":"totalAmountsEarnedOverTimePerNFTIds","type":"uint256[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"withdrawAllApeAndClaimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"withdrawApeCoin","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e0604052620000126012600a620001f7565b6200001f9060466200020c565b6001553480156200002f57600080fd5b50604051620029b0380380620029b0833981016040819052620000529162000243565b6200005d3362000092565b6001600160a01b0393841660c052600480546001600160a01b0319169385169390931790925582166080521660a052620002a0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115620001395781600019048211156200011d576200011d620000e2565b808516156200012b57918102915b93841c9390800290620000fd565b509250929050565b6000826200015257506001620001f1565b816200016157506000620001f1565b81600181146200017a57600281146200018557620001a5565b6001915050620001f1565b60ff841115620001995762000199620000e2565b50506001821b620001f1565b5060208310610133831016604e8410600b8410161715620001ca575081810a620001f1565b620001d68383620000f8565b8060001904821115620001ed57620001ed620000e2565b0290505b92915050565b600062000205838362000141565b9392505050565b8082028115828204841417620001f157620001f1620000e2565b80516001600160a01b03811681146200023e57600080fd5b919050565b600080600080608085870312156200025a57600080fd5b620002658562000226565b9350620002756020860162000226565b9250620002856040860162000226565b9150620002956060860162000226565b905092959194509250565b60805160a05160c05161263862000378600039600081816101a20152818161095801528181611205015261166f01526000818161051c015281816105d00152818161066501528181610d3c01528181610eba01528181610f6301528181610ff80152818161109d015281816119040152818161199b0152611aca0152600081816103d1015281816104480152818161054b015281816106e00152818161075801528181610bbe01528181610caf01528181610d6b01528181610fc9015281816114df0152818161180b01526119f401526126386000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80638da5cb5b116100de578063d3e6686111610097578063e4e8184711610071578063e4e8184714610370578063ef3497eb14610383578063f2fde38b14610396578063ffdb8744146103a957600080fd5b8063d3e6686114610342578063d54102cb14610355578063db2e21bc1461036857600080fd5b80638da5cb5b1461028b5780638e989f801461029c57806396b0546b146102f45780639c39bed6146102fc578063a84ddb231461030f578063ac3b52681461032257600080fd5b8063441cb49911610130578063441cb4991461022f5780634fbeebed14610242578063683beb14146102555780636c19e78314610268578063715018a61461027b57806372a54fd51461028357600080fd5b80630de5f27714610178578063236c99e4146101825780632541492d14610195578063275949f11461019d57806333435762146101e157806333c162a11461020f575b600080fd5b6101806103b1565b005b610180610190366004611f20565b6104fd565b610180610637565b6101c47f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6102016101ef366004611f20565b60009081526003602052604090205490565b6040519081526020016101d8565b61022261021d366004611f7e565b61080e565b6040516101d89190611fc0565b61018061023d366004612097565b6108c7565b610180610250366004611f20565b610c85565b610222610263366004611f7e565b610d9a565b610180610276366004612192565b610e49565b610180610e73565b610201610e87565b6000546001600160a01b03166101c4565b6102a4610e9a565b6040805182518152602080840151818301528383015192820192909252606080840151908201526080808401519082015260a09283015180519382019390935291015160c082015260e0016101d8565b610180610f2d565b61022261030a366004611f7e565b611121565b61018061031d3660046121f8565b6111d0565b610201610330366004611f20565b60009081526002602052604090205490565b610180610350366004611f20565b6115a8565b61018061036336600461229c565b6115b5565b6101806118d3565b61018061037e366004612336565b61196d565b610180610391366004611f20565b6119ca565b6101806103a4366004612192565b611a2b565b610201611aa4565b6103b9611b42565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610420573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104449190612366565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb6104876000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044015b6020604051808303816000875af11580156104d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f9919061237f565b5050565b610505611b42565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044015b6020604051808303816000875af1158015610595573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b9919061237f565b50604051632772abed60e21b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639dcaafb490602401600060405180830381600087803b15801561061c57600080fd5b505af1158015610630573d6000803e3d6000fd5b5050505050565b61063f611b42565b60008061064a611b9c565b604051630fec1a6760e31b81526004810183905291935091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690637f60d33890602401600060405180830381600087803b1580156106b157600080fd5b505af11580156106c5573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a0823190602401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190612366565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb6107976000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af11580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610808919061237f565b50505050565b606060008267ffffffffffffffff81111561082b5761082b612004565b604051908082528060200260200182016040528015610854578160200160208202803683370190505b50905060005b838110156108bd5760036000868684818110610878576108786123a1565b905060200201358152602001908152602001600020548282815181106108a0576108a06123a1565b6020908102919091010152806108b5816123cd565b91505061085a565b5090505b92915050565b60008585858560016040516020016108e395949392919061240f565b60405160208183030381529060405280519060200120905060006109108361090a84611bbe565b90611c11565b6004549091506001600160a01b038083169116146109495760405162461bcd60e51b81526004016109409061243b565b60405180910390fd5b6000805b87811015610b3f57337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e8b8b85818110610997576109976123a1565b905060200201356040518263ffffffff1660e01b81526004016109bc91815260200190565b602060405180830381865afa1580156109d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fd9190612466565b6001600160a01b031614610a235760405162461bcd60e51b815260040161094090612483565b6000600260008b8b85818110610a3b57610a3b6123a1565b90506020020135815260200190815260200160002054888884818110610a6357610a636123a1565b90506020020135610a7491906124ba565b905080600260008c8c86818110610a8d57610a8d6123a1565b9050602002013581526020019081526020016000206000828254610ab191906124cd565b90915550610ac1905081846124cd565b9250600360008b8b85818110610ad957610ad96123a1565b9050602002013581526020019081526020016000205483610afa91906124cd565b92506000600360008c8c86818110610b1457610b146123a1565b905060200201358152602001908152602001600020819055505080610b38906123cd565b905061094d565b5060008111610ba25760405162461bcd60e51b815260206004820152602960248201527f596f75206861766520616c726561647920636c61696d656420616c6c20796f7560448201526872207265776172647360b81b6064820152608401610940565b60405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610c0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c33919061237f565b50336001600160a01b03167fa78d18c9868a075fbb512fe99f8a102cd053eaa68e9c76fbab39d463509c6c4b89898989604051610c739493929190612512565b60405180910390a25050505050505050565b610c8d611b42565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610d00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d24919061237f565b5060405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b390604401610576565b606060008267ffffffffffffffff811115610db757610db7612004565b604051908082528060200260200182016040528015610de0578160200160208202803683370190505b50905060005b838110156108bd5760036000868684818110610e0457610e046123a1565b90506020020135815260200190815260200160002054828281518110610e2c57610e2c6123a1565b602090810291909101015280610e41816123cd565b915050610de6565b610e51611b42565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b610e7b611b42565b610e856000611c2d565b565b6000610e91610e9a565b60400151905090565b610ea2611ed0565b604051636cf88fd960e11b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d9f11fb29060240160e060405180830381865afa158015610f09573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c19190612544565b610f35611b42565b6000610f3f610e9a565b60408181015160608301519151630fec1a6760e31b815260048101829052929350917f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690637f60d33890602401600060405180830381600087803b158015610faf57600080fd5b505af1158015610fc3573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663095ea7b37f0000000000000000000000000000000000000000000000000000000000000000838561102391906124cd565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561106e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611092919061237f565b506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016639dcaafb46110cc83856124cd565b6040518263ffffffff1660e01b81526004016110ea91815260200190565b600060405180830381600087803b15801561110457600080fd5b505af1158015611118573d6000803e3d6000fd5b50505050505050565b606060008267ffffffffffffffff81111561113e5761113e612004565b604051908082528060200260200182016040528015611167578160200160208202803683370190505b50905060005b838110156108bd576002600086868481811061118b5761118b6123a1565b905060200201358152602001908152602001600020548282815181106111b3576111b36123a1565b6020908102919091010152806111c8816123cd565b91505061116d565b6000805b878110156113cf5760008484838181106111f0576111f06123a1565b905060200201359050336001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e8c8c86818110611244576112446123a1565b905060200201356040518263ffffffff1660e01b815260040161126991815260200190565b602060405180830381865afa158015611286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112aa9190612466565b6001600160a01b0316146112d05760405162461bcd60e51b815260040161094090612483565b600154600360008c8c868181106112e9576112e96123a1565b905060200201358152602001908152602001600020548261130a91906124cd565b111561136e5760405162461bcd60e51b815260206004820152602d60248201527f596f752063616e6e6f74207374616b65206d6f7265207468616e20373020417060448201526c1950dbda5b881c195c88139195609a1b6064820152608401610940565b80600360008c8c86818110611385576113856123a1565b90506020020135815260200190815260200160002060008282546113a991906124cd565b909155506113b9905081846124cd565b92505080806113c7906123cd565b9150506111d4565b50600088888860016040516020016113ea94939291906125c7565b604051602081830303815290604052805190602001209050600061144987878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061090a9250869150611bbe9050565b6004549091506001600160a01b038083169116146114795760405162461bcd60e51b81526004016109409061243b565b874211156114bd5760405162461bcd60e51b815260206004820152601160248201527014da59db985d1d5c9948195e1c1a5c9959607a1b6044820152606401610940565b6040516323b872dd60e01b8152336004820152306024820152604481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611530573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611554919061237f565b50336001600160a01b03167f859a4049709b7ed7c28d73c9122229b70aa55880d8744d1931e98e093a1b5b918b8b88886040516115949493929190612512565b60405180910390a250505050505050505050565b6115b0611b42565b600155565b60008686868660016040516020016115d195949392919061240f565b604051602081830303815290604052805190602001209050600061163084848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061090a9250869150611bbe9050565b6004549091506001600160a01b038083169116146116605760405162461bcd60e51b81526004016109409061243b565b6000805b888110156117ee57337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e8c8c858181106116ae576116ae6123a1565b905060200201356040518263ffffffff1660e01b81526004016116d391815260200190565b602060405180830381865afa1580156116f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117149190612466565b6001600160a01b03161461173a5760405162461bcd60e51b815260040161094090612483565b6000600260008c8c85818110611752576117526123a1565b9050602002013581526020019081526020016000205489898481811061177a5761177a6123a1565b9050602002013561178b91906124ba565b905080600260008d8d868181106117a4576117a46123a1565b90506020020135815260200190815260200160002060008282546117c891906124cd565b909155506117d8905081846124cd565b92505080806117e6906123cd565b915050611664565b5060405163a9059cbb60e01b8152336004820152602481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561185c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611880919061237f565b50336001600160a01b03167fa78d18c9868a075fbb512fe99f8a102cd053eaa68e9c76fbab39d463509c6c4b8a8a8a8a6040516118c09493929190612512565b60405180910390a2505050505050505050565b6118db611b42565b60006118e5610e9a565b6040818101519051630fec1a6760e31b815260048101829052919250907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690637f60d338906024015b600060405180830381600087803b15801561195157600080fd5b505af1158015611965573d6000803e3d6000fd5b505050505050565b611975611b42565b60405163e4e8184760e01b8152600481018390526001600160a01b0382811660248301527f0000000000000000000000000000000000000000000000000000000000000000169063e4e8184790604401611937565b6119d2611b42565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016104b6565b611a33611b42565b6001600160a01b038116611a985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610940565b611aa181611c2d565b50565b604051632c018f9160e01b815260006004820181905230602483015260448201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632c018f9190606401602060405180830381865afa158015611b19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3d9190612366565b905090565b6000546001600160a01b03163314610e855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610940565b6000806000611ba9610e9a565b60408101516060909101519094909350915050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000806000611c208585611c7d565b915091506108bd81611cc2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000808251604103611cb35760208301516040840151606085015160001a611ca787828585611e0c565b94509450505050611cbb565b506000905060025b9250929050565b6000816004811115611cd657611cd66125ec565b03611cde5750565b6001816004811115611cf257611cf26125ec565b03611d3f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610940565b6002816004811115611d5357611d536125ec565b03611da05760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610940565b6003816004811115611db457611db46125ec565b03611aa15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610940565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611e435750600090506003611ec7565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611e97573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611ec057600060019250925050611ec7565b9150600090505b94509492505050565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001611f1b604051806040016040528060008152602001600081525090565b905290565b600060208284031215611f3257600080fd5b5035919050565b60008083601f840112611f4b57600080fd5b50813567ffffffffffffffff811115611f6357600080fd5b6020830191508360208260051b8501011115611cbb57600080fd5b60008060208385031215611f9157600080fd5b823567ffffffffffffffff811115611fa857600080fd5b611fb485828601611f39565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015611ff857835183529284019291840191600101611fdc565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff8111828210171561203d5761203d612004565b60405290565b6040805190810167ffffffffffffffff8111828210171561203d5761203d612004565b604051601f8201601f1916810167ffffffffffffffff8111828210171561208f5761208f612004565b604052919050565b6000806000806000606086880312156120af57600080fd5b853567ffffffffffffffff808211156120c757600080fd5b6120d389838a01611f39565b90975095506020915087820135818111156120ed57600080fd5b6120f98a828b01611f39565b90965094505060408801358181111561211157600080fd5b8801601f81018a1361212257600080fd5b80358281111561213457612134612004565b612146601f8201601f19168501612066565b92508083528a8482840101111561215c57600080fd5b80848301858501376000848285010152505080925050509295509295909350565b6001600160a01b0381168114611aa157600080fd5b6000602082840312156121a457600080fd5b81356121af8161217d565b9392505050565b60008083601f8401126121c857600080fd5b50813567ffffffffffffffff8111156121e057600080fd5b602083019150836020828501011115611cbb57600080fd5b60008060008060008060006080888a03121561221357600080fd5b873567ffffffffffffffff8082111561222b57600080fd5b6122378b838c01611f39565b909950975060208a0135965060408a013591508082111561225757600080fd5b6122638b838c016121b6565b909650945060608a013591508082111561227c57600080fd5b506122898a828b01611f39565b989b979a50959850939692959293505050565b600080600080600080606087890312156122b557600080fd5b863567ffffffffffffffff808211156122cd57600080fd5b6122d98a838b01611f39565b909850965060208901359150808211156122f257600080fd5b6122fe8a838b01611f39565b9096509450604089013591508082111561231757600080fd5b5061232489828a016121b6565b979a9699509497509295939492505050565b6000806040838503121561234957600080fd5b82359150602083013561235b8161217d565b809150509250929050565b60006020828403121561237857600080fd5b5051919050565b60006020828403121561239157600080fd5b815180151581146121af57600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016123df576123df6123b7565b5060010190565b60006001600160fb1b038311156123fc57600080fd5b8260051b80838637939093019392505050565b600061242661241f83888a6123e6565b85876123e6565b92151560f81b83525050600101949350505050565b602080825260119082015270496e76616c6964207369676e617475726560781b604082015260600190565b60006020828403121561247857600080fd5b81516121af8161217d565b60208082526017908201527f596f7520646f206e6f74206f776e2074686973204e4654000000000000000000604082015260600190565b818103818111156108c1576108c16123b7565b808201808211156108c1576108c16123b7565b81835260006001600160fb1b038311156124f957600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006125266040830186886124e0565b82810360208401526125398185876124e0565b979650505050505050565b600081830360e081121561255757600080fd5b61255f61201a565b83518152602084015160208201526040840151604082015260608401516060820152608084015160808201526040609f198301121561259d57600080fd5b6125a5612043565b60a085810151825260c090950151602082015293810193909352509092915050565b60006125d48286886123e6565b9384525050151560f81b602082015260210192915050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220992e0c01341a75324140699b4029803c8ab8843ff4a4ad5e801ef6af5ea8ac5764736f6c63430008110033000000000000000000000000ba960c4be7840c4803b85abc4ae6701c9f1dc5b50000000000000000000000004a482e752cbfc41c74915bdbaded4f0032e0a78d0000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943810000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb9
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80638da5cb5b116100de578063d3e6686111610097578063e4e8184711610071578063e4e8184714610370578063ef3497eb14610383578063f2fde38b14610396578063ffdb8744146103a957600080fd5b8063d3e6686114610342578063d54102cb14610355578063db2e21bc1461036857600080fd5b80638da5cb5b1461028b5780638e989f801461029c57806396b0546b146102f45780639c39bed6146102fc578063a84ddb231461030f578063ac3b52681461032257600080fd5b8063441cb49911610130578063441cb4991461022f5780634fbeebed14610242578063683beb14146102555780636c19e78314610268578063715018a61461027b57806372a54fd51461028357600080fd5b80630de5f27714610178578063236c99e4146101825780632541492d14610195578063275949f11461019d57806333435762146101e157806333c162a11461020f575b600080fd5b6101806103b1565b005b610180610190366004611f20565b6104fd565b610180610637565b6101c47f000000000000000000000000ba960c4be7840c4803b85abc4ae6701c9f1dc5b581565b6040516001600160a01b0390911681526020015b60405180910390f35b6102016101ef366004611f20565b60009081526003602052604090205490565b6040519081526020016101d8565b61022261021d366004611f7e565b61080e565b6040516101d89190611fc0565b61018061023d366004612097565b6108c7565b610180610250366004611f20565b610c85565b610222610263366004611f7e565b610d9a565b610180610276366004612192565b610e49565b610180610e73565b610201610e87565b6000546001600160a01b03166101c4565b6102a4610e9a565b6040805182518152602080840151818301528383015192820192909252606080840151908201526080808401519082015260a09283015180519382019390935291015160c082015260e0016101d8565b610180610f2d565b61022261030a366004611f7e565b611121565b61018061031d3660046121f8565b6111d0565b610201610330366004611f20565b60009081526002602052604090205490565b610180610350366004611f20565b6115a8565b61018061036336600461229c565b6115b5565b6101806118d3565b61018061037e366004612336565b61196d565b610180610391366004611f20565b6119ca565b6101806103a4366004612192565b611a2b565b610201611aa4565b6103b9611b42565b6040516370a0823160e01b81523060048201526000907f0000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943816001600160a01b0316906370a0823190602401602060405180830381865afa158015610420573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104449190612366565b90507f0000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943816001600160a01b031663a9059cbb6104876000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044015b6020604051808303816000875af11580156104d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f9919061237f565b5050565b610505611b42565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb981166004830152602482018390527f0000000000000000000000004d224452801aced8b2f0aebe155379bb5d594381169063095ea7b3906044015b6020604051808303816000875af1158015610595573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b9919061237f565b50604051632772abed60e21b8152600481018290527f0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb96001600160a01b031690639dcaafb490602401600060405180830381600087803b15801561061c57600080fd5b505af1158015610630573d6000803e3d6000fd5b5050505050565b61063f611b42565b60008061064a611b9c565b604051630fec1a6760e31b81526004810183905291935091507f0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb96001600160a01b031690637f60d33890602401600060405180830381600087803b1580156106b157600080fd5b505af11580156106c5573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092507f0000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943816001600160a01b031691506370a0823190602401602060405180830381865afa158015610730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107549190612366565b90507f0000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943816001600160a01b031663a9059cbb6107976000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af11580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610808919061237f565b50505050565b606060008267ffffffffffffffff81111561082b5761082b612004565b604051908082528060200260200182016040528015610854578160200160208202803683370190505b50905060005b838110156108bd5760036000868684818110610878576108786123a1565b905060200201358152602001908152602001600020548282815181106108a0576108a06123a1565b6020908102919091010152806108b5816123cd565b91505061085a565b5090505b92915050565b60008585858560016040516020016108e395949392919061240f565b60405160208183030381529060405280519060200120905060006109108361090a84611bbe565b90611c11565b6004549091506001600160a01b038083169116146109495760405162461bcd60e51b81526004016109409061243b565b60405180910390fd5b6000805b87811015610b3f57337f000000000000000000000000ba960c4be7840c4803b85abc4ae6701c9f1dc5b56001600160a01b0316636352211e8b8b85818110610997576109976123a1565b905060200201356040518263ffffffff1660e01b81526004016109bc91815260200190565b602060405180830381865afa1580156109d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fd9190612466565b6001600160a01b031614610a235760405162461bcd60e51b815260040161094090612483565b6000600260008b8b85818110610a3b57610a3b6123a1565b90506020020135815260200190815260200160002054888884818110610a6357610a636123a1565b90506020020135610a7491906124ba565b905080600260008c8c86818110610a8d57610a8d6123a1565b9050602002013581526020019081526020016000206000828254610ab191906124cd565b90915550610ac1905081846124cd565b9250600360008b8b85818110610ad957610ad96123a1565b9050602002013581526020019081526020016000205483610afa91906124cd565b92506000600360008c8c86818110610b1457610b146123a1565b905060200201358152602001908152602001600020819055505080610b38906123cd565b905061094d565b5060008111610ba25760405162461bcd60e51b815260206004820152602960248201527f596f75206861766520616c726561647920636c61696d656420616c6c20796f7560448201526872207265776172647360b81b6064820152608401610940565b60405163a9059cbb60e01b8152336004820152602481018290527f0000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943816001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610c0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c33919061237f565b50336001600160a01b03167fa78d18c9868a075fbb512fe99f8a102cd053eaa68e9c76fbab39d463509c6c4b89898989604051610c739493929190612512565b60405180910390a25050505050505050565b610c8d611b42565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f0000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943816001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610d00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d24919061237f565b5060405163095ea7b360e01b81526001600160a01b037f0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb981166004830152602482018390527f0000000000000000000000004d224452801aced8b2f0aebe155379bb5d594381169063095ea7b390604401610576565b606060008267ffffffffffffffff811115610db757610db7612004565b604051908082528060200260200182016040528015610de0578160200160208202803683370190505b50905060005b838110156108bd5760036000868684818110610e0457610e046123a1565b90506020020135815260200190815260200160002054828281518110610e2c57610e2c6123a1565b602090810291909101015280610e41816123cd565b915050610de6565b610e51611b42565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b610e7b611b42565b610e856000611c2d565b565b6000610e91610e9a565b60400151905090565b610ea2611ed0565b604051636cf88fd960e11b81523060048201526000907f0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb96001600160a01b03169063d9f11fb29060240160e060405180830381865afa158015610f09573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c19190612544565b610f35611b42565b6000610f3f610e9a565b60408181015160608301519151630fec1a6760e31b815260048101829052929350917f0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb96001600160a01b031690637f60d33890602401600060405180830381600087803b158015610faf57600080fd5b505af1158015610fc3573d6000803e3d6000fd5b505050507f0000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943816001600160a01b031663095ea7b37f0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb9838561102391906124cd565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561106e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611092919061237f565b506001600160a01b037f0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb916639dcaafb46110cc83856124cd565b6040518263ffffffff1660e01b81526004016110ea91815260200190565b600060405180830381600087803b15801561110457600080fd5b505af1158015611118573d6000803e3d6000fd5b50505050505050565b606060008267ffffffffffffffff81111561113e5761113e612004565b604051908082528060200260200182016040528015611167578160200160208202803683370190505b50905060005b838110156108bd576002600086868481811061118b5761118b6123a1565b905060200201358152602001908152602001600020548282815181106111b3576111b36123a1565b6020908102919091010152806111c8816123cd565b91505061116d565b6000805b878110156113cf5760008484838181106111f0576111f06123a1565b905060200201359050336001600160a01b03167f000000000000000000000000ba960c4be7840c4803b85abc4ae6701c9f1dc5b56001600160a01b0316636352211e8c8c86818110611244576112446123a1565b905060200201356040518263ffffffff1660e01b815260040161126991815260200190565b602060405180830381865afa158015611286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112aa9190612466565b6001600160a01b0316146112d05760405162461bcd60e51b815260040161094090612483565b600154600360008c8c868181106112e9576112e96123a1565b905060200201358152602001908152602001600020548261130a91906124cd565b111561136e5760405162461bcd60e51b815260206004820152602d60248201527f596f752063616e6e6f74207374616b65206d6f7265207468616e20373020417060448201526c1950dbda5b881c195c88139195609a1b6064820152608401610940565b80600360008c8c86818110611385576113856123a1565b90506020020135815260200190815260200160002060008282546113a991906124cd565b909155506113b9905081846124cd565b92505080806113c7906123cd565b9150506111d4565b50600088888860016040516020016113ea94939291906125c7565b604051602081830303815290604052805190602001209050600061144987878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061090a9250869150611bbe9050565b6004549091506001600160a01b038083169116146114795760405162461bcd60e51b81526004016109409061243b565b874211156114bd5760405162461bcd60e51b815260206004820152601160248201527014da59db985d1d5c9948195e1c1a5c9959607a1b6044820152606401610940565b6040516323b872dd60e01b8152336004820152306024820152604481018490527f0000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943816001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611530573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611554919061237f565b50336001600160a01b03167f859a4049709b7ed7c28d73c9122229b70aa55880d8744d1931e98e093a1b5b918b8b88886040516115949493929190612512565b60405180910390a250505050505050505050565b6115b0611b42565b600155565b60008686868660016040516020016115d195949392919061240f565b604051602081830303815290604052805190602001209050600061163084848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061090a9250869150611bbe9050565b6004549091506001600160a01b038083169116146116605760405162461bcd60e51b81526004016109409061243b565b6000805b888110156117ee57337f000000000000000000000000ba960c4be7840c4803b85abc4ae6701c9f1dc5b56001600160a01b0316636352211e8c8c858181106116ae576116ae6123a1565b905060200201356040518263ffffffff1660e01b81526004016116d391815260200190565b602060405180830381865afa1580156116f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117149190612466565b6001600160a01b03161461173a5760405162461bcd60e51b815260040161094090612483565b6000600260008c8c85818110611752576117526123a1565b9050602002013581526020019081526020016000205489898481811061177a5761177a6123a1565b9050602002013561178b91906124ba565b905080600260008d8d868181106117a4576117a46123a1565b90506020020135815260200190815260200160002060008282546117c891906124cd565b909155506117d8905081846124cd565b92505080806117e6906123cd565b915050611664565b5060405163a9059cbb60e01b8152336004820152602481018290527f0000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943816001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561185c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611880919061237f565b50336001600160a01b03167fa78d18c9868a075fbb512fe99f8a102cd053eaa68e9c76fbab39d463509c6c4b8a8a8a8a6040516118c09493929190612512565b60405180910390a2505050505050505050565b6118db611b42565b60006118e5610e9a565b6040818101519051630fec1a6760e31b815260048101829052919250907f0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb96001600160a01b031690637f60d338906024015b600060405180830381600087803b15801561195157600080fd5b505af1158015611965573d6000803e3d6000fd5b505050505050565b611975611b42565b60405163e4e8184760e01b8152600481018390526001600160a01b0382811660248301527f0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb9169063e4e8184790604401611937565b6119d2611b42565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f0000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943816001600160a01b0316906323b872dd906064016104b6565b611a33611b42565b6001600160a01b038116611a985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610940565b611aa181611c2d565b50565b604051632c018f9160e01b815260006004820181905230602483015260448201819052907f0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb96001600160a01b031690632c018f9190606401602060405180830381865afa158015611b19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3d9190612366565b905090565b6000546001600160a01b03163314610e855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610940565b6000806000611ba9610e9a565b60408101516060909101519094909350915050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000806000611c208585611c7d565b915091506108bd81611cc2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000808251604103611cb35760208301516040840151606085015160001a611ca787828585611e0c565b94509450505050611cbb565b506000905060025b9250929050565b6000816004811115611cd657611cd66125ec565b03611cde5750565b6001816004811115611cf257611cf26125ec565b03611d3f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610940565b6002816004811115611d5357611d536125ec565b03611da05760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610940565b6003816004811115611db457611db46125ec565b03611aa15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610940565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611e435750600090506003611ec7565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611e97573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611ec057600060019250925050611ec7565b9150600090505b94509492505050565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001611f1b604051806040016040528060008152602001600081525090565b905290565b600060208284031215611f3257600080fd5b5035919050565b60008083601f840112611f4b57600080fd5b50813567ffffffffffffffff811115611f6357600080fd5b6020830191508360208260051b8501011115611cbb57600080fd5b60008060208385031215611f9157600080fd5b823567ffffffffffffffff811115611fa857600080fd5b611fb485828601611f39565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015611ff857835183529284019291840191600101611fdc565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff8111828210171561203d5761203d612004565b60405290565b6040805190810167ffffffffffffffff8111828210171561203d5761203d612004565b604051601f8201601f1916810167ffffffffffffffff8111828210171561208f5761208f612004565b604052919050565b6000806000806000606086880312156120af57600080fd5b853567ffffffffffffffff808211156120c757600080fd5b6120d389838a01611f39565b90975095506020915087820135818111156120ed57600080fd5b6120f98a828b01611f39565b90965094505060408801358181111561211157600080fd5b8801601f81018a1361212257600080fd5b80358281111561213457612134612004565b612146601f8201601f19168501612066565b92508083528a8482840101111561215c57600080fd5b80848301858501376000848285010152505080925050509295509295909350565b6001600160a01b0381168114611aa157600080fd5b6000602082840312156121a457600080fd5b81356121af8161217d565b9392505050565b60008083601f8401126121c857600080fd5b50813567ffffffffffffffff8111156121e057600080fd5b602083019150836020828501011115611cbb57600080fd5b60008060008060008060006080888a03121561221357600080fd5b873567ffffffffffffffff8082111561222b57600080fd5b6122378b838c01611f39565b909950975060208a0135965060408a013591508082111561225757600080fd5b6122638b838c016121b6565b909650945060608a013591508082111561227c57600080fd5b506122898a828b01611f39565b989b979a50959850939692959293505050565b600080600080600080606087890312156122b557600080fd5b863567ffffffffffffffff808211156122cd57600080fd5b6122d98a838b01611f39565b909850965060208901359150808211156122f257600080fd5b6122fe8a838b01611f39565b9096509450604089013591508082111561231757600080fd5b5061232489828a016121b6565b979a9699509497509295939492505050565b6000806040838503121561234957600080fd5b82359150602083013561235b8161217d565b809150509250929050565b60006020828403121561237857600080fd5b5051919050565b60006020828403121561239157600080fd5b815180151581146121af57600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016123df576123df6123b7565b5060010190565b60006001600160fb1b038311156123fc57600080fd5b8260051b80838637939093019392505050565b600061242661241f83888a6123e6565b85876123e6565b92151560f81b83525050600101949350505050565b602080825260119082015270496e76616c6964207369676e617475726560781b604082015260600190565b60006020828403121561247857600080fd5b81516121af8161217d565b60208082526017908201527f596f7520646f206e6f74206f776e2074686973204e4654000000000000000000604082015260600190565b818103818111156108c1576108c16123b7565b808201808211156108c1576108c16123b7565b81835260006001600160fb1b038311156124f957600080fd5b8260051b80836020870137939093016020019392505050565b6040815260006125266040830186886124e0565b82810360208401526125398185876124e0565b979650505050505050565b600081830360e081121561255757600080fd5b61255f61201a565b83518152602084015160208201526040840151604082015260608401516060820152608084015160808201526040609f198301121561259d57600080fd5b6125a5612043565b60a085810151825260c090950151602082015293810193909352509092915050565b60006125d48286886123e6565b9384525050151560f81b602082015260210192915050565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220992e0c01341a75324140699b4029803c8ab8843ff4a4ad5e801ef6af5ea8ac5764736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ba960c4be7840c4803b85abc4ae6701c9f1dc5b50000000000000000000000004a482e752cbfc41c74915bdbaded4f0032e0a78d0000000000000000000000004d224452801aced8b2f0aebe155379bb5d5943810000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb9
-----Decoded View---------------
Arg [0] : b3lAddress (address): 0xbA960C4be7840c4803b85AbC4ae6701C9f1dC5b5
Arg [1] : _signer (address): 0x4A482E752CBfc41c74915bDbAdED4F0032E0A78D
Arg [2] : ape_coin (address): 0x4d224452801ACEd8B2F0aebE155379bb5D594381
Arg [3] : ape_coin_staking (address): 0x5954aB967Bc958940b7EB73ee84797Dc8a2AFbb9
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000ba960c4be7840c4803b85abc4ae6701c9f1dc5b5
Arg [1] : 0000000000000000000000004a482e752cbfc41c74915bdbaded4f0032e0a78d
Arg [2] : 0000000000000000000000004d224452801aced8b2f0aebe155379bb5d594381
Arg [3] : 0000000000000000000000005954ab967bc958940b7eb73ee84797dc8a2afbb9
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.