Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PhaseVault
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.28;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {AccessControlEnumerable} from "@openzeppelin/contracts/access/extensions/AccessControlEnumerable.sol";
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol";
import {ReentrancyGuardTransient} from "@openzeppelin/contracts/utils/ReentrancyGuardTransient.sol";
import {IPhaseVault} from "./interfaces/IPhaseVault.sol";
import {ITokiVesting} from "./interfaces/ITokiVesting.sol";
import {ITokiErrors} from "./interfaces/ITokiErrors.sol";
/**
* @title PhaseVault
* @notice Manages token distribution across phases
* @dev Implements cooldown periods for security and governance transparency
*/
contract PhaseVault is
IPhaseVault,
AccessControlEnumerable,
ReentrancyGuardTransient,
ITokiErrors
{
using SafeERC20 for IERC20;
bytes32 public constant GOVERNANCE_ROLE = keccak256("GOVERNANCE_ROLE");
bytes32 public constant TREASURY_ROLE = keccak256("TREASURY_ROLE");
// Cooldown periods
uint256 public constant PHASE_UNLOCK_COOLDOWN = 7 days;
uint256 public constant ALLOCATION_CHANGE_COOLDOWN = 14 days;
uint256 public constant ROLE_CHANGE_COOLDOWN = 30 days;
IERC20 public immutable TOKEN;
PhaseAllocation public allocation;
AllocationRecipients public recipients;
CooldownInfo public cooldown;
// slither-disable-next-line constable-states
bool public isUnlocked;
// slither-disable-next-line constable-states
bool public isReleased;
// slither-disable-next-line constable-states
address public treasury; // TREASURY_ROLE holder is tracked for recoverFunds
/**
* @notice Modifier to check if caller has governance or treasury role
*/
modifier onlyGovernanceOrTreasury() {
require(
hasRole(GOVERNANCE_ROLE, _msgSender()) ||
hasRole(TREASURY_ROLE, _msgSender()),
TokiUnauthorizedAccess(
"need GOVERNANCE_ROLE or TREASURY_ROLE",
_msgSender()
)
);
_;
}
/**
* @notice Modifier to check if outside of cooldown period
*/
// slither-disable-next-line incorrect-modifier
modifier outOfCooldownPeriod() {
require(
block.timestamp >= cooldown.endTime,
TokiCooldownActive(cooldown.endTime)
);
_;
}
/**
* @notice Constructor
* @param _token The ERC20 token to be distributed
* @param _governance The governance contract address. Only governance can unlock phase allocation
* @param _treasury The treasury EOA address. Only treasury can release phase allocation
* @param _defaultAdmin The default admin EOA address. Only default admin can change governance and treasury
* @param _allocation The initial phase allocation amounts
* @param _recipients The initial recipient addresses
*/
constructor(
address _token,
address _governance,
address _treasury,
address _defaultAdmin,
PhaseAllocation memory _allocation,
AllocationRecipients memory _recipients
) {
require(_token != address(0), TokiZeroAddress("token"));
require(_governance != address(0), TokiZeroAddress("governance"));
require(_treasury != address(0), TokiZeroAddress("treasury"));
require(_defaultAdmin != address(0), TokiZeroAddress("defaultAdmin"));
_validateAllocation(_allocation);
_validateRecipients(_recipients);
TOKEN = IERC20(_token);
allocation = _allocation;
recipients = _recipients;
_grantRole(DEFAULT_ADMIN_ROLE, _defaultAdmin);
_grantRole(GOVERNANCE_ROLE, _governance);
_grantRole(TREASURY_ROLE, _treasury);
treasury = _treasury;
}
/**
* @notice Step 1: Unlock phase allocation
* @dev Can only be called by governance during no active cooldown
*/
function unlockPhaseAllocation()
external
onlyRole(GOVERNANCE_ROLE)
outOfCooldownPeriod
{
require(!isUnlocked, TokiAlreadyUnlocked());
isUnlocked = true;
_startCooldown(CooldownTrigger.PHASE_UNLOCK, PHASE_UNLOCK_COOLDOWN);
emit PhaseAllocationUnlocked(
block.timestamp,
allocation,
cooldown.endTime
);
}
/**
* @notice Step 2: Release tokens to recipients (after cooldown)
* @dev Can only be called by treasury after unlock and cooldown period
*/
function releasePhaseAllocation()
external
outOfCooldownPeriod
onlyRole(TREASURY_ROLE)
nonReentrant
{
require(isUnlocked, TokiNotUnlocked());
_validateSufficientBalance();
isReleased = true;
_transferToRecipients();
_startVesting();
emit PhaseAllocationReleased(block.timestamp, allocation);
}
/**
* @notice Change allocation recipient address
* @param allocationType The type of allocation to change
* @param newRecipient The new recipient address
* @dev Can only be called by governance or treasury
*/
function changeAllocationRecipient(
AllocationType allocationType,
address newRecipient
) external outOfCooldownPeriod onlyGovernanceOrTreasury {
require(newRecipient != address(0), TokiZeroAddress("newRecipient"));
if (allocationType == AllocationType.TEAM_VESTING) {
recipients.teamVesting = newRecipient;
} else if (allocationType == AllocationType.ECOSYSTEM_VESTING) {
recipients.ecosystemVesting = newRecipient;
} else if (allocationType == AllocationType.COMMUNITY_INCENTIVE) {
recipients.communityIncentive = newRecipient;
} else if (allocationType == AllocationType.LP_INCENTIVE) {
recipients.lpIncentive = newRecipient;
}
_startCooldown(
CooldownTrigger.ALLOCATION_CHANGE,
ALLOCATION_CHANGE_COOLDOWN
);
emit AllocationRecipientChanged(
allocationType,
newRecipient,
cooldown.endTime
);
}
/**
* @notice Change role holder for a specific role
* @param role The role to change (GOVERNANCE_ROLE or TREASURY_ROLE)
* @param oldHolder The current holder address of the role to be revoked
* @param newHolder The new address for the role to be granted
* @dev Can only be called by default admin. This function is designed for compromised key rotation.
*/
function changeRole(
bytes32 role,
address oldHolder,
address newHolder
) external outOfCooldownPeriod onlyRole(DEFAULT_ADMIN_ROLE) {
require(
role == GOVERNANCE_ROLE || role == TREASURY_ROLE,
TokiInvalidRole("Only GOVERNANCE_ROLE or TREASURY_ROLE allowed")
);
require(oldHolder != address(0), TokiZeroAddress("oldHolder"));
require(newHolder != address(0), TokiZeroAddress("newHolder"));
require(oldHolder != newHolder, TokiNotMatch("old!=new", 0, 0));
require(
hasRole(role, oldHolder),
TokiInvalidRole("oldHolder not current")
);
// Revoke previous holder and grant to the new holder without enumeration
_revokeRole(role, oldHolder);
_grantRole(role, newHolder);
// Track current treasury holder for internal usage
if (role == TREASURY_ROLE) {
treasury = newHolder;
}
_startCooldown(CooldownTrigger.ROLE_CHANGE, ROLE_CHANGE_COOLDOWN);
emit RoleChanged(role, newHolder, cooldown.endTime);
}
function changeAllocationAmount(
PhaseAllocation calldata newAllocation
) external outOfCooldownPeriod onlyGovernanceOrTreasury {
uint256 currentTotal = _totalAllocation(allocation);
uint256 newTotal = _totalAllocation(newAllocation);
require(
currentTotal == newTotal,
TokiNotMatch("allocation total mismatch", newTotal, currentTotal)
);
_validateAllocation(newAllocation);
allocation = newAllocation;
_startCooldown(
CooldownTrigger.ALLOCATION_CHANGE,
ALLOCATION_CHANGE_COOLDOWN
);
emit AllocationAmountChanged(newAllocation, cooldown.endTime);
}
/**
* @notice Recover excess funds after phase allocation has been released
* @dev Can only be called after phase allocation is released.
* Transfers the entire balance of the specified token to the treasury.
* @param token Address of the ERC20 token to recover
*/
function recoverFunds(address token) external nonReentrant {
require(token != address(0), TokiZeroAddress("token"));
require(isReleased, TokiNotReleased());
IERC20 tokenContract = IERC20(token);
uint256 balance = tokenContract.balanceOf(address(this));
require(balance > 0, TokiZeroAmount("balance"));
tokenContract.safeTransfer(treasury, balance);
emit FundsRecovered(token, treasury, balance);
}
/**
* @notice Get token balance of this contract
* @return The token balance
*/
function vaultBalance() external view returns (uint256) {
return TOKEN.balanceOf(address(this));
}
/**
* @notice Override grantRole to prevent direct manipulation of GOVERNANCE_ROLE and TREASURY_ROLE
* @param role The role to grant
* @param account The account to grant the role to
* @dev GOVERNANCE_ROLE and TREASURY_ROLE can only be changed via changeRole()
*/
function grantRole(
bytes32 role,
address account
)
public
override(AccessControl, IAccessControl)
onlyRole(DEFAULT_ADMIN_ROLE)
{
// Prevent direct manipulation of GOVERNANCE_ROLE and TREASURY_ROLE roles - use changeRole() instead
require(
role == DEFAULT_ADMIN_ROLE,
TokiInvalidRole("Only DEFAULT_ADMIN_ROLE can be granted")
);
_grantRole(role, account);
_startCooldown(CooldownTrigger.ROLE_CHANGE, ROLE_CHANGE_COOLDOWN);
}
/**
* @notice Override revokeRole to prevent direct manipulation of GOVERNANCE_ROLE and TREASURY_ROLE roles
* @param role The role to revoke
* @param account The account to revoke the role from
* @dev GOVERNANCE_ROLE and TREASURY_ROLE can only be changed via changeRole()
*/
function revokeRole(
bytes32 role,
address account
)
public
override(AccessControl, IAccessControl)
onlyRole(DEFAULT_ADMIN_ROLE)
{
// Prevent direct manipulation of GOVERNANCE_ROLE and TREASURY_ROLE roles - use changeRole() instead
require(
role == DEFAULT_ADMIN_ROLE,
TokiInvalidRole("Only DEFAULT_ADMIN_ROLE can be revoked")
);
require(
getRoleMemberCount(DEFAULT_ADMIN_ROLE) > 1,
TokiInvalidRole("Last DEFAULT_ADMIN can't revoke")
);
_revokeRole(role, account);
}
/**
* @notice Change allocation amounts
* @param newAllocation The new allocation amounts
* @dev Can only be called by governance or treasury. Total of new allocation amounts must match total of current allocation amounts.
*/
/**
* @notice Override renounceRole to prevent accidental lockout for GOVERNANCE_ROLE and TREASURY_ROLE roles
*/
function renounceRole(
bytes32 role,
address account
)
public
override(AccessControl, IAccessControl)
onlyRole(DEFAULT_ADMIN_ROLE)
{
require(
getRoleMemberCount(DEFAULT_ADMIN_ROLE) > 1,
TokiInvalidRole("Last DEFAULT_ADMIN can't renounce")
);
super.renounceRole(role, account);
}
/**
* @notice Transfer tokens to all recipients
*/
function _transferToRecipients() private {
if (allocation.teamVestingAmount > 0) {
TOKEN.safeTransfer(
recipients.teamVesting,
allocation.teamVestingAmount
);
}
if (allocation.ecosystemVestingAmount > 0) {
TOKEN.safeTransfer(
recipients.ecosystemVesting,
allocation.ecosystemVestingAmount
);
}
if (allocation.communityIncentiveAmount > 0) {
TOKEN.safeTransfer(
recipients.communityIncentive,
allocation.communityIncentiveAmount
);
}
if (allocation.lpIncentiveAmount > 0) {
TOKEN.safeTransfer(
recipients.lpIncentive,
allocation.lpIncentiveAmount
);
}
}
/**
* @notice Helper to start vesting if needed
*/
function _startVesting() private {
if (allocation.teamVestingAmount > 0) {
ITokiVesting teamVesting = ITokiVesting(recipients.teamVesting);
if (teamVesting.startTime() == 0) {
teamVesting.start();
}
}
if (allocation.ecosystemVestingAmount > 0) {
ITokiVesting ecosystemVesting = ITokiVesting(
recipients.ecosystemVesting
);
if (ecosystemVesting.startTime() == 0) {
ecosystemVesting.start();
}
}
}
/**
* @notice Start a cooldown period
* @param cooldownTrigger The type of cooldown
* @param duration The cooldown duration
*/
function _startCooldown(
CooldownTrigger cooldownTrigger,
uint256 duration
) private {
cooldown = CooldownInfo({
cooldownTrigger: cooldownTrigger,
endTime: block.timestamp + duration
});
}
/**
* @notice Validate sufficient balance for current allocation
*/
function _validateSufficientBalance() private view {
uint256 totalRequired = _totalAllocation(allocation);
uint256 available = TOKEN.balanceOf(address(this));
require(
available >= totalRequired,
TokiInsufficientAmount("available", available, totalRequired)
);
}
/**
* @notice Validate allocation parameters
* @param _allocation The allocation to validate
*/
function _validateAllocation(
PhaseAllocation memory _allocation
) private pure {
require(
_allocation.teamVestingAmount != 0 ||
_allocation.ecosystemVestingAmount != 0 ||
_allocation.communityIncentiveAmount != 0 ||
_allocation.lpIncentiveAmount != 0,
TokiZeroAmount("At least one allocation amount must be non-zero")
);
}
/**
* @notice Validate recipient addresses
* @param _recipients The recipients to validate
*/
function _validateRecipients(
AllocationRecipients memory _recipients
) private pure {
require(
_recipients.teamVesting != address(0),
TokiZeroAddress("teamVesting")
);
require(
_recipients.ecosystemVesting != address(0),
TokiZeroAddress("ecosystemVesting")
);
require(
_recipients.communityIncentive != address(0),
TokiZeroAddress("communityIncentive")
);
require(
_recipients.lpIncentive != address(0),
TokiZeroAddress("lpIncentive")
);
}
/**
* @notice Get total allocation amount
* @param _allocation The allocation to sum
* @return The total amount
*/
function _totalAllocation(
PhaseAllocation memory _allocation
) private pure returns (uint256) {
return
_allocation.teamVestingAmount +
_allocation.ecosystemVestingAmount +
_allocation.communityIncentiveAmount +
_allocation.lpIncentiveAmount;
}
}// 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.1.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 Return all accounts that have `role`
*
* 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 getRoleMembers(bytes32 role) public view virtual returns (address[] memory) {
return _roleMembers[role].values();
}
/**
* @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.1.0) (access/extensions/IAccessControlEnumerable.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "../IAccessControl.sol";
/**
* @dev External interface of AccessControlEnumerable declared to support ERC-165 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.1.0) (access/IAccessControl.sol)
pragma solidity ^0.8.20;
/**
* @dev External interface of AccessControl declared to support ERC-165 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. This account bears the admin role (for the granted role).
* Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
*/
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.1.0) (interfaces/IERC1363.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";
/**
* @title IERC1363
* @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
*
* Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
* after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
*/
interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0xb0202a11.
* 0xb0202a11 ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @param data Additional data with no specified format, sent in call to `spender`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../utils/introspection/IERC165.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../token/ERC20/IERC20.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
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.1.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
import {Address} from "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC-20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
/**
* @dev An operation with an ERC-20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*
* NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
* only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
* set here.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
safeTransfer(token, to, value);
} else if (!token.transferAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
* has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferFromAndCallRelaxed(
IERC1363 token,
address from,
address to,
uint256 value,
bytes memory data
) internal {
if (to.code.length == 0) {
safeTransferFrom(token, from, to, value);
} else if (!token.transferFromAndCall(from, to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
* Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
* once without retrying, and relies on the returned value to be true.
*
* Reverts if the returned value is other than `true`.
*/
function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
forceApprove(token, to, value);
} else if (!token.approveAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
// bubble errors
if iszero(success) {
let ptr := mload(0x40)
returndatacopy(ptr, 0, returndatasize())
revert(ptr, returndatasize())
}
returnSize := returndatasize()
returnValue := mload(0)
}
if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
bool success;
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
returnSize := returndatasize()
returnValue := mload(0)
}
return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol)
pragma solidity ^0.8.20;
import {Errors} from "./Errors.sol";
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert Errors.InsufficientBalance(address(this).balance, amount);
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert Errors.FailedCall();
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {Errors.FailedCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert Errors.InsufficientBalance(address(this).balance, value);
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
* of an unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {Errors.FailedCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly ("memory-safe") {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert Errors.FailedCall();
}
}
}// 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.1.0) (utils/Errors.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of common custom errors used in multiple contracts
*
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
* It is recommended to avoid relying on the error API for critical functionality.
*
* _Available since v5.1._
*/
library Errors {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error InsufficientBalance(uint256 balance, uint256 needed);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedCall();
/**
* @dev The deployment failed.
*/
error FailedDeployment();
/**
* @dev A necessary precompile is missing.
*/
error MissingPrecompile(address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.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 ERC-165 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.1.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* 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[ERC 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.1.0) (utils/ReentrancyGuardTransient.sol)
pragma solidity ^0.8.24;
import {TransientSlot} from "./TransientSlot.sol";
/**
* @dev Variant of {ReentrancyGuard} that uses transient storage.
*
* NOTE: This variant only works on networks where EIP-1153 is available.
*
* _Available since v5.1._
*/
abstract contract ReentrancyGuardTransient {
using TransientSlot for *;
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant REENTRANCY_GUARD_STORAGE =
0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
/**
* @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 (_reentrancyGuardEntered()) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
REENTRANCY_GUARD_STORAGE.asBoolean().tstore(true);
}
function _nonReentrantAfter() private {
REENTRANCY_GUARD_STORAGE.asBoolean().tstore(false);
}
/**
* @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 REENTRANCY_GUARD_STORAGE.asBoolean().tload();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.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;
assembly ("memory-safe") {
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;
assembly ("memory-safe") {
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;
assembly ("memory-safe") {
result := store
}
return result;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/TransientSlot.sol)
// This file was procedurally generated from scripts/generate/templates/TransientSlot.js.
pragma solidity ^0.8.24;
/**
* @dev Library for reading and writing value-types to specific transient storage slots.
*
* Transient slots are often used to store temporary values that are removed after the current transaction.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* * Example reading and writing values using transient storage:
* ```solidity
* contract Lock {
* using TransientSlot for *;
*
* // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
* bytes32 internal constant _LOCK_SLOT = 0xf4678858b2b588224636b8522b729e7722d32fc491da849ed75b3fdf3c84f542;
*
* modifier locked() {
* require(!_LOCK_SLOT.asBoolean().tload());
*
* _LOCK_SLOT.asBoolean().tstore(true);
* _;
* _LOCK_SLOT.asBoolean().tstore(false);
* }
* }
* ```
*
* TIP: Consider using this library along with {SlotDerivation}.
*/
library TransientSlot {
/**
* @dev UDVT that represent a slot holding a address.
*/
type AddressSlot is bytes32;
/**
* @dev Cast an arbitrary slot to a AddressSlot.
*/
function asAddress(bytes32 slot) internal pure returns (AddressSlot) {
return AddressSlot.wrap(slot);
}
/**
* @dev UDVT that represent a slot holding a bool.
*/
type BooleanSlot is bytes32;
/**
* @dev Cast an arbitrary slot to a BooleanSlot.
*/
function asBoolean(bytes32 slot) internal pure returns (BooleanSlot) {
return BooleanSlot.wrap(slot);
}
/**
* @dev UDVT that represent a slot holding a bytes32.
*/
type Bytes32Slot is bytes32;
/**
* @dev Cast an arbitrary slot to a Bytes32Slot.
*/
function asBytes32(bytes32 slot) internal pure returns (Bytes32Slot) {
return Bytes32Slot.wrap(slot);
}
/**
* @dev UDVT that represent a slot holding a uint256.
*/
type Uint256Slot is bytes32;
/**
* @dev Cast an arbitrary slot to a Uint256Slot.
*/
function asUint256(bytes32 slot) internal pure returns (Uint256Slot) {
return Uint256Slot.wrap(slot);
}
/**
* @dev UDVT that represent a slot holding a int256.
*/
type Int256Slot is bytes32;
/**
* @dev Cast an arbitrary slot to a Int256Slot.
*/
function asInt256(bytes32 slot) internal pure returns (Int256Slot) {
return Int256Slot.wrap(slot);
}
/**
* @dev Load the value held at location `slot` in transient storage.
*/
function tload(AddressSlot slot) internal view returns (address value) {
assembly ("memory-safe") {
value := tload(slot)
}
}
/**
* @dev Store `value` at location `slot` in transient storage.
*/
function tstore(AddressSlot slot, address value) internal {
assembly ("memory-safe") {
tstore(slot, value)
}
}
/**
* @dev Load the value held at location `slot` in transient storage.
*/
function tload(BooleanSlot slot) internal view returns (bool value) {
assembly ("memory-safe") {
value := tload(slot)
}
}
/**
* @dev Store `value` at location `slot` in transient storage.
*/
function tstore(BooleanSlot slot, bool value) internal {
assembly ("memory-safe") {
tstore(slot, value)
}
}
/**
* @dev Load the value held at location `slot` in transient storage.
*/
function tload(Bytes32Slot slot) internal view returns (bytes32 value) {
assembly ("memory-safe") {
value := tload(slot)
}
}
/**
* @dev Store `value` at location `slot` in transient storage.
*/
function tstore(Bytes32Slot slot, bytes32 value) internal {
assembly ("memory-safe") {
tstore(slot, value)
}
}
/**
* @dev Load the value held at location `slot` in transient storage.
*/
function tload(Uint256Slot slot) internal view returns (uint256 value) {
assembly ("memory-safe") {
value := tload(slot)
}
}
/**
* @dev Store `value` at location `slot` in transient storage.
*/
function tstore(Uint256Slot slot, uint256 value) internal {
assembly ("memory-safe") {
tstore(slot, value)
}
}
/**
* @dev Load the value held at location `slot` in transient storage.
*/
function tload(Int256Slot slot) internal view returns (int256 value) {
assembly ("memory-safe") {
value := tload(slot)
}
}
/**
* @dev Store `value` at location `slot` in transient storage.
*/
function tstore(Int256Slot slot, int256 value) internal {
assembly ("memory-safe") {
tstore(slot, value)
}
}
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.28;
/**
* @title IPhaseVault
* @notice Interface for Phase Vault contract that manages token distribution across phases
*/
interface IPhaseVault {
enum AllocationType {
TEAM_VESTING,
ECOSYSTEM_VESTING,
COMMUNITY_INCENTIVE,
LP_INCENTIVE
}
enum CooldownTrigger {
PHASE_UNLOCK,
ALLOCATION_CHANGE,
ROLE_CHANGE
}
struct PhaseAllocation {
uint256 teamVestingAmount;
uint256 ecosystemVestingAmount;
uint256 communityIncentiveAmount;
uint256 lpIncentiveAmount;
}
struct AllocationRecipients {
address teamVesting;
address ecosystemVesting;
address communityIncentive;
address lpIncentive;
}
struct CooldownInfo {
CooldownTrigger cooldownTrigger;
uint256 endTime;
}
event PhaseAllocationUnlocked(
uint256 timestamp,
PhaseAllocation allocation,
uint256 endCooldownTime
);
event PhaseAllocationReleased(
uint256 timestamp,
PhaseAllocation allocation
);
event RoleChanged(
bytes32 indexed role,
address indexed newRoleHolder,
uint256 endCooldownTime
);
event AllocationRecipientChanged(
AllocationType indexed allocationType,
address indexed recipient,
uint256 endCooldownTime
);
event AllocationAmountChanged(
PhaseAllocation allocation,
uint256 endCooldownTime
);
event FundsRecovered(address token, address recipient, uint256 amount);
function unlockPhaseAllocation() external;
function releasePhaseAllocation() external;
function changeRole(
bytes32 role,
address oldHolder,
address newHolder
) external;
function changeAllocationRecipient(
AllocationType allocationType,
address newRecipient
) external;
function changeAllocationAmount(
PhaseAllocation calldata newAllocation
) external;
function recoverFunds(address token) external;
function vaultBalance() external view returns (uint256);
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.28;
interface ITokiErrors {
error TokiZeroAddress(string message);
error TokiZeroAmount(string message);
error TokiZeroValue(string message);
// user error
error TokiInsufficientAmount(string name, uint256 value, uint256 needed);
// pool does not have enough liquidity
error TokiInsufficientPoolLiquidity(uint256 value, uint256 needed);
// insufficient allowance for transfer
error TokiInsufficientAllowance(
string name,
uint256 allowance,
uint256 needed
);
error TokiExceed(string name, uint256 value, uint256 limit);
error TokiExceedAdd(
string name,
uint256 current,
uint256 add,
uint256 limit
);
// only used in PseudoToken, which is just for Testnet
error TokiContractNotAllowed(string name, address addr);
error TokiCannotCloseChannel();
error TokiCannotTimeoutPacket();
error TokiRequireOrderedChannel();
error TokiDstOuterGasShouldBeZero();
error TokiInvalidPacketType(uint8);
error TokiInvalidRetryType(uint8);
error TokiInvalidRecipientBytes();
error TokiNoRevertReceive();
error TokiRetryExpired(uint256 expiryBlock);
error TokiInvalidAppVersion(uint256 expected, uint256 actual);
error TokiNotEnoughNativeFee(uint256 value, uint256 limit);
error TokiFailToRefund();
error TokiNoFee();
error TokiInvalidBalanceDeficitFeeZone();
error TokiInvalidSafeZoneRange(uint256 min, uint256 max);
error TokiDepeg(uint256 poolId);
error TokiUnregisteredChainId(string channel);
error TokiUnregisteredPoolId(uint256 poolId);
error TokiSamePool(uint256 poolId, address pool);
error TokiNoPool(uint256 poolId);
error TokiPoolRecvIsFailed(uint256 poolId);
error TokiPoolWithdrawConfirmIsFailed(uint256 poolId);
error TokiPriceIsNotPositive(int256 value);
error TokiPriceIsExpired(uint256 updatedAt);
error TokiDstChainIdNotAccepted(uint256 dstChainId);
error TokiTransferIsStop();
error TokiTransferIsFailed(address token, address to, uint256 value);
error TokiNativeTransferIsFailed(address to, uint256 value);
error TokiPeerPoolIsNotReady(uint256 peerChainId, uint256 peerPoolId);
error TokiSlippageTooHigh(
uint256 amountGD,
uint256 eqReward,
uint256 eqFee,
uint256 minAmountGD
);
error TokiPeerPoolIsRegistered(uint256 chainId, uint256 poolId);
error TokiPeerPoolIsAlreadyActive(uint256 chainId, uint256 poolId);
error TokiNoPeerPoolInfo();
error TokiPeerPoolInfoNotFound(uint256 chainId, uint256 poolId);
error TokiFlowRateLimitExceed(uint256 current, uint256 add, uint256 limit);
error TokiFallbackUnauthorized(address caller);
// used in mocks
error TokiMock(string message);
// channel upgrade
error TokiInvalidProposedVersion(string version);
error TokiChannelNotFound(string portId, string channelId);
// TokiToken specific errors
error TokiNotPrimaryChain();
// merkle proof verification
error TokiSaleEnded();
error TokiInvalidRound(uint256 currentRoundId);
error TokiInvalidMerkleProof();
error TokiAlreadyClaimed(uint256 windowIndex, address account);
error TokiInvalidSignature();
error TokiNonceAlreadyUsed();
error TokiUnauthorizedAccess(string message, address caller);
error TokiCooldownActive(uint256 endTime);
error TokiNotUnlocked();
error TokiNotReleased();
error TokiAlreadyUnlocked();
error TokiInvalidRecipient(string message);
error TokiInvalidRole(string message);
error TokiNotMatch(string message, uint256 actual, uint256 expected);
error TokiNotStarted();
error TokiAlreadyStarted();
error TokiInvalidCliff();
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.28;
/**
* @title ITokiVesting
* @notice Interface for TokiVesting contract that handles token vesting with phase-based start
*/
interface ITokiVesting {
event VestingStarted(
address indexed beneficiary,
uint256 startTime,
uint256 duration,
uint256 cliffDuration,
uint256 totalAmount
);
event BeneficiaryChanged(
address indexed previousBeneficiary,
address indexed newBeneficiary
);
event TokensReleased(address indexed beneficiary, uint256 amount);
function start() external;
function release() external;
function changeBeneficiary(address newBeneficiary) external;
function releasableAmount() external view returns (uint256);
function beneficiary() external view returns (address);
function startTime() external view returns (uint256);
function vestedAmount() external view returns (uint256);
function totalAllocation() external view returns (uint256);
}{
"evmVersion": "cancun",
"viaIR": true,
"optimizer": {
"enabled": true,
"runs": 1000000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_governance","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_defaultAdmin","type":"address"},{"components":[{"internalType":"uint256","name":"teamVestingAmount","type":"uint256"},{"internalType":"uint256","name":"ecosystemVestingAmount","type":"uint256"},{"internalType":"uint256","name":"communityIncentiveAmount","type":"uint256"},{"internalType":"uint256","name":"lpIncentiveAmount","type":"uint256"}],"internalType":"struct IPhaseVault.PhaseAllocation","name":"_allocation","type":"tuple"},{"components":[{"internalType":"address","name":"teamVesting","type":"address"},{"internalType":"address","name":"ecosystemVesting","type":"address"},{"internalType":"address","name":"communityIncentive","type":"address"},{"internalType":"address","name":"lpIncentive","type":"address"}],"internalType":"struct IPhaseVault.AllocationRecipients","name":"_recipients","type":"tuple"}],"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":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"uint256","name":"windowIndex","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"TokiAlreadyClaimed","type":"error"},{"inputs":[],"name":"TokiAlreadyStarted","type":"error"},{"inputs":[],"name":"TokiAlreadyUnlocked","type":"error"},{"inputs":[],"name":"TokiCannotCloseChannel","type":"error"},{"inputs":[],"name":"TokiCannotTimeoutPacket","type":"error"},{"inputs":[{"internalType":"string","name":"portId","type":"string"},{"internalType":"string","name":"channelId","type":"string"}],"name":"TokiChannelNotFound","type":"error"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"addr","type":"address"}],"name":"TokiContractNotAllowed","type":"error"},{"inputs":[{"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"TokiCooldownActive","type":"error"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"TokiDepeg","type":"error"},{"inputs":[{"internalType":"uint256","name":"dstChainId","type":"uint256"}],"name":"TokiDstChainIdNotAccepted","type":"error"},{"inputs":[],"name":"TokiDstOuterGasShouldBeZero","type":"error"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"TokiExceed","type":"error"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"current","type":"uint256"},{"internalType":"uint256","name":"add","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"TokiExceedAdd","type":"error"},{"inputs":[],"name":"TokiFailToRefund","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"TokiFallbackUnauthorized","type":"error"},{"inputs":[{"internalType":"uint256","name":"current","type":"uint256"},{"internalType":"uint256","name":"add","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"TokiFlowRateLimitExceed","type":"error"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"TokiInsufficientAllowance","type":"error"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"TokiInsufficientAmount","type":"error"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"TokiInsufficientPoolLiquidity","type":"error"},{"inputs":[{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"actual","type":"uint256"}],"name":"TokiInvalidAppVersion","type":"error"},{"inputs":[],"name":"TokiInvalidBalanceDeficitFeeZone","type":"error"},{"inputs":[],"name":"TokiInvalidCliff","type":"error"},{"inputs":[],"name":"TokiInvalidMerkleProof","type":"error"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"TokiInvalidPacketType","type":"error"},{"inputs":[{"internalType":"string","name":"version","type":"string"}],"name":"TokiInvalidProposedVersion","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"TokiInvalidRecipient","type":"error"},{"inputs":[],"name":"TokiInvalidRecipientBytes","type":"error"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"TokiInvalidRetryType","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"TokiInvalidRole","type":"error"},{"inputs":[{"internalType":"uint256","name":"currentRoundId","type":"uint256"}],"name":"TokiInvalidRound","type":"error"},{"inputs":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"TokiInvalidSafeZoneRange","type":"error"},{"inputs":[],"name":"TokiInvalidSignature","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"TokiMock","type":"error"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"TokiNativeTransferIsFailed","type":"error"},{"inputs":[],"name":"TokiNoFee","type":"error"},{"inputs":[],"name":"TokiNoPeerPoolInfo","type":"error"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"TokiNoPool","type":"error"},{"inputs":[],"name":"TokiNoRevertReceive","type":"error"},{"inputs":[],"name":"TokiNonceAlreadyUsed","type":"error"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"TokiNotEnoughNativeFee","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"},{"internalType":"uint256","name":"actual","type":"uint256"},{"internalType":"uint256","name":"expected","type":"uint256"}],"name":"TokiNotMatch","type":"error"},{"inputs":[],"name":"TokiNotPrimaryChain","type":"error"},{"inputs":[],"name":"TokiNotReleased","type":"error"},{"inputs":[],"name":"TokiNotStarted","type":"error"},{"inputs":[],"name":"TokiNotUnlocked","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"TokiPeerPoolInfoNotFound","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"TokiPeerPoolIsAlreadyActive","type":"error"},{"inputs":[{"internalType":"uint256","name":"peerChainId","type":"uint256"},{"internalType":"uint256","name":"peerPoolId","type":"uint256"}],"name":"TokiPeerPoolIsNotReady","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"TokiPeerPoolIsRegistered","type":"error"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"TokiPoolRecvIsFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"TokiPoolWithdrawConfirmIsFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"TokiPriceIsExpired","type":"error"},{"inputs":[{"internalType":"int256","name":"value","type":"int256"}],"name":"TokiPriceIsNotPositive","type":"error"},{"inputs":[],"name":"TokiRequireOrderedChannel","type":"error"},{"inputs":[{"internalType":"uint256","name":"expiryBlock","type":"uint256"}],"name":"TokiRetryExpired","type":"error"},{"inputs":[],"name":"TokiSaleEnded","type":"error"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"},{"internalType":"address","name":"pool","type":"address"}],"name":"TokiSamePool","type":"error"},{"inputs":[{"internalType":"uint256","name":"amountGD","type":"uint256"},{"internalType":"uint256","name":"eqReward","type":"uint256"},{"internalType":"uint256","name":"eqFee","type":"uint256"},{"internalType":"uint256","name":"minAmountGD","type":"uint256"}],"name":"TokiSlippageTooHigh","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"TokiTransferIsFailed","type":"error"},{"inputs":[],"name":"TokiTransferIsStop","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"},{"internalType":"address","name":"caller","type":"address"}],"name":"TokiUnauthorizedAccess","type":"error"},{"inputs":[{"internalType":"string","name":"channel","type":"string"}],"name":"TokiUnregisteredChainId","type":"error"},{"inputs":[{"internalType":"uint256","name":"poolId","type":"uint256"}],"name":"TokiUnregisteredPoolId","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"TokiZeroAddress","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"TokiZeroAmount","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"TokiZeroValue","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint256","name":"teamVestingAmount","type":"uint256"},{"internalType":"uint256","name":"ecosystemVestingAmount","type":"uint256"},{"internalType":"uint256","name":"communityIncentiveAmount","type":"uint256"},{"internalType":"uint256","name":"lpIncentiveAmount","type":"uint256"}],"indexed":false,"internalType":"struct IPhaseVault.PhaseAllocation","name":"allocation","type":"tuple"},{"indexed":false,"internalType":"uint256","name":"endCooldownTime","type":"uint256"}],"name":"AllocationAmountChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"enum IPhaseVault.AllocationType","name":"allocationType","type":"uint8"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"endCooldownTime","type":"uint256"}],"name":"AllocationRecipientChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FundsRecovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"components":[{"internalType":"uint256","name":"teamVestingAmount","type":"uint256"},{"internalType":"uint256","name":"ecosystemVestingAmount","type":"uint256"},{"internalType":"uint256","name":"communityIncentiveAmount","type":"uint256"},{"internalType":"uint256","name":"lpIncentiveAmount","type":"uint256"}],"indexed":false,"internalType":"struct IPhaseVault.PhaseAllocation","name":"allocation","type":"tuple"}],"name":"PhaseAllocationReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"components":[{"internalType":"uint256","name":"teamVestingAmount","type":"uint256"},{"internalType":"uint256","name":"ecosystemVestingAmount","type":"uint256"},{"internalType":"uint256","name":"communityIncentiveAmount","type":"uint256"},{"internalType":"uint256","name":"lpIncentiveAmount","type":"uint256"}],"indexed":false,"internalType":"struct IPhaseVault.PhaseAllocation","name":"allocation","type":"tuple"},{"indexed":false,"internalType":"uint256","name":"endCooldownTime","type":"uint256"}],"name":"PhaseAllocationUnlocked","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":"newRoleHolder","type":"address"},{"indexed":false,"internalType":"uint256","name":"endCooldownTime","type":"uint256"}],"name":"RoleChanged","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"},{"inputs":[],"name":"ALLOCATION_CHANGE_COOLDOWN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GOVERNANCE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PHASE_UNLOCK_COOLDOWN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_CHANGE_COOLDOWN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TREASURY_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allocation","outputs":[{"internalType":"uint256","name":"teamVestingAmount","type":"uint256"},{"internalType":"uint256","name":"ecosystemVestingAmount","type":"uint256"},{"internalType":"uint256","name":"communityIncentiveAmount","type":"uint256"},{"internalType":"uint256","name":"lpIncentiveAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"teamVestingAmount","type":"uint256"},{"internalType":"uint256","name":"ecosystemVestingAmount","type":"uint256"},{"internalType":"uint256","name":"communityIncentiveAmount","type":"uint256"},{"internalType":"uint256","name":"lpIncentiveAmount","type":"uint256"}],"internalType":"struct IPhaseVault.PhaseAllocation","name":"newAllocation","type":"tuple"}],"name":"changeAllocationAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IPhaseVault.AllocationType","name":"allocationType","type":"uint8"},{"internalType":"address","name":"newRecipient","type":"address"}],"name":"changeAllocationRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"oldHolder","type":"address"},{"internalType":"address","name":"newHolder","type":"address"}],"name":"changeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cooldown","outputs":[{"internalType":"enum IPhaseVault.CooldownTrigger","name":"cooldownTrigger","type":"uint8"},{"internalType":"uint256","name":"endTime","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"}],"name":"getRoleMembers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"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":"isReleased","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recipients","outputs":[{"internalType":"address","name":"teamVesting","type":"address"},{"internalType":"address","name":"ecosystemVesting","type":"address"},{"internalType":"address","name":"communityIncentive","type":"address"},{"internalType":"address","name":"lpIncentive","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"recoverFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"releasePhaseAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unlockPhaseAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a060405234610584576040516131fc38819003601f8101601f191683016001600160401b038111848210176105885783928291604052833981010361018081126105845761004d826105bb565b9061005a602084016105bb565b92610067604082016105bb565b93610074606083016105bb565b6080607f198501126105845761008861059c565b926080810151845260a0810151916020850192835260c08201519660408601978852608060e0840151976060880198895260ff190112610584576100ca61059c565b926100d861010082016105bb565b84526100e761012082016105bb565b6020850190815261010f61016061010161014085016105bb565b9360408801948552016105bb565b606086019081526001600160a01b03909316948515610556576001600160a01b038816998a15610523576001600160a01b038d169b8c156104f2576001600160a01b0387169889156104bd578b51158015906104b3575b80156104a9575b801561049f575b156104415783516001600160a01b03161561040d5784516001600160a01b0316156103d45785516001600160a01b0316156103995786516001600160a01b0316156103655760809890985299516002559551600355975160045593516005559551600680546001600160a01b03199081166001600160a01b0393841617909155935160078054861691831691909117905595516008805485169188169190911790555160098054909316951694909417905561023e92610233906105cf565b61032c575b50610645565b6102e6575b5061024d826106c5565b6102a0575b50600c805462010000600160b01b03191660109290921b62010000600160b01b031691909117905560405161298690816107b682396080518181816102c2015281816117bf0152611ee40152f35b5f5160206131bc5f395f51905f525f5260016020526102df907f7ad6673c42818a670b9104ef8686d884461881d37c58babfde8b007ba2034f76610745565b505f610252565b5f51602061315c5f395f51905f525f526001602052610325907faf2b352d373f61cd7c00141c5d498de35abbffd9743307be56c20cef1cd5da4c610745565b505f610243565b5f8052600160205261035e907fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49610745565b505f610238565b604051636bc37c5f60e11b815260206004820152600b60248201526a6c70496e63656e7469766560a81b6044820152606490fd5b604051636bc37c5f60e11b8152602060048201526012602482015271636f6d6d756e697479496e63656e7469766560701b6044820152606490fd5b604051636bc37c5f60e11b815260206004820152601060248201526f65636f73797374656d56657374696e6760801b6044820152606490fd5b604051636bc37c5f60e11b815260206004820152600b60248201526a7465616d56657374696e6760a81b6044820152606490fd5b60405163495279c560e11b815260206004820152602f60248201527f4174206c65617374206f6e6520616c6c6f636174696f6e20616d6f756e74206d60448201526e757374206265206e6f6e2d7a65726f60881b6064820152608490fd5b5082511515610174565b508151151561016d565b5080511515610166565b604051636bc37c5f60e11b815260206004820152600c60248201526b3232b330bab63a20b236b4b760a11b6044820152606490fd5b604051636bc37c5f60e11b8152602060048201526008602482015267747265617375727960c01b6044820152606490fd5b604051636bc37c5f60e11b815260206004820152600a602482015269676f7665726e616e636560b01b6044820152606490fd5b604051636bc37c5f60e11b81526020600482015260056024820152643a37b5b2b760d91b6044820152606490fd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b60405190608082016001600160401b0381118382101761058857604052565b51906001600160a01b038216820361058457565b6001600160a01b0381165f9081525f5160206131dc5f395f51905f52602052604090205460ff16610640576001600160a01b03165f8181525f5160206131dc5f395f51905f5260205260408120805460ff191660011790553391905f51602061313c5f395f51905f528180a4600190565b505f90565b6001600160a01b0381165f9081525f51602061319c5f395f51905f52602052604090205460ff16610640576001600160a01b03165f8181525f51602061319c5f395f51905f5260205260408120805460ff191660011790553391905f51602061315c5f395f51905f52905f51602061313c5f395f51905f529080a4600190565b6001600160a01b0381165f9081525f51602061317c5f395f51905f52602052604090205460ff16610640576001600160a01b03165f8181525f51602061317c5f395f51905f5260205260408120805460ff191660011790553391905f5160206131bc5f395f51905f52905f51602061313c5f395f51905f529080a4600190565b6001810190825f528160205260405f2054155f146107ae57805468010000000000000000811015610588576001810180835581101561079a578390825f5260205f20015554915f5260205260405f2055600190565b634e487b7160e01b5f52603260045260245ffd5b5050505f9056fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816301ffc9a714611f51575080630bf6cc0814611e6d5780630e57d4ce14611dc1578063248a9ca314611d775780632f2ff15d14611c9a57806336568abe14611b5457806361d027b314611b00578063697bce781461189b578063787a08a61461181e5780637ed5b093146117e357806382bfefc8146117755780638380edb71461173557806388a17bde146116e15780638f6950d1146114ec5780639010d07c1461147d57806391d14854146114095780639bc16665146113ce578063a217fddf14611396578063a3246ad3146112bc578063c2a2b4b11461103c578063c394e49514611001578063ca15c87314610fb9578063ca7b098014610bdb578063d11a57ec14610b83578063d547741f14610a1d578063e72f6e30146107b3578063edac6bba146101fc578063f36c8f5c146101a35763fa2a89971461015d575f80fd5b346101a057807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a057602060ff600c5460081c166040519015158152f35b80fd5b50346101a057807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a05760206040517f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb18152f35b50346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5761023a600b5480421015612109565b335f9081527f9e5c930214a7bc8a78d251e617445bcdba028aed2ede5828cc6cd6c8261656f5602052604090205460ff16156107635761027861243a565b600c5460ff81161561073b5761029461028f6121e5565b6123c9565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000000000000000000000000000000000000000000000929160208260248173ffffffffffffffffffffffffffffffffffffffff88165afa9182156105ba575f92610707575b5080821061069c5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010017600c5560025480610673575b506003548061064a575b5060045480610621575b50600554806105f7575b5050600254610501575b6003546103f2575b7f4bfdde6abc715191a2c22e64e803ccbdb36d8c839a1d7be9c5dab492ea5c971160a06040514281526103cb602082016002548152600354602082015260045460408201526060600554910152565ba1807f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d80f35b8073ffffffffffffffffffffffffffffffffffffffff600754166040517f78e97925000000000000000000000000000000000000000000000000000000008152602081600481855afa9081156104f65783916104bd575b5015610457575b505061037c565b803b156104ba578180916004604051809481937fbe9a65550000000000000000000000000000000000000000000000000000000083525af180156104af571561045057816104a4916120c8565b6101a057805f610450565b6040513d84823e3d90fd5b50fd5b9250506020823d6020116104ee575b816104d9602093836120c8565b810103126104ea578291515f610449565b5f80fd5b3d91506104cc565b6040513d85823e3d90fd5b73ffffffffffffffffffffffffffffffffffffffff600654166040517f78e97925000000000000000000000000000000000000000000000000000000008152602081600481855afa9081156105ba575f916105c5575b5015610564575b50610374565b803b156104ea575f80916004604051809481937fbe9a65550000000000000000000000000000000000000000000000000000000083525af180156105ba571561055e576105b391505f906120c8565b5f5f61055e565b6040513d5f823e3d90fd5b90506020813d6020116105ef575b816105e0602093836120c8565b810103126104ea57515f610557565b3d91506105d3565b61061a9173ffffffffffffffffffffffffffffffffffffffff60095416906124ae565b5f8061036a565b6106449073ffffffffffffffffffffffffffffffffffffffff60085416836124ae565b5f610360565b61066d9073ffffffffffffffffffffffffffffffffffffffff60075416836124ae565b5f610356565b6106969073ffffffffffffffffffffffffffffffffffffffff60065416836124ae565b5f61034c565b60a49250604051917f581bd8e400000000000000000000000000000000000000000000000000000000835260606004840152600960648401527f617661696c61626c650000000000000000000000000000000000000000000000608484015260248301526044820152fd5b9091506020813d602011610733575b81610723602093836120c8565b810103126104ea5751905f610310565b3d9150610716565b7f4f02c642000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527fe1dcbdb91df27212a29bc27177c840cf2f819ecf2187432e1fac86c2dd5dfca960245260445ffd5b346104ea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5760043573ffffffffffffffffffffffffffffffffffffffff81168091036104ea5761080b61243a565b80156109bf57600c5460ff8160081c161561099757604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481845afa9283156105ba575f93610963575b50821561090557826108b37f13e06184555481b6d2cb327155e8d2e1d0b1f0252a7fe6621e32cf99881488359473ffffffffffffffffffffffffffffffffffffffff60609560101c16846124ae565b73ffffffffffffffffffffffffffffffffffffffff600c5460101c1660405192835260208301526040820152a15f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d005b60646040517f92a4f38a00000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f62616c616e6365000000000000000000000000000000000000000000000000006044820152fd5b9092506020813d60201161098f575b8161097f602093836120c8565b810103126104ea57519183610864565b3d9150610972565b7ff98df7d9000000000000000000000000000000000000000000000000000000005f5260045ffd5b60646040517fd786f8be00000000000000000000000000000000000000000000000000000000815260206004820152600560248201527f746f6b656e0000000000000000000000000000000000000000000000000000006044820152fd5b346104ea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57600435610a57612040565b610a5f612267565b81610aff575f8052600160208190527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49541115610aa157610a9f916123f9565b005b60646040517f7d541a4a00000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4c6173742044454641554c545f41444d494e2063616e2774207265766f6b65006044820152fd5b60846040517f7d541a4a00000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f6e6c792044454641554c545f41444d494e5f524f4c452063616e206265207260448201527f65766f6b656400000000000000000000000000000000000000000000000000006064820152fd5b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5760206040517fe1dcbdb91df27212a29bc27177c840cf2f819ecf2187432e1fac86c2dd5dfca98152f35b346104ea5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57600435610c15612040565b9060443573ffffffffffffffffffffffffffffffffffffffff8116928382036104ea57610c47600b5480421015612109565b610c4f612267565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb183148015610f90575b15610f0c5773ffffffffffffffffffffffffffffffffffffffff81168015610eae578415610e5057848114610de657835f525f60205260405f20905f5260205260ff60405f20541615610d8857610cd090836123f9565b50610cdb81836122cf565b507fe1dcbdb91df27212a29bc27177c840cf2f819ecf2187432e1fac86c2dd5dfca98214610d3c575b50610d0d612321565b7f51bfa573bf019d242f893f1ecaa4384400ed54addf0ec1fa153424ab2172545e6020600b54604051908152a3005b7fffffffffffffffffffff0000000000000000000000000000000000000000ffff75ffffffffffffffffffffffffffffffffffffffff0000600c549260101b16911617600c5582610d04565b60646040517f7d541a4a00000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6f6c64486f6c646572206e6f742063757272656e7400000000000000000000006044820152fd5b60a46040517fba69c78f00000000000000000000000000000000000000000000000000000000815260606004820152600860648201527f6f6c64213d6e657700000000000000000000000000000000000000000000000060848201525f60248201525f6044820152fd5b60646040517fd786f8be00000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6577486f6c64657200000000000000000000000000000000000000000000006044820152fd5b60646040517fd786f8be00000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6f6c64486f6c64657200000000000000000000000000000000000000000000006044820152fd5b60846040517f7d541a4a00000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4f6e6c7920474f5645524e414e43455f524f4c45206f7220545245415355525960448201527f5f524f4c4520616c6c6f776564000000000000000000000000000000000000006064820152fd5b507fe1dcbdb91df27212a29bc27177c840cf2f819ecf2187432e1fac86c2dd5dfca98314610c79565b346104ea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea576004355f526001602052602060405f2054604051908152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea576020604051621275008152f35b346104ea5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5761107a600b5480421015612109565b335f9081527f316a51056d8b2401ab04c48d9973add294eadde229c785c6d19cde93785467ef602052604090205460ff168015611285575b6110bd90339061213c565b6110c861028f6121e5565b6110d461028f36612211565b80820361121b576110e436612211565b8051159081159161120d575b81156111ff575b81156111f1575b501561116d577f82656c284b23b92e2c3839d94f99648cbad00fff682574d16982de9e804ccae360a0600435806002556024358060035560443580600455606435908160055561114c612375565b600b54926040519485526020850152604084015260608301526080820152a1005b60846040517f92a4f38a00000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4174206c65617374206f6e6520616c6c6f636174696f6e20616d6f756e74206d60448201527f757374206265206e6f6e2d7a65726f00000000000000000000000000000000006064820152fd5b6060915001511515816110fe565b6040810151151591506110f7565b6020810151151591506110f0565b60a491604051917fba69c78f00000000000000000000000000000000000000000000000000000000835260606004840152601960648401527f616c6c6f636174696f6e20746f74616c206d69736d6174636800000000000000608484015260248301526044820152fd5b50335f9081527f9e5c930214a7bc8a78d251e617445bcdba028aed2ede5828cc6cd6c8261656f5602052604090205460ff166110b2565b346104ea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea576004355f52600160205260405f20604051806020835491828152019081935f5260205f20905f5b81811061138057505050816113289103826120c8565b604051918291602083019060208452518091526040830191905f5b818110611351575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff16845285945060209384019390920191600101611343565b8254845260209093019260019283019201611312565b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5760206040515f8152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57602060405162278d008152f35b346104ea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57611440612040565b6004355f525f60205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b346104ea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea576004355f526001602052602073ffffffffffffffffffffffffffffffffffffffff6114dc60243560405f2061265f565b90549060031b1c16604051908152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57335f9081527f316a51056d8b2401ab04c48d9973add294eadde229c785c6d19cde93785467ef602052604090205460ff16156116915761155f600b5480421015612109565b600c5460ff8116611669577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006001911617600c5562093a80420180421161163c5760206040516115ae816120ac565b5f8152019081527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600a5416600a5551600b557f3d7ac1f9c37d463d6b5c2f999dbc12d06cf9d3841c6b0158b2d378a25f52e1b860c0600b5460405190428252611634602083016002548152600354602082015260045460408201526060600554910152565b60a0820152a1005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7f310dc57b000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb160245260445ffd5b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57608060025460035460045460055491604051938452602084015260408301526060820152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57602060ff600c54166040519015158152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57602060405162093a808152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5760ff600a5416600b5460405190600383101561186e5760409282526020820152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b346104ea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5760043560048110156104ea5773ffffffffffffffffffffffffffffffffffffffff6118f3612040565b611902600b5480421015612109565b3382165f9081527f316a51056d8b2401ab04c48d9973add294eadde229c785c6d19cde93785467ef602052604090205460ff168015611ac7575b61194790339061213c565b16908115611a69575f816119bd57827fffffffffffffffffffffffff000000000000000000000000000000000000000060065416176006555b611988612375565b600b549061186e5760207f690c276d444b0f6278ab99ce84d66abe97d6cc9c4b01d3a1ebce09ee1606484b91604051908152a3005b505f600182036119f757827fffffffffffffffffffffffff000000000000000000000000000000000000000060075416176007555b611980565b505f60028203611a3057827fffffffffffffffffffffffff00000000000000000000000000000000000000006008541617600855611980565b505f600382036119f257827fffffffffffffffffffffffff00000000000000000000000000000000000000006009541617600955611980565b60646040517fd786f8be00000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6e6577526563697069656e7400000000000000000000000000000000000000006044820152fd5b503382165f9081527f9e5c930214a7bc8a78d251e617445bcdba028aed2ede5828cc6cd6c8261656f5602052604090205460ff1661193c565b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57602073ffffffffffffffffffffffffffffffffffffffff600c5460101c16604051908152f35b346104ea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57611b8b612040565b611b93612267565b5f8052600160208190527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49541115611c16573373ffffffffffffffffffffffffffffffffffffffff821603611bee57610a9f906004356123f9565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b60846040517f7d541a4a00000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4c6173742044454641554c545f41444d494e2063616e27742072656e6f756e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152fd5b346104ea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57600435611cd4612040565b611cdc612267565b81611cf357611cea916122cf565b50610a9f612321565b60846040517f7d541a4a00000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f6e6c792044454641554c545f41444d494e5f524f4c452063616e206265206760448201527f72616e74656400000000000000000000000000000000000000000000000000006064820152fd5b346104ea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea576004355f525f6020526020600160405f200154604051908152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57608073ffffffffffffffffffffffffffffffffffffffff6006541673ffffffffffffffffffffffffffffffffffffffff6007541673ffffffffffffffffffffffffffffffffffffffff6008541673ffffffffffffffffffffffffffffffffffffffff6009541691604051938452602084015260408301526060820152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea576040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa80156105ba575f90611f1e575b602090604051908152f35b506020813d602011611f49575b81611f38602093836120c8565b810103126104ea5760209051611f13565b3d9150611f2b565b346104ea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036104ea57817f5a05180f0000000000000000000000000000000000000000000000000000000060209314908115611fe3575b5015158152f35b7f7965db0b00000000000000000000000000000000000000000000000000000000811491508115612016575b5083611fdc565b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150148361200f565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036104ea57565b6080810190811067ffffffffffffffff82111761207f57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040810190811067ffffffffffffffff82111761207f57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761207f57604052565b156121115750565b7faeb0049a000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b156121445750565b60a49073ffffffffffffffffffffffffffffffffffffffff604051917fd55f518d00000000000000000000000000000000000000000000000000000000835260406004840152602560448401527f6e65656420474f5645524e414e43455f524f4c45206f7220545245415355525960648401527f5f524f4c450000000000000000000000000000000000000000000000000000006084840152166024820152fd5b604051906121f282612063565b6002548252600354602083015260045460408301526005546060830152565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60809101126104ea576040519061224882612063565b6004358252602435602083015260443560408301526064356060830152565b335f9081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff161561229f57565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004525f60245260445ffd5b6122d9828261258d565b91826122e457505090565b612310915f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f20911690612769565b5090565b9190820180921161163c57565b62278d00420180421161163c57602060405161233c816120ac565b600281520190815260027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600a541617600a5551600b55565b62127500420180421161163c576020604051612390816120ac565b600181520190815260017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600a541617600a5551600b55565b6123f69060606123ed6123e28351602085015190612314565b604084015190612314565b91015190612314565b90565b61240382826126a1565b918261240e57505090565b612310915f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f209116906127f7565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005c6124865760017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b916020915f916040519073ffffffffffffffffffffffffffffffffffffffff858301937fa9059cbb00000000000000000000000000000000000000000000000000000000855216602483015260448201526044815261250e6064826120c8565b519082855af1156105ba575f513d612584575073ffffffffffffffffffffffffffffffffffffffff81163b155b6125425750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b6001141561253b565b805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f1461265957805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b8054821015612674575f5260205f2001905f90565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f1461265957805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b6001810190825f528160205260405f2054155f146127f05780546801000000000000000081101561207f576127dd6127a882600187940185558461265f565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905554915f5260205260405f2055600190565b5050505f90565b906001820191815f528260205260405f20548015155f14612948577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811161163c578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161163c57818103612913575b505050805480156128e6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906128a9828261265f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055555f526020525f6040812055600190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b6129336129236127a8938661265f565b90549060031b1c9283928661265f565b90555f528360205260405f20555f8080612871565b505050505f9056fea2646970667358221220a6daa6bf6c980ee39b34140aa9b7d96cec5ee9f61036d0acc0bd2aaeadcf3d7364736f6c634300081c00332f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb19e5c930214a7bc8a78d251e617445bcdba028aed2ede5828cc6cd6c8261656f5316a51056d8b2401ab04c48d9973add294eadde229c785c6d19cde93785467efe1dcbdb91df27212a29bc27177c840cf2f819ecf2187432e1fac86c2dd5dfca9ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb500000000000000000000000047b371aad47754a78dd4fb99d3d84be404d3890000000000000000000000000017f983cb1200b539a927bf6a0413594c59395d03000000000000000000000000d9cebd0fbd049ebd281a4c752c49ac8ea8de95d5000000000000000000000000499430be96219d6c98dbdb6e4091f24b2d0976e700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002116545850052128000000000000000000000000000000000000000000000000084595161401484a00000000000000000000000000000000000000000000000018d0bf423c03d8de000000000000000000000000000000cf9fada68ac68722101ad0b0a498d2b6b5ec2d7f000000000000000000000000cf9fada68ac68722101ad0b0a498d2b6b5ec2d7f00000000000000000000000022b07880c42f41c011202b8a174804ad1f9d51c90000000000000000000000008184e88126c3dfc5032f764fa55d42a4bbb38b87
Deployed Bytecode
0x6080806040526004361015610012575f80fd5b5f905f3560e01c90816301ffc9a714611f51575080630bf6cc0814611e6d5780630e57d4ce14611dc1578063248a9ca314611d775780632f2ff15d14611c9a57806336568abe14611b5457806361d027b314611b00578063697bce781461189b578063787a08a61461181e5780637ed5b093146117e357806382bfefc8146117755780638380edb71461173557806388a17bde146116e15780638f6950d1146114ec5780639010d07c1461147d57806391d14854146114095780639bc16665146113ce578063a217fddf14611396578063a3246ad3146112bc578063c2a2b4b11461103c578063c394e49514611001578063ca15c87314610fb9578063ca7b098014610bdb578063d11a57ec14610b83578063d547741f14610a1d578063e72f6e30146107b3578063edac6bba146101fc578063f36c8f5c146101a35763fa2a89971461015d575f80fd5b346101a057807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a057602060ff600c5460081c166040519015158152f35b80fd5b50346101a057807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101a05760206040517f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb18152f35b50346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5761023a600b5480421015612109565b335f9081527f9e5c930214a7bc8a78d251e617445bcdba028aed2ede5828cc6cd6c8261656f5602052604090205460ff16156107635761027861243a565b600c5460ff81161561073b5761029461028f6121e5565b6123c9565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f00000000000000000000000047b371aad47754a78dd4fb99d3d84be404d38900929160208260248173ffffffffffffffffffffffffffffffffffffffff88165afa9182156105ba575f92610707575b5080821061069c5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010017600c5560025480610673575b506003548061064a575b5060045480610621575b50600554806105f7575b5050600254610501575b6003546103f2575b7f4bfdde6abc715191a2c22e64e803ccbdb36d8c839a1d7be9c5dab492ea5c971160a06040514281526103cb602082016002548152600354602082015260045460408201526060600554910152565ba1807f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d80f35b8073ffffffffffffffffffffffffffffffffffffffff600754166040517f78e97925000000000000000000000000000000000000000000000000000000008152602081600481855afa9081156104f65783916104bd575b5015610457575b505061037c565b803b156104ba578180916004604051809481937fbe9a65550000000000000000000000000000000000000000000000000000000083525af180156104af571561045057816104a4916120c8565b6101a057805f610450565b6040513d84823e3d90fd5b50fd5b9250506020823d6020116104ee575b816104d9602093836120c8565b810103126104ea578291515f610449565b5f80fd5b3d91506104cc565b6040513d85823e3d90fd5b73ffffffffffffffffffffffffffffffffffffffff600654166040517f78e97925000000000000000000000000000000000000000000000000000000008152602081600481855afa9081156105ba575f916105c5575b5015610564575b50610374565b803b156104ea575f80916004604051809481937fbe9a65550000000000000000000000000000000000000000000000000000000083525af180156105ba571561055e576105b391505f906120c8565b5f5f61055e565b6040513d5f823e3d90fd5b90506020813d6020116105ef575b816105e0602093836120c8565b810103126104ea57515f610557565b3d91506105d3565b61061a9173ffffffffffffffffffffffffffffffffffffffff60095416906124ae565b5f8061036a565b6106449073ffffffffffffffffffffffffffffffffffffffff60085416836124ae565b5f610360565b61066d9073ffffffffffffffffffffffffffffffffffffffff60075416836124ae565b5f610356565b6106969073ffffffffffffffffffffffffffffffffffffffff60065416836124ae565b5f61034c565b60a49250604051917f581bd8e400000000000000000000000000000000000000000000000000000000835260606004840152600960648401527f617661696c61626c650000000000000000000000000000000000000000000000608484015260248301526044820152fd5b9091506020813d602011610733575b81610723602093836120c8565b810103126104ea5751905f610310565b3d9150610716565b7f4f02c642000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527fe1dcbdb91df27212a29bc27177c840cf2f819ecf2187432e1fac86c2dd5dfca960245260445ffd5b346104ea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5760043573ffffffffffffffffffffffffffffffffffffffff81168091036104ea5761080b61243a565b80156109bf57600c5460ff8160081c161561099757604051917f70a08231000000000000000000000000000000000000000000000000000000008352306004840152602083602481845afa9283156105ba575f93610963575b50821561090557826108b37f13e06184555481b6d2cb327155e8d2e1d0b1f0252a7fe6621e32cf99881488359473ffffffffffffffffffffffffffffffffffffffff60609560101c16846124ae565b73ffffffffffffffffffffffffffffffffffffffff600c5460101c1660405192835260208301526040820152a15f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d005b60646040517f92a4f38a00000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f62616c616e6365000000000000000000000000000000000000000000000000006044820152fd5b9092506020813d60201161098f575b8161097f602093836120c8565b810103126104ea57519183610864565b3d9150610972565b7ff98df7d9000000000000000000000000000000000000000000000000000000005f5260045ffd5b60646040517fd786f8be00000000000000000000000000000000000000000000000000000000815260206004820152600560248201527f746f6b656e0000000000000000000000000000000000000000000000000000006044820152fd5b346104ea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57600435610a57612040565b610a5f612267565b81610aff575f8052600160208190527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49541115610aa157610a9f916123f9565b005b60646040517f7d541a4a00000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4c6173742044454641554c545f41444d494e2063616e2774207265766f6b65006044820152fd5b60846040517f7d541a4a00000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f6e6c792044454641554c545f41444d494e5f524f4c452063616e206265207260448201527f65766f6b656400000000000000000000000000000000000000000000000000006064820152fd5b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5760206040517fe1dcbdb91df27212a29bc27177c840cf2f819ecf2187432e1fac86c2dd5dfca98152f35b346104ea5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57600435610c15612040565b9060443573ffffffffffffffffffffffffffffffffffffffff8116928382036104ea57610c47600b5480421015612109565b610c4f612267565b7f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb183148015610f90575b15610f0c5773ffffffffffffffffffffffffffffffffffffffff81168015610eae578415610e5057848114610de657835f525f60205260405f20905f5260205260ff60405f20541615610d8857610cd090836123f9565b50610cdb81836122cf565b507fe1dcbdb91df27212a29bc27177c840cf2f819ecf2187432e1fac86c2dd5dfca98214610d3c575b50610d0d612321565b7f51bfa573bf019d242f893f1ecaa4384400ed54addf0ec1fa153424ab2172545e6020600b54604051908152a3005b7fffffffffffffffffffff0000000000000000000000000000000000000000ffff75ffffffffffffffffffffffffffffffffffffffff0000600c549260101b16911617600c5582610d04565b60646040517f7d541a4a00000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6f6c64486f6c646572206e6f742063757272656e7400000000000000000000006044820152fd5b60a46040517fba69c78f00000000000000000000000000000000000000000000000000000000815260606004820152600860648201527f6f6c64213d6e657700000000000000000000000000000000000000000000000060848201525f60248201525f6044820152fd5b60646040517fd786f8be00000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6e6577486f6c64657200000000000000000000000000000000000000000000006044820152fd5b60646040517fd786f8be00000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6f6c64486f6c64657200000000000000000000000000000000000000000000006044820152fd5b60846040517f7d541a4a00000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4f6e6c7920474f5645524e414e43455f524f4c45206f7220545245415355525960448201527f5f524f4c4520616c6c6f776564000000000000000000000000000000000000006064820152fd5b507fe1dcbdb91df27212a29bc27177c840cf2f819ecf2187432e1fac86c2dd5dfca98314610c79565b346104ea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea576004355f526001602052602060405f2054604051908152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea576020604051621275008152f35b346104ea5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5761107a600b5480421015612109565b335f9081527f316a51056d8b2401ab04c48d9973add294eadde229c785c6d19cde93785467ef602052604090205460ff168015611285575b6110bd90339061213c565b6110c861028f6121e5565b6110d461028f36612211565b80820361121b576110e436612211565b8051159081159161120d575b81156111ff575b81156111f1575b501561116d577f82656c284b23b92e2c3839d94f99648cbad00fff682574d16982de9e804ccae360a0600435806002556024358060035560443580600455606435908160055561114c612375565b600b54926040519485526020850152604084015260608301526080820152a1005b60846040517f92a4f38a00000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4174206c65617374206f6e6520616c6c6f636174696f6e20616d6f756e74206d60448201527f757374206265206e6f6e2d7a65726f00000000000000000000000000000000006064820152fd5b6060915001511515816110fe565b6040810151151591506110f7565b6020810151151591506110f0565b60a491604051917fba69c78f00000000000000000000000000000000000000000000000000000000835260606004840152601960648401527f616c6c6f636174696f6e20746f74616c206d69736d6174636800000000000000608484015260248301526044820152fd5b50335f9081527f9e5c930214a7bc8a78d251e617445bcdba028aed2ede5828cc6cd6c8261656f5602052604090205460ff166110b2565b346104ea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea576004355f52600160205260405f20604051806020835491828152019081935f5260205f20905f5b81811061138057505050816113289103826120c8565b604051918291602083019060208452518091526040830191905f5b818110611351575050500390f35b825173ffffffffffffffffffffffffffffffffffffffff16845285945060209384019390920191600101611343565b8254845260209093019260019283019201611312565b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5760206040515f8152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57602060405162278d008152f35b346104ea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57611440612040565b6004355f525f60205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b346104ea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea576004355f526001602052602073ffffffffffffffffffffffffffffffffffffffff6114dc60243560405f2061265f565b90549060031b1c16604051908152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57335f9081527f316a51056d8b2401ab04c48d9973add294eadde229c785c6d19cde93785467ef602052604090205460ff16156116915761155f600b5480421015612109565b600c5460ff8116611669577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006001911617600c5562093a80420180421161163c5760206040516115ae816120ac565b5f8152019081527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600a5416600a5551600b557f3d7ac1f9c37d463d6b5c2f999dbc12d06cf9d3841c6b0158b2d378a25f52e1b860c0600b5460405190428252611634602083016002548152600354602082015260045460408201526060600554910152565b60a0820152a1005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7f310dc57b000000000000000000000000000000000000000000000000000000005f5260045ffd5b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb160245260445ffd5b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57608060025460035460045460055491604051938452602084015260408301526060820152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57602060ff600c54166040519015158152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57602060405173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000047b371aad47754a78dd4fb99d3d84be404d38900168152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57602060405162093a808152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5760ff600a5416600b5460405190600383101561186e5760409282526020820152f35b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b346104ea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea5760043560048110156104ea5773ffffffffffffffffffffffffffffffffffffffff6118f3612040565b611902600b5480421015612109565b3382165f9081527f316a51056d8b2401ab04c48d9973add294eadde229c785c6d19cde93785467ef602052604090205460ff168015611ac7575b61194790339061213c565b16908115611a69575f816119bd57827fffffffffffffffffffffffff000000000000000000000000000000000000000060065416176006555b611988612375565b600b549061186e5760207f690c276d444b0f6278ab99ce84d66abe97d6cc9c4b01d3a1ebce09ee1606484b91604051908152a3005b505f600182036119f757827fffffffffffffffffffffffff000000000000000000000000000000000000000060075416176007555b611980565b505f60028203611a3057827fffffffffffffffffffffffff00000000000000000000000000000000000000006008541617600855611980565b505f600382036119f257827fffffffffffffffffffffffff00000000000000000000000000000000000000006009541617600955611980565b60646040517fd786f8be00000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6e6577526563697069656e7400000000000000000000000000000000000000006044820152fd5b503382165f9081527f9e5c930214a7bc8a78d251e617445bcdba028aed2ede5828cc6cd6c8261656f5602052604090205460ff1661193c565b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57602073ffffffffffffffffffffffffffffffffffffffff600c5460101c16604051908152f35b346104ea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57611b8b612040565b611b93612267565b5f8052600160208190527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49541115611c16573373ffffffffffffffffffffffffffffffffffffffff821603611bee57610a9f906004356123f9565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b60846040517f7d541a4a00000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4c6173742044454641554c545f41444d494e2063616e27742072656e6f756e6360448201527f65000000000000000000000000000000000000000000000000000000000000006064820152fd5b346104ea5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57600435611cd4612040565b611cdc612267565b81611cf357611cea916122cf565b50610a9f612321565b60846040517f7d541a4a00000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f6e6c792044454641554c545f41444d494e5f524f4c452063616e206265206760448201527f72616e74656400000000000000000000000000000000000000000000000000006064820152fd5b346104ea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea576004355f525f6020526020600160405f200154604051908152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57608073ffffffffffffffffffffffffffffffffffffffff6006541673ffffffffffffffffffffffffffffffffffffffff6007541673ffffffffffffffffffffffffffffffffffffffff6008541673ffffffffffffffffffffffffffffffffffffffff6009541691604051938452602084015260408301526060820152f35b346104ea575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea576040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000047b371aad47754a78dd4fb99d3d84be404d38900165afa80156105ba575f90611f1e575b602090604051908152f35b506020813d602011611f49575b81611f38602093836120c8565b810103126104ea5760209051611f13565b3d9150611f2b565b346104ea5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104ea57600435907fffffffff0000000000000000000000000000000000000000000000000000000082168092036104ea57817f5a05180f0000000000000000000000000000000000000000000000000000000060209314908115611fe3575b5015158152f35b7f7965db0b00000000000000000000000000000000000000000000000000000000811491508115612016575b5083611fdc565b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150148361200f565b6024359073ffffffffffffffffffffffffffffffffffffffff821682036104ea57565b6080810190811067ffffffffffffffff82111761207f57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040810190811067ffffffffffffffff82111761207f57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761207f57604052565b156121115750565b7faeb0049a000000000000000000000000000000000000000000000000000000005f5260045260245ffd5b156121445750565b60a49073ffffffffffffffffffffffffffffffffffffffff604051917fd55f518d00000000000000000000000000000000000000000000000000000000835260406004840152602560448401527f6e65656420474f5645524e414e43455f524f4c45206f7220545245415355525960648401527f5f524f4c450000000000000000000000000000000000000000000000000000006084840152166024820152fd5b604051906121f282612063565b6002548252600354602083015260045460408301526005546060830152565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60809101126104ea576040519061224882612063565b6004358252602435602083015260443560408301526064356060830152565b335f9081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff161561229f57565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004525f60245260445ffd5b6122d9828261258d565b91826122e457505090565b612310915f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f20911690612769565b5090565b9190820180921161163c57565b62278d00420180421161163c57602060405161233c816120ac565b600281520190815260027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600a541617600a5551600b55565b62127500420180421161163c576020604051612390816120ac565b600181520190815260017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600a541617600a5551600b55565b6123f69060606123ed6123e28351602085015190612314565b604084015190612314565b91015190612314565b90565b61240382826126a1565b918261240e57505090565b612310915f52600160205273ffffffffffffffffffffffffffffffffffffffff60405f209116906127f7565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005c6124865760017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005d565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b916020915f916040519073ffffffffffffffffffffffffffffffffffffffff858301937fa9059cbb00000000000000000000000000000000000000000000000000000000855216602483015260448201526044815261250e6064826120c8565b519082855af1156105ba575f513d612584575073ffffffffffffffffffffffffffffffffffffffff81163b155b6125425750565b73ffffffffffffffffffffffffffffffffffffffff907f5274afe7000000000000000000000000000000000000000000000000000000005f521660045260245ffd5b6001141561253b565b805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f1461265957805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b8054821015612674575f5260205f2001905f90565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f1461265957805f525f60205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b6001810190825f528160205260405f2054155f146127f05780546801000000000000000081101561207f576127dd6127a882600187940185558461265f565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905554915f5260205260405f2055600190565b5050505f90565b906001820191815f528260205260405f20548015155f14612948577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810181811161163c578254907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820191821161163c57818103612913575b505050805480156128e6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01906128a9828261265f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82549160031b1b19169055555f526020525f6040812055600190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b6129336129236127a8938661265f565b90549060031b1c9283928661265f565b90555f528360205260405f20555f8080612871565b505050505f9056fea2646970667358221220a6daa6bf6c980ee39b34140aa9b7d96cec5ee9f61036d0acc0bd2aaeadcf3d7364736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000047b371aad47754a78dd4fb99d3d84be404d3890000000000000000000000000017f983cb1200b539a927bf6a0413594c59395d03000000000000000000000000d9cebd0fbd049ebd281a4c752c49ac8ea8de95d5000000000000000000000000499430be96219d6c98dbdb6e4091f24b2d0976e700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002116545850052128000000000000000000000000000000000000000000000000084595161401484a00000000000000000000000000000000000000000000000018d0bf423c03d8de000000000000000000000000000000cf9fada68ac68722101ad0b0a498d2b6b5ec2d7f000000000000000000000000cf9fada68ac68722101ad0b0a498d2b6b5ec2d7f00000000000000000000000022b07880c42f41c011202b8a174804ad1f9d51c90000000000000000000000008184e88126c3dfc5032f764fa55d42a4bbb38b87
-----Decoded View---------------
Arg [0] : _token (address): 0x47B371AAd47754A78Dd4Fb99d3D84BE404d38900
Arg [1] : _governance (address): 0x17F983CB1200b539a927bf6a0413594c59395d03
Arg [2] : _treasury (address): 0xd9CebD0fBd049EbD281a4C752C49AC8Ea8de95D5
Arg [3] : _defaultAdmin (address): 0x499430bE96219d6c98dBdb6E4091F24b2D0976e7
Arg [4] : _allocation (tuple):
Arg [1] : teamVestingAmount (uint256): 0
Arg [2] : ecosystemVestingAmount (uint256): 40000000000000000000000000
Arg [3] : communityIncentiveAmount (uint256): 10000000000000000000000000
Arg [4] : lpIncentiveAmount (uint256): 30000000000000000000000000
Arg [5] : _recipients (tuple):
Arg [1] : teamVesting (address): 0xcF9fada68AC68722101AD0b0a498d2b6b5Ec2D7F
Arg [2] : ecosystemVesting (address): 0xcF9fada68AC68722101AD0b0a498d2b6b5Ec2D7F
Arg [3] : communityIncentive (address): 0x22B07880C42f41c011202B8A174804AD1f9d51c9
Arg [4] : lpIncentive (address): 0x8184e88126c3DFc5032F764FA55D42A4bbB38B87
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 00000000000000000000000047b371aad47754a78dd4fb99d3d84be404d38900
Arg [1] : 00000000000000000000000017f983cb1200b539a927bf6a0413594c59395d03
Arg [2] : 000000000000000000000000d9cebd0fbd049ebd281a4c752c49ac8ea8de95d5
Arg [3] : 000000000000000000000000499430be96219d6c98dbdb6e4091f24b2d0976e7
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000002116545850052128000000
Arg [6] : 000000000000000000000000000000000000000000084595161401484a000000
Arg [7] : 00000000000000000000000000000000000000000018d0bf423c03d8de000000
Arg [8] : 000000000000000000000000cf9fada68ac68722101ad0b0a498d2b6b5ec2d7f
Arg [9] : 000000000000000000000000cf9fada68ac68722101ad0b0a498d2b6b5ec2d7f
Arg [10] : 00000000000000000000000022b07880c42f41c011202b8a174804ad1f9d51c9
Arg [11] : 0000000000000000000000008184e88126c3dfc5032f764fa55d42a4bbb38b87
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.