More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 159 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Redeem | 21308129 | 35 days ago | IN | 0 ETH | 0.00295828 | ||||
Redeem | 21263886 | 42 days ago | IN | 0 ETH | 0.00194686 | ||||
Redeem | 21091370 | 66 days ago | IN | 0 ETH | 0.00127115 | ||||
Approve | 20918100 | 90 days ago | IN | 0 ETH | 0.00022312 | ||||
Approve | 20649302 | 127 days ago | IN | 0 ETH | 0.00003399 | ||||
Redeem | 20188136 | 192 days ago | IN | 0 ETH | 0.0003615 | ||||
Redeem | 19996411 | 219 days ago | IN | 0 ETH | 0.00096047 | ||||
Redeem | 19927707 | 228 days ago | IN | 0 ETH | 0.00271328 | ||||
Redeem | 19872555 | 236 days ago | IN | 0 ETH | 0.00093935 | ||||
Redeem | 19836863 | 241 days ago | IN | 0 ETH | 0.00060632 | ||||
Redeem | 19817659 | 244 days ago | IN | 0 ETH | 0.00113766 | ||||
Redeem | 19784072 | 248 days ago | IN | 0 ETH | 0.00171005 | ||||
Redeem | 19780395 | 249 days ago | IN | 0 ETH | 0.00090278 | ||||
Redeem | 19779935 | 249 days ago | IN | 0 ETH | 0.0009159 | ||||
Redeem | 19777093 | 249 days ago | IN | 0 ETH | 0.0015207 | ||||
Redeem | 19777079 | 249 days ago | IN | 0 ETH | 0.00177557 | ||||
Redeem | 19775726 | 249 days ago | IN | 0 ETH | 0.00172443 | ||||
Redeem | 19775709 | 249 days ago | IN | 0 ETH | 0.001848 | ||||
Redeem | 19771907 | 250 days ago | IN | 0 ETH | 0.00104208 | ||||
Redeem | 19771783 | 250 days ago | IN | 0 ETH | 0.00107961 | ||||
Redeem | 19766835 | 251 days ago | IN | 0 ETH | 0.00169477 | ||||
Redeem | 19757254 | 252 days ago | IN | 0 ETH | 0.00077451 | ||||
Redeem | 19702395 | 260 days ago | IN | 0 ETH | 0.00110327 | ||||
Redeem | 19688194 | 262 days ago | IN | 0 ETH | 0.00215245 | ||||
Redeem | 19659248 | 266 days ago | IN | 0 ETH | 0.00212505 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
||||
---|---|---|---|---|---|---|---|
21308129 | 35 days ago | 0 ETH | |||||
21308129 | 35 days ago | 0 ETH | |||||
21308129 | 35 days ago | 0 ETH | |||||
21308129 | 35 days ago | 0 ETH | |||||
21308129 | 35 days ago | 0 ETH | |||||
21308129 | 35 days ago | 0 ETH | |||||
21308129 | 35 days ago | 0 ETH | |||||
21308129 | 35 days ago | 0 ETH | |||||
21308129 | 35 days ago | 0 ETH | |||||
21308109 | 35 days ago | 0 ETH | |||||
21308109 | 35 days ago | 0 ETH | |||||
21308109 | 35 days ago | 0 ETH | |||||
21308109 | 35 days ago | 0 ETH | |||||
21263886 | 42 days ago | 0 ETH | |||||
21263886 | 42 days ago | 0 ETH | |||||
21263886 | 42 days ago | 0 ETH | |||||
21263886 | 42 days ago | 0 ETH | |||||
21263886 | 42 days ago | 0 ETH | |||||
21263886 | 42 days ago | 0 ETH | |||||
21263886 | 42 days ago | 0 ETH | |||||
21263886 | 42 days ago | 0 ETH | |||||
21263886 | 42 days ago | 0 ETH | |||||
21263876 | 42 days ago | 0 ETH | |||||
21263876 | 42 days ago | 0 ETH | |||||
21263876 | 42 days ago | 0 ETH |
Loading...
Loading
Contract Name:
PCTPool
Compiler Version
v0.8.21+commit.d9974bed
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./PCT.sol"; import "./utils/SafeMath.sol"; import "./interfaces/ISPCT.sol"; import "./interfaces/ISPCTPriceOracle.sol"; /** * @title Interest-bearing ERC20-like token for Anzen protocol. */ contract PCTPool is PCT, AccessControl, Pausable { using SafeERC20 for IERC20; using SafeMath for uint256; bytes32 public constant POOL_MANAGER_ROLE = keccak256("POOL_MANAGER_ROLE"); // Restricting call deposit and redeem in the same block. mapping(address => uint256) private _status; // Interest mode bool public mode = false; // Used to calculate total executed shares. uint256 public executedShares; // Used to calculate total pooled SPCT. uint256 public totalPooledSPCT; // Used to calculate collateral rate. uint256 public collateralRate = 1; // Fee Zone uint256 public constant FEE_COEFFICIENT = 1e8; // Fee should be less than 1%. uint256 public constant maxMintFeeRate = FEE_COEFFICIENT / 100; uint256 public constant maxRedeemFeeRate = FEE_COEFFICIENT / 100; uint256 public mintFeeRate; uint256 public redeemFeeRate; // Protocol treasury should be a mulsig wallet. address public treasury; // Lend token IERC20 public usdc; // Collateral token ISPCT public spct; // Price oracle ISPCTPriceOracle public oracle; event ModeSwitch(bool mode, uint256 timestamp); event Deposit(address indexed user, uint256 amount, uint256 timestamp); event Redeem(address indexed user, uint256 amount, uint256 timestamp); event Mint(address indexed user, uint256 amount, uint256 timestamp); event Burn(address indexed user, uint256 amount, uint256 timestamp); event mintFeeRateChanged(uint256 newFeeRate, uint256 timestamp); event redeemFeeRateChanged(uint256 newFeeRate, uint256 timestamp); event treasuryChanged(address newTreasury, uint256 timestamp); event oracleChanged(address newOracle, uint256 timestamp); constructor(address admin, IERC20 _usdc, ISPCT _spct, ISPCTPriceOracle _oracle) ERC20("Private Credit Token", "PCT") { _grantRole(DEFAULT_ADMIN_ROLE, admin); usdc = _usdc; spct = _spct; oracle = _oracle; } modifier checkCollateralRate() { _checkCollateralRate(); _; } modifier checkRebasing() { _checkRebasing(); _; } /** * @notice Check collateral rate. */ function _checkCollateralRate() internal { if (oracle.getPrice() / 1e18 < collateralRate) { _pause(); revert("UNDER_COLLATERAL_RATE,SMART_CONTRACT_IS_PAUSED_NOW"); } } /** * @notice Check rebasing. */ function _checkRebasing() internal { totalPooledSPCT = spct.getPooledUSDByShares(executedShares); } /** * @notice Pause the contract. Revert if already paused. */ function pause() external onlyRole(DEFAULT_ADMIN_ROLE) { _pause(); } /** * @notice Unpause the contract. Revert if already unpaused. */ function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) { _unpause(); } /** * @notice Switch to interest mode. * Emits a `ModeSwitch` event. */ function switchMode() external onlyRole(DEFAULT_ADMIN_ROLE) { mode = !mode; emit ModeSwitch(mode, block.timestamp); } /** * @notice deposit USDC. (borrow USDC from user and deposit collateral) * Emits a `Deposit` event. * * @param _amount the amount of USDC */ function deposit(uint256 _amount) external whenNotPaused checkCollateralRate checkRebasing { require(mode == false, "PLEASE_MIGRATE_TO_NEW_VERSION"); require(_amount > 0, "DEPOSIT_AMOUNT_IS_ZERO"); require(_status[tx.origin] != block.number, "FUNCTION_RESTRICTION"); usdc.transferFrom(msg.sender, address(this), _amount); usdc.approve(address(spct), _amount); // approve for depositing collateral // Due to different precisions, convert it to PCT. uint256 convertToSPCT = _amount.mul(1e12); // Get mint rate from spct for calculating. uint256 spctMintFeeRate = spct.mintFeeRate(); // calculate fee with PCT if (mintFeeRate == 0) { if (spctMintFeeRate == 0) { _mintPCT(msg.sender, convertToSPCT); spct.deposit(_amount); } else { uint256 spctFeeAmount = convertToSPCT.mul(spctMintFeeRate).div(FEE_COEFFICIENT); uint256 spctAmountAfterFee = convertToSPCT.sub(spctFeeAmount); _mintPCT(msg.sender, spctAmountAfterFee); spct.deposit(_amount); } } else { if (spctMintFeeRate == 0) { uint256 feeAmount = convertToSPCT.mul(mintFeeRate).div(FEE_COEFFICIENT); uint256 amountAfterFee = convertToSPCT.sub(feeAmount); _mintPCT(msg.sender, amountAfterFee); if (feeAmount != 0) { _mintPCT(treasury, feeAmount); } spct.deposit(_amount); } else { uint256 spctFeeAmount = convertToSPCT.mul(spctMintFeeRate).div(FEE_COEFFICIENT); uint256 spctAmountAfterFee = convertToSPCT.sub(spctFeeAmount); uint256 feeAmount = spctAmountAfterFee.mul(mintFeeRate).div(FEE_COEFFICIENT); uint256 amountAfterFee = spctAmountAfterFee.sub(feeAmount); _mintPCT(msg.sender, amountAfterFee); if (feeAmount != 0) { _mintPCT(treasury, feeAmount); } spct.deposit(_amount); } } _status[tx.origin] = block.number; emit Deposit(msg.sender, _amount, block.timestamp); } /** * @notice redeem PCT. (get back USDC from borrower and release collateral) * 6 decimal input * Emits a `Redeem` event. * * @param _amount the amount of PCT. */ function redeem(uint256 _amount) external whenNotPaused checkCollateralRate checkRebasing { require(spct.reserveUSD().mul(1e12) >= _amount, "RESERVE_INSUFFICIENT"); require(_amount > 0, "REDEEM_AMOUNT_IS_ZERO"); require(_status[tx.origin] != block.number, "FUNCTION_RESTRICTION"); // Due to different precisions, convert it to PCT. uint256 convertToUSDC; // Get redeem rate from spct for calculating. uint256 spctRedeemFeeRate = spct.redeemFeeRate(); // calculate fee with PCT if (redeemFeeRate == 0) { if (spctRedeemFeeRate == 0) { _burnPCT(msg.sender, _amount); spct.redeem(_amount); convertToUSDC = _amount.div(1e12); usdc.transfer(msg.sender, convertToUSDC); } else { uint256 spctFeeAmount = _amount.mul(spctRedeemFeeRate).div(FEE_COEFFICIENT); uint256 spctAmountAfterFee = _amount.sub(spctFeeAmount); _burnPCT(msg.sender, _amount); spct.redeem(_amount); convertToUSDC = spctAmountAfterFee.div(1e12); usdc.transfer(msg.sender, convertToUSDC); } } else { if (spctRedeemFeeRate == 0) { uint256 feeAmount = _amount.mul(redeemFeeRate).div(FEE_COEFFICIENT); uint256 amountAfterFee = _amount.sub(feeAmount); _burnPCT(msg.sender, amountAfterFee); if (feeAmount != 0) { _transfer(msg.sender, treasury, feeAmount); } spct.redeem(amountAfterFee); convertToUSDC = amountAfterFee.div(1e12); usdc.transfer(msg.sender, convertToUSDC); } else { uint256 feeAmount = _amount.mul(redeemFeeRate).div(FEE_COEFFICIENT); uint256 amountAfterFee = _amount.sub(feeAmount); uint256 spctFeeAmount = amountAfterFee.mul(spctRedeemFeeRate).div(FEE_COEFFICIENT); uint256 spctAmountAfterFee = amountAfterFee.sub(spctFeeAmount); _burnPCT(msg.sender, amountAfterFee); if (feeAmount != 0) { _transfer(msg.sender, treasury, feeAmount); } spct.redeem(amountAfterFee); convertToUSDC = spctAmountAfterFee.div(1e12); usdc.transfer(msg.sender, convertToUSDC); } } _status[tx.origin] = block.number; emit Redeem(msg.sender, _amount, block.timestamp); } /** * @notice total pooled SPCT. */ function _getTotalPooledSPCT() internal view override returns (uint256) { return spct.getPooledUSDByShares(executedShares); } /** * @dev mint PCT for _receiver. * Emits `Mint` and `Transfer` event. * * @param _receiver address to receive SPCT. * @param _amount the amount of SPCT. */ function _mintPCT(address _receiver, uint256 _amount) internal { uint256 sharesAmount = getSharesByPooledSPCT(_amount); if (sharesAmount == 0) { // 1 PCT shares are equal to 1 USDC. sharesAmount = _amount; } _mintShares(_receiver, sharesAmount); executedShares = executedShares.add(sharesAmount); totalPooledSPCT = totalPooledSPCT.add(_amount); emit Mint(msg.sender, _amount, block.timestamp); emit Transfer(address(0), _receiver, _amount); } /** * @dev burn PCT from _receiver. * Emits `Burn` and `Transfer` event. * * @param _account address to burn PCT from. * @param _amount the amount of PCT. */ function _burnPCT(address _account, uint256 _amount) internal { uint256 sharesAmount = getSharesByPooledSPCT(_amount); require(sharesAmount > 0, "SHARES_AMOUNT_IS_ZERO"); _burnShares(_account, sharesAmount); executedShares = executedShares.sub(sharesAmount); totalPooledSPCT = totalPooledSPCT.sub(_amount); emit Burn(msg.sender, _amount, block.timestamp); emit Transfer(_account, address(0), _amount); } /** * @notice Mint fee. * * @param newMintFeeRate new mint fee rate. */ function setMintFeeRate(uint256 newMintFeeRate) external onlyRole(POOL_MANAGER_ROLE) { require(newMintFeeRate <= maxMintFeeRate, "SHOULD_BE_LESS_THAN_1P"); mintFeeRate = newMintFeeRate; emit mintFeeRateChanged(mintFeeRate, block.timestamp); } /** * @notice Redeem fee. * * @param newRedeemFeeRate new redeem fee rate. */ function setRedeemFeeRate(uint256 newRedeemFeeRate) external onlyRole(POOL_MANAGER_ROLE) { require(newRedeemFeeRate <= maxRedeemFeeRate, "SHOULD_BE_LESS_THAN_1P"); redeemFeeRate = newRedeemFeeRate; emit redeemFeeRateChanged(redeemFeeRate, block.timestamp); } /** * @notice Treasury address. * * @param newTreasury new treasury address. */ function setTreasury(address newTreasury) external onlyRole(POOL_MANAGER_ROLE) { require(newTreasury != address(0), "SET_UP_TO_ZERO_ADDR"); treasury = newTreasury; emit treasuryChanged(treasury, block.timestamp); } /** * @notice Oracle address. * * @param newOracle new Oracle address. */ function setOracle(address newOracle) external onlyRole(POOL_MANAGER_ROLE) { require(newOracle != address(0), "SET_UP_TO_ZERO_ADDR"); oracle = ISPCTPriceOracle(newOracle); emit oracleChanged(newOracle, block.timestamp); } /** * @notice Rescue ERC20 tokens locked up in this contract. * @param token ERC20 token contract address. * @param to recipient address. * @param amount amount to withdraw. */ function rescueERC20(IERC20 token, address to, uint256 amount) external onlyRole(POOL_MANAGER_ROLE) { // If is SPCT, check total pooled amount first. if (address(token) == address(spct)) { require(amount <= spct.balanceOf(address(this)).sub(totalPooledSPCT), "SPCT_RESCUE_AMOUNT_EXCEED_DEBIT"); } token.safeTransfer(to, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { bool private _paused; /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev An operation with an ERC20 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. */ 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. */ 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. */ 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 Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { 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 silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal virtual { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./utils/SafeMath.sol"; /** * @title Interest-bearing ERC20-like token for Anzen protocol. * * This contract is abstract. To make the contract deployable override the * `_getTotalPooledSPCT` function. `PCTPool.sol` contract inherits PCT and defines * the `_getTotalPooledSPCT` function. * * PCT balances are dynamic and represent the holder's share in the total amount * of SPCT controlled by the protocol. Account shares aren't normalized, so the * contract also stores the sum of all shares to calculate each account's token balance * which equals to: * * shares[account] * _getTotalPooledSPCT() / _getTotalShares() * * For example, assume that we have: * * _getTotalPooledSPCT() -> 10 SPCT * sharesOf(user1) -> 100 * sharesOf(user2) -> 400 * * Therefore: * * balanceOf(user1) -> 2 tokens which corresponds 2 SPCT * balanceOf(user2) -> 8 tokens which corresponds 8 SPCT * * Since balances of all token holders change when the amount of total pooled SPCT * changes, this token cannot fully implement ERC20 standard: it only emits `Transfer` * events upon explicit transfer between holders. In contrast, when total amount of * pooled SPCT increases, no `Transfer` events are generated: doing so would require * emitting an event for each token holder and thus running an unbounded loop. * * The token inherits from `Pausable` and uses `whenNotStopped` modifier for methods * which change `shares` or `allowances`. This is useful for emergency scenarios, * e.g. a protocol bug, where one might want to freeze all token transfers and * approvals until the emergency is resolved. */ abstract contract PCT is ERC20 { using SafeMath for uint256; uint256 private _totalShares; /** * @dev PCT balances are dynamic and are calculated based on the accounts' shares * and the total amount of SPCT controlled by the protocol. Account shares aren't * normalized, so the contract also stores the sum of all shares to calculate * each account's token balance which equals to: * * shares[account] * _getTotalPooledSPCT() / _getTotalShares() */ mapping(address => uint256) private _shares; /** * @dev Allowances are nominated in tokens, not token shares. */ mapping(address => mapping(address => uint256)) private _allowances; /** * @notice An executed shares transfer from `sender` to `recipient`. * * @dev emitted in pair with an ERC20-defined `Transfer` event. */ event TransferShares(address indexed from, address indexed to, uint256 sharesValue); /** * @notice An executed `burnShares` request * * @dev Reports simultaneously burnt shares amount * and corresponding PCT amount. * The PCT amount is calculated twice: before and after the burning incurred rebase. * * @param account holder of the burnt shares * @param preRebaseTokenAmount amount of PCT the burnt shares corresponded to before the burn * @param postRebaseTokenAmount amount of PCT the burnt shares corresponded to after the burn * @param sharesAmount amount of burnt shares */ event SharesBurnt( address indexed account, uint256 preRebaseTokenAmount, uint256 postRebaseTokenAmount, uint256 sharesAmount ); /** * @return the number of decimals for getting user representation of a token amount. */ function decimals() public pure override returns (uint8) { return 18; } /** * @return the amount of tokens in existence. * * @dev Always equals to `_getTotalPooledSPCT()` since token amount * is pegged to the total amount of SPCT controlled by the protocol. */ function totalSupply() public view override returns (uint256) { return _getTotalPooledSPCT(); } /** * @return the entire amount of SPCT controlled by the protocol. * * @dev The sum of all SPCT balances in the protocol, equals to the total supply of PCT. */ function getTotalPooledSPCT() public view returns (uint256) { return _getTotalPooledSPCT(); } /** * @return the amount of tokens owned by the `_account`. * * @dev Balances are dynamic and equal the `_account`'s share in the amount of the * total SPCT controlled by the protocol. See `sharesOf`. */ function balanceOf(address _account) public view override returns (uint256) { return getPooledSPCTByShares(_sharesOf(_account)); } /** * @return the total amount of shares in existence. * * @dev The sum of all accounts' shares can be an arbitrary number, therefore * it is necessary to store it in order to calculate each account's relative share. */ function getTotalShares() public view returns (uint256) { return _getTotalShares(); } /** * @return the amount of shares owned by `_account`. */ function sharesOf(address _account) external view returns (uint256) { return _sharesOf(_account); } /** * @return the amount of shares that corresponds to `_spctAmount` protocol-supplied SPCT. */ function getSharesByPooledSPCT(uint256 _spctAmount) public view returns (uint256) { uint256 totalPooledSPCT = _getTotalPooledSPCT(); return totalPooledSPCT == 0 ? 0 : _spctAmount.mul(_getTotalShares()).div(totalPooledSPCT); } /** * @return the amount of SPCT that corresponds to `_sharesAmount` token shares. */ function getPooledSPCTByShares(uint256 _sharesAmount) public view returns (uint256) { uint256 totalSharesAmount = _getTotalShares(); return totalSharesAmount == 0 ? 0 : _sharesAmount.mul(_getTotalPooledSPCT()).div(totalSharesAmount); } /** * @notice Moves `_sharesAmount` token shares from the caller's account to the `_recipient` account. * * @return amount of transferred tokens. * Emits a `TransferShares` event. * Emits a `Transfer` event. * * Requirements: * * - `_recipient` cannot be the zero address. * - the caller must have at least `_sharesAmount` shares. * - the contract must not be paused. * * @dev The `_sharesAmount` argument is the amount of shares, not tokens. */ function transferShares(address _recipient, uint256 _sharesAmount) external returns (uint256) { _transferShares(msg.sender, _recipient, _sharesAmount); uint256 tokensAmount = getPooledSPCTByShares(_sharesAmount); _emitTransferEvents(msg.sender, _recipient, tokensAmount, _sharesAmount); return tokensAmount; } /** * @return the total amount of SPCT. * @dev This is used for calculating tokens from shares and vice versa. * @dev This function is required to be implemented in a derived contract. */ function _getTotalPooledSPCT() internal view virtual returns (uint256); /** * @notice Moves `_amount` tokens from `_sender` to `_recipient`. * Emits a `Transfer` event. * Emits a `TransferShares` event. */ function _transfer(address _sender, address _recipient, uint256 _amount) internal override { uint256 _sharesToTransfer = getSharesByPooledSPCT(_amount); _transferShares(_sender, _recipient, _sharesToTransfer); _emitTransferEvents(_sender, _recipient, _amount, _sharesToTransfer); } /** * @return the total amount of shares in existence. */ function _getTotalShares() internal view returns (uint256) { return _totalShares; } /** * @return the amount of shares owned by `_account`. */ function _sharesOf(address _account) internal view returns (uint256) { return _shares[_account]; } /** * @notice Moves `_sharesAmount` shares from `_sender` to `_recipient`. * * Requirements: * * - `_sender` cannot be the zero address. * - `_recipient` cannot be the zero address. * - `_sender` must hold at least `_sharesAmount` shares. * - the contract must not be paused. */ function _transferShares(address _sender, address _recipient, uint256 _sharesAmount) internal { require(_sender != address(0), "TRANSFER_FROM_THE_ZERO_ADDRESS"); require(_recipient != address(0), "TRANSFER_TO_THE_ZERO_ADDRESS"); uint256 currentSenderShares = _shares[_sender]; require(_sharesAmount <= currentSenderShares, "TRANSFER_AMOUNT_EXCEEDS_BALANCE"); _shares[_sender] = currentSenderShares.sub(_sharesAmount); _shares[_recipient] = _shares[_recipient].add(_sharesAmount); } /** * @notice Creates `_sharesAmount` shares and assigns them to `_recipient`, increasing the total amount of shares. * @dev This doesn't increase the token total supply. * * NB: The method doesn't check protocol pause relying on the external enforcement. * * Requirements: * * - `_recipient` cannot be the zero address. * - the contract must not be paused. * - _recipient is verified. */ function _mintShares(address _recipient, uint256 _sharesAmount) internal returns (uint256 newTotalShares) { require(_recipient != address(0), "MINT_TO_ZERO_ADDR"); newTotalShares = _getTotalShares().add(_sharesAmount); _totalShares = newTotalShares; _shares[_recipient] = _shares[_recipient].add(_sharesAmount); // Notice: we're not emitting a Transfer event from the zero address here since shares mint // works by taking the amount of tokens corresponding to the minted shares from all other // token holders, proportionally to their share. The total supply of the token doesn't change // as the result. This is equivalent to performing a send from each other token holder's // address to `address`, but we cannot reflect this as it would require sending an unbounded // number of events. } /** * @notice Destroys `_sharesAmount` shares from `_account`'s holdings, decreasing the total amount of shares. * @dev This doesn't decrease the token total supply. * * Requirements: * * - `_account` cannot be the zero address. * - `_account` must hold at least `_sharesAmount` shares. * - the contract must not be paused. */ function _burnShares(address _account, uint256 _sharesAmount) internal returns (uint256 newTotalShares) { require(_account != address(0), "BURN_FROM_ZERO_ADDR"); uint256 accountShares = _shares[_account]; require(_sharesAmount <= accountShares, "BALANCE_EXCEEDED"); uint256 preRebaseTokenAmount = getPooledSPCTByShares(_sharesAmount); newTotalShares = _getTotalShares().sub(_sharesAmount); _totalShares = newTotalShares; _shares[_account] = accountShares.sub(_sharesAmount); uint256 postRebaseTokenAmount = getPooledSPCTByShares(_sharesAmount); emit SharesBurnt(_account, preRebaseTokenAmount, postRebaseTokenAmount, _sharesAmount); // Notice: we're not emitting a Transfer event to the zero address here since shares burn // works by redistributing the amount of tokens corresponding to the burned shares between // all other token holders. The total supply of the token doesn't change as the result. // This is equivalent to performing a send from `address` to each other token holder address, // but we cannot reflect this as it would require sending an unbounded number of events. // We're emitting `SharesBurnt` event to provide an explicit rebase log record nonetheless. } /** * @dev Emits {Transfer} and {TransferShares} events */ function _emitTransferEvents(address _from, address _to, uint256 _tokenAmount, uint256 _sharesAmount) internal { emit Transfer(_from, _to, _tokenAmount); emit TransferShares(_from, _to, _sharesAmount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; interface ISPCT { event Approval(address indexed owner, address indexed spender, uint256 value); event Burn(address indexed user, uint256 amount, uint256 timestamp); event Deposit(address indexed user, uint256 amount, uint256 timestamp); event Execute(uint256 amount, uint256 timestamp); event InterestsDistribute(uint256 amount, uint256 fromTime, uint256 toTime); event Mint(address indexed user, uint256 amount, uint256 timestamp); event Paused(address account); event Redeem(address indexed user, uint256 amount, uint256 timestamp); event Repay(uint256 amount, uint256 timestamp); event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); event SharesBurnt( address indexed account, uint256 preRebaseTokenAmount, uint256 postRebaseTokenAmount, uint256 sharesAmount ); event Transfer(address indexed from, address indexed to, uint256 value); event TransferShares(address indexed from, address indexed to, uint256 sharesValue); event Unpaused(address account); event mintFeeRateChanged(uint256 newFeeRate, uint256 timestamp); event redeemFeeRateChanged(uint256 newFeeRate, uint256 timestamp); event treasuryChanged(address newTreasury, uint256 timestamp); function DEFAULT_ADMIN_ROLE() external view returns (bytes32); function FEE_COEFFICIENT() external view returns (uint256); function POOL_MANAGER_ROLE() external view returns (bytes32); function addToWhitelist(address _user) external; function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function balanceOf(address _account) external view returns (uint256); function decimals() external pure returns (uint8); function deposit(uint256 _amount) external; function depositByFiat(address _user, uint256 _amount) external; function distributeInterests(uint256 _amount, uint256 _fromTime, uint256 _toTime) external; function execute(uint256 _amount) external; function executedShares() external view returns (uint256); function getPooledUSDByShares(uint256 _sharesAmount) external view returns (uint256); function getRoleAdmin(bytes32 role) external view returns (bytes32); function getSharesByPooledUSD(uint256 _usdAmount) external view returns (uint256); function getTotalPooledUSD() external view returns (uint256); function getTotalShares() external view returns (uint256); function grantRole(bytes32 role, address account) external; function hasRole(bytes32 role, address account) external view returns (bool); function isWhitelist(address _user) external view returns (bool); function lastDistribution() external view returns (uint256); function maxMintFeeRate() external view returns (uint256); function maxRedeemFeeRate() external view returns (uint256); function mintFeeRate() external view returns (uint256); function name() external view returns (string memory); function pause() external; function paused() external view returns (bool); function redeem(uint256 _amount) external; function redeemByFiat(address _user, uint256 _amount) external; function redeemFeeRate() external view returns (uint256); function removeFromWhitelist(address _user) external; function renounceRole(bytes32 role, address callerConfirmation) external; function repay(uint256 _amount) external; function rescueERC20(address token, address to, uint256 amount) external; function reserveUSD() external view returns (uint256); function revokeRole(bytes32 role, address account) external; function setMintFeeRate(uint256 newMintFeeRate) external; function setRedeemFeeRate(uint256 newRedeemFeeRate) external; function setTreasury(address newTreasury) external; function sharesOf(address _account) external view returns (uint256); function supportsInterface(bytes4 interfaceId) external view returns (bool); function symbol() external view returns (string memory); function totalPooledUSD() external view returns (uint256); function totalSupply() external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function transferShares(address _recipient, uint256 _sharesAmount) external returns (uint256); function treasury() external view returns (address); function unpause() external; function usdc() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.21; interface ISPCTPriceOracle { function getPrice() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @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 AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @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 * {FailedInnerCall} 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 AddressInsufficientBalance(address(this)); } (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 {FailedInnerCall}) 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 {FailedInnerCall} 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 {FailedInnerCall}. */ 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@layerzerolabs/solidity-examples/contracts/=lib/solidity-examples/contracts/", "@chainlink/contracts/=lib/chainlink/contracts/", "chainlink/=lib/chainlink/contracts/src/v0.6/vendor/@arbitrum/nitro-contracts/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/", "solidity-examples/=lib/solidity-examples/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"contract IERC20","name":"_usdc","type":"address"},{"internalType":"contract ISPCT","name":"_spct","type":"address"},{"internalType":"contract ISPCTPriceOracle","name":"_oracle","type":"address"}],"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":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"mode","type":"bool"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ModeSwitch","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"preRebaseTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"postRebaseTokenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharesAmount","type":"uint256"}],"name":"SharesBurnt","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"sharesValue","type":"uint256"}],"name":"TransferShares","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFeeRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"mintFeeRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOracle","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"oracleChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFeeRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"redeemFeeRateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newTreasury","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"treasuryChanged","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEE_COEFFICIENT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POOL_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collateralRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"executedShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sharesAmount","type":"uint256"}],"name":"getPooledSPCTByShares","outputs":[{"internalType":"uint256","name":"","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":"uint256","name":"_spctAmount","type":"uint256"}],"name":"getSharesByPooledSPCT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalPooledSPCT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxRedeemFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"contract ISPCTPriceOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemFeeRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueERC20","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":"uint256","name":"newMintFeeRate","type":"uint256"}],"name":"setMintFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOracle","type":"address"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRedeemFeeRate","type":"uint256"}],"name":"setRedeemFeeRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTreasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"sharesOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"spct","outputs":[{"internalType":"contract ISPCT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"switchMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPooledSPCT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_sharesAmount","type":"uint256"}],"name":"transferShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdc","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600b805460ff191690556001600e553480156200002057600080fd5b5060405162002c7938038062002c798339810160408190526200004391620001e0565b6040518060400160405280601481526020017f507269766174652043726564697420546f6b656e000000000000000000000000815250604051806040016040528060038152602001621410d560ea1b8152508160039081620000a69190620002ed565b506004620000b58282620002ed565b50506009805460ff1916905550620000cf60008562000114565b50601280546001600160a01b039485166001600160a01b03199182161790915560138054938516938216939093179092556014805491909316911617905550620003b9565b60008281526008602090815260408083206001600160a01b038516845290915281205460ff16620001bd5760008381526008602090815260408083206001600160a01b03861684529091529020805460ff19166001179055620001743390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001620001c1565b5060005b92915050565b6001600160a01b0381168114620001dd57600080fd5b50565b60008060008060808587031215620001f757600080fd5b84516200020481620001c7565b60208601519094506200021781620001c7565b60408601519093506200022a81620001c7565b60608601519092506200023d81620001c7565b939692955090935050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200027357607f821691505b6020821081036200029457634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002e857600081815260208120601f850160051c81016020861015620002c35750805b601f850160051c820191505b81811015620002e457828155600101620002cf565b5050505b505050565b81516001600160401b0381111562000309576200030962000248565b62000321816200031a84546200025e565b846200029a565b602080601f831160018114620003595760008415620003405750858301515b600019600386901b1c1916600185901b178555620002e4565b600085815260208120601f198616915b828110156200038a5788860151825594840194600190910190840162000369565b5085821015620003a95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6128b080620003c96000396000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c806370a0823111610167578063b6b55f25116100ce578063db006a7511610087578063db006a7514610547578063dd62ed3e1461055a578063eecadaac14610508578063f05a6b6d14610593578063f0f442601461059e578063f5eb42dc146105b157600080fd5b8063b6b55f25146104f5578063c2d24d4614610508578063c6a3541014610510578063d394d2d714610523578063d5002f2e1461052c578063d547741f1461053457600080fd5b806391d148541161012057806391d14854146104a457806395d89b41146104b7578063a217fddf146104bf578063a9059cbb146104c7578063b2118a8d146104da578063b5680cb5146104ed57600080fd5b806370a08231146104475780637adbf9731461045a5780637dc0d1d01461046d5780638456cb59146104805780638abb1eb4146104885780638fcb4e5b1461049157600080fd5b80632f2ff15d1161020b5780633f4ba83a116101c45780633f4ba83a146103fa57806356d73568146104025780635872e6fa1461041757806358a6be1c146104205780635c975abb1461042957806361d027b31461043457600080fd5b80632f2ff15d1461038c578063313ce5671461039f5780633143ab57146103ae57806336568abe146103c15780633bc7876b146103d45780633e413bee146103e757600080fd5b806318160ddd1161025d57806318160ddd1461031557806318819a311461032b57806321e822c51461033457806323b872dd14610349578063248a9ca31461035c578063295a52121461037f57600080fd5b806301ffc9a71461029a57806306fdde03146102c2578063090a1cc8146102d7578063095ea7b3146103025780630a70f31e14610315575b600080fd5b6102ad6102a83660046125bd565b6105c4565b60405190151581526020015b60405180910390f35b6102ca6105fb565b6040516102b9919061260b565b6013546102ea906001600160a01b031681565b6040516001600160a01b0390911681526020016102b9565b6102ad610310366004612653565b61068d565b61031d6106a5565b6040519081526020016102b9565b61031d600f5481565b61034761034236600461267f565b6106b4565b005b6102ad610357366004612698565b61076a565b61031d61036a36600461267f565b60009081526008602052604090206001015490565b600b546102ad9060ff1681565b61034761039a3660046126d9565b610790565b604051601281526020016102b9565b6103476103bc36600461267f565b6107bb565b6103476103cf3660046126d9565b610864565b61031d6103e236600461267f565b61089c565b6012546102ea906001600160a01b031681565b6103476108da565b61031d60008051602061285b83398151915281565b61031d60105481565b61031d600e5481565b60095460ff166102ad565b6011546102ea906001600160a01b031681565b61031d610455366004612709565b6108f0565b610347610468366004612709565b610912565b6014546102ea906001600160a01b031681565b6103476109c9565b61031d600d5481565b61031d61049f366004612653565b6109dc565b6102ad6104b23660046126d9565b610a02565b6102ca610a2d565b61031d600081565b6102ad6104d5366004612653565b610a3c565b6103476104e8366004612698565b610a4a565b610347610b53565b61034761050336600461267f565b610bb3565b61031d6110e8565b61031d61051e36600461267f565b6110fa565b61031d600c5481565b61031d61111d565b6103476105423660046126d9565b611128565b61034761055536600461267f565b61114d565b61031d610568366004612726565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61031d6305f5e10081565b6103476105ac366004612709565b6117c8565b61031d6105bf366004612709565b61187f565b60006001600160e01b03198216637965db0b60e01b14806105f557506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606003805461060a90612754565b80601f016020809104026020016040519081016040528092919081815260200182805461063690612754565b80156106835780601f1061065857610100808354040283529160200191610683565b820191906000526020600020905b81548152906001019060200180831161066657829003601f168201915b5050505050905090565b60003361069b81858561189d565b5060019392505050565b60006106af6118aa565b905090565b60008051602061285b8339815191526106cc8161191c565b6106db60646305f5e1006127a4565b8211156107285760405162461bcd60e51b8152602060048201526016602482015275053484f554c445f42455f4c4553535f5448414e5f31560541b60448201526064015b60405180910390fd5b6010829055604080518381524260208201527f8f54b89df9b6b65fd053b2b36d1e7a15e4573586a8bdf9517f5a133a4155436591015b60405180910390a15050565b600033610778858285611926565b61078385858561199e565b60019150505b9392505050565b6000828152600860205260409020600101546107ab8161191c565b6107b583836119c2565b50505050565b60008051602061285b8339815191526107d38161191c565b6107e260646305f5e1006127a4565b82111561082a5760405162461bcd60e51b8152602060048201526016602482015275053484f554c445f42455f4c4553535f5448414e5f31560541b604482015260640161071f565b600f829055604080518381524260208201527ff382d14f779bfe154a4731bacba578df6d53b0a5e26bdd328f98e2f314a34ce2910161075e565b6001600160a01b038116331461088d5760405163334bd91960e11b815260040160405180910390fd5b6108978282611a56565b505050565b6000806108a76118aa565b905080156108d1576108cc816108c66108bf60055490565b8690611ac3565b90611acf565b610789565b60009392505050565b60006108e58161191c565b6108ed611adb565b50565b6001600160a01b0381166000908152600660205260408120546105f5906110fa565b60008051602061285b83398151915261092a8161191c565b6001600160a01b0382166109765760405162461bcd60e51b815260206004820152601360248201527229a2aa2faaa82faa27afad22a927afa0a2222960691b604482015260640161071f565b601480546001600160a01b0319166001600160a01b038416908117909155604080519182524260208301527f17ca5b23a4d831c46a44e71d72130d938c0042fb3cb03c50fed5659af95b93cb910161075e565b60006109d48161191c565b6108ed611b2d565b60006109e9338484611b6a565b60006109f4836110fa565b905061078933858386611cda565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606004805461060a90612754565b60003361069b81858561199e565b60008051602061285b833981519152610a628161191c565b6013546001600160a01b0390811690851603610b3f57600d546013546040516370a0823160e01b8152306004820152610af092916001600160a01b0316906370a0823190602401602060405180830381865afa158015610ac6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aea91906127c6565b90611d7a565b821115610b3f5760405162461bcd60e51b815260206004820152601f60248201527f535043545f5245534355455f414d4f554e545f4558434545445f444542495400604482015260640161071f565b6107b56001600160a01b0385168484611d86565b6000610b5e8161191c565b600b805460ff8082161560ff1990921682179092556040805191909216151581524260208201527f5249de093342509ebd8180e72ef74423e0aec5cd03e3a822be3690761a6b688e910160405180910390a150565b610bbb611dd8565b610bc3611dfe565b610bcb611ef1565b600b5460ff1615610c1e5760405162461bcd60e51b815260206004820152601d60248201527f504c454153455f4d4947524154455f544f5f4e45575f56455253494f4e000000604482015260640161071f565b60008111610c675760405162461bcd60e51b81526020600482015260166024820152754445504f5349545f414d4f554e545f49535f5a45524f60501b604482015260640161071f565b326000908152600a6020526040902054439003610cbd5760405162461bcd60e51b8152602060048201526014602482015273232aa721aa24a7a72fa922a9aa2924a1aa24a7a760611b604482015260640161071f565b6012546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3891906127df565b5060125460135460405163095ea7b360e01b81526001600160a01b0391821660048201526024810184905291169063095ea7b3906044016020604051808303816000875af1158015610d8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db291906127df565b506000610dc48264e8d4a51000611ac3565b90506000601360009054906101000a90046001600160a01b03166001600160a01b03166318819a316040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3f91906127c6565b9050600f54600003610f535780600003610ec057610e5d3383611f6c565b60135460405163b6b55f2560e01b8152600481018590526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b158015610ea357600080fd5b505af1158015610eb7573d6000803e3d6000fd5b5050505061108c565b6000610ed46305f5e1006108c68585611ac3565b90506000610ee28483611d7a565b9050610eee3382611f6c565b60135460405163b6b55f2560e01b8152600481018790526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b158015610f3457600080fd5b505af1158015610f48573d6000803e3d6000fd5b50505050505061108c565b80600003610fb0576000610f7a6305f5e1006108c6600f5486611ac390919063ffffffff16565b90506000610f888483611d7a565b9050610f943382611f6c565b8115610eee57601154610eee906001600160a01b031683611f6c565b6000610fc46305f5e1006108c68585611ac3565b90506000610fd28483611d7a565b90506000610ff36305f5e1006108c6600f5485611ac390919063ffffffff16565b905060006110018383611d7a565b905061100d3382611f6c565b811561102957601154611029906001600160a01b031683611f6c565b60135460405163b6b55f2560e01b8152600481018990526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b15801561106f57600080fd5b505af1158015611083573d6000803e3d6000fd5b50505050505050505b326000908152600a6020526040908190204390555133907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15906110db9086904290918252602082015260400190565b60405180910390a2505050565b6110f760646305f5e1006127a4565b81565b60008061110660055490565b905080156108d1576108cc816108c66108bf6118aa565b60006106af60055490565b6000828152600860205260409020600101546111438161191c565b6107b58383611a56565b611155611dd8565b61115d611dfe565b611165611ef1565b806111ec64e8d4a51000601360009054906101000a90046001600160a01b03166001600160a01b031663664692f26040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e691906127c6565b90611ac3565b10156112315760405162461bcd60e51b8152602060048201526014602482015273149154d154959157d25394d551919250d251539560621b604482015260640161071f565b600081116112795760405162461bcd60e51b815260206004820152601560248201527452454445454d5f414d4f554e545f49535f5a45524f60581b604482015260640161071f565b326000908152600a60205260409020544390036112cf5760405162461bcd60e51b8152602060048201526014602482015273232aa721aa24a7a72fa922a9aa2924a1aa24a7a760611b604482015260640161071f565b600080601360009054906101000a90046001600160a01b03166001600160a01b0316635872e6fa6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611325573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134991906127c6565b905060105460000361157c5780600003611459576113673384612030565b60135460405163db006a7560e01b8152600481018590526001600160a01b039091169063db006a7590602401600060405180830381600087803b1580156113ad57600080fd5b505af11580156113c1573d6000803e3d6000fd5b505050506113dd64e8d4a5100084611acf90919063ffffffff16565b60125460405163a9059cbb60e01b8152336004820152602481018390529193506001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561142f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145391906127df565b50611779565b600061146d6305f5e1006108c68685611ac3565b9050600061147b8583611d7a565b90506114873386612030565b60135460405163db006a7560e01b8152600481018790526001600160a01b039091169063db006a75906024015b600060405180830381600087803b1580156114ce57600080fd5b505af11580156114e2573d6000803e3d6000fd5b505050506114fe64e8d4a5100082611acf90919063ffffffff16565b60125460405163a9059cbb60e01b8152336004820152602481018390529195506001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015611550573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157491906127df565b505050611779565b8060000361160c5760006115a36305f5e1006108c660105487611ac390919063ffffffff16565b905060006115b18583611d7a565b90506115bd3382612030565b81156115db576011546115db9033906001600160a01b03168461199e565b60135460405163db006a7560e01b8152600481018390526001600160a01b039091169063db006a75906024016114b4565b600061162b6305f5e1006108c660105487611ac390919063ffffffff16565b905060006116398583611d7a565b9050600061164f6305f5e1006108c68487611ac3565b9050600061165d8383611d7a565b90506116693384612030565b8315611687576011546116879033906001600160a01b03168661199e565b60135460405163db006a7560e01b8152600481018590526001600160a01b039091169063db006a7590602401600060405180830381600087803b1580156116cd57600080fd5b505af11580156116e1573d6000803e3d6000fd5b505050506116fd64e8d4a5100082611acf90919063ffffffff16565b60125460405163a9059cbb60e01b8152336004820152602481018390529197506001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561174f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177391906127df565b50505050505b326000908152600a6020526040908190204390555133907fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929906110db9086904290918252602082015260400190565b60008051602061285b8339815191526117e08161191c565b6001600160a01b03821661182c5760405162461bcd60e51b815260206004820152601360248201527229a2aa2faaa82faa27afad22a927afa0a2222960691b604482015260640161071f565b601180546001600160a01b0319166001600160a01b038416908117909155604080519182524260208301527f1fdffa12548b69c5bc7c41079dff9e9adcbcb7215c0d9cd1419b0730c39966b2910161075e565b6001600160a01b0381166000908152600660205260408120546105f5565b6108978383836001612128565b601354600c5460405163a9240e6560e01b815260048101919091526000916001600160a01b03169063a9240e6590602401602060405180830381865afa1580156118f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106af91906127c6565b6108ed81336121ef565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146107b5578181101561198f57604051637dc7a0d960e11b81526001600160a01b0384166004820152602481018290526044810183905260640161071f565b6107b584848484036000612128565b60006119a98261089c565b90506119b6848483611b6a565b6107b584848484611cda565b60006119ce8383610a02565b611a4e5760008381526008602090815260408083206001600160a01b03861684529091529020805460ff19166001179055611a063390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016105f5565b5060006105f5565b6000611a628383610a02565b15611a4e5760008381526008602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016105f5565b60006107898284612801565b600061078982846127a4565b611ae361222c565b6009805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b611b35611dd8565b6009805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b103390565b6001600160a01b038316611bc05760405162461bcd60e51b815260206004820152601e60248201527f5452414e534645525f46524f4d5f5448455f5a45524f5f414444524553530000604482015260640161071f565b6001600160a01b038216611c165760405162461bcd60e51b815260206004820152601c60248201527f5452414e534645525f544f5f5448455f5a45524f5f4144445245535300000000604482015260640161071f565b6001600160a01b03831660009081526006602052604090205480821115611c7f5760405162461bcd60e51b815260206004820152601f60248201527f5452414e534645525f414d4f554e545f455843454544535f42414c414e434500604482015260640161071f565b611c898183611d7a565b6001600160a01b038086166000908152600660205260408082209390935590851681522054611cb8908361224f565b6001600160a01b03909316600090815260066020526040902092909255505050565b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611d1f91815260200190565b60405180910390a3826001600160a01b0316846001600160a01b03167f9d9c909296d9c674451c0c24f02cb64981eb3b727f99865939192f880a755dcb83604051611d6c91815260200190565b60405180910390a350505050565b60006107898284612818565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261089790849061225b565b60095460ff1615611dfc5760405163d93c066560e01b815260040160405180910390fd5b565b600e5460145460408051634c6afee560e11b81529051670de0b6b3a7640000926001600160a01b0316916398d5fdca9160048083019260209291908290030181865afa158015611e52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7691906127c6565b611e8091906127a4565b1015611dfc57611e8e611b2d565b60405162461bcd60e51b815260206004820152603260248201527f554e4445525f434f4c4c41544552414c5f524154452c534d4152545f434f4e54604482015271524143545f49535f5041555345445f4e4f5760701b606482015260840161071f565b601354600c5460405163a9240e6560e01b81526001600160a01b039092169163a9240e6591611f269160040190815260200190565b602060405180830381865afa158015611f43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6791906127c6565b600d55565b6000611f778261089c565b905080600003611f845750805b611f8e83826122be565b50600c54611f9c908261224f565b600c55600d54611fac908361224f565b600d556040805183815242602082015233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a26040518281526001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a3505050565b600061203b8261089c565b9050600081116120855760405162461bcd60e51b81526020600482015260156024820152745348415245535f414d4f554e545f49535f5a45524f60581b604482015260640161071f565b61208f8382612369565b50600c5461209d9082611d7a565b600c55600d546120ad9083611d7a565b600d556040805183815242602082015233917f49995e5dd6158cf69ad3e9777c46755a1a826a446c6416992167462dad033b2a910160405180910390a26040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001612023565b6001600160a01b0384166121525760405163e602df0560e01b81526000600482015260240161071f565b6001600160a01b03831661217c57604051634a1406b160e11b81526000600482015260240161071f565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156107b557826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051611d6c91815260200190565b6121f98282610a02565b6122285760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161071f565b5050565b60095460ff16611dfc57604051638dfc202b60e01b815260040160405180910390fd5b6000610789828461282b565b60006122706001600160a01b038416836124bb565b9050805160001415801561229557508080602001905181019061229391906127df565b155b1561089757604051635274afe760e01b81526001600160a01b038416600482015260240161071f565b60006001600160a01b03831661230a5760405162461bcd60e51b815260206004820152601160248201527026a4a72a2faa27afad22a927afa0a2222960791b604482015260640161071f565b61231d8261231760055490565b9061224f565b60058190556001600160a01b038416600090815260066020526040902054909150612348908361224f565b6001600160a01b039093166000908152600660205260409020929092555090565b60006001600160a01b0383166123b75760405162461bcd60e51b8152602060048201526013602482015272212aa9272fa32927a6afad22a927afa0a2222960691b604482015260640161071f565b6001600160a01b038316600090815260066020526040902054808311156124135760405162461bcd60e51b815260206004820152601060248201526f109053105390d157d15610d15151115160821b604482015260640161071f565b600061241e846110fa565b905061242d84610aea60055490565b6005819055925061243e8285611d7a565b6001600160a01b038616600090815260066020526040812091909155612463856110fa565b60408051848152602081018390529081018790529091506001600160a01b038716907f8b2a1e1ad5e0578c3dd82494156e985dade827a87c573b5c1c7716a32162ad649060600160405180910390a250505092915050565b60606107898383600084600080856001600160a01b031684866040516124e1919061283e565b60006040518083038185875af1925050503d806000811461251e576040519150601f19603f3d011682016040523d82523d6000602084013e612523565b606091505b509150915061253386838361253d565b9695505050505050565b60608261254d576108cc82612594565b815115801561256457506001600160a01b0384163b155b1561258d57604051639996b31560e01b81526001600160a01b038516600482015260240161071f565b5080610789565b8051156125a45780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000602082840312156125cf57600080fd5b81356001600160e01b03198116811461078957600080fd5b60005b838110156126025781810151838201526020016125ea565b50506000910152565b602081526000825180602084015261262a8160408501602087016125e7565b601f01601f19169190910160400192915050565b6001600160a01b03811681146108ed57600080fd5b6000806040838503121561266657600080fd5b82356126718161263e565b946020939093013593505050565b60006020828403121561269157600080fd5b5035919050565b6000806000606084860312156126ad57600080fd5b83356126b88161263e565b925060208401356126c88161263e565b929592945050506040919091013590565b600080604083850312156126ec57600080fd5b8235915060208301356126fe8161263e565b809150509250929050565b60006020828403121561271b57600080fd5b81356107898161263e565b6000806040838503121561273957600080fd5b82356127448161263e565b915060208301356126fe8161263e565b600181811c9082168061276857607f821691505b60208210810361278857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000826127c157634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156127d857600080fd5b5051919050565b6000602082840312156127f157600080fd5b8151801515811461078957600080fd5b80820281158282048414176105f5576105f561278e565b818103818111156105f5576105f561278e565b808201808211156105f5576105f561278e565b600082516128508184602087016125e7565b919091019291505056fe6077685936c8169d09204a1d97db12e41713588c38e1d29a61867d3dcee98affa2646970667358221220c2d61060db0fb4465cced57a71428f5e690bcf24811a4152c43dd75b3688c4eb64736f6c6343000815003300000000000000000000000082e09977ced7de0f93548d89c227d2e1bf8f3337000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000ef5aacb3c38a5be7785a361008e27fb0328a62b5000000000000000000000000fd9d5d27ea03e7fd5d897f267518a8c396c7b483
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102955760003560e01c806370a0823111610167578063b6b55f25116100ce578063db006a7511610087578063db006a7514610547578063dd62ed3e1461055a578063eecadaac14610508578063f05a6b6d14610593578063f0f442601461059e578063f5eb42dc146105b157600080fd5b8063b6b55f25146104f5578063c2d24d4614610508578063c6a3541014610510578063d394d2d714610523578063d5002f2e1461052c578063d547741f1461053457600080fd5b806391d148541161012057806391d14854146104a457806395d89b41146104b7578063a217fddf146104bf578063a9059cbb146104c7578063b2118a8d146104da578063b5680cb5146104ed57600080fd5b806370a08231146104475780637adbf9731461045a5780637dc0d1d01461046d5780638456cb59146104805780638abb1eb4146104885780638fcb4e5b1461049157600080fd5b80632f2ff15d1161020b5780633f4ba83a116101c45780633f4ba83a146103fa57806356d73568146104025780635872e6fa1461041757806358a6be1c146104205780635c975abb1461042957806361d027b31461043457600080fd5b80632f2ff15d1461038c578063313ce5671461039f5780633143ab57146103ae57806336568abe146103c15780633bc7876b146103d45780633e413bee146103e757600080fd5b806318160ddd1161025d57806318160ddd1461031557806318819a311461032b57806321e822c51461033457806323b872dd14610349578063248a9ca31461035c578063295a52121461037f57600080fd5b806301ffc9a71461029a57806306fdde03146102c2578063090a1cc8146102d7578063095ea7b3146103025780630a70f31e14610315575b600080fd5b6102ad6102a83660046125bd565b6105c4565b60405190151581526020015b60405180910390f35b6102ca6105fb565b6040516102b9919061260b565b6013546102ea906001600160a01b031681565b6040516001600160a01b0390911681526020016102b9565b6102ad610310366004612653565b61068d565b61031d6106a5565b6040519081526020016102b9565b61031d600f5481565b61034761034236600461267f565b6106b4565b005b6102ad610357366004612698565b61076a565b61031d61036a36600461267f565b60009081526008602052604090206001015490565b600b546102ad9060ff1681565b61034761039a3660046126d9565b610790565b604051601281526020016102b9565b6103476103bc36600461267f565b6107bb565b6103476103cf3660046126d9565b610864565b61031d6103e236600461267f565b61089c565b6012546102ea906001600160a01b031681565b6103476108da565b61031d60008051602061285b83398151915281565b61031d60105481565b61031d600e5481565b60095460ff166102ad565b6011546102ea906001600160a01b031681565b61031d610455366004612709565b6108f0565b610347610468366004612709565b610912565b6014546102ea906001600160a01b031681565b6103476109c9565b61031d600d5481565b61031d61049f366004612653565b6109dc565b6102ad6104b23660046126d9565b610a02565b6102ca610a2d565b61031d600081565b6102ad6104d5366004612653565b610a3c565b6103476104e8366004612698565b610a4a565b610347610b53565b61034761050336600461267f565b610bb3565b61031d6110e8565b61031d61051e36600461267f565b6110fa565b61031d600c5481565b61031d61111d565b6103476105423660046126d9565b611128565b61034761055536600461267f565b61114d565b61031d610568366004612726565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61031d6305f5e10081565b6103476105ac366004612709565b6117c8565b61031d6105bf366004612709565b61187f565b60006001600160e01b03198216637965db0b60e01b14806105f557506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606003805461060a90612754565b80601f016020809104026020016040519081016040528092919081815260200182805461063690612754565b80156106835780601f1061065857610100808354040283529160200191610683565b820191906000526020600020905b81548152906001019060200180831161066657829003601f168201915b5050505050905090565b60003361069b81858561189d565b5060019392505050565b60006106af6118aa565b905090565b60008051602061285b8339815191526106cc8161191c565b6106db60646305f5e1006127a4565b8211156107285760405162461bcd60e51b8152602060048201526016602482015275053484f554c445f42455f4c4553535f5448414e5f31560541b60448201526064015b60405180910390fd5b6010829055604080518381524260208201527f8f54b89df9b6b65fd053b2b36d1e7a15e4573586a8bdf9517f5a133a4155436591015b60405180910390a15050565b600033610778858285611926565b61078385858561199e565b60019150505b9392505050565b6000828152600860205260409020600101546107ab8161191c565b6107b583836119c2565b50505050565b60008051602061285b8339815191526107d38161191c565b6107e260646305f5e1006127a4565b82111561082a5760405162461bcd60e51b8152602060048201526016602482015275053484f554c445f42455f4c4553535f5448414e5f31560541b604482015260640161071f565b600f829055604080518381524260208201527ff382d14f779bfe154a4731bacba578df6d53b0a5e26bdd328f98e2f314a34ce2910161075e565b6001600160a01b038116331461088d5760405163334bd91960e11b815260040160405180910390fd5b6108978282611a56565b505050565b6000806108a76118aa565b905080156108d1576108cc816108c66108bf60055490565b8690611ac3565b90611acf565b610789565b60009392505050565b60006108e58161191c565b6108ed611adb565b50565b6001600160a01b0381166000908152600660205260408120546105f5906110fa565b60008051602061285b83398151915261092a8161191c565b6001600160a01b0382166109765760405162461bcd60e51b815260206004820152601360248201527229a2aa2faaa82faa27afad22a927afa0a2222960691b604482015260640161071f565b601480546001600160a01b0319166001600160a01b038416908117909155604080519182524260208301527f17ca5b23a4d831c46a44e71d72130d938c0042fb3cb03c50fed5659af95b93cb910161075e565b60006109d48161191c565b6108ed611b2d565b60006109e9338484611b6a565b60006109f4836110fa565b905061078933858386611cda565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606004805461060a90612754565b60003361069b81858561199e565b60008051602061285b833981519152610a628161191c565b6013546001600160a01b0390811690851603610b3f57600d546013546040516370a0823160e01b8152306004820152610af092916001600160a01b0316906370a0823190602401602060405180830381865afa158015610ac6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aea91906127c6565b90611d7a565b821115610b3f5760405162461bcd60e51b815260206004820152601f60248201527f535043545f5245534355455f414d4f554e545f4558434545445f444542495400604482015260640161071f565b6107b56001600160a01b0385168484611d86565b6000610b5e8161191c565b600b805460ff8082161560ff1990921682179092556040805191909216151581524260208201527f5249de093342509ebd8180e72ef74423e0aec5cd03e3a822be3690761a6b688e910160405180910390a150565b610bbb611dd8565b610bc3611dfe565b610bcb611ef1565b600b5460ff1615610c1e5760405162461bcd60e51b815260206004820152601d60248201527f504c454153455f4d4947524154455f544f5f4e45575f56455253494f4e000000604482015260640161071f565b60008111610c675760405162461bcd60e51b81526020600482015260166024820152754445504f5349545f414d4f554e545f49535f5a45524f60501b604482015260640161071f565b326000908152600a6020526040902054439003610cbd5760405162461bcd60e51b8152602060048201526014602482015273232aa721aa24a7a72fa922a9aa2924a1aa24a7a760611b604482015260640161071f565b6012546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610d14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3891906127df565b5060125460135460405163095ea7b360e01b81526001600160a01b0391821660048201526024810184905291169063095ea7b3906044016020604051808303816000875af1158015610d8e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db291906127df565b506000610dc48264e8d4a51000611ac3565b90506000601360009054906101000a90046001600160a01b03166001600160a01b03166318819a316040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3f91906127c6565b9050600f54600003610f535780600003610ec057610e5d3383611f6c565b60135460405163b6b55f2560e01b8152600481018590526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b158015610ea357600080fd5b505af1158015610eb7573d6000803e3d6000fd5b5050505061108c565b6000610ed46305f5e1006108c68585611ac3565b90506000610ee28483611d7a565b9050610eee3382611f6c565b60135460405163b6b55f2560e01b8152600481018790526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b158015610f3457600080fd5b505af1158015610f48573d6000803e3d6000fd5b50505050505061108c565b80600003610fb0576000610f7a6305f5e1006108c6600f5486611ac390919063ffffffff16565b90506000610f888483611d7a565b9050610f943382611f6c565b8115610eee57601154610eee906001600160a01b031683611f6c565b6000610fc46305f5e1006108c68585611ac3565b90506000610fd28483611d7a565b90506000610ff36305f5e1006108c6600f5485611ac390919063ffffffff16565b905060006110018383611d7a565b905061100d3382611f6c565b811561102957601154611029906001600160a01b031683611f6c565b60135460405163b6b55f2560e01b8152600481018990526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b15801561106f57600080fd5b505af1158015611083573d6000803e3d6000fd5b50505050505050505b326000908152600a6020526040908190204390555133907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15906110db9086904290918252602082015260400190565b60405180910390a2505050565b6110f760646305f5e1006127a4565b81565b60008061110660055490565b905080156108d1576108cc816108c66108bf6118aa565b60006106af60055490565b6000828152600860205260409020600101546111438161191c565b6107b58383611a56565b611155611dd8565b61115d611dfe565b611165611ef1565b806111ec64e8d4a51000601360009054906101000a90046001600160a01b03166001600160a01b031663664692f26040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e691906127c6565b90611ac3565b10156112315760405162461bcd60e51b8152602060048201526014602482015273149154d154959157d25394d551919250d251539560621b604482015260640161071f565b600081116112795760405162461bcd60e51b815260206004820152601560248201527452454445454d5f414d4f554e545f49535f5a45524f60581b604482015260640161071f565b326000908152600a60205260409020544390036112cf5760405162461bcd60e51b8152602060048201526014602482015273232aa721aa24a7a72fa922a9aa2924a1aa24a7a760611b604482015260640161071f565b600080601360009054906101000a90046001600160a01b03166001600160a01b0316635872e6fa6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611325573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134991906127c6565b905060105460000361157c5780600003611459576113673384612030565b60135460405163db006a7560e01b8152600481018590526001600160a01b039091169063db006a7590602401600060405180830381600087803b1580156113ad57600080fd5b505af11580156113c1573d6000803e3d6000fd5b505050506113dd64e8d4a5100084611acf90919063ffffffff16565b60125460405163a9059cbb60e01b8152336004820152602481018390529193506001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561142f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145391906127df565b50611779565b600061146d6305f5e1006108c68685611ac3565b9050600061147b8583611d7a565b90506114873386612030565b60135460405163db006a7560e01b8152600481018790526001600160a01b039091169063db006a75906024015b600060405180830381600087803b1580156114ce57600080fd5b505af11580156114e2573d6000803e3d6000fd5b505050506114fe64e8d4a5100082611acf90919063ffffffff16565b60125460405163a9059cbb60e01b8152336004820152602481018390529195506001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015611550573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061157491906127df565b505050611779565b8060000361160c5760006115a36305f5e1006108c660105487611ac390919063ffffffff16565b905060006115b18583611d7a565b90506115bd3382612030565b81156115db576011546115db9033906001600160a01b03168461199e565b60135460405163db006a7560e01b8152600481018390526001600160a01b039091169063db006a75906024016114b4565b600061162b6305f5e1006108c660105487611ac390919063ffffffff16565b905060006116398583611d7a565b9050600061164f6305f5e1006108c68487611ac3565b9050600061165d8383611d7a565b90506116693384612030565b8315611687576011546116879033906001600160a01b03168661199e565b60135460405163db006a7560e01b8152600481018590526001600160a01b039091169063db006a7590602401600060405180830381600087803b1580156116cd57600080fd5b505af11580156116e1573d6000803e3d6000fd5b505050506116fd64e8d4a5100082611acf90919063ffffffff16565b60125460405163a9059cbb60e01b8152336004820152602481018390529197506001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561174f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177391906127df565b50505050505b326000908152600a6020526040908190204390555133907fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929906110db9086904290918252602082015260400190565b60008051602061285b8339815191526117e08161191c565b6001600160a01b03821661182c5760405162461bcd60e51b815260206004820152601360248201527229a2aa2faaa82faa27afad22a927afa0a2222960691b604482015260640161071f565b601180546001600160a01b0319166001600160a01b038416908117909155604080519182524260208301527f1fdffa12548b69c5bc7c41079dff9e9adcbcb7215c0d9cd1419b0730c39966b2910161075e565b6001600160a01b0381166000908152600660205260408120546105f5565b6108978383836001612128565b601354600c5460405163a9240e6560e01b815260048101919091526000916001600160a01b03169063a9240e6590602401602060405180830381865afa1580156118f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106af91906127c6565b6108ed81336121ef565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146107b5578181101561198f57604051637dc7a0d960e11b81526001600160a01b0384166004820152602481018290526044810183905260640161071f565b6107b584848484036000612128565b60006119a98261089c565b90506119b6848483611b6a565b6107b584848484611cda565b60006119ce8383610a02565b611a4e5760008381526008602090815260408083206001600160a01b03861684529091529020805460ff19166001179055611a063390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016105f5565b5060006105f5565b6000611a628383610a02565b15611a4e5760008381526008602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016105f5565b60006107898284612801565b600061078982846127a4565b611ae361222c565b6009805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b611b35611dd8565b6009805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b103390565b6001600160a01b038316611bc05760405162461bcd60e51b815260206004820152601e60248201527f5452414e534645525f46524f4d5f5448455f5a45524f5f414444524553530000604482015260640161071f565b6001600160a01b038216611c165760405162461bcd60e51b815260206004820152601c60248201527f5452414e534645525f544f5f5448455f5a45524f5f4144445245535300000000604482015260640161071f565b6001600160a01b03831660009081526006602052604090205480821115611c7f5760405162461bcd60e51b815260206004820152601f60248201527f5452414e534645525f414d4f554e545f455843454544535f42414c414e434500604482015260640161071f565b611c898183611d7a565b6001600160a01b038086166000908152600660205260408082209390935590851681522054611cb8908361224f565b6001600160a01b03909316600090815260066020526040902092909255505050565b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611d1f91815260200190565b60405180910390a3826001600160a01b0316846001600160a01b03167f9d9c909296d9c674451c0c24f02cb64981eb3b727f99865939192f880a755dcb83604051611d6c91815260200190565b60405180910390a350505050565b60006107898284612818565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261089790849061225b565b60095460ff1615611dfc5760405163d93c066560e01b815260040160405180910390fd5b565b600e5460145460408051634c6afee560e11b81529051670de0b6b3a7640000926001600160a01b0316916398d5fdca9160048083019260209291908290030181865afa158015611e52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7691906127c6565b611e8091906127a4565b1015611dfc57611e8e611b2d565b60405162461bcd60e51b815260206004820152603260248201527f554e4445525f434f4c4c41544552414c5f524154452c534d4152545f434f4e54604482015271524143545f49535f5041555345445f4e4f5760701b606482015260840161071f565b601354600c5460405163a9240e6560e01b81526001600160a01b039092169163a9240e6591611f269160040190815260200190565b602060405180830381865afa158015611f43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6791906127c6565b600d55565b6000611f778261089c565b905080600003611f845750805b611f8e83826122be565b50600c54611f9c908261224f565b600c55600d54611fac908361224f565b600d556040805183815242602082015233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a26040518281526001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a3505050565b600061203b8261089c565b9050600081116120855760405162461bcd60e51b81526020600482015260156024820152745348415245535f414d4f554e545f49535f5a45524f60581b604482015260640161071f565b61208f8382612369565b50600c5461209d9082611d7a565b600c55600d546120ad9083611d7a565b600d556040805183815242602082015233917f49995e5dd6158cf69ad3e9777c46755a1a826a446c6416992167462dad033b2a910160405180910390a26040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001612023565b6001600160a01b0384166121525760405163e602df0560e01b81526000600482015260240161071f565b6001600160a01b03831661217c57604051634a1406b160e11b81526000600482015260240161071f565b6001600160a01b03808516600090815260016020908152604080832093871683529290522082905580156107b557826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051611d6c91815260200190565b6121f98282610a02565b6122285760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440161071f565b5050565b60095460ff16611dfc57604051638dfc202b60e01b815260040160405180910390fd5b6000610789828461282b565b60006122706001600160a01b038416836124bb565b9050805160001415801561229557508080602001905181019061229391906127df565b155b1561089757604051635274afe760e01b81526001600160a01b038416600482015260240161071f565b60006001600160a01b03831661230a5760405162461bcd60e51b815260206004820152601160248201527026a4a72a2faa27afad22a927afa0a2222960791b604482015260640161071f565b61231d8261231760055490565b9061224f565b60058190556001600160a01b038416600090815260066020526040902054909150612348908361224f565b6001600160a01b039093166000908152600660205260409020929092555090565b60006001600160a01b0383166123b75760405162461bcd60e51b8152602060048201526013602482015272212aa9272fa32927a6afad22a927afa0a2222960691b604482015260640161071f565b6001600160a01b038316600090815260066020526040902054808311156124135760405162461bcd60e51b815260206004820152601060248201526f109053105390d157d15610d15151115160821b604482015260640161071f565b600061241e846110fa565b905061242d84610aea60055490565b6005819055925061243e8285611d7a565b6001600160a01b038616600090815260066020526040812091909155612463856110fa565b60408051848152602081018390529081018790529091506001600160a01b038716907f8b2a1e1ad5e0578c3dd82494156e985dade827a87c573b5c1c7716a32162ad649060600160405180910390a250505092915050565b60606107898383600084600080856001600160a01b031684866040516124e1919061283e565b60006040518083038185875af1925050503d806000811461251e576040519150601f19603f3d011682016040523d82523d6000602084013e612523565b606091505b509150915061253386838361253d565b9695505050505050565b60608261254d576108cc82612594565b815115801561256457506001600160a01b0384163b155b1561258d57604051639996b31560e01b81526001600160a01b038516600482015260240161071f565b5080610789565b8051156125a45780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6000602082840312156125cf57600080fd5b81356001600160e01b03198116811461078957600080fd5b60005b838110156126025781810151838201526020016125ea565b50506000910152565b602081526000825180602084015261262a8160408501602087016125e7565b601f01601f19169190910160400192915050565b6001600160a01b03811681146108ed57600080fd5b6000806040838503121561266657600080fd5b82356126718161263e565b946020939093013593505050565b60006020828403121561269157600080fd5b5035919050565b6000806000606084860312156126ad57600080fd5b83356126b88161263e565b925060208401356126c88161263e565b929592945050506040919091013590565b600080604083850312156126ec57600080fd5b8235915060208301356126fe8161263e565b809150509250929050565b60006020828403121561271b57600080fd5b81356107898161263e565b6000806040838503121561273957600080fd5b82356127448161263e565b915060208301356126fe8161263e565b600181811c9082168061276857607f821691505b60208210810361278857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b6000826127c157634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156127d857600080fd5b5051919050565b6000602082840312156127f157600080fd5b8151801515811461078957600080fd5b80820281158282048414176105f5576105f561278e565b818103818111156105f5576105f561278e565b808201808211156105f5576105f561278e565b600082516128508184602087016125e7565b919091019291505056fe6077685936c8169d09204a1d97db12e41713588c38e1d29a61867d3dcee98affa2646970667358221220c2d61060db0fb4465cced57a71428f5e690bcf24811a4152c43dd75b3688c4eb64736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000082e09977ced7de0f93548d89c227d2e1bf8f3337000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000ef5aacb3c38a5be7785a361008e27fb0328a62b5000000000000000000000000fd9d5d27ea03e7fd5d897f267518a8c396c7b483
-----Decoded View---------------
Arg [0] : admin (address): 0x82e09977ced7dE0F93548D89C227D2E1BF8F3337
Arg [1] : _usdc (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [2] : _spct (address): 0xEf5AAcB3c38a5Be7785a361008e27fb0328a62B5
Arg [3] : _oracle (address): 0xfD9D5D27Ea03e7Fd5D897F267518A8C396c7b483
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000082e09977ced7de0f93548d89c227d2e1bf8f3337
Arg [1] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [2] : 000000000000000000000000ef5aacb3c38a5be7785a361008e27fb0328a62b5
Arg [3] : 000000000000000000000000fd9d5d27ea03e7fd5d897f267518a8c396c7b483
Deployed Bytecode Sourcemap
496:12099:14:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2565:202:0;;;;;;:::i;:::-;;:::i;:::-;;;470:14:18;;463:22;445:41;;433:2;418:18;2565:202:0;;;;;;;;2074:89:3;;;:::i;:::-;;;;;;;:::i;1560:17:14:-;;;;;-1:-1:-1;;;;;1560:17:14;;;;;;-1:-1:-1;;;;;1331:32:18;;;1313:51;;1301:2;1286:18;1560:17:14;1153:217:18;4293:186:3;;;;;;:::i;:::-;;:::i;4125:105:13:-;;;:::i;:::-;;;1977:25:18;;;1965:2;1950:18;4125:105:13;1831:177:18;1346:26:14;;;;;;11012:286;;;;;;:::i;:::-;;:::i;:::-;;5039:244:3;;;;;;:::i;:::-;;:::i;3810:120:0:-;;;;;;:::i;:::-;3875:7;3901:12;;;:6;:12;;;;;:22;;;;3810:120;830:24:14;;;;;;;;;4226:136:0;;;;;;:::i;:::-;;:::i;3520:83:13:-;;;3594:2;3488:36:18;;3476:2;3461:18;3520:83:13;3346:184:18;10634:270:14;;;;;;:::i;:::-;;:::i;5328:245:0:-;;;;;;:::i;:::-;;:::i;5269::13:-;;;;;;:::i;:::-;;:::i;1512:18:14:-;;;;;-1:-1:-1;;;;;1512:18:14;;;3362:84;;;:::i;616:74::-;;-1:-1:-1;;;;;;;;;;;616:74:14;;1378:28;;;;;;1066:33;;;;;;1850:84:10;1920:7;;;;1850:84;;1464:23:14;;;;;-1:-1:-1;;;;;1464:23:14;;;4469:142:13;;;;;;:::i;:::-;;:::i;11754:249:14:-;;;;;;:::i;:::-;;:::i;1603:30::-;;;;;-1:-1:-1;;;;;1603:30:14;;;3195:80;;;:::i;988:30::-;;;;;;6401:345:13;;;;;;:::i;:::-;;:::i;2854:136:0:-;;;;;;:::i;:::-;;:::i;2276:93:3:-;;;:::i;2187:49:0:-;;2232:4;2187:49;;3610:178:3;;;;;;:::i;:::-;;:::i;12215:378:14:-;;;;;;:::i;:::-;;:::i;3543:137::-;;;:::i;3858:2288::-;;;;;;:::i;:::-;;:::i;1208:62::-;;;:::i;5620:255:13:-;;;;;;:::i;:::-;;:::i;909:29:14:-;;;;;;4866:97:13;;;:::i;4642:138:0:-;;;;;;:::i;:::-;;:::i;6350:2594:14:-;;;;;;:::i;:::-;;:::i;3846:140:3:-;;;;;;:::i;:::-;-1:-1:-1;;;;;3952:18:3;;;3926:7;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;3846:140;1122:45:14;;1164:3;1122:45;;11408:242;;;;;;:::i;:::-;;:::i;5042:111:13:-;;;;;;:::i;:::-;;:::i;2565:202:0:-;2650:4;-1:-1:-1;;;;;;2673:47:0;;-1:-1:-1;;;2673:47:0;;:87;;-1:-1:-1;;;;;;;;;;861:40:11;;;2724:36:0;2666:94;2565:202;-1:-1:-1;;2565:202:0:o;2074:89:3:-;2119:13;2151:5;2144:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2074:89;:::o;4293:186::-;4366:4;735:10:9;4420:31:3;735:10:9;4436:7:3;4445:5;4420:8;:31::i;:::-;-1:-1:-1;4468:4:3;;4293:186;-1:-1:-1;;;4293:186:3:o;4125:105:13:-;4176:7;4202:21;:19;:21::i;:::-;4195:28;;4125:105;:::o;11012:286:14:-;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;1319:21:14::1;1337:3;1164;1319:21;:::i;:::-;11119:16;:36;;11111:71;;;::::0;-1:-1:-1;;;11111:71:14;;6261:2:18;11111:71:14::1;::::0;::::1;6243:21:18::0;6300:2;6280:18;;;6273:30;-1:-1:-1;;;6319:18:18;;;6312:52;6381:18;;11111:71:14::1;;;;;;;;;11192:13;:32:::0;;;11239:52:::1;::::0;;6584:25:18;;;11275:15:14::1;6640:2:18::0;6625:18;;6618:34;11239:52:14::1;::::0;6557:18:18;11239:52:14::1;;;;;;;;11012:286:::0;;:::o;5039:244:3:-;5126:4;735:10:9;5182:37:3;5198:4;735:10:9;5213:5:3;5182:15;:37::i;:::-;5229:26;5239:4;5245:2;5249:5;5229:9;:26::i;:::-;5272:4;5265:11;;;5039:244;;;;;;:::o;4226:136:0:-;3875:7;3901:12;;;:6;:12;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4330:25:::1;4341:4;4347:7;4330:10;:25::i;:::-;;4226:136:::0;;;:::o;10634:270:14:-;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;1249:21:14::1;1267:3;1164;1249:21;:::i;:::-;10737:14;:32;;10729:67;;;::::0;-1:-1:-1;;;10729:67:14;;6261:2:18;10729:67:14::1;::::0;::::1;6243:21:18::0;6300:2;6280:18;;;6273:30;-1:-1:-1;;;6319:18:18;;;6312:52;6381:18;;10729:67:14::1;6059:346:18::0;10729:67:14::1;10806:11;:28:::0;;;10849:48:::1;::::0;;6584:25:18;;;10881:15:14::1;6640:2:18::0;6625:18;;6618:34;10849:48:14::1;::::0;6557:18:18;10849:48:14::1;6410:248:18::0;5328:245:0;-1:-1:-1;;;;;5421:34:0;;735:10:9;5421:34:0;5417:102;;5478:30;;-1:-1:-1;;;5478:30:0;;;;;;;;;;;5417:102;5529:37;5541:4;5547:18;5529:11;:37::i;:::-;;5328:245;;:::o;5269::13:-;5342:7;5361:23;5387:21;:19;:21::i;:::-;5361:47;-1:-1:-1;5425:20:13;;:82;;5452:55;5491:15;5452:34;5468:17;7662:12;;;7586:95;5468:17;5452:11;;:15;:34::i;:::-;:38;;:55::i;:::-;5425:82;;;5448:1;5418:89;5269:245;-1:-1:-1;;;5269:245:13:o;3362:84:14:-;2232:4:0;2464:16;2232:4;2464:10;:16::i;:::-;3429:10:14::1;:8;:10::i;:::-;3362:84:::0;:::o;4469:142:13:-;-1:-1:-1;;;;;7846:17:13;;4536:7;7846:17;;;:7;:17;;;;;;4562:42;;5620:255;:::i;11754:249:14:-;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;-1:-1:-1;;;;;11847:23:14;::::1;11839:55;;;::::0;-1:-1:-1;;;11839:55:14;;6865:2:18;11839:55:14::1;::::0;::::1;6847:21:18::0;6904:2;6884:18;;;6877:30;-1:-1:-1;;;6923:18:18;;;6916:49;6982:18;;11839:55:14::1;6663:343:18::0;11839:55:14::1;11904:6;:36:::0;;-1:-1:-1;;;;;;11904:36:14::1;-1:-1:-1::0;;;;;11904:36:14;::::1;::::0;;::::1;::::0;;;11955:41:::1;::::0;;7185:51:18;;;11980:15:14::1;7267:2:18::0;7252:18;;7245:34;11955:41:14::1;::::0;7158:18:18;11955:41:14::1;7011:274:18::0;3195:80:14;2232:4:0;2464:16;2232:4;2464:10;:16::i;:::-;3260:8:14::1;:6;:8::i;6401:345:13:-:0;6486:7;6505:54;6521:10;6533;6545:13;6505:15;:54::i;:::-;6569:20;6592:36;6614:13;6592:21;:36::i;:::-;6569:59;;6638:72;6658:10;6670;6682:12;6696:13;6638:19;:72::i;2854:136:0:-;2931:4;2954:12;;;:6;:12;;;;;;;;-1:-1:-1;;;;;2954:29:0;;;;;;;;;;;;;;;2854:136::o;2276:93:3:-;2323:13;2355:7;2348:14;;;;;:::i;3610:178::-;3679:4;735:10:9;3733:27:3;735:10:9;3750:2:3;3754:5;3733:9;:27::i;12215:378:14:-;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;12411:4:14::1;::::0;-1:-1:-1;;;;;12411:4:14;;::::1;12385:31:::0;;::::1;::::0;12381:166:::1;;12484:15;::::0;12450:4:::1;::::0;:29:::1;::::0;-1:-1:-1;;;12450:29:14;;12473:4:::1;12450:29;::::0;::::1;1313:51:18::0;12450:50:14::1;::::0;12484:15;-1:-1:-1;;;;;12450:4:14::1;::::0;:14:::1;::::0;1286:18:18;;12450:29:14::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:33:::0;::::1;:50::i;:::-;12440:6;:60;;12432:104;;;::::0;-1:-1:-1;;;12432:104:14;;7681:2:18;12432:104:14::1;::::0;::::1;7663:21:18::0;7720:2;7700:18;;;7693:30;7759:33;7739:18;;;7732:61;7810:18;;12432:104:14::1;7479:355:18::0;12432:104:14::1;12556:30;-1:-1:-1::0;;;;;12556:18:14;::::1;12575:2:::0;12579:6;12556:18:::1;:30::i;3543:137::-:0;2232:4:0;2464:16;2232:4;2464:10;:16::i;:::-;3621:4:14::1;::::0;;::::1;::::0;;::::1;3620:5;-1:-1:-1::0;;3613:12:14;;::::1;::::0;::::1;::::0;;;3640:33:::1;::::0;;3651:4;;;;8032:14:18;8025:22;8007:41;;3657:15:14::1;8079:2:18::0;8064:18;;8057:34;3640:33:14::1;::::0;7980:18:18;3640:33:14::1;;;;;;;3543:137:::0;:::o;3858:2288::-;1474:19:10;:17;:19::i;:::-;2562:22:14::1;:20;:22::i;:::-;2643:16:::2;:14;:16::i;:::-;3967:4:::3;::::0;::::3;;:13;3959:55;;;::::0;-1:-1:-1;;;3959:55:14;;8304:2:18;3959:55:14::3;::::0;::::3;8286:21:18::0;8343:2;8323:18;;;8316:30;8382:31;8362:18;;;8355:59;8431:18;;3959:55:14::3;8102:353:18::0;3959:55:14::3;4042:1;4032:7;:11;4024:46;;;::::0;-1:-1:-1;;;4024:46:14;;8662:2:18;4024:46:14::3;::::0;::::3;8644:21:18::0;8701:2;8681:18;;;8674:30;-1:-1:-1;;;8720:18:18;;;8713:52;8782:18;;4024:46:14::3;8460:346:18::0;4024:46:14::3;4096:9;4088:18;::::0;;;:7:::3;:18;::::0;;;;;4110:12:::3;4088:34:::0;;4080:67:::3;;;::::0;-1:-1:-1;;;4080:67:14;;9013:2:18;4080:67:14::3;::::0;::::3;8995:21:18::0;9052:2;9032:18;;;9025:30;-1:-1:-1;;;9071:18:18;;;9064:50;9131:18;;4080:67:14::3;8811:344:18::0;4080:67:14::3;4158:4;::::0;:53:::3;::::0;-1:-1:-1;;;4158:53:14;;4176:10:::3;4158:53;::::0;::::3;9400:34:18::0;4196:4:14::3;9450:18:18::0;;;9443:43;9502:18;;;9495:34;;;-1:-1:-1;;;;;4158:4:14;;::::3;::::0;:17:::3;::::0;9335:18:18;;4158:53:14::3;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;4221:4:14::3;::::0;4242::::3;::::0;4221:36:::3;::::0;-1:-1:-1;;;4221:36:14;;-1:-1:-1;;;;;4242:4:14;;::::3;4221:36;::::0;::::3;7185:51:18::0;7252:18;;;7245:34;;;4221:4:14;::::3;::::0;:12:::3;::::0;7158:18:18;;4221:36:14::3;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;4364:21:14::3;4388:17;:7:::0;4400:4:::3;4388:11;:17::i;:::-;4364:41;;4467:23;4493:4;;;;;;;;;-1:-1:-1::0;;;;;4493:4:14::3;-1:-1:-1::0;;;;;4493:16:14::3;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4467:44;;4560:11;;4575:1;4560:16:::0;4556:1480:::3;;4596:15;4615:1;4596:20:::0;4592:430:::3;;4636:35;4645:10;4657:13;4636:8;:35::i;:::-;4690:4;::::0;:21:::3;::::0;-1:-1:-1;;;4690:21:14;;::::3;::::0;::::3;1977:25:18::0;;;-1:-1:-1;;;;;4690:4:14;;::::3;::::0;:12:::3;::::0;1950:18:18;;4690:21:14::3;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;4556:1480;;4592:430;4750:21;4774:55;1164:3;4774:34;:13:::0;4792:15;4774:17:::3;:34::i;:55::-;4750:79:::0;-1:-1:-1;4847:26:14::3;4876:32;:13:::0;4750:79;4876:17:::3;:32::i;:::-;4847:61;;4927:40;4936:10;4948:18;4927:8;:40::i;:::-;4986:4;::::0;:21:::3;::::0;-1:-1:-1;;;4986:21:14;;::::3;::::0;::::3;1977:25:18::0;;;-1:-1:-1;;;;;4986:4:14;;::::3;::::0;:12:::3;::::0;1950:18:18;;4986:21:14::3;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;4732:290;;4556:1480;;;5056:15;5075:1;5056:20:::0;5052:974:::3;;5096:17;5116:51;1164:3;5116:30;5134:11;;5116:13;:17;;:30;;;;:::i;:51::-;5096:71:::0;-1:-1:-1;5185:22:14::3;5210:28;:13:::0;5096:71;5210:17:::3;:28::i;:::-;5185:53;;5257:36;5266:10;5278:14;5257:8;:36::i;:::-;5316:14:::0;;5312:90:::3;;5363:8;::::0;5354:29:::3;::::0;-1:-1:-1;;;;;5363:8:14::3;5373:9:::0;5354:8:::3;:29::i;5052:974::-;5480:21;5504:55;1164:3;5504:34;:13:::0;5522:15;5504:17:::3;:34::i;:55::-;5480:79:::0;-1:-1:-1;5577:26:14::3;5606:32;:13:::0;5480:79;5606:17:::3;:32::i;:::-;5577:61;;5656:17;5676:56;1164:3;5676:35;5699:11;;5676:18;:22;;:35;;;;:::i;:56::-;5656:76:::0;-1:-1:-1;5750:22:14::3;5775:33;:18:::0;5656:76;5775:22:::3;:33::i;:::-;5750:58;;5827:36;5836:10;5848:14;5827:8;:36::i;:::-;5886:14:::0;;5882:90:::3;;5933:8;::::0;5924:29:::3;::::0;-1:-1:-1;;;;;5933:8:14::3;5943:9:::0;5924:8:::3;:29::i;:::-;5990:4;::::0;:21:::3;::::0;-1:-1:-1;;;5990:21:14;;::::3;::::0;::::3;1977:25:18::0;;;-1:-1:-1;;;;;5990:4:14;;::::3;::::0;:12:::3;::::0;1950:18:18;;5990:21:14::3;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;5462:564;;;;5052:974;6054:9;6046:18;::::0;;;:7:::3;:18;::::0;;;;;;6067:12:::3;6046:33:::0;;6094:45;6102:10:::3;::::0;6094:45:::3;::::0;::::3;::::0;6114:7;;6123:15:::3;::::0;6584:25:18;;;6640:2;6625:18;;6618:34;6572:2;6557:18;;6410:248;6094:45:14::3;;;;;;;;3949:2197;;3858:2288:::0;:::o;1208:62::-;1249:21;1267:3;1164;1249:21;:::i;:::-;1208:62;:::o;5620:255:13:-;5695:7;5714:25;5742:17;7662:12;;;7586:95;5742:17;5714:45;-1:-1:-1;5776:22:13;;:92;;5805:63;5850:17;5805:40;5823:21;:19;:21::i;4866:97::-;4913:7;4939:17;7662:12;;;7586:95;4642:138:0;3875:7;3901:12;;;:6;:12;;;;;:22;;;2464:16;2475:4;2464:10;:16::i;:::-;4747:26:::1;4759:4;4765:7;4747:11;:26::i;6350:2594:14:-:0;1474:19:10;:17;:19::i;:::-;2562:22:14::1;:20;:22::i;:::-;2643:16:::2;:14;:16::i;:::-;6489:7:::3;6458:27;6480:4;6458;;;;;;;;;-1:-1:-1::0;;;;;6458:4:14::3;-1:-1:-1::0;;;;;6458:15:14::3;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:21:::0;::::3;:27::i;:::-;:38;;6450:71;;;::::0;-1:-1:-1;;;6450:71:14;;10024:2:18;6450:71:14::3;::::0;::::3;10006:21:18::0;10063:2;10043:18;;;10036:30;-1:-1:-1;;;10082:18:18;;;10075:50;10142:18;;6450:71:14::3;9822:344:18::0;6450:71:14::3;6549:1;6539:7;:11;6531:45;;;::::0;-1:-1:-1;;;6531:45:14;;10373:2:18;6531:45:14::3;::::0;::::3;10355:21:18::0;10412:2;10392:18;;;10385:30;-1:-1:-1;;;10431:18:18;;;10424:51;10492:18;;6531:45:14::3;10171:345:18::0;6531:45:14::3;6602:9;6594:18;::::0;;;:7:::3;:18;::::0;;;;;6616:12:::3;6594:34:::0;;6586:67:::3;;;::::0;-1:-1:-1;;;6586:67:14;;9013:2:18;6586:67:14::3;::::0;::::3;8995:21:18::0;9052:2;9032:18;;;9025:30;-1:-1:-1;;;9071:18:18;;;9064:50;9131:18;;6586:67:14::3;8811:344:18::0;6586:67:14::3;6723:21;6808:25:::0;6836:4:::3;;;;;;;;;-1:-1:-1::0;;;;;6836:4:14::3;-1:-1:-1::0;;;;;6836:18:14::3;;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6808:48;;6905:13;;6922:1;6905:18:::0;6901:1934:::3;;6943:17;6964:1;6943:22:::0;6939:632:::3;;6985:29;6994:10;7006:7;6985:8;:29::i;:::-;7033:4;::::0;:20:::3;::::0;-1:-1:-1;;;7033:20:14;;::::3;::::0;::::3;1977:25:18::0;;;-1:-1:-1;;;;;7033:4:14;;::::3;::::0;:11:::3;::::0;1950:18:18;;7033:20:14::3;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;7087:17;7099:4;7087:7;:11;;:17;;;;:::i;:::-;7122:4;::::0;:40:::3;::::0;-1:-1:-1;;;7122:40:14;;7136:10:::3;7122:40;::::0;::::3;7185:51:18::0;7252:18;;;7245:34;;;7071:33:14;;-1:-1:-1;;;;;;7122:4:14::3;::::0;:13:::3;::::0;7158:18:18;;7122:40:14::3;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;6901:1934;;6939:632;7201:21;7225:51;1164:3;7225:30;:7:::0;7237:17;7225:11:::3;:30::i;:51::-;7201:75:::0;-1:-1:-1;7294:26:14::3;7323;:7:::0;7201:75;7323:11:::3;:26::i;:::-;7294:55;;7368:29;7377:10;7389:7;7368:8;:29::i;:::-;7416:4;::::0;:20:::3;::::0;-1:-1:-1;;;7416:20:14;;::::3;::::0;::::3;1977:25:18::0;;;-1:-1:-1;;;;;7416:4:14;;::::3;::::0;:11:::3;::::0;1950:18:18;;7416:20:14::3;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;7470:28;7493:4;7470:18;:22;;:28;;;;:::i;:::-;7516:4;::::0;:40:::3;::::0;-1:-1:-1;;;7516:40:14;;7530:10:::3;7516:40;::::0;::::3;7185:51:18::0;7252:18;;;7245:34;;;7454:44:14;;-1:-1:-1;;;;;;7516:4:14::3;::::0;:13:::3;::::0;7158:18:18;;7516:40:14::3;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;7183:388;;6901:1934;;;7605:17;7626:1;7605:22:::0;7601:1224:::3;;7647:17;7667:47;1164:3;7667:26;7679:13;;7667:7;:11;;:26;;;;:::i;:47::-;7647:67:::0;-1:-1:-1;7732:22:14::3;7757;:7:::0;7647:67;7757:11:::3;:22::i;:::-;7732:47;;7798:36;7807:10;7819:14;7798:8;:36::i;:::-;7857:14:::0;;7853:103:::3;;7917:8;::::0;7895:42:::3;::::0;7905:10:::3;::::0;-1:-1:-1;;;;;7917:8:14::3;7927:9:::0;7895::::3;:42::i;:::-;7974:4;::::0;:27:::3;::::0;-1:-1:-1;;;7974:27:14;;::::3;::::0;::::3;1977:25:18::0;;;-1:-1:-1;;;;;7974:4:14;;::::3;::::0;:11:::3;::::0;1950:18:18;;7974:27:14::3;1831:177:18::0;7601:1224:14::3;8156:17;8176:47;1164:3;8176:26;8188:13;;8176:7;:11;;:26;;;;:::i;:47::-;8156:67:::0;-1:-1:-1;8241:22:14::3;8266;:7:::0;8156:67;8266:11:::3;:22::i;:::-;8241:47:::0;-1:-1:-1;8306:21:14::3;8330:58;1164:3;8330:37;8241:47:::0;8349:17;8330:18:::3;:37::i;:58::-;8306:82:::0;-1:-1:-1;8406:26:14::3;8435:33;:14:::0;8306:82;8435:18:::3;:33::i;:::-;8406:62;;8487:36;8496:10;8508:14;8487:8;:36::i;:::-;8546:14:::0;;8542:103:::3;;8606:8;::::0;8584:42:::3;::::0;8594:10:::3;::::0;-1:-1:-1;;;;;8606:8:14::3;8616:9:::0;8584::::3;:42::i;:::-;8663:4;::::0;:27:::3;::::0;-1:-1:-1;;;8663:27:14;;::::3;::::0;::::3;1977:25:18::0;;;-1:-1:-1;;;;;8663:4:14;;::::3;::::0;:11:::3;::::0;1950:18:18;;8663:27:14::3;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;8724:28;8747:4;8724:18;:22;;:28;;;;:::i;:::-;8770:4;::::0;:40:::3;::::0;-1:-1:-1;;;8770:40:14;;8784:10:::3;8770:40;::::0;::::3;7185:51:18::0;7252:18;;;7245:34;;;8708:44:14;;-1:-1:-1;;;;;;8770:4:14::3;::::0;:13:::3;::::0;7158:18:18;;8770:40:14::3;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;8138:687;;;;7601:1224;8853:9;8845:18;::::0;;;:7:::3;:18;::::0;;;;;;8866:12:::3;8845:33:::0;;8893:44;8900:10:::3;::::0;8893:44:::3;::::0;::::3;::::0;8912:7;;8921:15:::3;::::0;6584:25:18;;;6640:2;6625:18;;6618:34;6572:2;6557:18;;6410:248;11408:242:14;-1:-1:-1;;;;;;;;;;;2464:16:0;2475:4;2464:10;:16::i;:::-;-1:-1:-1;;;;;11505:25:14;::::1;11497:57;;;::::0;-1:-1:-1;;;11497:57:14;;6865:2:18;11497:57:14::1;::::0;::::1;6847:21:18::0;6904:2;6884:18;;;6877:30;-1:-1:-1;;;6923:18:18;;;6916:49;6982:18;;11497:57:14::1;6663:343:18::0;11497:57:14::1;11564:8;:22:::0;;-1:-1:-1;;;;;;11564:22:14::1;-1:-1:-1::0;;;;;11564:22:14;::::1;::::0;;::::1;::::0;;;11601:42:::1;::::0;;7185:51:18;;;11627:15:14::1;7267:2:18::0;7252:18;;7245:34;11601:42:14::1;::::0;7158:18:18;11601:42:14::1;7011:274:18::0;5042:111:13;-1:-1:-1;;;;;7846:17:13;;5101:7;7846:17;;;:7;:17;;;;;;5127:19;7760:110;8997:128:3;9081:37;9090:5;9097:7;9106:5;9113:4;9081:8;:37::i;9000:137:14:-;9089:4;;9115:14;;9089:41;;-1:-1:-1;;;9089:41:14;;;;;1977:25:18;;;;9063:7:14;;-1:-1:-1;;;;;9089:4:14;;:25;;1950:18:18;;9089:41:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;3199:103:0:-;3265:30;3276:4;735:10:9;3265::0;:30::i;10671:477:3:-;-1:-1:-1;;;;;3952:18:3;;;10770:24;3952:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;10836:37:3;;10832:310;;10912:5;10893:16;:24;10889:130;;;10944:60;;-1:-1:-1;;;10944:60:3;;-1:-1:-1;;;;;10741:32:18;;10944:60:3;;;10723:51:18;10790:18;;;10783:34;;;10833:18;;;10826:34;;;10696:18;;10944:60:3;10521:345:18;10889:130:3;11060:57;11069:5;11076:7;11104:5;11085:16;:24;11111:5;11060:8;:57::i;7199:309:13:-;7300:25;7328:30;7350:7;7328:21;:30::i;:::-;7300:58;;7368:55;7384:7;7393:10;7405:17;7368:15;:55::i;:::-;7433:68;7453:7;7462:10;7474:7;7483:17;7433:19;:68::i;6179:316:0:-;6256:4;6277:22;6285:4;6291:7;6277;:22::i;:::-;6272:217;;6315:12;;;;:6;:12;;;;;;;;-1:-1:-1;;;;;6315:29:0;;;;;;;;;:36;;-1:-1:-1;;6315:36:0;6347:4;6315:36;;;6397:12;735:10:9;;656:96;6397:12:0;-1:-1:-1;;;;;6370:40:0;6388:7;-1:-1:-1;;;;;6370:40:0;6382:4;6370:40;;;;;;;;;;-1:-1:-1;6431:4:0;6424:11;;6272:217;-1:-1:-1;6473:5:0;6466:12;;6730:317;6808:4;6828:22;6836:4;6842:7;6828;:22::i;:::-;6824:217;;;6898:5;6866:12;;;:6;:12;;;;;;;;-1:-1:-1;;;;;6866:29:0;;;;;;;;;;:37;;-1:-1:-1;;6866:37:0;;;6922:40;735:10:9;;6866:12:0;;6922:40;;6898:5;6922:40;-1:-1:-1;6983:4:0;6976:11;;3465:96:17;3523:7;3549:5;3553:1;3549;:5;:::i;3850:96::-;3908:7;3934:5;3938:1;3934;:5;:::i;2710:117:10:-;1721:16;:14;:16::i;:::-;2768:7:::1;:15:::0;;-1:-1:-1;;2768:15:10::1;::::0;;2798:22:::1;735:10:9::0;2807:12:10::1;2798:22;::::0;-1:-1:-1;;;;;1331:32:18;;;1313:51;;1301:2;1286:18;2798:22:10::1;;;;;;;2710:117::o:0;2463:115::-;1474:19;:17;:19::i;:::-;2522:7:::1;:14:::0;;-1:-1:-1;;2522:14:10::1;2532:4;2522:14;::::0;;2551:20:::1;2558:12;735:10:9::0;;656:96;8204:535:13;-1:-1:-1;;;;;8316:21:13;;8308:64;;;;-1:-1:-1;;;8308:64:13;;11246:2:18;8308:64:13;;;11228:21:18;11285:2;11265:18;;;11258:30;11324:32;11304:18;;;11297:60;11374:18;;8308:64:13;11044:354:18;8308:64:13;-1:-1:-1;;;;;8390:24:13;;8382:65;;;;-1:-1:-1;;;8382:65:13;;11605:2:18;8382:65:13;;;11587:21:18;11644:2;11624:18;;;11617:30;11683;11663:18;;;11656:58;11731:18;;8382:65:13;11403:352:18;8382:65:13;-1:-1:-1;;;;;8488:16:13;;8458:27;8488:16;;;:7;:16;;;;;;8522:36;;;;8514:80;;;;-1:-1:-1;;;8514:80:13;;11962:2:18;8514:80:13;;;11944:21:18;12001:2;11981:18;;;11974:30;12040:33;12020:18;;;12013:61;12091:18;;8514:80:13;11760:355:18;8514:80:13;8624:38;:19;8648:13;8624:23;:38::i;:::-;-1:-1:-1;;;;;8605:16:13;;;;;;;:7;:16;;;;;;:57;;;;8694:19;;;;;;;:38;;8718:13;8694:23;:38::i;:::-;-1:-1:-1;;;;;8672:19:13;;;;;;;:7;:19;;;;;:60;;;;-1:-1:-1;;;8204:535:13:o;11843:223::-;11985:3;-1:-1:-1;;;;;11969:34:13;11978:5;-1:-1:-1;;;;;11969:34:13;;11990:12;11969:34;;;;1977:25:18;;1965:2;1950:18;;1831:177;11969:34:13;;;;;;;;12040:3;-1:-1:-1;;;;;12018:41:13;12033:5;-1:-1:-1;;;;;12018:41:13;;12045:13;12018:41;;;;1977:25:18;;1965:2;1950:18;;1831:177;12018:41:13;;;;;;;;11843:223;;;;:::o;3122:96:17:-;3180:7;3206:5;3210:1;3206;:5;:::i;1303:160:7:-;1412:43;;;-1:-1:-1;;;;;7203:32:18;;1412:43:7;;;7185:51:18;7252:18;;;;7245:34;;;1412:43:7;;;;;;;;;;7158:18:18;;;;1412:43:7;;;;;;;;-1:-1:-1;;;;;1412:43:7;-1:-1:-1;;;1412:43:7;;;1385:71;;1405:5;;1385:19;:71::i;2002:128:10:-;1920:7;;;;2063:61;;;2098:15;;-1:-1:-1;;;2098:15:10;;;;;;;;;;;2063:61;2002:128::o;2737:211:14:-;2819:14;;2792:6;;:17;;;-1:-1:-1;;;2792:17:14;;;;2812:4;;-1:-1:-1;;;;;2792:6:14;;:15;;:17;;;;;;;;;;;;;;:6;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:24;;;;:::i;:::-;:41;2788:154;;;2849:8;:6;:8::i;:::-;2871:60;;-1:-1:-1;;;2871:60:14;;12455:2:18;2871:60:14;;;12437:21:18;12494:2;12474:18;;;12467:30;12533:34;12513:18;;;12506:62;-1:-1:-1;;;12584:18:18;;;12577:48;12642:19;;2871:60:14;12253:414:18;3001:111:14;3064:4;;3090:14;;3064:41;;-1:-1:-1;;;3064:41:14;;-1:-1:-1;;;;;3064:4:14;;;;:25;;:41;;;;1977:25:18;;;1965:2;1950:18;;1831:177;3064:41:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3046:15;:59;3001:111::o;9335:535::-;9408:20;9431:30;9453:7;9431:21;:30::i;:::-;9408:53;;9475:12;9491:1;9475:17;9471:119;;-1:-1:-1;9572:7:14;9471:119;9599:36;9611:9;9622:12;9599:11;:36::i;:::-;-1:-1:-1;9663:14:14;;:32;;9682:12;9663:18;:32::i;:::-;9646:14;:49;9723:15;;:28;;9743:7;9723:19;:28::i;:::-;9705:15;:46;9766:42;;;6584:25:18;;;9792:15:14;6640:2:18;6625:18;;6618:34;9771:10:14;;9766:42;;6557:18:18;9766:42:14;;;;;;;9823:40;;1977:25:18;;;-1:-1:-1;;;;;9823:40:14;;;9840:1;;9823:40;;1965:2:18;1950:18;9823:40:14;;;;;;;;9398:472;9335:535;;:::o;10068:464::-;10140:20;10163:30;10185:7;10163:21;:30::i;:::-;10140:53;;10226:1;10211:12;:16;10203:50;;;;-1:-1:-1;;;10203:50:14;;12874:2:18;10203:50:14;;;12856:21:18;12913:2;12893:18;;;12886:30;-1:-1:-1;;;12932:18:18;;;12925:51;12993:18;;10203:50:14;12672:345:18;10203:50:14;10263:35;10275:8;10285:12;10263:11;:35::i;:::-;-1:-1:-1;10326:14:14;;:32;;10345:12;10326:18;:32::i;:::-;10309:14;:49;10386:15;;:28;;10406:7;10386:19;:28::i;:::-;10368:15;:46;10429:42;;;6584:25:18;;;10455:15:14;6640:2:18;6625:18;;6618:34;10434:10:14;;10429:42;;6557:18:18;10429:42:14;;;;;;;10486:39;;1977:25:18;;;10513:1:14;;-1:-1:-1;;;;;10486:39:14;;;;;1965:2:18;1950:18;10486:39:14;1831:177:18;9957:432:3;-1:-1:-1;;;;;10069:19:3;;10065:89;;10111:32;;-1:-1:-1;;;10111:32:3;;10140:1;10111:32;;;1313:51:18;1286:18;;10111:32:3;1153:217:18;10065:89:3;-1:-1:-1;;;;;10167:21:3;;10163:90;;10211:31;;-1:-1:-1;;;10211:31:3;;10239:1;10211:31;;;1313:51:18;1286:18;;10211:31:3;1153:217:18;10163:90:3;-1:-1:-1;;;;;10262:18:3;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;10307:76;;;;10357:7;-1:-1:-1;;;;;10341:31:3;10350:5;-1:-1:-1;;;;;10341:31:3;;10366:5;10341:31;;;;1977:25:18;;1965:2;1950:18;;1831:177;3432:197:0;3520:22;3528:4;3534:7;3520;:22::i;:::-;3515:108;;3565:47;;-1:-1:-1;;;3565:47:0;;-1:-1:-1;;;;;7203:32:18;;3565:47:0;;;7185:51:18;7252:18;;;7245:34;;;7158:18;;3565:47:0;7011:274:18;3515:108:0;3432:197;;:::o;2202:126:10:-;1920:7;;;;2260:62;;2296:15;;-1:-1:-1;;;2296:15:10;;;;;;;;;;;2755:96:17;2813:7;2839:5;2843:1;2839;:5;:::i;4059:629:7:-;4478:23;4504:33;-1:-1:-1;;;;;4504:27:7;;4532:4;4504:27;:33::i;:::-;4478:59;;4551:10;:17;4572:1;4551:22;;:57;;;;;4589:10;4578:30;;;;;;;;;;;;:::i;:::-;4577:31;4551:57;4547:135;;;4631:40;;-1:-1:-1;;;4631:40:7;;-1:-1:-1;;;;;1331:32:18;;4631:40:7;;;1313:51:18;1286:18;;4631:40:7;1153:217:18;9193:879:13;9275:22;-1:-1:-1;;;;;9317:24:13;;9309:54;;;;-1:-1:-1;;;9309:54:13;;13633:2:18;9309:54:13;;;13615:21:18;13672:2;13652:18;;;13645:30;-1:-1:-1;;;13691:18:18;;;13684:47;13748:18;;9309:54:13;13431:341:18;9309:54:13;9391:36;9413:13;9391:17;7662:12;;;7586:95;9391:17;:21;;:36::i;:::-;9437:12;:29;;;-1:-1:-1;;;;;9499:19:13;;;;;;:7;:19;;;;;;9374:53;;-1:-1:-1;9499:38:13;;9523:13;9499:23;:38::i;:::-;-1:-1:-1;;;;;9477:19:13;;;;;;;:7;:19;;;;;:60;;;;-1:-1:-1;9193:879:13;:::o;10454:1310::-;10534:22;-1:-1:-1;;;;;10576:22:13;;10568:54;;;;-1:-1:-1;;;10568:54:13;;13979:2:18;10568:54:13;;;13961:21:18;14018:2;13998:18;;;13991:30;-1:-1:-1;;;14037:18:18;;;14030:49;14096:18;;10568:54:13;13777:343:18;10568:54:13;-1:-1:-1;;;;;10657:17:13;;10633:21;10657:17;;;:7;:17;;;;;;10692:30;;;;10684:59;;;;-1:-1:-1;;;10684:59:13;;14327:2:18;10684:59:13;;;14309:21:18;14366:2;14346:18;;;14339:30;-1:-1:-1;;;14385:18:18;;;14378:46;14441:18;;10684:59:13;14125:340:18;10684:59:13;10754:28;10785:36;10807:13;10785:21;:36::i;:::-;10754:67;;10849:36;10871:13;10849:17;7662:12;;;7586:95;10849:36;10895:12;:29;;;10832:53;-1:-1:-1;10955:32:13;:13;10973;10955:17;:32::i;:::-;-1:-1:-1;;;;;10935:17:13;;;;;;:7;:17;;;;;:52;;;;11030:36;11052:13;11030:21;:36::i;:::-;11082:81;;;14672:25:18;;;14728:2;14713:18;;14706:34;;;14756:18;;;14749:34;;;10998:68:13;;-1:-1:-1;;;;;;11082:81:13;;;;;14660:2:18;14645:18;11082:81:13;;;;;;;10558:1206;;;10454:1310;;;;:::o;2705:151:8:-;2780:12;2811:38;2833:6;2841:4;2847:1;2780:12;3421;3435:23;3462:6;-1:-1:-1;;;;;3462:11:8;3481:5;3488:4;3462:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3420:73;;;;3510:55;3537:6;3545:7;3554:10;3510:26;:55::i;:::-;3503:62;3180:392;-1:-1:-1;;;;;;3180:392:8:o;4625:582::-;4769:12;4798:7;4793:408;;4821:19;4829:10;4821:7;:19::i;4793:408::-;5045:17;;:22;:49;;;;-1:-1:-1;;;;;;5071:18:8;;;:23;5045:49;5041:119;;;5121:24;;-1:-1:-1;;;5121:24:8;;-1:-1:-1;;;;;1331:32:18;;5121:24:8;;;1313:51:18;1286:18;;5121:24:8;1153:217:18;5041:119:8;-1:-1:-1;5180:10:8;5173:17;;5743:516;5874:17;;:21;5870:383;;6102:10;6096:17;6158:15;6145:10;6141:2;6137:19;6130:44;5870:383;6225:17;;-1:-1:-1;;;6225:17:8;;;;;;;;;;;14:286:18;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;167:23;;-1:-1:-1;;;;;;219:32:18;;209:43;;199:71;;266:1;263;256:12;497:250;582:1;592:113;606:6;603:1;600:13;592:113;;;682:11;;;676:18;663:11;;;656:39;628:2;621:10;592:113;;;-1:-1:-1;;739:1:18;721:16;;714:27;497:250::o;752:396::-;901:2;890:9;883:21;864:4;933:6;927:13;976:6;971:2;960:9;956:18;949:34;992:79;1064:6;1059:2;1048:9;1044:18;1039:2;1031:6;1027:15;992:79;:::i;:::-;1132:2;1111:15;-1:-1:-1;;1107:29:18;1092:45;;;;1139:2;1088:54;;752:396;-1:-1:-1;;752:396:18:o;1375:131::-;-1:-1:-1;;;;;1450:31:18;;1440:42;;1430:70;;1496:1;1493;1486:12;1511:315;1579:6;1587;1640:2;1628:9;1619:7;1615:23;1611:32;1608:52;;;1656:1;1653;1646:12;1608:52;1695:9;1682:23;1714:31;1739:5;1714:31;:::i;:::-;1764:5;1816:2;1801:18;;;;1788:32;;-1:-1:-1;;;1511:315:18:o;2013:180::-;2072:6;2125:2;2113:9;2104:7;2100:23;2096:32;2093:52;;;2141:1;2138;2131:12;2093:52;-1:-1:-1;2164:23:18;;2013:180;-1:-1:-1;2013:180:18:o;2198:456::-;2275:6;2283;2291;2344:2;2332:9;2323:7;2319:23;2315:32;2312:52;;;2360:1;2357;2350:12;2312:52;2399:9;2386:23;2418:31;2443:5;2418:31;:::i;:::-;2468:5;-1:-1:-1;2525:2:18;2510:18;;2497:32;2538:33;2497:32;2538:33;:::i;:::-;2198:456;;2590:7;;-1:-1:-1;;;2644:2:18;2629:18;;;;2616:32;;2198:456::o;3026:315::-;3094:6;3102;3155:2;3143:9;3134:7;3130:23;3126:32;3123:52;;;3171:1;3168;3161:12;3123:52;3207:9;3194:23;3184:33;;3267:2;3256:9;3252:18;3239:32;3280:31;3305:5;3280:31;:::i;:::-;3330:5;3320:15;;;3026:315;;;;;:::o;3966:247::-;4025:6;4078:2;4066:9;4057:7;4053:23;4049:32;4046:52;;;4094:1;4091;4084:12;4046:52;4133:9;4120:23;4152:31;4177:5;4152:31;:::i;4927:388::-;4995:6;5003;5056:2;5044:9;5035:7;5031:23;5027:32;5024:52;;;5072:1;5069;5062:12;5024:52;5111:9;5098:23;5130:31;5155:5;5130:31;:::i;:::-;5180:5;-1:-1:-1;5237:2:18;5222:18;;5209:32;5250:33;5209:32;5250:33;:::i;5320:380::-;5399:1;5395:12;;;;5442;;;5463:61;;5517:4;5509:6;5505:17;5495:27;;5463:61;5570:2;5562:6;5559:14;5539:18;5536:38;5533:161;;5616:10;5611:3;5607:20;5604:1;5597:31;5651:4;5648:1;5641:15;5679:4;5676:1;5669:15;5533:161;;5320:380;;;:::o;5705:127::-;5766:10;5761:3;5757:20;5754:1;5747:31;5797:4;5794:1;5787:15;5821:4;5818:1;5811:15;5837:217;5877:1;5903;5893:132;;5947:10;5942:3;5938:20;5935:1;5928:31;5982:4;5979:1;5972:15;6010:4;6007:1;6000:15;5893:132;-1:-1:-1;6039:9:18;;5837:217::o;7290:184::-;7360:6;7413:2;7401:9;7392:7;7388:23;7384:32;7381:52;;;7429:1;7426;7419:12;7381:52;-1:-1:-1;7452:16:18;;7290:184;-1:-1:-1;7290:184:18:o;9540:277::-;9607:6;9660:2;9648:9;9639:7;9635:23;9631:32;9628:52;;;9676:1;9673;9666:12;9628:52;9708:9;9702:16;9761:5;9754:13;9747:21;9740:5;9737:32;9727:60;;9783:1;9780;9773:12;10871:168;10944:9;;;10975;;10992:15;;;10986:22;;10972:37;10962:71;;11013:18;;:::i;12120:128::-;12187:9;;;12208:11;;;12205:37;;;12222:18;;:::i;13301:125::-;13366:9;;;13387:10;;;13384:36;;;13400:18;;:::i;14794:287::-;14923:3;14961:6;14955:13;14977:66;15036:6;15031:3;15024:4;15016:6;15012:17;14977:66;:::i;:::-;15059:16;;;;;14794:287;-1:-1:-1;;14794:287:18:o
Swarm Source
ipfs://c2d61060db0fb4465cced57a71428f5e690bcf24811a4152c43dd75b3688c4eb
Loading...
Loading
Loading...
Loading
OVERVIEW
Private Credit Yield on-chainMultichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.