More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 26 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 13536694 | 912 days ago | IN | 0 ETH | 0.0034878 | ||||
Harvest | 13503897 | 917 days ago | IN | 0 ETH | 0.01335531 | ||||
Harvest | 13465684 | 923 days ago | IN | 0 ETH | 0.00434144 | ||||
Harvest | 13458419 | 924 days ago | IN | 0 ETH | 0.00581356 | ||||
Harvest | 13452290 | 925 days ago | IN | 0 ETH | 0.00507063 | ||||
Harvest | 13445420 | 926 days ago | IN | 0 ETH | 0.00552902 | ||||
Harvest | 13439135 | 927 days ago | IN | 0 ETH | 0.01453452 | ||||
Harvest | 13432870 | 928 days ago | IN | 0 ETH | 0.00496879 | ||||
Harvest | 13426334 | 929 days ago | IN | 0 ETH | 0.00798155 | ||||
Harvest | 13419905 | 930 days ago | IN | 0 ETH | 0.01525823 | ||||
Harvest | 13413870 | 931 days ago | IN | 0 ETH | 0.01025298 | ||||
Harvest | 13407207 | 932 days ago | IN | 0 ETH | 0.00506012 | ||||
Harvest | 13400941 | 933 days ago | IN | 0 ETH | 0.00581248 | ||||
Harvest | 13394734 | 934 days ago | IN | 0 ETH | 0.01036145 | ||||
Harvest | 13388118 | 935 days ago | IN | 0 ETH | 0.00490735 | ||||
Harvest | 13382051 | 936 days ago | IN | 0 ETH | 0.00704931 | ||||
Harvest | 13375369 | 937 days ago | IN | 0 ETH | 0.00916127 | ||||
Harvest | 13369059 | 938 days ago | IN | 0 ETH | 0.01418752 | ||||
Harvest | 13362744 | 939 days ago | IN | 0 ETH | 0.00931073 | ||||
Harvest | 13356694 | 940 days ago | IN | 0 ETH | 0.00792459 | ||||
Harvest | 13349664 | 941 days ago | IN | 0 ETH | 0.00540939 | ||||
Harvest | 13342900 | 943 days ago | IN | 0 ETH | 0.00661488 | ||||
Harvest | 13337077 | 943 days ago | IN | 0 ETH | 0.00619888 | ||||
Harvest | 13330669 | 944 days ago | IN | 0 ETH | 0.00833374 | ||||
Seed Mint | 13324152 | 945 days ago | IN | 0 ETH | 0.01269498 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
13322015 | 946 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
TempleTreasury
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.4; // SPDX-License-Identifier: GPL-3.0-or-later import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./TempleERC20Token.sol"; import "./ITreasuryAllocation.sol"; import "./MintAllowance.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; // import "hardhat/console.sol"; contract TempleTreasury is Ownable { // Underlying TEMPLE token TempleERC20Token private TEMPLE; // underlying stable token we are holding and valuing treasury with IERC20 private STABLEC; // Minted temple allocated to various investment contracts MintAllowance public MINT_ALLOWANCE; // Ratio of treasury value in stablec to open supply of temple. struct IntrinsicValueRatio { uint256 stablec; uint256 temple; } IntrinsicValueRatio public intrinsicValueRatio; // Temple rewards harvested, and (yet) to be allocated to a pool uint256 public harvestedRewardsTemple; // Has treasury been seeded with STABLEC yet (essentially, has seedMint been called) // this will bootstrap IV bool public seeded = false; // all active pools. A pool is anything // that gets allocated some portion of harvest address[] public pools; mapping(address => uint96) public poolHarvestShare; uint96 public totalHarvestShares; // Current treasury STABLEC allocations mapping(ITreasuryAllocation => uint256) public treasuryAllocationsStablec; uint256 public totalAllocationStablec; event RewardsHarvested(uint256 _amount); event HarvestDistributed(address _contract, uint256 _amount); constructor(TempleERC20Token _TEMPLE, IERC20 _STABLEC) { TEMPLE = _TEMPLE; STABLEC = _STABLEC; MINT_ALLOWANCE = new MintAllowance(_TEMPLE); } function numPools() external view returns (uint256) { return pools.length; } /** * Seed treasury with STABLEC and Temple to bootstrap */ function seedMint(uint256 amountStablec, uint256 amountTemple) external onlyOwner { require(!seeded, "Owner has already seeded treasury"); seeded = true; // can this go in the constructor? intrinsicValueRatio.stablec = amountStablec; intrinsicValueRatio.temple = amountTemple; SafeERC20.safeTransferFrom(STABLEC, msg.sender, address(this), amountStablec); TEMPLE.mint(msg.sender, amountTemple); } /** * Harvest rewards. * * For auditing, we harvest and allocate in two steps */ function harvest(uint256 distributionPercent) external onlyOwner { require(distributionPercent <= 100, "Scaling factor interpreted as a %, needs to be between 0 (no harvest) and 100 (max harvest)"); uint256 reserveStablec = STABLEC.balanceOf(address(this)) + totalAllocationStablec; // // Burn any excess temple, that is Any temple over and beyond harvestedRewardsTemple. // // NOTE: If we don't do this, IV could drop... if (TEMPLE.balanceOf(address(this)) > harvestedRewardsTemple) { // NOTE: there isn't a Reentrancy issue as we control the TEMPLE ERC20 contract, and configure // treasury with an address on contract creation TEMPLE.burn(TEMPLE.balanceOf(address(this)) - harvestedRewardsTemple); } uint256 totalSupplyTemple = TEMPLE.totalSupply() - TEMPLE.balanceOf(address(MINT_ALLOWANCE)); uint256 impliedSupplyAtCurrentIVTemple = reserveStablec * intrinsicValueRatio.temple / intrinsicValueRatio.stablec; require(impliedSupplyAtCurrentIVTemple >= totalSupplyTemple, "Cannot run harvest when IV drops"); uint256 newHarvestTemple = (impliedSupplyAtCurrentIVTemple - totalSupplyTemple) * distributionPercent / 100; harvestedRewardsTemple += newHarvestTemple; intrinsicValueRatio.stablec = reserveStablec; intrinsicValueRatio.temple = totalSupplyTemple + newHarvestTemple; TEMPLE.mint(address(this), newHarvestTemple); emit RewardsHarvested(newHarvestTemple); } /** * ResetIV * * Not expected to be used in day to day operations, as opposed to harvest which * will be called ~ once per epoch. * * Only to be called if we have to post a treasury loss, and restart IV growth from * a new baseline. */ function resetIV() external onlyOwner { uint256 reserveStablec = STABLEC.balanceOf(address(this)) + totalAllocationStablec; uint256 totalSupplyTemple = TEMPLE.totalSupply() - TEMPLE.balanceOf(address(MINT_ALLOWANCE)); intrinsicValueRatio.stablec = reserveStablec; intrinsicValueRatio.temple = totalSupplyTemple; } /** * Allocate rewards to each pool. */ function distributeHarvest() external onlyOwner { // transfer rewards as per defined allocation uint256 totalAllocated = 0; for (uint256 i = 0; i < pools.length; i++) { uint256 allocatedRewards = harvestedRewardsTemple * poolHarvestShare[pools[i]] / totalHarvestShares; // integer rounding may cause the last allocation to exceed harvested // rewards. Handle gracefully if ((totalAllocated + allocatedRewards) > harvestedRewardsTemple) { allocatedRewards = harvestedRewardsTemple - totalAllocated; } totalAllocated += allocatedRewards; SafeERC20.safeTransfer(TEMPLE, pools[i], allocatedRewards); emit HarvestDistributed(pools[i], allocatedRewards); } harvestedRewardsTemple -= totalAllocated; } /** * Mint and Allocate treasury TEMPLE. */ function mintAndAllocateTemple(address _contract, uint256 amountTemple) external onlyOwner { require(amountTemple > 0, "TEMPLE to mint and allocate must be > 0"); // Mint and Allocate TEMPLE via MINT_ALLOWANCE helper TEMPLE.mint(address(this), amountTemple); SafeERC20.safeIncreaseAllowance(TEMPLE, address(MINT_ALLOWANCE), amountTemple); MINT_ALLOWANCE.increaseMintAllowance(_contract, amountTemple); } /** * Burn minted temple associated with a specific contract */ function unallocateAndBurnUnusedMintedTemple(address _contract) external onlyOwner { MINT_ALLOWANCE.burnUnusedMintAllowance(_contract); } /** * Allocate treasury STABLEC. */ function allocateTreasuryStablec(ITreasuryAllocation _contract, uint256 amountStablec) external onlyOwner { require(amountStablec > 0, "STABLEC to allocate must be > 0"); treasuryAllocationsStablec[_contract] += amountStablec; totalAllocationStablec += amountStablec; SafeERC20.safeTransfer(STABLEC, address(_contract), amountStablec); } /** * Update treasury with latest mark to market for a given treasury allocation */ function updateMarkToMarket(ITreasuryAllocation _contract) external onlyOwner { uint256 oldReval = treasuryAllocationsStablec[_contract]; uint256 newReval = _contract.reval(); totalAllocationStablec = totalAllocationStablec + newReval - oldReval; treasuryAllocationsStablec[_contract] = newReval; } /** * Withdraw from a contract. * * Expects that pre-withdrawal reval() includes the unwithdrawn allowance, and post withdrawal reval() * drops by exactly this amount. */ function withdraw(ITreasuryAllocation _contract) external onlyOwner { uint256 preWithdrawlReval = _contract.reval(); uint256 pendingWithdrawal = STABLEC.allowance(address(_contract), address(this)); // NOTE: Reentrancy considered and it's safe STABLEC is a well known unchanging contract SafeERC20.safeTransferFrom(STABLEC, address(_contract), address(this), pendingWithdrawal); uint256 postWithdrawlReval = _contract.reval(); totalAllocationStablec = totalAllocationStablec - pendingWithdrawal; treasuryAllocationsStablec[_contract] -= pendingWithdrawal; require(postWithdrawlReval + pendingWithdrawal == preWithdrawlReval); } /** * Withdraw from a contract which has some treasury allocation * * Ejects a contract out of treasury, pulling in any allowance of STABLEC * We only expect to use this if (for whatever reason). The booking in * The given TreasuryAllocation results in withdraw not working. * * Precondition, contract given has allocated all of it's Stablec assets * to be transfered into treasury as an allowance. * * This will only ever reduce treasury IV. */ function ejectTreasuryAllocation(ITreasuryAllocation _contract) external onlyOwner { uint256 pendingWithdrawal = STABLEC.allowance(address(_contract), address(this)); totalAllocationStablec -= treasuryAllocationsStablec[_contract]; treasuryAllocationsStablec[_contract] = 0; SafeERC20.safeTransferFrom(STABLEC, address(_contract), address(this), pendingWithdrawal); } /** * Add or update a pool, and transfer in treasury assets */ function upsertPool(address _contract, uint96 _poolHarvestShare) external onlyOwner { require(_poolHarvestShare > 0, "Harvest share must be > 0"); totalHarvestShares = totalHarvestShares + _poolHarvestShare - poolHarvestShare[_contract]; // first time, add contract to array as well if (poolHarvestShare[_contract] == 0) { pools.push(_contract); } poolHarvestShare[_contract] = _poolHarvestShare; } /** * Remove a given investment pool. */ function removePool(uint256 idx, address _contract) external onlyOwner { require(idx < pools.length, "No pool at the specified index"); require(pools[idx] == _contract, "Pool at index and passed in address don't match"); pools[idx] = pools[pools.length-1]; pools.pop(); totalHarvestShares -= poolHarvestShare[_contract]; delete poolHarvestShare[_contract]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../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 { /** * @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); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @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 pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../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; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @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, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
pragma solidity ^0.8.4; // SPDX-License-Identifier: GPL-3.0-or-later import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; contract TempleERC20Token is ERC20, ERC20Burnable, Ownable, AccessControl { bytes32 public constant CAN_MINT = keccak256("CAN_MINT"); constructor() ERC20("Temple", "TEMPLE") { _setupRole(DEFAULT_ADMIN_ROLE, owner()); } function mint(address to, uint256 amount) external { require(hasRole(CAN_MINT, msg.sender), "Caller cannot mint"); _mint(to, amount); } function addMinter(address account) external onlyOwner { grantRole(CAN_MINT, account); } function removeMinter(address account) external onlyOwner { revokeRole(CAN_MINT, account); } }
pragma solidity ^0.8.4; // SPDX-License-Identifier: GPL-3.0-or-later /** * Contract which has treasury allocated from Stablec * * Reports back it's mark to market (so DAO can rebalance IV accordingly, from time to time) */ interface ITreasuryAllocation { /** * mark to market of treasury investment, denominated in Treasury Stablec */ function reval() external view returns (uint256); }
pragma solidity ^0.8.4; // SPDX-License-Identifier: GPL-3.0-or-later import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "./TempleERC20Token.sol"; /** * Newly minted temple allocated to various temple strategies * * Any temple held by this contract is assumed to be unused, * and hence doesn't effect the intrinsinc value calculation. * * It's only considered in circulation once a pool pulls * it's allowance. */ contract MintAllowance is Ownable { // Temple contract address TempleERC20Token TEMPLE; constructor(TempleERC20Token _TEMPLE) { TEMPLE = _TEMPLE; } /** * Increase mint allowance for the given pool * * Atomically pulls amount from treasury before increasing allownance * as an extra check and balance */ function increaseMintAllowance(address _pool, uint256 _amount) external onlyOwner { SafeERC20.safeTransferFrom(TEMPLE, msg.sender, address(this), _amount); SafeERC20.safeIncreaseAllowance(TEMPLE, _pool, _amount); } /** * Burn any unused mint allowance for a given pool */ function burnUnusedMintAllowance(address _pool) external onlyOwner { uint256 unusedMintAllowance = TEMPLE.allowance(address(this), _pool); SafeERC20.safeDecreaseAllowance(TEMPLE, _pool, unusedMintAllowance); TEMPLE.burn(unusedMintAllowance); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @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, it is bubbled up by this * function (like regular Solidity function calls). * * 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. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @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`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.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}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * 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. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * 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 override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override 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 value {ERC20} uses, unless this function is * 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 override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); 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}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * 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. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` 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. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 currentAllowance = allowance(account, _msgSender()); require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance"); unchecked { _approve(account, _msgSender(), currentAllowance - amount); } _burn(account, amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../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: * * ``` * 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}: * * ``` * 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. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @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 override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @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 override 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. */ function grantRole(bytes32 role, address account) public virtual override 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. */ function revokeRole(bytes32 role, address account) public virtual override 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 granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @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); } function _grantRole(bytes32 role, address account) private { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ 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 pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @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. * * _Available since v3.1._ */ 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 `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./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); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract TempleERC20Token","name":"_TEMPLE","type":"address"},{"internalType":"contract IERC20","name":"_STABLEC","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_contract","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"HarvestDistributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"RewardsHarvested","type":"event"},{"inputs":[],"name":"MINT_ALLOWANCE","outputs":[{"internalType":"contract MintAllowance","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ITreasuryAllocation","name":"_contract","type":"address"},{"internalType":"uint256","name":"amountStablec","type":"uint256"}],"name":"allocateTreasuryStablec","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"distributeHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ITreasuryAllocation","name":"_contract","type":"address"}],"name":"ejectTreasuryAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"distributionPercent","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestedRewardsTemple","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"intrinsicValueRatio","outputs":[{"internalType":"uint256","name":"stablec","type":"uint256"},{"internalType":"uint256","name":"temple","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"amountTemple","type":"uint256"}],"name":"mintAndAllocateTemple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"numPools","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"poolHarvestShare","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pools","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"idx","type":"uint256"},{"internalType":"address","name":"_contract","type":"address"}],"name":"removePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetIV","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountStablec","type":"uint256"},{"internalType":"uint256","name":"amountTemple","type":"uint256"}],"name":"seedMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seeded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocationStablec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalHarvestShares","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ITreasuryAllocation","name":"","type":"address"}],"name":"treasuryAllocationsStablec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"unallocateAndBurnUnusedMintedTemple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ITreasuryAllocation","name":"_contract","type":"address"}],"name":"updateMarkToMarket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint96","name":"_poolHarvestShare","type":"uint96"}],"name":"upsertPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ITreasuryAllocation","name":"_contract","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000600760006101000a81548160ff0219169083151502179055503480156200002c57600080fd5b50604051620054893803806200548983398181016040528101906200005291906200027d565b62000072620000666200017560201b60201c565b6200017d60201b60201c565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081604051620001039062000241565b6200010f9190620002cf565b604051809103906000f0801580156200012c573d6000803e3d6000fd5b50600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620003a4565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6115148062003f7583390190565b600081519050620002608162000370565b92915050565b60008151905062000277816200038a565b92915050565b600080604083850312156200029157600080fd5b6000620002a18582860162000266565b9250506020620002b4858286016200024f565b9150509250929050565b620002c98162000348565b82525050565b6000602082019050620002e66000830184620002be565b92915050565b6000620002f98262000328565b9050919050565b60006200030d82620002ec565b9050919050565b60006200032182620002ec565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000355826200035c565b9050919050565b6000620003698262000328565b9050919050565b6200037b8162000300565b81146200038757600080fd5b50565b620003958162000314565b8114620003a157600080fd5b50565b613bc180620003b46000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80637877eed2116100de578063a340bae211610097578063ddc6326211610071578063ddc63262146103c7578063e5e2efaa146103e3578063e69948bc14610413578063f2fde38b1461042f57610173565b8063a340bae21461035c578063ac4afa381461037b578063b1bead99146103ab57610173565b80637877eed2146102c457806379b3066b146102e05780638da5cb5b146102ea5780639657e06b146103085780639b42910814610324578063a072dc321461034057610173565b80633b66ce14116101305780633b66ce14146102185780634401ce32146102485780634ff92a4d1461026657806351cff8d9146102825780635b7244d41461029e578063715018a6146102ba57610173565b80631f02c95d1461017857806324c2ddec146101965780632935d080146101a0578063334041a6146101be578063359524d6146101dc57806335c62bc2146101fa575b600080fd5b61018061044b565b60405161018d9190613436565b60405180910390f35b61019e610451565b005b6101a861071c565b6040516101b5919061347a565b60405180910390f35b6101c661073a565b6040516101d3919061323e565b60405180910390f35b6101e461074d565b6040516101f19190613436565b60405180910390f35b610202610753565b60405161020f9190613436565b60405180910390f35b610232600480360381019061022d9190612d0e565b610760565b60405161023f919061347a565b60405180910390f35b61025061078b565b60405161025d9190613259565b60405180910390f35b610280600480360381019061027b9190612d0e565b6107b1565b005b61029c60048036038101906102979190612dd8565b6108bd565b005b6102b860048036038101906102b39190612dd8565b610ba3565b005b6102c2610d9f565b005b6102de60048036038101906102d99190612d37565b610e27565b005b6102e8611057565b005b6102f2611385565b6040516102ff919061319a565b60405180910390f35b610322600480360381019061031d9190612ecb565b6113ae565b005b61033e60048036038101906103399190612e8f565b61156a565b005b61035a60048036038101906103559190612e01565b611970565b005b610364611acf565b604051610372929190613451565b60405180910390f35b61039560048036038101906103909190612e3d565b611ae1565b6040516103a2919061319a565b60405180910390f35b6103c560048036038101906103c09190612d73565b611b20565b005b6103e160048036038101906103dc9190612e3d565b611de9565b005b6103fd60048036038101906103f89190612dd8565b61246d565b60405161040a9190613436565b60405180910390f35b61042d60048036038101906104289190612dd8565b612485565b005b61044960048036038101906104449190612d0e565b61262f565b005b60065481565b610459612727565b73ffffffffffffffffffffffffffffffffffffffff16610477611385565b73ffffffffffffffffffffffffffffffffffffffff16146104cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c4906133b6565b60405180910390fd5b6000600c54600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161052d919061319a565b60206040518083038186803b15801561054557600080fd5b505afa158015610559573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057d9190612e66565b61058791906134c7565b90506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401610608919061319a565b60206040518083038186803b15801561062057600080fd5b505afa158015610634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106589190612e66565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106c057600080fd5b505afa1580156106d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f89190612e66565b61070291906135ea565b905081600460000181905550806004600101819055505050565b600a60009054906101000a90046bffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b600c5481565b6000600880549050905090565b60096020528060005260406000206000915054906101000a90046bffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6107b9612727565b73ffffffffffffffffffffffffffffffffffffffff166107d7611385565b73ffffffffffffffffffffffffffffffffffffffff161461082d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610824906133b6565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f7b8cab8826040518263ffffffff1660e01b8152600401610888919061319a565b600060405180830381600087803b1580156108a257600080fd5b505af11580156108b6573d6000803e3d6000fd5b5050505050565b6108c5612727565b73ffffffffffffffffffffffffffffffffffffffff166108e3611385565b73ffffffffffffffffffffffffffffffffffffffff1614610939576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610930906133b6565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff16633f3a0c5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561098157600080fd5b505afa158015610995573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b99190612e66565b90506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e84306040518363ffffffff1660e01b8152600401610a1a9291906131b5565b60206040518083038186803b158015610a3257600080fd5b505afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612e66565b9050610a9a600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684308461272f565b60008373ffffffffffffffffffffffffffffffffffffffff16633f3a0c5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ae257600080fd5b505afa158015610af6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1a9190612e66565b905081600c54610b2a91906135ea565b600c8190555081600b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b7f91906135ea565b92505081905550828282610b9391906134c7565b14610b9d57600080fd5b50505050565b610bab612727565b73ffffffffffffffffffffffffffffffffffffffff16610bc9611385565b73ffffffffffffffffffffffffffffffffffffffff1614610c1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c16906133b6565b60405180910390fd5b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e83306040518363ffffffff1660e01b8152600401610c7e9291906131b5565b60206040518083038186803b158015610c9657600080fd5b505afa158015610caa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cce9190612e66565b9050600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600c6000828254610d2191906135ea565b925050819055506000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d9b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683308461272f565b5050565b610da7612727565b73ffffffffffffffffffffffffffffffffffffffff16610dc5611385565b73ffffffffffffffffffffffffffffffffffffffff1614610e1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e12906133b6565b60405180910390fd5b610e2560006127b8565b565b610e2f612727565b73ffffffffffffffffffffffffffffffffffffffff16610e4d611385565b73ffffffffffffffffffffffffffffffffffffffff1614610ea3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9a906133b6565b60405180910390fd5b60008111610ee6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610edd906132b6565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b8152600401610f43929190613215565b600060405180830381600087803b158015610f5d57600080fd5b505af1158015610f71573d6000803e3d6000fd5b50505050610fc4600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168361287c565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663785a47f883836040518363ffffffff1660e01b8152600401611021929190613215565b600060405180830381600087803b15801561103b57600080fd5b505af115801561104f573d6000803e3d6000fd5b505050505050565b61105f612727565b73ffffffffffffffffffffffffffffffffffffffff1661107d611385565b73ffffffffffffffffffffffffffffffffffffffff16146110d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ca906133b6565b60405180910390fd5b6000805b600880549050811015611368576000600a60009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16600960006008858154811061114d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166006546111e69190613590565b6111f0919061355f565b9050600654818461120191906134c7565b1115611218578260065461121591906135ea565b90505b808361122491906134c7565b92506112b7600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660088481548110611286577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168361299d565b7fbb1896312e8942f1899b2f8c15bc6667b301540456846767c2597697e05c735260088381548110611312577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260405161134c929190613215565b60405180910390a15080806113609061371b565b9150506110d7565b50806006600082825461137b91906135ea565b9250508190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6113b6612727565b73ffffffffffffffffffffffffffffffffffffffff166113d4611385565b73ffffffffffffffffffffffffffffffffffffffff161461142a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611421906133b6565b60405180910390fd5b600760009054906101000a900460ff161561147a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147190613416565b60405180910390fd5b6001600760006101000a81548160ff02191690831515021790555081600460000181905550806004600101819055506114d7600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633308561272f565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1933836040518363ffffffff1660e01b8152600401611534929190613215565b600060405180830381600087803b15801561154e57600080fd5b505af1158015611562573d6000803e3d6000fd5b505050505050565b611572612727565b73ffffffffffffffffffffffffffffffffffffffff16611590611385565b73ffffffffffffffffffffffffffffffffffffffff16146115e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115dd906133b6565b60405180910390fd5b600880549050821061162d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611624906132f6565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166008838154811061167e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f690613356565b60405180910390fd5b6008600160088054905061171391906135ea565b8154811061174a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600883815481106117af577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600880548061182f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690559055600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16600a60008282829054906101000a90046bffffffffffffffffffffffff166118e4919061361e565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154906bffffffffffffffffffffffff02191690555050565b611978612727565b73ffffffffffffffffffffffffffffffffffffffff16611996611385565b73ffffffffffffffffffffffffffffffffffffffff16146119ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e3906133b6565b60405180910390fd5b60008111611a2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2690613376565b60405180910390fd5b80600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a7e91906134c7565b9250508190555080600c6000828254611a9791906134c7565b92505081905550611acb600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838361299d565b5050565b60048060000154908060010154905082565b60088181548110611af157600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611b28612727565b73ffffffffffffffffffffffffffffffffffffffff16611b46611385565b73ffffffffffffffffffffffffffffffffffffffff1614611b9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b93906133b6565b60405180910390fd5b6000816bffffffffffffffffffffffff1611611bed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611be490613396565b60405180910390fd5b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff1681600a60009054906101000a90046bffffffffffffffffffffffff16611c6b919061351d565b611c75919061361e565b600a60006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff161415611d77576008829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b80600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055505050565b611df1612727565b73ffffffffffffffffffffffffffffffffffffffff16611e0f611385565b73ffffffffffffffffffffffffffffffffffffffff1614611e65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e5c906133b6565b60405180910390fd5b6064811115611ea9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ea090613316565b60405180910390fd5b6000600c54600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611f09919061319a565b60206040518083038186803b158015611f2157600080fd5b505afa158015611f35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f599190612e66565b611f6391906134c7565b9050600654600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611fc3919061319a565b60206040518083038186803b158015611fdb57600080fd5b505afa158015611fef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120139190612e66565b111561215e57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68600654600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016120b5919061319a565b60206040518083038186803b1580156120cd57600080fd5b505afa1580156120e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121059190612e66565b61210f91906135ea565b6040518263ffffffff1660e01b815260040161212b9190613436565b600060405180830381600087803b15801561214557600080fd5b505af1158015612159573d6000803e3d6000fd5b505050505b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b81526004016121dd919061319a565b60206040518083038186803b1580156121f557600080fd5b505afa158015612209573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222d9190612e66565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561229557600080fd5b505afa1580156122a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122cd9190612e66565b6122d791906135ea565b90506000600460000154600460010154846122f29190613590565b6122fc919061355f565b905081811015612341576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161233890613296565b60405180910390fd5b6000606485848461235291906135ea565b61235c9190613590565b612366919061355f565b9050806006600082825461237a91906134c7565b9250508190555083600460000181905550808361239791906134c7565b600460010181905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b81526004016123fd929190613215565b600060405180830381600087803b15801561241757600080fd5b505af115801561242b573d6000803e3d6000fd5b505050507f302ece888b23f17e9addd0ad302c9b0d6619a5c38b718deb019638e29355c0fb8160405161245e9190613436565b60405180910390a15050505050565b600b6020528060005260406000206000915090505481565b61248d612727565b73ffffffffffffffffffffffffffffffffffffffff166124ab611385565b73ffffffffffffffffffffffffffffffffffffffff1614612501576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124f8906133b6565b60405180910390fd5b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008273ffffffffffffffffffffffffffffffffffffffff16633f3a0c5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561258d57600080fd5b505afa1580156125a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125c59190612e66565b90508181600c546125d691906134c7565b6125e091906135ea565b600c8190555080600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612637612727565b73ffffffffffffffffffffffffffffffffffffffff16612655611385565b73ffffffffffffffffffffffffffffffffffffffff16146126ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126a2906133b6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561271b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612712906132d6565b60405180910390fd5b612724816127b8565b50565b600033905090565b6127b2846323b872dd60e01b858585604051602401612750939291906131de565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612a23565b50505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000818473ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30866040518363ffffffff1660e01b81526004016128ba9291906131b5565b60206040518083038186803b1580156128d257600080fd5b505afa1580156128e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061290a9190612e66565b61291491906134c7565b90506129978463095ea7b360e01b8584604051602401612935929190613215565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612a23565b50505050565b612a1e8363a9059cbb60e01b84846040516024016129bc929190613215565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612a23565b505050565b6000612a85826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612aea9092919063ffffffff16565b9050600081511115612ae55780806020019051810190612aa59190612daf565b612ae4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612adb906133f6565b60405180910390fd5b5b505050565b6060612af98484600085612b02565b90509392505050565b606082471015612b47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3e90613336565b60405180910390fd5b612b5085612c16565b612b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b86906133d6565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612bb89190613183565b60006040518083038185875af1925050503d8060008114612bf5576040519150601f19603f3d011682016040523d82523d6000602084013e612bfa565b606091505b5091509150612c0a828286612c29565b92505050949350505050565b600080823b905060008111915050919050565b60608315612c3957829050612c89565b600083511115612c4c5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c809190613274565b60405180910390fd5b9392505050565b600081359050612c9f81613b18565b92915050565b600081519050612cb481613b2f565b92915050565b600081359050612cc981613b46565b92915050565b600081359050612cde81613b5d565b92915050565b600081519050612cf381613b5d565b92915050565b600081359050612d0881613b74565b92915050565b600060208284031215612d2057600080fd5b6000612d2e84828501612c90565b91505092915050565b60008060408385031215612d4a57600080fd5b6000612d5885828601612c90565b9250506020612d6985828601612ccf565b9150509250929050565b60008060408385031215612d8657600080fd5b6000612d9485828601612c90565b9250506020612da585828601612cf9565b9150509250929050565b600060208284031215612dc157600080fd5b6000612dcf84828501612ca5565b91505092915050565b600060208284031215612dea57600080fd5b6000612df884828501612cba565b91505092915050565b60008060408385031215612e1457600080fd5b6000612e2285828601612cba565b9250506020612e3385828601612ccf565b9150509250929050565b600060208284031215612e4f57600080fd5b6000612e5d84828501612ccf565b91505092915050565b600060208284031215612e7857600080fd5b6000612e8684828501612ce4565b91505092915050565b60008060408385031215612ea257600080fd5b6000612eb085828601612ccf565b9250506020612ec185828601612c90565b9150509250929050565b60008060408385031215612ede57600080fd5b6000612eec85828601612ccf565b9250506020612efd85828601612ccf565b9150509250929050565b612f1081613652565b82525050565b612f1f81613664565b82525050565b6000612f3082613495565b612f3a81856134ab565b9350612f4a8185602086016136e8565b80840191505092915050565b612f5f816136c4565b82525050565b6000612f70826134a0565b612f7a81856134b6565b9350612f8a8185602086016136e8565b612f93816137c2565b840191505092915050565b6000612fab6020836134b6565b9150612fb6826137d3565b602082019050919050565b6000612fce6027836134b6565b9150612fd9826137fc565b604082019050919050565b6000612ff16026836134b6565b9150612ffc8261384b565b604082019050919050565b6000613014601e836134b6565b915061301f8261389a565b602082019050919050565b6000613037605b836134b6565b9150613042826138c3565b606082019050919050565b600061305a6026836134b6565b915061306582613938565b604082019050919050565b600061307d602f836134b6565b915061308882613987565b604082019050919050565b60006130a0601f836134b6565b91506130ab826139d6565b602082019050919050565b60006130c36019836134b6565b91506130ce826139ff565b602082019050919050565b60006130e66020836134b6565b91506130f182613a28565b602082019050919050565b6000613109601d836134b6565b915061311482613a51565b602082019050919050565b600061312c602a836134b6565b915061313782613a7a565b604082019050919050565b600061314f6021836134b6565b915061315a82613ac9565b604082019050919050565b61316e816136a2565b82525050565b61317d816136ac565b82525050565b600061318f8284612f25565b915081905092915050565b60006020820190506131af6000830184612f07565b92915050565b60006040820190506131ca6000830185612f07565b6131d76020830184612f07565b9392505050565b60006060820190506131f36000830186612f07565b6132006020830185612f07565b61320d6040830184613165565b949350505050565b600060408201905061322a6000830185612f07565b6132376020830184613165565b9392505050565b60006020820190506132536000830184612f16565b92915050565b600060208201905061326e6000830184612f56565b92915050565b6000602082019050818103600083015261328e8184612f65565b905092915050565b600060208201905081810360008301526132af81612f9e565b9050919050565b600060208201905081810360008301526132cf81612fc1565b9050919050565b600060208201905081810360008301526132ef81612fe4565b9050919050565b6000602082019050818103600083015261330f81613007565b9050919050565b6000602082019050818103600083015261332f8161302a565b9050919050565b6000602082019050818103600083015261334f8161304d565b9050919050565b6000602082019050818103600083015261336f81613070565b9050919050565b6000602082019050818103600083015261338f81613093565b9050919050565b600060208201905081810360008301526133af816130b6565b9050919050565b600060208201905081810360008301526133cf816130d9565b9050919050565b600060208201905081810360008301526133ef816130fc565b9050919050565b6000602082019050818103600083015261340f8161311f565b9050919050565b6000602082019050818103600083015261342f81613142565b9050919050565b600060208201905061344b6000830184613165565b92915050565b60006040820190506134666000830185613165565b6134736020830184613165565b9392505050565b600060208201905061348f6000830184613174565b92915050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b60006134d2826136a2565b91506134dd836136a2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561351257613511613764565b5b828201905092915050565b6000613528826136ac565b9150613533836136ac565b9250826bffffffffffffffffffffffff0382111561355457613553613764565b5b828201905092915050565b600061356a826136a2565b9150613575836136a2565b92508261358557613584613793565b5b828204905092915050565b600061359b826136a2565b91506135a6836136a2565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156135df576135de613764565b5b828202905092915050565b60006135f5826136a2565b9150613600836136a2565b92508282101561361357613612613764565b5b828203905092915050565b6000613629826136ac565b9150613634836136ac565b92508282101561364757613646613764565b5b828203905092915050565b600061365d82613682565b9050919050565b60008115159050919050565b600061367b82613652565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b60006136cf826136d6565b9050919050565b60006136e182613682565b9050919050565b60005b838110156137065780820151818401526020810190506136eb565b83811115613715576000848401525b50505050565b6000613726826136a2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561375957613758613764565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f43616e6e6f742072756e2068617276657374207768656e2049562064726f7073600082015250565b7f54454d504c4520746f206d696e7420616e6420616c6c6f63617465206d75737460008201527f206265203e203000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4e6f20706f6f6c206174207468652073706563696669656420696e6465780000600082015250565b7f5363616c696e6720666163746f7220696e74657270726574656420617320612060008201527f252c206e6565647320746f206265206265747765656e203020286e6f2068617260208201527f766573742920616e642031303020286d61782068617276657374290000000000604082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f506f6f6c20617420696e64657820616e642070617373656420696e206164647260008201527f65737320646f6e2774206d617463680000000000000000000000000000000000602082015250565b7f535441424c454320746f20616c6c6f63617465206d757374206265203e203000600082015250565b7f48617276657374207368617265206d757374206265203e203000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f4f776e65722068617320616c726561647920736565646564207472656173757260008201527f7900000000000000000000000000000000000000000000000000000000000000602082015250565b613b2181613652565b8114613b2c57600080fd5b50565b613b3881613664565b8114613b4357600080fd5b50565b613b4f81613670565b8114613b5a57600080fd5b50565b613b66816136a2565b8114613b7157600080fd5b50565b613b7d816136ac565b8114613b8857600080fd5b5056fea2646970667358221220740327d0fbd981381f5ab9575672231c7cb29d5f6c90bfd6e03e11b907a4e88064736f6c6343000804003360806040523480156200001157600080fd5b506040516200151438038062001514833981810160405281019062000037919062000182565b620000576200004b6200009f60201b60201c565b620000a760201b60201c565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505062000210565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000815190506200017c81620001f6565b92915050565b6000602082840312156200019557600080fd5b6000620001a5848285016200016b565b91505092915050565b6000620001bb82620001d6565b9050919050565b6000620001cf82620001ae565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6200020181620001c2565b81146200020d57600080fd5b50565b6112f480620002206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c578063785a47f8146100665780638da5cb5b14610082578063f2fde38b146100a0578063f7b8cab8146100bc575b600080fd5b6100646100d8565b005b610080600480360381019061007b9190610c08565b610160565b005b61008a61023b565b6040516100979190610e07565b60405180910390f35b6100ba60048036038101906100b59190610bdf565b610264565b005b6100d660048036038101906100d19190610bdf565b61035c565b005b6100e0610547565b73ffffffffffffffffffffffffffffffffffffffff166100fe61023b565b73ffffffffffffffffffffffffffffffffffffffff1614610154576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161014b90610f2d565b60405180910390fd5b61015e600061054f565b565b610168610547565b73ffffffffffffffffffffffffffffffffffffffff1661018661023b565b73ffffffffffffffffffffffffffffffffffffffff16146101dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d390610f2d565b60405180910390fd5b61020a600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16333084610613565b610237600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838361069c565b5050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61026c610547565b73ffffffffffffffffffffffffffffffffffffffff1661028a61023b565b73ffffffffffffffffffffffffffffffffffffffff16146102e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d790610f2d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610350576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034790610ecd565b60405180910390fd5b6103598161054f565b50565b610364610547565b73ffffffffffffffffffffffffffffffffffffffff1661038261023b565b73ffffffffffffffffffffffffffffffffffffffff16146103d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103cf90610f2d565b60405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30846040518363ffffffff1660e01b8152600401610437929190610e22565b60206040518083038186803b15801561044f57600080fd5b505afa158015610463573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104879190610c6d565b90506104b6600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683836107bd565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b81526004016105119190610f8d565b600060405180830381600087803b15801561052b57600080fd5b505af115801561053f573d6000803e3d6000fd5b505050505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b610696846323b872dd60e01b85858560405160240161063493929190610e4b565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061091e565b50505050565b6000818473ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30866040518363ffffffff1660e01b81526004016106da929190610e22565b60206040518083038186803b1580156106f257600080fd5b505afa158015610706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072a9190610c6d565b6107349190610fda565b90506107b78463095ea7b360e01b8584604051602401610755929190610e82565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061091e565b50505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b81526004016107fa929190610e22565b60206040518083038186803b15801561081257600080fd5b505afa158015610826573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084a9190610c6d565b90508181101561088f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088690610eed565b60405180910390fd5b600082820390506109178563095ea7b360e01b86846040516024016108b5929190610e82565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061091e565b5050505050565b6000610980826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166109e59092919063ffffffff16565b90506000815111156109e057808060200190518101906109a09190610c44565b6109df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d690610f6d565b60405180910390fd5b5b505050565b60606109f484846000856109fd565b90509392505050565b606082471015610a42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3990610f0d565b60405180910390fd5b610a4b85610b11565b610a8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8190610f4d565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610ab39190610df0565b60006040518083038185875af1925050503d8060008114610af0576040519150601f19603f3d011682016040523d82523d6000602084013e610af5565b606091505b5091509150610b05828286610b24565b92505050949350505050565b600080823b905060008111915050919050565b60608315610b3457829050610b84565b600083511115610b475782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7b9190610eab565b60405180910390fd5b9392505050565b600081359050610b9a81611279565b92915050565b600081519050610baf81611290565b92915050565b600081359050610bc4816112a7565b92915050565b600081519050610bd9816112a7565b92915050565b600060208284031215610bf157600080fd5b6000610bff84828501610b8b565b91505092915050565b60008060408385031215610c1b57600080fd5b6000610c2985828601610b8b565b9250506020610c3a85828601610bb5565b9150509250929050565b600060208284031215610c5657600080fd5b6000610c6484828501610ba0565b91505092915050565b600060208284031215610c7f57600080fd5b6000610c8d84828501610bca565b91505092915050565b610c9f81611030565b82525050565b6000610cb082610fa8565b610cba8185610fbe565b9350610cca818560208601611078565b80840191505092915050565b6000610ce182610fb3565b610ceb8185610fc9565b9350610cfb818560208601611078565b610d04816110da565b840191505092915050565b6000610d1c602683610fc9565b9150610d27826110eb565b604082019050919050565b6000610d3f602983610fc9565b9150610d4a8261113a565b604082019050919050565b6000610d62602683610fc9565b9150610d6d82611189565b604082019050919050565b6000610d85602083610fc9565b9150610d90826111d8565b602082019050919050565b6000610da8601d83610fc9565b9150610db382611201565b602082019050919050565b6000610dcb602a83610fc9565b9150610dd68261122a565b604082019050919050565b610dea8161106e565b82525050565b6000610dfc8284610ca5565b915081905092915050565b6000602082019050610e1c6000830184610c96565b92915050565b6000604082019050610e376000830185610c96565b610e446020830184610c96565b9392505050565b6000606082019050610e606000830186610c96565b610e6d6020830185610c96565b610e7a6040830184610de1565b949350505050565b6000604082019050610e976000830185610c96565b610ea46020830184610de1565b9392505050565b60006020820190508181036000830152610ec58184610cd6565b905092915050565b60006020820190508181036000830152610ee681610d0f565b9050919050565b60006020820190508181036000830152610f0681610d32565b9050919050565b60006020820190508181036000830152610f2681610d55565b9050919050565b60006020820190508181036000830152610f4681610d78565b9050919050565b60006020820190508181036000830152610f6681610d9b565b9050919050565b60006020820190508181036000830152610f8681610dbe565b9050919050565b6000602082019050610fa26000830184610de1565b92915050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b6000610fe58261106e565b9150610ff08361106e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611025576110246110ab565b5b828201905092915050565b600061103b8261104e565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b8381101561109657808201518184015260208101905061107b565b838111156110a5576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f5361666545524332303a2064656372656173656420616c6c6f77616e6365206260008201527f656c6f77207a65726f0000000000000000000000000000000000000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b61128281611030565b811461128d57600080fd5b50565b61129981611042565b81146112a457600080fd5b50565b6112b08161106e565b81146112bb57600080fd5b5056fea2646970667358221220b29e9927076f0708f4c5920323220ed8a55bb71772c3f368d8c82829919fd71964736f6c63430008040033000000000000000000000000470ebf5f030ed85fc1ed4c2d36b9dd02e77cf1b7000000000000000000000000853d955acef822db058eb8505911ed77f175b99e
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80637877eed2116100de578063a340bae211610097578063ddc6326211610071578063ddc63262146103c7578063e5e2efaa146103e3578063e69948bc14610413578063f2fde38b1461042f57610173565b8063a340bae21461035c578063ac4afa381461037b578063b1bead99146103ab57610173565b80637877eed2146102c457806379b3066b146102e05780638da5cb5b146102ea5780639657e06b146103085780639b42910814610324578063a072dc321461034057610173565b80633b66ce14116101305780633b66ce14146102185780634401ce32146102485780634ff92a4d1461026657806351cff8d9146102825780635b7244d41461029e578063715018a6146102ba57610173565b80631f02c95d1461017857806324c2ddec146101965780632935d080146101a0578063334041a6146101be578063359524d6146101dc57806335c62bc2146101fa575b600080fd5b61018061044b565b60405161018d9190613436565b60405180910390f35b61019e610451565b005b6101a861071c565b6040516101b5919061347a565b60405180910390f35b6101c661073a565b6040516101d3919061323e565b60405180910390f35b6101e461074d565b6040516101f19190613436565b60405180910390f35b610202610753565b60405161020f9190613436565b60405180910390f35b610232600480360381019061022d9190612d0e565b610760565b60405161023f919061347a565b60405180910390f35b61025061078b565b60405161025d9190613259565b60405180910390f35b610280600480360381019061027b9190612d0e565b6107b1565b005b61029c60048036038101906102979190612dd8565b6108bd565b005b6102b860048036038101906102b39190612dd8565b610ba3565b005b6102c2610d9f565b005b6102de60048036038101906102d99190612d37565b610e27565b005b6102e8611057565b005b6102f2611385565b6040516102ff919061319a565b60405180910390f35b610322600480360381019061031d9190612ecb565b6113ae565b005b61033e60048036038101906103399190612e8f565b61156a565b005b61035a60048036038101906103559190612e01565b611970565b005b610364611acf565b604051610372929190613451565b60405180910390f35b61039560048036038101906103909190612e3d565b611ae1565b6040516103a2919061319a565b60405180910390f35b6103c560048036038101906103c09190612d73565b611b20565b005b6103e160048036038101906103dc9190612e3d565b611de9565b005b6103fd60048036038101906103f89190612dd8565b61246d565b60405161040a9190613436565b60405180910390f35b61042d60048036038101906104289190612dd8565b612485565b005b61044960048036038101906104449190612d0e565b61262f565b005b60065481565b610459612727565b73ffffffffffffffffffffffffffffffffffffffff16610477611385565b73ffffffffffffffffffffffffffffffffffffffff16146104cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c4906133b6565b60405180910390fd5b6000600c54600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161052d919061319a565b60206040518083038186803b15801561054557600080fd5b505afa158015610559573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057d9190612e66565b61058791906134c7565b90506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401610608919061319a565b60206040518083038186803b15801561062057600080fd5b505afa158015610634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106589190612e66565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106c057600080fd5b505afa1580156106d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f89190612e66565b61070291906135ea565b905081600460000181905550806004600101819055505050565b600a60009054906101000a90046bffffffffffffffffffffffff1681565b600760009054906101000a900460ff1681565b600c5481565b6000600880549050905090565b60096020528060005260406000206000915054906101000a90046bffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6107b9612727565b73ffffffffffffffffffffffffffffffffffffffff166107d7611385565b73ffffffffffffffffffffffffffffffffffffffff161461082d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610824906133b6565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f7b8cab8826040518263ffffffff1660e01b8152600401610888919061319a565b600060405180830381600087803b1580156108a257600080fd5b505af11580156108b6573d6000803e3d6000fd5b5050505050565b6108c5612727565b73ffffffffffffffffffffffffffffffffffffffff166108e3611385565b73ffffffffffffffffffffffffffffffffffffffff1614610939576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610930906133b6565b60405180910390fd5b60008173ffffffffffffffffffffffffffffffffffffffff16633f3a0c5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561098157600080fd5b505afa158015610995573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b99190612e66565b90506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e84306040518363ffffffff1660e01b8152600401610a1a9291906131b5565b60206040518083038186803b158015610a3257600080fd5b505afa158015610a46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6a9190612e66565b9050610a9a600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684308461272f565b60008373ffffffffffffffffffffffffffffffffffffffff16633f3a0c5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ae257600080fd5b505afa158015610af6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1a9190612e66565b905081600c54610b2a91906135ea565b600c8190555081600b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b7f91906135ea565b92505081905550828282610b9391906134c7565b14610b9d57600080fd5b50505050565b610bab612727565b73ffffffffffffffffffffffffffffffffffffffff16610bc9611385565b73ffffffffffffffffffffffffffffffffffffffff1614610c1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c16906133b6565b60405180910390fd5b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e83306040518363ffffffff1660e01b8152600401610c7e9291906131b5565b60206040518083038186803b158015610c9657600080fd5b505afa158015610caa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cce9190612e66565b9050600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600c6000828254610d2191906135ea565b925050819055506000600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d9b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683308461272f565b5050565b610da7612727565b73ffffffffffffffffffffffffffffffffffffffff16610dc5611385565b73ffffffffffffffffffffffffffffffffffffffff1614610e1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e12906133b6565b60405180910390fd5b610e2560006127b8565b565b610e2f612727565b73ffffffffffffffffffffffffffffffffffffffff16610e4d611385565b73ffffffffffffffffffffffffffffffffffffffff1614610ea3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9a906133b6565b60405180910390fd5b60008111610ee6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610edd906132b6565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b8152600401610f43929190613215565b600060405180830381600087803b158015610f5d57600080fd5b505af1158015610f71573d6000803e3d6000fd5b50505050610fc4600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168361287c565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663785a47f883836040518363ffffffff1660e01b8152600401611021929190613215565b600060405180830381600087803b15801561103b57600080fd5b505af115801561104f573d6000803e3d6000fd5b505050505050565b61105f612727565b73ffffffffffffffffffffffffffffffffffffffff1661107d611385565b73ffffffffffffffffffffffffffffffffffffffff16146110d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ca906133b6565b60405180910390fd5b6000805b600880549050811015611368576000600a60009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16600960006008858154811061114d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166006546111e69190613590565b6111f0919061355f565b9050600654818461120191906134c7565b1115611218578260065461121591906135ea565b90505b808361122491906134c7565b92506112b7600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660088481548110611286577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168361299d565b7fbb1896312e8942f1899b2f8c15bc6667b301540456846767c2597697e05c735260088381548110611312577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260405161134c929190613215565b60405180910390a15080806113609061371b565b9150506110d7565b50806006600082825461137b91906135ea565b9250508190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6113b6612727565b73ffffffffffffffffffffffffffffffffffffffff166113d4611385565b73ffffffffffffffffffffffffffffffffffffffff161461142a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611421906133b6565b60405180910390fd5b600760009054906101000a900460ff161561147a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147190613416565b60405180910390fd5b6001600760006101000a81548160ff02191690831515021790555081600460000181905550806004600101819055506114d7600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633308561272f565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1933836040518363ffffffff1660e01b8152600401611534929190613215565b600060405180830381600087803b15801561154e57600080fd5b505af1158015611562573d6000803e3d6000fd5b505050505050565b611572612727565b73ffffffffffffffffffffffffffffffffffffffff16611590611385565b73ffffffffffffffffffffffffffffffffffffffff16146115e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115dd906133b6565b60405180910390fd5b600880549050821061162d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611624906132f6565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166008838154811061167e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f690613356565b60405180910390fd5b6008600160088054905061171391906135ea565b8154811061174a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600883815481106117af577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600880548061182f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690559055600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16600a60008282829054906101000a90046bffffffffffffffffffffffff166118e4919061361e565b92506101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154906bffffffffffffffffffffffff02191690555050565b611978612727565b73ffffffffffffffffffffffffffffffffffffffff16611996611385565b73ffffffffffffffffffffffffffffffffffffffff16146119ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e3906133b6565b60405180910390fd5b60008111611a2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2690613376565b60405180910390fd5b80600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a7e91906134c7565b9250508190555080600c6000828254611a9791906134c7565b92505081905550611acb600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838361299d565b5050565b60048060000154908060010154905082565b60088181548110611af157600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611b28612727565b73ffffffffffffffffffffffffffffffffffffffff16611b46611385565b73ffffffffffffffffffffffffffffffffffffffff1614611b9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b93906133b6565b60405180910390fd5b6000816bffffffffffffffffffffffff1611611bed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611be490613396565b60405180910390fd5b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff1681600a60009054906101000a90046bffffffffffffffffffffffff16611c6b919061351d565b611c75919061361e565b600a60006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055506000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff161415611d77576008829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b80600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055505050565b611df1612727565b73ffffffffffffffffffffffffffffffffffffffff16611e0f611385565b73ffffffffffffffffffffffffffffffffffffffff1614611e65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e5c906133b6565b60405180910390fd5b6064811115611ea9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ea090613316565b60405180910390fd5b6000600c54600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611f09919061319a565b60206040518083038186803b158015611f2157600080fd5b505afa158015611f35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f599190612e66565b611f6391906134c7565b9050600654600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611fc3919061319a565b60206040518083038186803b158015611fdb57600080fd5b505afa158015611fef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120139190612e66565b111561215e57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68600654600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016120b5919061319a565b60206040518083038186803b1580156120cd57600080fd5b505afa1580156120e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121059190612e66565b61210f91906135ea565b6040518263ffffffff1660e01b815260040161212b9190613436565b600060405180830381600087803b15801561214557600080fd5b505af1158015612159573d6000803e3d6000fd5b505050505b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b81526004016121dd919061319a565b60206040518083038186803b1580156121f557600080fd5b505afa158015612209573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222d9190612e66565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561229557600080fd5b505afa1580156122a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122cd9190612e66565b6122d791906135ea565b90506000600460000154600460010154846122f29190613590565b6122fc919061355f565b905081811015612341576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161233890613296565b60405180910390fd5b6000606485848461235291906135ea565b61235c9190613590565b612366919061355f565b9050806006600082825461237a91906134c7565b9250508190555083600460000181905550808361239791906134c7565b600460010181905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1930836040518363ffffffff1660e01b81526004016123fd929190613215565b600060405180830381600087803b15801561241757600080fd5b505af115801561242b573d6000803e3d6000fd5b505050507f302ece888b23f17e9addd0ad302c9b0d6619a5c38b718deb019638e29355c0fb8160405161245e9190613436565b60405180910390a15050505050565b600b6020528060005260406000206000915090505481565b61248d612727565b73ffffffffffffffffffffffffffffffffffffffff166124ab611385565b73ffffffffffffffffffffffffffffffffffffffff1614612501576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124f8906133b6565b60405180910390fd5b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008273ffffffffffffffffffffffffffffffffffffffff16633f3a0c5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561258d57600080fd5b505afa1580156125a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125c59190612e66565b90508181600c546125d691906134c7565b6125e091906135ea565b600c8190555080600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612637612727565b73ffffffffffffffffffffffffffffffffffffffff16612655611385565b73ffffffffffffffffffffffffffffffffffffffff16146126ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126a2906133b6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561271b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612712906132d6565b60405180910390fd5b612724816127b8565b50565b600033905090565b6127b2846323b872dd60e01b858585604051602401612750939291906131de565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612a23565b50505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000818473ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30866040518363ffffffff1660e01b81526004016128ba9291906131b5565b60206040518083038186803b1580156128d257600080fd5b505afa1580156128e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061290a9190612e66565b61291491906134c7565b90506129978463095ea7b360e01b8584604051602401612935929190613215565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612a23565b50505050565b612a1e8363a9059cbb60e01b84846040516024016129bc929190613215565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612a23565b505050565b6000612a85826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612aea9092919063ffffffff16565b9050600081511115612ae55780806020019051810190612aa59190612daf565b612ae4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612adb906133f6565b60405180910390fd5b5b505050565b6060612af98484600085612b02565b90509392505050565b606082471015612b47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3e90613336565b60405180910390fd5b612b5085612c16565b612b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b86906133d6565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051612bb89190613183565b60006040518083038185875af1925050503d8060008114612bf5576040519150601f19603f3d011682016040523d82523d6000602084013e612bfa565b606091505b5091509150612c0a828286612c29565b92505050949350505050565b600080823b905060008111915050919050565b60608315612c3957829050612c89565b600083511115612c4c5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c809190613274565b60405180910390fd5b9392505050565b600081359050612c9f81613b18565b92915050565b600081519050612cb481613b2f565b92915050565b600081359050612cc981613b46565b92915050565b600081359050612cde81613b5d565b92915050565b600081519050612cf381613b5d565b92915050565b600081359050612d0881613b74565b92915050565b600060208284031215612d2057600080fd5b6000612d2e84828501612c90565b91505092915050565b60008060408385031215612d4a57600080fd5b6000612d5885828601612c90565b9250506020612d6985828601612ccf565b9150509250929050565b60008060408385031215612d8657600080fd5b6000612d9485828601612c90565b9250506020612da585828601612cf9565b9150509250929050565b600060208284031215612dc157600080fd5b6000612dcf84828501612ca5565b91505092915050565b600060208284031215612dea57600080fd5b6000612df884828501612cba565b91505092915050565b60008060408385031215612e1457600080fd5b6000612e2285828601612cba565b9250506020612e3385828601612ccf565b9150509250929050565b600060208284031215612e4f57600080fd5b6000612e5d84828501612ccf565b91505092915050565b600060208284031215612e7857600080fd5b6000612e8684828501612ce4565b91505092915050565b60008060408385031215612ea257600080fd5b6000612eb085828601612ccf565b9250506020612ec185828601612c90565b9150509250929050565b60008060408385031215612ede57600080fd5b6000612eec85828601612ccf565b9250506020612efd85828601612ccf565b9150509250929050565b612f1081613652565b82525050565b612f1f81613664565b82525050565b6000612f3082613495565b612f3a81856134ab565b9350612f4a8185602086016136e8565b80840191505092915050565b612f5f816136c4565b82525050565b6000612f70826134a0565b612f7a81856134b6565b9350612f8a8185602086016136e8565b612f93816137c2565b840191505092915050565b6000612fab6020836134b6565b9150612fb6826137d3565b602082019050919050565b6000612fce6027836134b6565b9150612fd9826137fc565b604082019050919050565b6000612ff16026836134b6565b9150612ffc8261384b565b604082019050919050565b6000613014601e836134b6565b915061301f8261389a565b602082019050919050565b6000613037605b836134b6565b9150613042826138c3565b606082019050919050565b600061305a6026836134b6565b915061306582613938565b604082019050919050565b600061307d602f836134b6565b915061308882613987565b604082019050919050565b60006130a0601f836134b6565b91506130ab826139d6565b602082019050919050565b60006130c36019836134b6565b91506130ce826139ff565b602082019050919050565b60006130e66020836134b6565b91506130f182613a28565b602082019050919050565b6000613109601d836134b6565b915061311482613a51565b602082019050919050565b600061312c602a836134b6565b915061313782613a7a565b604082019050919050565b600061314f6021836134b6565b915061315a82613ac9565b604082019050919050565b61316e816136a2565b82525050565b61317d816136ac565b82525050565b600061318f8284612f25565b915081905092915050565b60006020820190506131af6000830184612f07565b92915050565b60006040820190506131ca6000830185612f07565b6131d76020830184612f07565b9392505050565b60006060820190506131f36000830186612f07565b6132006020830185612f07565b61320d6040830184613165565b949350505050565b600060408201905061322a6000830185612f07565b6132376020830184613165565b9392505050565b60006020820190506132536000830184612f16565b92915050565b600060208201905061326e6000830184612f56565b92915050565b6000602082019050818103600083015261328e8184612f65565b905092915050565b600060208201905081810360008301526132af81612f9e565b9050919050565b600060208201905081810360008301526132cf81612fc1565b9050919050565b600060208201905081810360008301526132ef81612fe4565b9050919050565b6000602082019050818103600083015261330f81613007565b9050919050565b6000602082019050818103600083015261332f8161302a565b9050919050565b6000602082019050818103600083015261334f8161304d565b9050919050565b6000602082019050818103600083015261336f81613070565b9050919050565b6000602082019050818103600083015261338f81613093565b9050919050565b600060208201905081810360008301526133af816130b6565b9050919050565b600060208201905081810360008301526133cf816130d9565b9050919050565b600060208201905081810360008301526133ef816130fc565b9050919050565b6000602082019050818103600083015261340f8161311f565b9050919050565b6000602082019050818103600083015261342f81613142565b9050919050565b600060208201905061344b6000830184613165565b92915050565b60006040820190506134666000830185613165565b6134736020830184613165565b9392505050565b600060208201905061348f6000830184613174565b92915050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b60006134d2826136a2565b91506134dd836136a2565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561351257613511613764565b5b828201905092915050565b6000613528826136ac565b9150613533836136ac565b9250826bffffffffffffffffffffffff0382111561355457613553613764565b5b828201905092915050565b600061356a826136a2565b9150613575836136a2565b92508261358557613584613793565b5b828204905092915050565b600061359b826136a2565b91506135a6836136a2565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156135df576135de613764565b5b828202905092915050565b60006135f5826136a2565b9150613600836136a2565b92508282101561361357613612613764565b5b828203905092915050565b6000613629826136ac565b9150613634836136ac565b92508282101561364757613646613764565b5b828203905092915050565b600061365d82613682565b9050919050565b60008115159050919050565b600061367b82613652565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b60006136cf826136d6565b9050919050565b60006136e182613682565b9050919050565b60005b838110156137065780820151818401526020810190506136eb565b83811115613715576000848401525b50505050565b6000613726826136a2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561375957613758613764565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f43616e6e6f742072756e2068617276657374207768656e2049562064726f7073600082015250565b7f54454d504c4520746f206d696e7420616e6420616c6c6f63617465206d75737460008201527f206265203e203000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4e6f20706f6f6c206174207468652073706563696669656420696e6465780000600082015250565b7f5363616c696e6720666163746f7220696e74657270726574656420617320612060008201527f252c206e6565647320746f206265206265747765656e203020286e6f2068617260208201527f766573742920616e642031303020286d61782068617276657374290000000000604082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f506f6f6c20617420696e64657820616e642070617373656420696e206164647260008201527f65737320646f6e2774206d617463680000000000000000000000000000000000602082015250565b7f535441424c454320746f20616c6c6f63617465206d757374206265203e203000600082015250565b7f48617276657374207368617265206d757374206265203e203000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f4f776e65722068617320616c726561647920736565646564207472656173757260008201527f7900000000000000000000000000000000000000000000000000000000000000602082015250565b613b2181613652565b8114613b2c57600080fd5b50565b613b3881613664565b8114613b4357600080fd5b50565b613b4f81613670565b8114613b5a57600080fd5b50565b613b66816136a2565b8114613b7157600080fd5b50565b613b7d816136ac565b8114613b8857600080fd5b5056fea2646970667358221220740327d0fbd981381f5ab9575672231c7cb29d5f6c90bfd6e03e11b907a4e88064736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000470ebf5f030ed85fc1ed4c2d36b9dd02e77cf1b7000000000000000000000000853d955acef822db058eb8505911ed77f175b99e
-----Decoded View---------------
Arg [0] : _TEMPLE (address): 0x470EBf5f030Ed85Fc1ed4C2d36B9DD02e77CF1b7
Arg [1] : _STABLEC (address): 0x853d955aCEf822Db058eb8505911ED77F175b99e
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000470ebf5f030ed85fc1ed4c2d36b9dd02e77cf1b7
Arg [1] : 000000000000000000000000853d955acef822db058eb8505911ed77f175b99e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 25 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ 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.