More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 28 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Early Claim | 5139298 | 47 hrs ago | IN | 0 S | 0.03980383 | ||||
Early Claim | 4939686 | 3 days ago | IN | 0 S | 0.0798426 | ||||
Early Claim | 4772302 | 4 days ago | IN | 0 S | 0.03939534 | ||||
Early Claim | 4759153 | 4 days ago | IN | 0 S | 0.04057306 | ||||
Early Claim | 4729114 | 4 days ago | IN | 0 S | 0.03427728 | ||||
Early Claim | 4696939 | 4 days ago | IN | 0 S | 0.03202688 | ||||
Early Claim | 4626257 | 5 days ago | IN | 0 S | 0.04936317 | ||||
Early Claim | 4578193 | 5 days ago | IN | 0 S | 0.04180242 | ||||
Early Claim | 4436013 | 6 days ago | IN | 0 S | 0.04163967 | ||||
Early Claim | 4211948 | 8 days ago | IN | 0 S | 0.08362618 | ||||
Early Claim | 4153497 | 9 days ago | IN | 0 S | 0.08246415 | ||||
Early Claim | 4153427 | 9 days ago | IN | 0 S | 0.08380566 | ||||
Early Claim | 4043363 | 9 days ago | IN | 0 S | 0.02892606 | ||||
Early Claim | 4027745 | 9 days ago | IN | 0 S | 0.02497964 | ||||
Early Claim | 3650586 | 12 days ago | IN | 0 S | 0.00342565 | ||||
Early Claim | 3593164 | 12 days ago | IN | 0 S | 0.0034235 | ||||
Early Claim | 3545377 | 13 days ago | IN | 0 S | 0.00338025 | ||||
Early Claim | 3545128 | 13 days ago | IN | 0 S | 0.00330839 | ||||
Early Claim | 3462866 | 13 days ago | IN | 0 S | 0.00343453 | ||||
Early Claim | 3369544 | 14 days ago | IN | 0 S | 0.00342377 | ||||
Early Claim | 3297769 | 14 days ago | IN | 0 S | 0.0038243 | ||||
Early Claim | 3194717 | 15 days ago | IN | 0 S | 0.00453967 | ||||
Early Claim | 3177770 | 15 days ago | IN | 0 S | 0.00418907 | ||||
Early Claim | 3171703 | 15 days ago | IN | 0 S | 0.00421203 | ||||
Early Claim | 2981065 | 17 days ago | IN | 0 S | 0.0038719 |
Loading...
Loading
Contract Name:
RewardVester
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 1000 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; import {IVault} from "./interfaces/IVault.sol"; import {ILockBox} from "./interfaces/ILockBox.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import {AccessControlEnumerable} from "@openzeppelin/contracts/access/extensions/AccessControlEnumerable.sol"; contract RewardVester is ReentrancyGuard, AccessControlEnumerable { // ERRORS // error NotAllowed(); error Paused(); error NotVested(); error NotUnitroller(); error ZeroAmount(); error UnderTimeLock(); error OverParams(); error VestExpired(); // ADDRESSES / address public immutable fBux; address public immutable sTs; address public immutable lp; address public immutable unitroller; address public immutable vault; address public immutable multisig; address public lockBox; address[] internal lpTokens; bytes32 internal immutable poolId; uint internal constant DURATION = 91 days; bool public isPaused; // VEST ACCOUNTING // struct UserInfo{ uint vestedAmount; uint vestEnd; bool isVested; } mapping(address user => UserInfo) public userInfo; // EVENTS // event Vested(address indexed user, uint amount, uint vestEnd); event VestClaimed(address indexed user, uint amount); event ClaimedEarly(address indexed user, uint fBuxAmount, uint sTsAmount, uint lpAmount); event TokenRescued(address indexed token, address indexed to, uint amount); event WasPaused(bool state); event Unpaused(bool state); event LockBoxSet(address indexed lockBox); constructor( address _admin, address _fBux, address _sTs, address _lp, address _unitroller, address _vault, bytes32 _poolId ) { _grantRole(DEFAULT_ADMIN_ROLE, _admin); multisig = _admin; sTs = _sTs; fBux = _fBux; unitroller = _unitroller; vault = _vault; poolId = _poolId; lp = _lp; lpTokens = [fBux, sTs]; renewApprovals(); } /// @notice Vests fBux for an account when claiming rewards on fMoney Lender // If vest has expired, it will first claim the vest, reset it and resume accounting in a new 3M cycle. function vestFor(address user, uint amount) external nonReentrant { if(msg.sender != unitroller){revert NotUnitroller();} UserInfo storage account = userInfo[user]; if(account.isVested){ if(block.timestamp >= account.vestEnd){_forceClaim(user);} } if(!account.isVested){ account.vestedAmount += amount; account.vestEnd = block.timestamp + DURATION; account.isVested = true; } else { account.vestedAmount += amount; } emit Vested(user, amount, account.vestEnd); } /// @notice Withdraw vested rewards once vesting is complete and reset vest for account function claimVest() external nonReentrant{ address user = msg.sender; UserInfo storage account = userInfo[user]; if(!account.isVested){revert NotVested();} if(block.timestamp < account.vestEnd){revert UnderTimeLock();} uint toClaim = account.vestedAmount; account.vestedAmount = 0; account.vestEnd = 0; account.isVested= false; _safeTransfer(fBux, user, toClaim); emit VestClaimed(user, toClaim); } /// @notice Allows partial or full exit from 3 month fBux vest into a 1.5M locked Staked fMoney with Attitude position. // If vest expired, _forceClaim rewards for user and reset stored info. Requires user sTs approval for this contract. function earlyClaim(uint sTsAmount, uint minLpReceived) external nonReentrant { address user = msg.sender; UserInfo storage account = userInfo[user]; if(!account.isVested) {revert NotVested();} if(isPaused){revert Paused();} if(sTsAmount == 0){revert ZeroAmount();} if(block.timestamp >= account.vestEnd){_forceClaim(user);} else{ uint availableToClaim = account.vestedAmount; if(availableToClaim == 0){revert ZeroAmount();} uint fBuxAmount = getFbuxPairAmount(sTsAmount); if(fBuxAmount > availableToClaim){revert OverParams();} account.vestedAmount -= fBuxAmount; _safeTransferFrom(sTs, user, address(this), sTsAmount); // Create LP on BeethovenX & vest on Lockbox. _joinPool(fBuxAmount, sTsAmount); uint lpAmount = IERC20(lp).balanceOf(address(this)); if(lpAmount < minLpReceived) {revert OverParams();} ILockBox(lockBox).createVest(user, lpAmount); emit ClaimedEarly(user, fBuxAmount, sTsAmount, lpAmount); } } // INTERNAL // /// @notice Prevents bypassing 3M vest cycle if a user's vest has expired. // Further unitroller deposits or earlyUnvests will forcefully claim rewards and reset vest. function _forceClaim(address user) internal { UserInfo storage account = userInfo[user]; uint amountClaimed = account.vestedAmount; account.vestedAmount = 0; account.vestEnd = 0; account.isVested = false; _safeTransfer(fBux, user, amountClaimed); emit VestClaimed(user, amountClaimed); } /// @notice Adds liquidity to fMoney's 80/20 pool on BeethovenX. function _joinPool(uint fBuxAmt, uint sTsAmt) internal { uint256[] memory amounts = new uint256[](lpTokens.length); amounts[0] = fBuxAmt; amounts[1] = sTsAmt; bytes memory userData = abi.encode(1, amounts, 1); IVault.JoinPoolRequest memory request = IVault.JoinPoolRequest(lpTokens, amounts, userData, false); IVault(vault).joinPool(poolId, address(this), address(this), request); } /// @notice Returns remaining vest time for a user function timeLeft(address user) external view returns (uint) { UserInfo memory account = userInfo[user]; if(account.vestedAmount == 0){ return 0;} if(block.timestamp >= account.vestEnd){return 0;} return account.vestEnd - block.timestamp; } // Returns total vested fBux in contract function vestedfBux() external view returns (uint fBuxBal){ fBuxBal = IERC20(fBux).balanceOf(address(this)); } /// @notice Returns user required sTs to earlyUnvest an fBux amount; function getFbuxPairAmount(uint sTsAmount) public view returns (uint fBuxRequired){ // balances[0] - total fBUX in BPT. balances[1] - total sTs in BPT. (, uint256[] memory balances, ) = IVault(vault).getPoolTokens(poolId); fBuxRequired = sTsAmount * balances[0] / balances[1]; } // ADMIN // // Recovers token mistakenly sent to the contract function recoverTokens(address token, address to, uint amount) external onlyRole(DEFAULT_ADMIN_ROLE) { if(token == fBux){revert NotAllowed();} _safeTransfer(token, to, amount); emit TokenRescued(token, to, amount); } // Approval refresh for contract longevity function renewApprovals() public onlyRole(DEFAULT_ADMIN_ROLE){ _safeApprove(fBux, vault, 0); _safeApprove(fBux, vault, type(uint).max); _safeApprove(sTs, vault, 0); _safeApprove(sTs, vault, type(uint).max); if(lockBox != address(0)){ _safeApprove(lp, lockBox, 0); _safeApprove(lp, lockBox, type(uint).max); } } /// @notice Sets LockBox address. Can only be set once. function setLockBox(address _lockBox) external onlyRole(DEFAULT_ADMIN_ROLE){ if(lockBox != address(0)){revert NotAllowed();} lockBox = _lockBox; _safeApprove(lp, lockBox, 0); _safeApprove(lp, lockBox, type(uint).max); emit LockBoxSet(_lockBox); } /// @notice For Sonic migration this contract must be paused to not receive lender rewards. // Checked on Unitroller. Only pauses earlyUnvest in this contract. function setPaused(bool state) external onlyRole(DEFAULT_ADMIN_ROLE){ if(isPaused == state){revert NotAllowed();} isPaused = state; if(state){emit WasPaused(state);} else{emit Unpaused(state);} } // ERC20 handling function _safeTransfer(address token, address to, uint value) internal { (bool success, bytes memory data) = token.call( abi.encodeCall(IERC20.transfer, (to, value)) ); require(success && (data.length == 0 || abi.decode(data, (bool)))); } function _safeTransferFrom(address token, address from, address to, uint value) internal { (bool success, bytes memory data) = token.call( abi.encodeCall(IERC20.transferFrom, (from, to, value)) ); require(success && (data.length == 0 || abi.decode(data, (bool)))); } function _safeApprove(address token, address spender, uint value) internal { (bool success, bytes memory data) = token.call( abi.encodeCall(IERC20.approve, (spender, value)) ); require(success && (data.length == 0 || abi.decode(data, (bool)))); } function _balanceOf(address token, address account) internal view returns (uint) { (bool success, bytes memory data) = token.staticcall( abi.encodeCall(IERC20.balanceOf, (account)) ); require(success && data.length >= 32); return abi.decode(data, (uint)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/AccessControlEnumerable.sol) pragma solidity ^0.8.20; import {IAccessControlEnumerable} from "./IAccessControlEnumerable.sol"; import {AccessControl} from "../AccessControl.sol"; import {EnumerableSet} from "../../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 role => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {AccessControl-_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override returns (bool) { bool granted = super._grantRole(role, account); if (granted) { _roleMembers[role].add(account); } return granted; } /** * @dev Overload {AccessControl-_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) { bool revoked = super._revokeRole(role, account); if (revoked) { _roleMembers[role].remove(account); } return revoked; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/IAccessControlEnumerable.sol) pragma solidity ^0.8.20; import {IAccessControl} from "../IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// 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.1) (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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._positions[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._positions[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; interface ILockBox { function createVest(address user, uint amount) external; function paused() external view returns(bool); }
//SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.20; interface IVault { function joinPool( bytes32 poolId, address sender, address recipient, JoinPoolRequest memory request ) external; function getPoolTokens(bytes32 poolId) external view returns ( address[] memory tokens, uint256[] memory balances, uint256 lastChangeBlock ); enum JoinKind { EXACT_TOKENS_IN_FOR_BPT_OUT } struct JoinPoolRequest { address[] assets; uint256[] maxAmountsIn; bytes userData; bool fromInternalBalance; } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "evmVersion": "shanghai", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_fBux","type":"address"},{"internalType":"address","name":"_sTs","type":"address"},{"internalType":"address","name":"_lp","type":"address"},{"internalType":"address","name":"_unitroller","type":"address"},{"internalType":"address","name":"_vault","type":"address"},{"internalType":"bytes32","name":"_poolId","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"NotAllowed","type":"error"},{"inputs":[],"name":"NotUnitroller","type":"error"},{"inputs":[],"name":"NotVested","type":"error"},{"inputs":[],"name":"OverParams","type":"error"},{"inputs":[],"name":"Paused","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"UnderTimeLock","type":"error"},{"inputs":[],"name":"VestExpired","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"fBuxAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sTsAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpAmount","type":"uint256"}],"name":"ClaimedEarly","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"lockBox","type":"address"}],"name":"LockBoxSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenRescued","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"VestClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"vestEnd","type":"uint256"}],"name":"Vested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"WasPaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimVest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"sTsAmount","type":"uint256"},{"internalType":"uint256","name":"minLpReceived","type":"uint256"}],"name":"earlyClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fBux","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"sTsAmount","type":"uint256"}],"name":"getFbuxPairAmount","outputs":[{"internalType":"uint256","name":"fBuxRequired","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockBox","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multisig","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"recoverTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renewApprovals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sTs","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lockBox","type":"address"}],"name":"setLockBox","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"timeLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unitroller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"vestedAmount","type":"uint256"},{"internalType":"uint256","name":"vestEnd","type":"uint256"},{"internalType":"bool","name":"isVested","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"vestFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vestedfBux","outputs":[{"internalType":"uint256","name":"fBuxBal","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
61016060405234801562000011575f80fd5b50604051620025f6380380620025f6833981016040819052620000349162000481565b60015f908155620000469088620000be565b506001600160a01b038088166101205285811660a0908152878216608081905285831660e0528483166101005261014084905286831660c0526040805180820190915290815290519091166020820152620000a6906004906002620003e7565b50620000b1620000f9565b5050505050505062000557565b5f80620000cc8484620001b5565b90508015620000f0575f848152600260205260409020620000ee908462000248565b505b90505b92915050565b5f62000105816200025e565b6200011d608051610100515f6200026a60201b60201c565b62000136608051610100515f196200026a60201b60201c565b6200014e60a051610100515f6200026a60201b60201c565b6200016760a051610100515f196200026a60201b60201c565b6003546001600160a01b031615620001b25760c0516003546200019591906001600160a01b03165f6200026a565b60c051600354620001b291906001600160a01b03165f196200026a565b50565b5f8281526001602090815260408083206001600160a01b038516845290915281205460ff1662000240575f8381526001602081815260408084206001600160a01b0387168086529252808420805460ff19169093179092559051339286917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a4506001620000f3565b505f620000f3565b5f620000f0836001600160a01b03841662000343565b620001b281336200038a565b6040516001600160a01b038381166024830152604482018390525f91829186169060640160408051601f198184030181529181526020820180516001600160e01b031663095ea7b360e01b17905251620002c5919062000508565b5f604051808303815f865af19150503d805f811462000300576040519150601f19603f3d011682016040523d82523d5f602084013e62000305565b606091505b5091509150818015620003335750805115806200033357508080602001905181019062000333919062000536565b6200033c575f80fd5b5050505050565b5f8181526001830160205260408120546200024057508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155620000f3565b5f8281526001602090815260408083206001600160a01b038516845290915290205460ff16620003e35760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440160405180910390fd5b5050565b828054828255905f5260205f209081019282156200043d579160200282015b828111156200043d57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000406565b506200044b9291506200044f565b5090565b5b808211156200044b575f815560010162000450565b80516001600160a01b03811681146200047c575f80fd5b919050565b5f805f805f805f60e0888a03121562000498575f80fd5b620004a38862000465565b9650620004b36020890162000465565b9550620004c36040890162000465565b9450620004d36060890162000465565b9350620004e36080890162000465565b9250620004f360a0890162000465565b915060c0880151905092959891949750929550565b5f82515f5b818110156200052957602081860181015185830152016200050d565b505f920191825250919050565b5f6020828403121562000547575f80fd5b81518015158114620000f0575f80fd5b60805160a05160c05160e051610100516101205161014051611fb3620006435f395f81816104ec01526116ca01525f61032d01525f81816104a20152818161051e0152818161091c01528181610967015281816109b3015281816109fe015261169b01525f81816104260152610c0401525f81816102c0015281816107da0152818161080901528181610a3e01528181610a760152610eb901525f818161037a01528181610992015281816109dd0152610e7101525f818161047301528181610638015281816108fb0152818161094601528181610b2c015281816110f201526114140152611fb35ff3fe608060405234801561000f575f80fd5b50600436106101ba575f3560e01c80635f3e849f116100f3578063b187bd2611610093578063d547741f1161006e578063d547741f1461045b578063def1121a1461046e578063f13253bb14610495578063fbfa77cf1461049d575f80fd5b8063b187bd2614610414578063bad1d3da14610421578063ca15c87314610448575f80fd5b806391d14854116100ce57806391d14854146103af57806394e35169146103e7578063a217fddf146103fa578063b16cb36214610401575f80fd5b80635f3e849f1461036257806383ddf5c4146103755780639010d07c1461039c575f80fd5b80632f2ff15d1161015e5780633c44ea84116101395780633c44ea841461030d578063405c649c146103155780634783c35b146103285780635d19b0d11461034f575f80fd5b80632f2ff15d146102a8578063313c06a0146102bb57806336568abe146102fa575f80fd5b806316c38b3c1161019957806316c38b3c1461020f5780631959a00214610224578063248a9ca3146102725780632d8c803914610295575f80fd5b806206a67a146101be57806301ffc9a7146101e457806316aa032d14610207575b5f80fd5b6101d16101cc366004611a44565b6104c4565b6040519081526020015b60405180910390f35b6101f76101f2366004611a5b565b6105de565b60405190151581526020016101db565b6101d1610621565b61022261021d366004611a8f565b6106ae565b005b610255610232366004611abe565b60066020525f908152604090208054600182015460029092015490919060ff1683565b6040805193845260208401929092521515908201526060016101db565b6101d1610280366004611a44565b5f908152600160208190526040909120015490565b6102226102a3366004611abe565b61076a565b6102226102b6366004611ad9565b610870565b6102e27f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101db565b610222610308366004611ad9565b61089b565b6102226108ec565b6101d1610323366004611abe565b610aa9565b6102e27f000000000000000000000000000000000000000000000000000000000000000081565b6003546102e2906001600160a01b031681565b610222610370366004611b07565b610b20565b6102e27f000000000000000000000000000000000000000000000000000000000000000081565b6102e26103aa366004611b45565b610bda565b6101f76103bd366004611ad9565b5f9182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6102226103f5366004611b65565b610bf1565b6101d15f81565b61022261040f366004611b45565b610d53565b6005546101f79060ff1681565b6102e27f000000000000000000000000000000000000000000000000000000000000000081565b6101d1610456366004611a44565b611022565b610222610469366004611ad9565b611038565b6102e27f000000000000000000000000000000000000000000000000000000000000000081565b61022261105d565b6102e27f000000000000000000000000000000000000000000000000000000000000000081565b6040517ff94d46680000000000000000000000000000000000000000000000000000000081527f000000000000000000000000000000000000000000000000000000000000000060048201525f9081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f94d4668906024015f60405180830381865afa158015610562573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526105899190810190611c5f565b50915050806001815181106105a0576105a0611d26565b6020026020010151815f815181106105ba576105ba611d26565b6020026020010151846105cd9190611d4e565b6105d79190611d65565b9392505050565b5f6001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061061b575061061b82611169565b92915050565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610685573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106a99190611d84565b905090565b5f6106b8816111cf565b60055482151560ff9091161515036106e357604051631eb49d6d60e11b815260040160405180910390fd5b6005805460ff191683158015919091179091556107345760405182151581527fde01108c40dfd08ba282497163611b5374803905806a94ab39a7a89627b74cb2906020015b60405180910390a15050565b60405182151581527f0c3ccd23c1836807297aca2fda302f40baf2f67f3f9628351b352a91742c6c4290602001610728565b5050565b5f610774816111cf565b6003546001600160a01b03161561079e57604051631eb49d6d60e11b815260040160405180910390fd5b600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038416908117909155610800907f0000000000000000000000000000000000000000000000000000000000000000905f6111d9565b600354610839907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b03165f196111d9565b6040516001600160a01b038316907fa0d5e8b51197b9b55e3cab7ce2df1d6e544a83b48bce8b14e28ae6b8d7923da9905f90a25050565b5f828152600160208190526040909120015461088b816111cf565b61089583836112c2565b50505050565b6001600160a01b03811633146108dd576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108e782826112f5565b505050565b5f6108f6816111cf565b6109417f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000005f6111d9565b61098d7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000005f196111d9565b6109d87f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000005f6111d9565b610a247f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000005f196111d9565b6003546001600160a01b031615610aa657600354610a6d907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b03165f6111d9565b600354610aa6907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b03165f196111d9565b50565b6001600160a01b0381165f9081526006602090815260408083208151606081018352815480825260018301549482019490945260029091015460ff16151591810191909152908203610afd57505f92915050565b80602001514210610b1057505f92915050565b4281602001516105d79190611d9b565b5f610b2a816111cf565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b031603610b7c57604051631eb49d6d60e11b815260040160405180910390fd5b610b87848484611320565b826001600160a01b0316846001600160a01b03167f4143f7b5cb6ea007914c32b8a3e64cebc051d7f493fa0755454da1e47701e12584604051610bcc91815260200190565b60405180910390a350505050565b5f8281526002602052604081206105d79083611392565b610bf961139d565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c5b576040517f8ddedec200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f908152600660205260409020600281015460ff1615610c935780600101544210610c9357610c93836113de565b600281015460ff16610ce15781815f015f828254610cb19190611dae565b90915550610cc490506277f88042611dae565b60018083019190915560028201805460ff19169091179055610cf9565b81815f015f828254610cf39190611dae565b90915550505b826001600160a01b03167ffbeff59d2bfda0d79ea8a29f8c57c66d48c7a13eabbdb90908d9115ec41c9dc6838360010154604051610d41929190918252602082015260400190565b60405180910390a25061076660015f55565b610d5b61139d565b335f818152600660205260409020600281015460ff16610d8e57604051639225b94160e01b815260040160405180910390fd5b60055460ff1615610dcb576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b835f03610deb57604051631f2a200560e01b815260040160405180910390fd5b80600101544210610e0457610dff826113de565b611017565b80545f819003610e2757604051631f2a200560e01b815260040160405180910390fd5b5f610e31866104c4565b905081811115610e5457604051630316433360e51b815260040160405180910390fd5b80835f015f828254610e669190611d9b565b90915550610e9890507f0000000000000000000000000000000000000000000000000000000000000000853089611482565b610ea28187611574565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610f06573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f2a9190611d84565b905085811015610f4d57604051630316433360e51b815260040160405180910390fd5b6003546040517ff8f21e5d0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152602482018490529091169063f8f21e5d906044015f604051808303815f87803b158015610fb1575f80fd5b505af1158015610fc3573d5f803e3d5ffd5b505060408051858152602081018b90529081018490526001600160a01b03881692507fb45e469caed48e0fc3511cd850abe2c6bd1d0626f86e0dd0f4b940e89a65fce6915060600160405180910390a25050505b505061076660015f55565b5f81815260026020526040812061061b9061173f565b5f8281526001602081905260409091200154611053816111cf565b61089583836112f5565b61106561139d565b335f818152600660205260409020600281015460ff1661109857604051639225b94160e01b815260040160405180910390fd5b80600101544210156110d6576040517fcba1549300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80545f808355600183015560028201805460ff191690556111187f00000000000000000000000000000000000000000000000000000000000000008483611320565b826001600160a01b03167f3552bfeaaadccee76f56971ef880969c9fe7ec6af186859930f738924cc0ede98260405161115391815260200190565b60405180910390a250505061116760015f55565b565b5f6001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061061b57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461061b565b610aa68133611748565b6040516001600160a01b038381166024830152604482018390525f91829186169060640160408051601f198184030181529181526020820180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790525161124b9190611de3565b5f604051808303815f865af19150503d805f8114611284576040519150601f19603f3d011682016040523d82523d5f602084013e611289565b606091505b50915091508180156112b35750805115806112b35750808060200190518101906112b39190611dfe565b6112bb575f80fd5b5050505050565b5f806112ce84846117b9565b905080156105d7575f8481526002602052604090206112ed9084611849565b509392505050565b5f80611301848461185d565b905080156105d7575f8481526002602052604090206112ed90846118e2565b6040516001600160a01b038381166024830152604482018390525f91829186169060640160408051601f198184030181529181526020820180516001600160e01b03167fa9059cbb000000000000000000000000000000000000000000000000000000001790525161124b9190611de3565b5f6105d783836118f6565b60025f54036113d8576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f55565b6001600160a01b0381165f9081526006602052604081208054828255600182019290925560028101805460ff191690559061143a7f00000000000000000000000000000000000000000000000000000000000000008483611320565b826001600160a01b03167f3552bfeaaadccee76f56971ef880969c9fe7ec6af186859930f738924cc0ede98260405161147591815260200190565b60405180910390a2505050565b6040516001600160a01b0384811660248301528381166044830152606482018390525f91829187169060840160408051601f198184030181529181526020820180516001600160e01b03167f23b872dd00000000000000000000000000000000000000000000000000000000179052516114fc9190611de3565b5f604051808303815f865af19150503d805f8114611535576040519150601f19603f3d011682016040523d82523d5f602084013e61153a565b606091505b50915091508180156115645750805115806115645750808060200190518101906115649190611dfe565b61156c575f80fd5b505050505050565b6004545f9067ffffffffffffffff81111561159157611591611b8f565b6040519080825280602002602001820160405280156115ba578160200160208202803683370190505b50905082815f815181106115d0576115d0611d26565b60200260200101818152505081816001815181106115f0576115f0611d26565b6020026020010181815250505f600182600160405160200161161493929190611e52565b60408051601f198184030181526004805460a06020820286018101909452608085018181529295505f9493849392919084018282801561167b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161165d575b505050505081526020018481526020018381526020015f151581525090507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663b95cac287f00000000000000000000000000000000000000000000000000000000000000003030856040518563ffffffff1660e01b815260040161170b9493929190611eab565b5f604051808303815f87803b158015611722575f80fd5b505af1158015611734573d5f803e3d5ffd5b505050505050505050565b5f61061b825490565b5f8281526001602090815260408083206001600160a01b038516845290915290205460ff16610766576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024810183905260440160405180910390fd5b5f8281526001602090815260408083206001600160a01b038516845290915281205460ff16611842575f8381526001602081815260408084206001600160a01b0387168086529252808420805460ff19169093179092559051339286917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a450600161061b565b505f61061b565b5f6105d7836001600160a01b03841661191c565b5f8281526001602090815260408083206001600160a01b038516845290915281205460ff1615611842575f8381526001602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161061b565b5f6105d7836001600160a01b038416611961565b5f825f01828154811061190b5761190b611d26565b905f5260205f200154905092915050565b5f81815260018301602052604081205461184257508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915561061b565b5f8181526001830160205260408120548015611a3b575f611983600183611d9b565b85549091505f9061199690600190611d9b565b90508082146119f5575f865f0182815481106119b4576119b4611d26565b905f5260205f200154905080875f0184815481106119d4576119d4611d26565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080611a0657611a06611f69565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f90556001935050505061061b565b5f91505061061b565b5f60208284031215611a54575f80fd5b5035919050565b5f60208284031215611a6b575f80fd5b81356001600160e01b0319811681146105d7575f80fd5b8015158114610aa6575f80fd5b5f60208284031215611a9f575f80fd5b81356105d781611a82565b6001600160a01b0381168114610aa6575f80fd5b5f60208284031215611ace575f80fd5b81356105d781611aaa565b5f8060408385031215611aea575f80fd5b823591506020830135611afc81611aaa565b809150509250929050565b5f805f60608486031215611b19575f80fd5b8335611b2481611aaa565b92506020840135611b3481611aaa565b929592945050506040919091013590565b5f8060408385031215611b56575f80fd5b50508035926020909101359150565b5f8060408385031215611b76575f80fd5b8235611b8181611aaa565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611bcc57611bcc611b8f565b604052919050565b5f67ffffffffffffffff821115611bed57611bed611b8f565b5060051b60200190565b5f82601f830112611c06575f80fd5b81516020611c1b611c1683611bd4565b611ba3565b82815260059290921b84018101918181019086841115611c39575f80fd5b8286015b84811015611c545780518352918301918301611c3d565b509695505050505050565b5f805f60608486031215611c71575f80fd5b835167ffffffffffffffff80821115611c88575f80fd5b818601915086601f830112611c9b575f80fd5b81516020611cab611c1683611bd4565b82815260059290921b8401810191818101908a841115611cc9575f80fd5b948201945b83861015611cf0578551611ce181611aaa565b82529482019490820190611cce565b91890151919750909350505080821115611d08575f80fd5b50611d1586828701611bf7565b925050604084015190509250925092565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761061b5761061b611d3a565b5f82611d7f57634e487b7160e01b5f52601260045260245ffd5b500490565b5f60208284031215611d94575f80fd5b5051919050565b8181038181111561061b5761061b611d3a565b8082018082111561061b5761061b611d3a565b5f5b83811015611ddb578181015183820152602001611dc3565b50505f910152565b5f8251611df4818460208701611dc1565b9190910192915050565b5f60208284031215611e0e575f80fd5b81516105d781611a82565b5f8151808452602080850194508084015f5b83811015611e4757815187529582019590820190600101611e2b565b509495945050505050565b60ff84168152606060208201525f611e6d6060830185611e19565b905060ff83166040830152949350505050565b5f8151808452611e97816020860160208601611dc1565b601f01601f19169290920160200192915050565b8481525f60206001600160a01b0380871682850152808616604085015260806060850152610100840185516080808701528181518084526101208801915085830193505f92505b80831015611f1457835185168252928501926001929092019190850190611ef2565b50848801519450607f199350838782030160a0880152611f348186611e19565b94505050506040850151818584030160c0860152611f528382611e80565b925050506060840151611c5460e085018215159052565b634e487b7160e01b5f52603160045260245ffdfea2646970667358221220b5bf3c5113bec49db9063ea4096fa4cda2fb9b468da1856fc3b2b21906ec0fad64736f6c6343000814003300000000000000000000000065be240291384570997cb62516eb27c543f82ee1000000000000000000000000d43b5d6899635e514a00b475eea04c364979e076000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe39550000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057000000000000000000000000d41e9fa6ec7a33f0a6aae5e9420c9d60ec1727e4000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c83ec8254006658e11f9ab5eaf92d64f8528d09057000200000000000000000056
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106101ba575f3560e01c80635f3e849f116100f3578063b187bd2611610093578063d547741f1161006e578063d547741f1461045b578063def1121a1461046e578063f13253bb14610495578063fbfa77cf1461049d575f80fd5b8063b187bd2614610414578063bad1d3da14610421578063ca15c87314610448575f80fd5b806391d14854116100ce57806391d14854146103af57806394e35169146103e7578063a217fddf146103fa578063b16cb36214610401575f80fd5b80635f3e849f1461036257806383ddf5c4146103755780639010d07c1461039c575f80fd5b80632f2ff15d1161015e5780633c44ea84116101395780633c44ea841461030d578063405c649c146103155780634783c35b146103285780635d19b0d11461034f575f80fd5b80632f2ff15d146102a8578063313c06a0146102bb57806336568abe146102fa575f80fd5b806316c38b3c1161019957806316c38b3c1461020f5780631959a00214610224578063248a9ca3146102725780632d8c803914610295575f80fd5b806206a67a146101be57806301ffc9a7146101e457806316aa032d14610207575b5f80fd5b6101d16101cc366004611a44565b6104c4565b6040519081526020015b60405180910390f35b6101f76101f2366004611a5b565b6105de565b60405190151581526020016101db565b6101d1610621565b61022261021d366004611a8f565b6106ae565b005b610255610232366004611abe565b60066020525f908152604090208054600182015460029092015490919060ff1683565b6040805193845260208401929092521515908201526060016101db565b6101d1610280366004611a44565b5f908152600160208190526040909120015490565b6102226102a3366004611abe565b61076a565b6102226102b6366004611ad9565b610870565b6102e27f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d0905781565b6040516001600160a01b0390911681526020016101db565b610222610308366004611ad9565b61089b565b6102226108ec565b6101d1610323366004611abe565b610aa9565b6102e27f00000000000000000000000065be240291384570997cb62516eb27c543f82ee181565b6003546102e2906001600160a01b031681565b610222610370366004611b07565b610b20565b6102e27f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe395581565b6102e26103aa366004611b45565b610bda565b6101f76103bd366004611ad9565b5f9182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6102226103f5366004611b65565b610bf1565b6101d15f81565b61022261040f366004611b45565b610d53565b6005546101f79060ff1681565b6102e27f000000000000000000000000d41e9fa6ec7a33f0a6aae5e9420c9d60ec1727e481565b6101d1610456366004611a44565b611022565b610222610469366004611ad9565b611038565b6102e27f000000000000000000000000d43b5d6899635e514a00b475eea04c364979e07681565b61022261105d565b6102e27f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c881565b6040517ff94d46680000000000000000000000000000000000000000000000000000000081527f3ec8254006658e11f9ab5eaf92d64f8528d0905700020000000000000000005660048201525f9081906001600160a01b037f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8169063f94d4668906024015f60405180830381865afa158015610562573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526105899190810190611c5f565b50915050806001815181106105a0576105a0611d26565b6020026020010151815f815181106105ba576105ba611d26565b6020026020010151846105cd9190611d4e565b6105d79190611d65565b9392505050565b5f6001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061061b575061061b82611169565b92915050565b6040516370a0823160e01b81523060048201525f907f000000000000000000000000d43b5d6899635e514a00b475eea04c364979e0766001600160a01b0316906370a0823190602401602060405180830381865afa158015610685573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106a99190611d84565b905090565b5f6106b8816111cf565b60055482151560ff9091161515036106e357604051631eb49d6d60e11b815260040160405180910390fd5b6005805460ff191683158015919091179091556107345760405182151581527fde01108c40dfd08ba282497163611b5374803905806a94ab39a7a89627b74cb2906020015b60405180910390a15050565b60405182151581527f0c3ccd23c1836807297aca2fda302f40baf2f67f3f9628351b352a91742c6c4290602001610728565b5050565b5f610774816111cf565b6003546001600160a01b03161561079e57604051631eb49d6d60e11b815260040160405180910390fd5b600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038416908117909155610800907f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057905f6111d9565b600354610839907f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057906001600160a01b03165f196111d9565b6040516001600160a01b038316907fa0d5e8b51197b9b55e3cab7ce2df1d6e544a83b48bce8b14e28ae6b8d7923da9905f90a25050565b5f828152600160208190526040909120015461088b816111cf565b61089583836112c2565b50505050565b6001600160a01b03811633146108dd576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108e782826112f5565b505050565b5f6108f6816111cf565b6109417f000000000000000000000000d43b5d6899635e514a00b475eea04c364979e0767f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c85f6111d9565b61098d7f000000000000000000000000d43b5d6899635e514a00b475eea04c364979e0767f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c85f196111d9565b6109d87f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe39557f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c85f6111d9565b610a247f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe39557f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c85f196111d9565b6003546001600160a01b031615610aa657600354610a6d907f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057906001600160a01b03165f6111d9565b600354610aa6907f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057906001600160a01b03165f196111d9565b50565b6001600160a01b0381165f9081526006602090815260408083208151606081018352815480825260018301549482019490945260029091015460ff16151591810191909152908203610afd57505f92915050565b80602001514210610b1057505f92915050565b4281602001516105d79190611d9b565b5f610b2a816111cf565b7f000000000000000000000000d43b5d6899635e514a00b475eea04c364979e0766001600160a01b0316846001600160a01b031603610b7c57604051631eb49d6d60e11b815260040160405180910390fd5b610b87848484611320565b826001600160a01b0316846001600160a01b03167f4143f7b5cb6ea007914c32b8a3e64cebc051d7f493fa0755454da1e47701e12584604051610bcc91815260200190565b60405180910390a350505050565b5f8281526002602052604081206105d79083611392565b610bf961139d565b336001600160a01b037f000000000000000000000000d41e9fa6ec7a33f0a6aae5e9420c9d60ec1727e41614610c5b576040517f8ddedec200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382165f908152600660205260409020600281015460ff1615610c935780600101544210610c9357610c93836113de565b600281015460ff16610ce15781815f015f828254610cb19190611dae565b90915550610cc490506277f88042611dae565b60018083019190915560028201805460ff19169091179055610cf9565b81815f015f828254610cf39190611dae565b90915550505b826001600160a01b03167ffbeff59d2bfda0d79ea8a29f8c57c66d48c7a13eabbdb90908d9115ec41c9dc6838360010154604051610d41929190918252602082015260400190565b60405180910390a25061076660015f55565b610d5b61139d565b335f818152600660205260409020600281015460ff16610d8e57604051639225b94160e01b815260040160405180910390fd5b60055460ff1615610dcb576040517f9e87fac800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b835f03610deb57604051631f2a200560e01b815260040160405180910390fd5b80600101544210610e0457610dff826113de565b611017565b80545f819003610e2757604051631f2a200560e01b815260040160405180910390fd5b5f610e31866104c4565b905081811115610e5457604051630316433360e51b815260040160405180910390fd5b80835f015f828254610e669190611d9b565b90915550610e9890507f000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe3955853089611482565b610ea28187611574565b6040516370a0823160e01b81523060048201525f907f0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d090576001600160a01b0316906370a0823190602401602060405180830381865afa158015610f06573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f2a9190611d84565b905085811015610f4d57604051630316433360e51b815260040160405180910390fd5b6003546040517ff8f21e5d0000000000000000000000000000000000000000000000000000000081526001600160a01b038781166004830152602482018490529091169063f8f21e5d906044015f604051808303815f87803b158015610fb1575f80fd5b505af1158015610fc3573d5f803e3d5ffd5b505060408051858152602081018b90529081018490526001600160a01b03881692507fb45e469caed48e0fc3511cd850abe2c6bd1d0626f86e0dd0f4b940e89a65fce6915060600160405180910390a25050505b505061076660015f55565b5f81815260026020526040812061061b9061173f565b5f8281526001602081905260409091200154611053816111cf565b61089583836112f5565b61106561139d565b335f818152600660205260409020600281015460ff1661109857604051639225b94160e01b815260040160405180910390fd5b80600101544210156110d6576040517fcba1549300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80545f808355600183015560028201805460ff191690556111187f000000000000000000000000d43b5d6899635e514a00b475eea04c364979e0768483611320565b826001600160a01b03167f3552bfeaaadccee76f56971ef880969c9fe7ec6af186859930f738924cc0ede98260405161115391815260200190565b60405180910390a250505061116760015f55565b565b5f6001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061061b57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461061b565b610aa68133611748565b6040516001600160a01b038381166024830152604482018390525f91829186169060640160408051601f198184030181529181526020820180516001600160e01b03167f095ea7b3000000000000000000000000000000000000000000000000000000001790525161124b9190611de3565b5f604051808303815f865af19150503d805f8114611284576040519150601f19603f3d011682016040523d82523d5f602084013e611289565b606091505b50915091508180156112b35750805115806112b35750808060200190518101906112b39190611dfe565b6112bb575f80fd5b5050505050565b5f806112ce84846117b9565b905080156105d7575f8481526002602052604090206112ed9084611849565b509392505050565b5f80611301848461185d565b905080156105d7575f8481526002602052604090206112ed90846118e2565b6040516001600160a01b038381166024830152604482018390525f91829186169060640160408051601f198184030181529181526020820180516001600160e01b03167fa9059cbb000000000000000000000000000000000000000000000000000000001790525161124b9190611de3565b5f6105d783836118f6565b60025f54036113d8576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f55565b6001600160a01b0381165f9081526006602052604081208054828255600182019290925560028101805460ff191690559061143a7f000000000000000000000000d43b5d6899635e514a00b475eea04c364979e0768483611320565b826001600160a01b03167f3552bfeaaadccee76f56971ef880969c9fe7ec6af186859930f738924cc0ede98260405161147591815260200190565b60405180910390a2505050565b6040516001600160a01b0384811660248301528381166044830152606482018390525f91829187169060840160408051601f198184030181529181526020820180516001600160e01b03167f23b872dd00000000000000000000000000000000000000000000000000000000179052516114fc9190611de3565b5f604051808303815f865af19150503d805f8114611535576040519150601f19603f3d011682016040523d82523d5f602084013e61153a565b606091505b50915091508180156115645750805115806115645750808060200190518101906115649190611dfe565b61156c575f80fd5b505050505050565b6004545f9067ffffffffffffffff81111561159157611591611b8f565b6040519080825280602002602001820160405280156115ba578160200160208202803683370190505b50905082815f815181106115d0576115d0611d26565b60200260200101818152505081816001815181106115f0576115f0611d26565b6020026020010181815250505f600182600160405160200161161493929190611e52565b60408051601f198184030181526004805460a06020820286018101909452608085018181529295505f9493849392919084018282801561167b57602002820191905f5260205f20905b81546001600160a01b0316815260019091019060200180831161165d575b505050505081526020018481526020018381526020015f151581525090507f000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c86001600160a01b031663b95cac287f3ec8254006658e11f9ab5eaf92d64f8528d090570002000000000000000000563030856040518563ffffffff1660e01b815260040161170b9493929190611eab565b5f604051808303815f87803b158015611722575f80fd5b505af1158015611734573d5f803e3d5ffd5b505050505050505050565b5f61061b825490565b5f8281526001602090815260408083206001600160a01b038516845290915290205460ff16610766576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024810183905260440160405180910390fd5b5f8281526001602090815260408083206001600160a01b038516845290915281205460ff16611842575f8381526001602081815260408084206001600160a01b0387168086529252808420805460ff19169093179092559051339286917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a450600161061b565b505f61061b565b5f6105d7836001600160a01b03841661191c565b5f8281526001602090815260408083206001600160a01b038516845290915281205460ff1615611842575f8381526001602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161061b565b5f6105d7836001600160a01b038416611961565b5f825f01828154811061190b5761190b611d26565b905f5260205f200154905092915050565b5f81815260018301602052604081205461184257508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915561061b565b5f8181526001830160205260408120548015611a3b575f611983600183611d9b565b85549091505f9061199690600190611d9b565b90508082146119f5575f865f0182815481106119b4576119b4611d26565b905f5260205f200154905080875f0184815481106119d4576119d4611d26565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080611a0657611a06611f69565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f90556001935050505061061b565b5f91505061061b565b5f60208284031215611a54575f80fd5b5035919050565b5f60208284031215611a6b575f80fd5b81356001600160e01b0319811681146105d7575f80fd5b8015158114610aa6575f80fd5b5f60208284031215611a9f575f80fd5b81356105d781611a82565b6001600160a01b0381168114610aa6575f80fd5b5f60208284031215611ace575f80fd5b81356105d781611aaa565b5f8060408385031215611aea575f80fd5b823591506020830135611afc81611aaa565b809150509250929050565b5f805f60608486031215611b19575f80fd5b8335611b2481611aaa565b92506020840135611b3481611aaa565b929592945050506040919091013590565b5f8060408385031215611b56575f80fd5b50508035926020909101359150565b5f8060408385031215611b76575f80fd5b8235611b8181611aaa565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611bcc57611bcc611b8f565b604052919050565b5f67ffffffffffffffff821115611bed57611bed611b8f565b5060051b60200190565b5f82601f830112611c06575f80fd5b81516020611c1b611c1683611bd4565b611ba3565b82815260059290921b84018101918181019086841115611c39575f80fd5b8286015b84811015611c545780518352918301918301611c3d565b509695505050505050565b5f805f60608486031215611c71575f80fd5b835167ffffffffffffffff80821115611c88575f80fd5b818601915086601f830112611c9b575f80fd5b81516020611cab611c1683611bd4565b82815260059290921b8401810191818101908a841115611cc9575f80fd5b948201945b83861015611cf0578551611ce181611aaa565b82529482019490820190611cce565b91890151919750909350505080821115611d08575f80fd5b50611d1586828701611bf7565b925050604084015190509250925092565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761061b5761061b611d3a565b5f82611d7f57634e487b7160e01b5f52601260045260245ffd5b500490565b5f60208284031215611d94575f80fd5b5051919050565b8181038181111561061b5761061b611d3a565b8082018082111561061b5761061b611d3a565b5f5b83811015611ddb578181015183820152602001611dc3565b50505f910152565b5f8251611df4818460208701611dc1565b9190910192915050565b5f60208284031215611e0e575f80fd5b81516105d781611a82565b5f8151808452602080850194508084015f5b83811015611e4757815187529582019590820190600101611e2b565b509495945050505050565b60ff84168152606060208201525f611e6d6060830185611e19565b905060ff83166040830152949350505050565b5f8151808452611e97816020860160208601611dc1565b601f01601f19169290920160200192915050565b8481525f60206001600160a01b0380871682850152808616604085015260806060850152610100840185516080808701528181518084526101208801915085830193505f92505b80831015611f1457835185168252928501926001929092019190850190611ef2565b50848801519450607f199350838782030160a0880152611f348186611e19565b94505050506040850151818584030160c0860152611f528382611e80565b925050506060840151611c5460e085018215159052565b634e487b7160e01b5f52603160045260245ffdfea2646970667358221220b5bf3c5113bec49db9063ea4096fa4cda2fb9b468da1856fc3b2b21906ec0fad64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000065be240291384570997cb62516eb27c543f82ee1000000000000000000000000d43b5d6899635e514a00b475eea04c364979e076000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe39550000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057000000000000000000000000d41e9fa6ec7a33f0a6aae5e9420c9d60ec1727e4000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c83ec8254006658e11f9ab5eaf92d64f8528d09057000200000000000000000056
-----Decoded View---------------
Arg [0] : _admin (address): 0x65Be240291384570997cb62516eB27C543f82eE1
Arg [1] : _fBux (address): 0xd43b5d6899635e514A00b475eEa04C364979e076
Arg [2] : _sTs (address): 0xE5DA20F15420aD15DE0fa650600aFc998bbE3955
Arg [3] : _lp (address): 0x3ec8254006658E11f9aB5EAf92d64f8528D09057
Arg [4] : _unitroller (address): 0xd41e9fa6EC7A33f0A6AAE5E9420c9D60eC1727e4
Arg [5] : _vault (address): 0xBA12222222228d8Ba445958a75a0704d566BF2C8
Arg [6] : _poolId (bytes32): 0x3ec8254006658e11f9ab5eaf92d64f8528d09057000200000000000000000056
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 00000000000000000000000065be240291384570997cb62516eb27c543f82ee1
Arg [1] : 000000000000000000000000d43b5d6899635e514a00b475eea04c364979e076
Arg [2] : 000000000000000000000000e5da20f15420ad15de0fa650600afc998bbe3955
Arg [3] : 0000000000000000000000003ec8254006658e11f9ab5eaf92d64f8528d09057
Arg [4] : 000000000000000000000000d41e9fa6ec7a33f0a6aae5e9420c9d60ec1727e4
Arg [5] : 000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c8
Arg [6] : 3ec8254006658e11f9ab5eaf92d64f8528d09057000200000000000000000056
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.