Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 7833026 | 154 days ago | IN | 0 ETH | 0.00000198 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Community
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol'; import '@openzeppelin/contracts/interfaces/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import './interfaces/IBlast.sol'; import './interfaces/IERC20Rebasing.sol'; using SafeERC20 for IERC20; contract Community is Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable { event Deposit(address indexed account, address indexed asset, uint256 amount, uint256 fee); event Withdraw(address indexed account, address indexed asset, uint256 amount); event ClaimYield( address indexed recipient, address indexed asset, uint256 recipientPart, uint256 treasuryPart ); event ClaimFee( address indexed recipient, address indexed asset, uint256 recipientPart, uint256 treasuryPart ); IBlast public constant BLAST = IBlast(0x4300000000000000000000000000000000000002); // IERC20Rebasing public constant USDBR = IERC20Rebasing(0x4300000000000000000000000000000000000003); IERC20Rebasing public constant USDBR = IERC20Rebasing(0x4200000000000000000000000000000000000022); // testnet // IERC20Rebasing public constant WETH = IERC20Rebasing(0x4300000000000000000000000000000000000004); IERC20Rebasing public constant WETH = IERC20Rebasing(0x4200000000000000000000000000000000000023); // testnet address public _factory; uint256 public _feeRateBps; address public _treasury; uint256 public _treasuryRateBps; mapping(address => uint256) public _lots; // _lots[asset] mapping(address => mapping(address => uint256)) public _balances; // _balances[asset][account] mapping(address => uint256) public _fees; // _fees[asset] /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } function initialize( address factory, address owner_, uint256 feeRateBps, address treasury, uint256 treasuryRateBps, address[] memory tokens, uint256[] memory lots ) external initializer { require(tokens.length == lots.length, 'invalid tokens'); require(owner_ != address(0), 'invalid owner'); require(factory != address(0), 'invalid factory'); require(treasury != address(0), 'invalid treasury'); require(treasuryRateBps <= 5_000, 'invalid treasuryRateBps'); require(feeRateBps <= 5_000, 'invalid feeRateBps'); __Ownable_init(owner_); __Context_init(); __ReentrancyGuard_init(); _factory = factory; _feeRateBps = feeRateBps; _treasury = treasury; _treasuryRateBps = treasuryRateBps; BLAST.configureClaimableYield(); USDBR.configure(YieldMode.CLAIMABLE); WETH.configure(YieldMode.CLAIMABLE); for (uint i = 0; i < tokens.length; i++) { uint256 lot = lots[i]; require(lot > 0, 'invalid lot amount'); _lots[tokens[i]] = lot; } } function updateSettings(uint256 feeRateBps, address treasury, uint256 treasuryRateBps) external { require(_msgSender() == _factory, 'not the factory'); require(treasury != address(0), 'invalid treasury'); require(treasuryRateBps <= 5_000, 'invalid treasuryRateBps'); require(feeRateBps <= 5_000, 'invalid feeRateBps'); _feeRateBps = feeRateBps; _treasury = treasury; _treasuryRateBps = treasuryRateBps; } function setLot(address asset, uint256 lot) external onlyOwner { _lots[asset] = lot; } function yield() external view returns (uint256, uint256, uint256) { return ( BLAST.readClaimableYield(address(this)), WETH.getClaimableAmount(address(this)), USDBR.getClaimableAmount(address(this)) ); } function claimYield(address asset, address recipient) external onlyOwner nonReentrant { (uint256 recipientPart, uint256 treasuryPart) = _distributeYield(asset, recipient); emit ClaimYield(recipient, asset, recipientPart, treasuryPart); } function claimFee(address asset, address recipient) external onlyOwner nonReentrant { (uint256 recipientPart, uint256 treasuryPart) = _distributeFee(asset, recipient); emit ClaimFee(recipient, asset, recipientPart, treasuryPart); } function deposit(address asset, uint256 amount) external payable nonReentrant { uint256 lot = _lots[asset]; require(lot > 0, 'not supported asset'); require(amount > 0, 'invalid amount'); require(amount >= lot, 'invalid lot amount'); if (asset == address(0)) { require(msg.value == amount, 'conflicted amount'); } else { require(msg.value == 0, 'unexpected amount'); uint256 balanceBefore = IERC20(asset).balanceOf(_msgSender()); require(balanceBefore >= amount, 'not enough balance'); uint256 contractBalanceBefore = IERC20(asset).balanceOf(address(this)); IERC20(asset).safeTransferFrom(_msgSender(), address(this), amount); uint256 contractBalanceAfter = IERC20(asset).balanceOf(address(this)); uint256 balanceAfter = IERC20(asset).balanceOf(_msgSender()); require(contractBalanceAfter == contractBalanceBefore + amount, 'invalid contract balance after'); require(balanceAfter == balanceBefore - amount, 'invalid balance after'); } uint256 fee = (amount * _feeRateBps) / 10_000; uint256 newAmount = amount - fee; _balances[asset][_msgSender()] += newAmount; _fees[asset] += fee; emit Deposit(_msgSender(), asset, newAmount, fee); } function withdraw(address asset, uint256 amount) external nonReentrant { uint256 balance = _balances[asset][_msgSender()]; require(amount > 0, 'invalid amount'); require(balance >= amount, 'not enough balance'); _balances[asset][_msgSender()] = balance - amount; if (asset == address(0)) { (bool success, ) = payable(_msgSender()).call{ value: amount }(''); require(success, 'failed to send ether'); } else { IERC20(asset).safeTransfer(_msgSender(), amount); } emit Withdraw(_msgSender(), asset, amount); } function _distributeYield(address asset, address recipient) private returns (uint256, uint256) { require(recipient != address(0), 'invalid recipient'); uint256 treasuryPart = 0; uint256 recipientPart = 0; if (asset == address(0)) { uint256 claimed = BLAST.claimAllYield(address(this), address(this)); treasuryPart = (claimed * _treasuryRateBps) / 10_000; recipientPart = claimed - treasuryPart; (bool success1, ) = payable(recipient).call{ value: recipientPart }(''); require(success1, 'recipient: failed to send ether'); if (treasuryPart > 0) { (bool success2, ) = payable(_treasury).call{ value: treasuryPart }(''); require(success2, 'treasury: failed to send ether'); } } else if (asset == address(USDBR) || asset == address(WETH)) { uint256 claimed = IERC20Rebasing(asset).getClaimableAmount(address(this)); treasuryPart = (claimed * _treasuryRateBps) / 10_000; recipientPart = claimed - treasuryPart; IERC20Rebasing(asset).claim(recipient, recipientPart); if (treasuryPart > 0) { IERC20Rebasing(asset).claim(_treasury, treasuryPart); } } else { revert('invalid asset'); } return (recipientPart, treasuryPart); } function _distributeFee(address asset, address recipient) private returns (uint256, uint256) { require(recipient != address(0), 'invalid recipient'); uint256 amount = _fees[asset]; require(amount > 0, 'invalid amount'); _fees[asset] = 0; uint256 treasuryPart = (amount * _treasuryRateBps) / 10_000; uint256 recipientPart = amount - treasuryPart; if (asset == address(0)) { (bool success1, ) = payable(recipient).call{ value: recipientPart }(''); require(success1, 'recipient: failed to send ether'); if (treasuryPart > 0) { (bool success2, ) = payable(_treasury).call{ value: treasuryPart }(''); require(success2, 'treasury: failed to send ether'); } } else { IERC20(asset).safeTransfer(recipient, recipientPart); if (treasuryPart > 0) { IERC20(asset).safeTransfer(_treasury, treasuryPart); } } return (recipientPart, treasuryPart); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.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. * * The initial owner is set to the address provided by the deployer. 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 OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { OwnableStorage storage $ = _getOwnableStorage(); return $._owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; /// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard struct ReentrancyGuardStorage { uint256 _status; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00; function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) { assembly { $.slot := ReentrancyGuardStorageLocation } } /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); $._status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); // On the first call to nonReentrant, _status will be NOT_ENTERED if ($._status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail $._status = ENTERED; } function _nonReentrantAfter() private { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) $._status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage(); return $._status == ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC20Permit} from "../extensions/IERC20Permit.sol"; import {Address} from "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; interface IBlast { function configureClaimableYield() external; function configureClaimableGas() external; function claimAllGas(address contractAddress, address recipient) external returns (uint256); function claimYield( address contractAddress, address recipientOfYield, uint256 amount ) external returns (uint256); function claimAllYield(address contractAddress, address recipientOfYield) external returns (uint256); function readClaimableYield(address contractAddress) external view returns (uint256); }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; import './Types.sol'; interface IERC20Rebasing { function configure(YieldMode) external returns (uint256); function claim(address recipient, uint256 amount) external returns (uint256); function getClaimableAmount(address account) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.20; enum YieldMode { AUTOMATIC, VOID, CLAIMABLE } enum GasMode { VOID, CLAIMABLE }
{ "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "hardhat/=lib/openzeppelin-foundry-upgrades/node_modules/hardhat/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/", "solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "shanghai", "viaIR": false, "libraries": {} }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"recipientPart","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryPart","type":"uint256"}],"name":"ClaimFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"recipientPart","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"treasuryPart","type":"uint256"}],"name":"ClaimYield","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"BLAST","outputs":[{"internalType":"contract IBlast","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDBR","outputs":[{"internalType":"contract IERC20Rebasing","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"contract IERC20Rebasing","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"_balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_feeRateBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_fees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_lots","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_treasuryRateBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"claimFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"claimYield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"factory","type":"address"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"uint256","name":"feeRateBps","type":"uint256"},{"internalType":"address","name":"treasury","type":"address"},{"internalType":"uint256","name":"treasuryRateBps","type":"uint256"},{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"lots","type":"uint256[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"lot","type":"uint256"}],"name":"setLot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"feeRateBps","type":"uint256"},{"internalType":"address","name":"treasury","type":"address"},{"internalType":"uint256","name":"treasuryRateBps","type":"uint256"}],"name":"updateSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yield","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561000f575f80fd5b5061001861001d565b6100cf565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff161561006d5760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100cc5780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b61225180620000dd5f395ff3fe608060405260043610610126575f3560e01c806397d75776116100a8578063dea67dc11161006d578063dea67dc114610346578063e21d07231461035b578063e319a3d914610391578063ec903068146103b0578063f2fde38b146103c5578063f3fef3a3146103e4575f80fd5b806397d75776146102aa578063a53da0a0146102c4578063a8ac93f5146102e3578063ad5c46481461030e578063c5cc6b6a14610328575f80fd5b8063706b233a116100ee578063706b233a146101d0578063715018a6146101ef5780637f45125914610203578063899c2741146102355780638da5cb5b1461026e575f80fd5b80630de3cd081461012a578063285939841461014b578063304a114c1461017f57806347e7ef241461019e5780636cac65fb146101b1575b5f80fd5b348015610135575f80fd5b50610149610144366004611f25565b610403565b005b348015610156575f80fd5b5061015f6108e4565b604080519384526020840192909252908201526060015b60405180910390f35b34801561018a575f80fd5b50610149610199366004612023565b610a21565b6101496101ac366004612023565b610a44565b3480156101bc575f80fd5b506101496101cb36600461204b565b610f64565b3480156101db575f80fd5b506101496101ea36600461207c565b610ff2565b3480156101fa575f80fd5b5061014961114d565b34801561020e575f80fd5b5061021d6022602160991b0181565b6040516001600160a01b039091168152602001610176565b348015610240575f80fd5b5061026061024f3660046120ae565b60046020525f908152604090205481565b604051908152602001610176565b348015610279575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031661021d565b3480156102b5575f80fd5b5061021d6002604360981b0181565b3480156102cf575f80fd5b506101496102de36600461204b565b611160565b3480156102ee575f80fd5b506102606102fd3660046120ae565b60066020525f908152604090205481565b348015610319575f80fd5b5061021d6023602160991b0181565b348015610333575f80fd5b505f5461021d906001600160a01b031681565b348015610351575f80fd5b5061026060015481565b348015610366575f80fd5b5061026061037536600461204b565b600560209081525f928352604080842090915290825290205481565b34801561039c575f80fd5b5060025461021d906001600160a01b031681565b3480156103bb575f80fd5b5061026060035481565b3480156103d0575f80fd5b506101496103df3660046120ae565b6111ce565b3480156103ef575f80fd5b506101496103fe366004612023565b61120b565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f811580156104485750825b90505f8267ffffffffffffffff1660011480156104645750303b155b905081158015610472575080155b156104905760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156104ba57845460ff60401b1916600160401b1785555b85518751146105015760405162461bcd60e51b815260206004820152600e60248201526d696e76616c696420746f6b656e7360901b60448201526064015b60405180910390fd5b6001600160a01b038b166105475760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b21037bbb732b960991b60448201526064016104f8565b6001600160a01b038c1661058f5760405162461bcd60e51b815260206004820152600f60248201526e696e76616c696420666163746f727960881b60448201526064016104f8565b6001600160a01b0389166105d85760405162461bcd60e51b815260206004820152601060248201526f696e76616c696420747265617375727960801b60448201526064016104f8565b6113888811156106245760405162461bcd60e51b8152602060048201526017602482015276696e76616c69642074726561737572795261746542707360481b60448201526064016104f8565b6113888a111561066b5760405162461bcd60e51b8152602060048201526012602482015271696e76616c6964206665655261746542707360701b60448201526064016104f8565b6106748b6113c9565b61067c6113da565b6106846113e2565b5f80546001600160a01b03808f166001600160a01b031992831617835560018d905560028054918d169190921617905560038990556040805163784c3b3d60e11b815290516002604360981b019263f098767a926004808201939182900301818387803b1580156106f3575f80fd5b505af1158015610705573d5f803e3d5ffd5b5050604051631a33757d60e01b81526022602160991b019250631a33757d9150610734906002906004016120c7565b6020604051808303815f875af1158015610750573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061077491906120ed565b50604051631a33757d60e01b81526023602160991b0190631a33757d906107a0906002906004016120c7565b6020604051808303815f875af11580156107bc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e091906120ed565b505f5b875181101561088f575f8782815181106107ff576107ff612104565b602002602001015190505f811161084d5760405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a59081b1bdd08185b5bdd5b9d60721b60448201526064016104f8565b8060045f8b858151811061086357610863612104565b6020908102919091018101516001600160a01b031682528101919091526040015f2055506001016107e3565b5083156108d657845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050505050565b604051631d864f1d60e31b81523060048201525f90819081906002604360981b019063ec3278e890602401602060405180830381865afa15801561092a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061094e91906120ed565b60405163e12f3a6160e01b81523060048201526023602160991b019063e12f3a6190602401602060405180830381865afa15801561098e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109b291906120ed565b60405163e12f3a6160e01b81523060048201526022602160991b019063e12f3a6190602401602060405180830381865afa1580156109f2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a1691906120ed565b925092509250909192565b610a296113f2565b6001600160a01b039091165f90815260046020526040902055565b610a4c61144d565b6001600160a01b0382165f9081526004602052604090205480610aa75760405162461bcd60e51b81526020600482015260136024820152721b9bdd081cdd5c1c1bdc9d195908185cdcd95d606a1b60448201526064016104f8565b5f8211610ac65760405162461bcd60e51b81526004016104f890612118565b80821015610b0b5760405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a59081b1bdd08185b5bdd5b9d60721b60448201526064016104f8565b6001600160a01b038316610b6157813414610b5c5760405162461bcd60e51b815260206004820152601160248201527018dbdb999b1a58dd195908185b5bdd5b9d607a1b60448201526064016104f8565b610e70565b3415610ba35760405162461bcd60e51b81526020600482015260116024820152701d5b995e1c1958dd195908185b5bdd5b9d607a1b60448201526064016104f8565b5f6001600160a01b0384166370a08231336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610bf6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c1a91906120ed565b905082811015610c615760405162461bcd60e51b81526020600482015260126024820152716e6f7420656e6f7567682062616c616e636560701b60448201526064016104f8565b6040516370a0823160e01b81523060048201525f906001600160a01b038616906370a0823190602401602060405180830381865afa158015610ca5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cc991906120ed565b9050610ce06001600160a01b038616333087611484565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa158015610d24573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d4891906120ed565b90505f6001600160a01b0387166370a08231336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610d9d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dc191906120ed565b9050610dcd8684612154565b8214610e1b5760405162461bcd60e51b815260206004820152601e60248201527f696e76616c696420636f6e74726163742062616c616e6365206166746572000060448201526064016104f8565b610e258685612167565b8114610e6b5760405162461bcd60e51b815260206004820152601560248201527434b73b30b634b2103130b630b731b29030b33a32b960591b60448201526064016104f8565b505050505b5f61271060015484610e82919061217a565b610e8c9190612191565b90505f610e998285612167565b6001600160a01b0386165f908152600560209081526040808320338452909152812080549293508392909190610ed0908490612154565b90915550506001600160a01b0385165f9081526006602052604081208054849290610efc908490612154565b909155505060408051828152602081018490526001600160a01b0387169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3505050610f6060015f805160206121fc83398151915255565b5050565b610f6c6113f2565b610f7461144d565b5f80610f808484611504565b91509150836001600160a01b0316836001600160a01b03167fa5a56e24e8cbe4c43434b9fd1d71f3567e9897e6b194f6d0d2e0d638bc9aa05a8484604051610fd2929190918252602082015260400190565b60405180910390a35050610f6060015f805160206121fc83398151915255565b5f546001600160a01b0316336001600160a01b0316146110465760405162461bcd60e51b815260206004820152600f60248201526e6e6f742074686520666163746f727960881b60448201526064016104f8565b6001600160a01b03821661108f5760405162461bcd60e51b815260206004820152601060248201526f696e76616c696420747265617375727960801b60448201526064016104f8565b6113888111156110db5760405162461bcd60e51b8152602060048201526017602482015276696e76616c69642074726561737572795261746542707360481b60448201526064016104f8565b6113888311156111225760405162461bcd60e51b8152602060048201526012602482015271696e76616c6964206665655261746542707360701b60448201526064016104f8565b600192909255600280546001600160a01b0319166001600160a01b0392909216919091179055600355565b6111556113f2565b61115e5f611763565b565b6111686113f2565b61117061144d565b5f8061117c84846117d3565b91509150836001600160a01b0316836001600160a01b03167f8bc3a9723e5a1f1c9fad43c632554367016acdc2d20ed712b4117f86e368aad58484604051610fd2929190918252602082015260400190565b6111d66113f2565b6001600160a01b0381166111ff57604051631e4fbdf760e01b81525f60048201526024016104f8565b61120881611763565b50565b61121361144d565b6001600160a01b0382165f908152600560209081526040808320338452909152902054816112535760405162461bcd60e51b81526004016104f890612118565b818110156112985760405162461bcd60e51b81526020600482015260126024820152716e6f7420656e6f7567682062616c616e636560701b60448201526064016104f8565b6112a28282612167565b6001600160a01b0384165f81815260056020908152604080832033845290915290209190915561135e576040515f90339084908381818185875af1925050503d805f811461130b576040519150601f19603f3d011682016040523d82523d5f602084013e611310565b606091505b50509050806113585760405162461bcd60e51b81526020600482015260146024820152733330b4b632b2103a379039b2b7321032ba3432b960611b60448201526064016104f8565b50611372565b6113726001600160a01b0384163384611c10565b6040518281526001600160a01b0384169033907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060200160405180910390a350610f6060015f805160206121fc83398151915255565b6113d1611c46565b61120881611c8f565b61115e611c46565b6113ea611c46565b61115e611c97565b336114247f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461115e5760405163118cdaa760e01b81523360048201526024016104f8565b5f805160206121fc83398151915280546001190161147e57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b6040516001600160a01b0384811660248301528381166044830152606482018390526114eb9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611c9f565b50505050565b60015f805160206121fc83398151915255565b5f806001600160a01b0383166115505760405162461bcd60e51b81526020600482015260116024820152701a5b9d985b1a59081c9958da5c1a595b9d607a1b60448201526064016104f8565b6001600160a01b0384165f90815260066020526040902054806115855760405162461bcd60e51b81526004016104f890612118565b6001600160a01b0385165f908152600660205260408120819055600354612710906115b0908461217a565b6115ba9190612191565b90505f6115c78284612167565b90506001600160a01b038716611724575f866001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611620576040519150601f19603f3d011682016040523d82523d5f602084013e611625565b606091505b50509050806116765760405162461bcd60e51b815260206004820152601f60248201527f726563697069656e743a206661696c656420746f2073656e642065746865720060448201526064016104f8565b821561171e576002546040515f916001600160a01b03169085908381818185875af1925050503d805f81146116c6576040519150601f19603f3d011682016040523d82523d5f602084013e6116cb565b606091505b505090508061171c5760405162461bcd60e51b815260206004820152601e60248201527f74726561737572793a206661696c656420746f2073656e64206574686572000060448201526064016104f8565b505b50611758565b6117386001600160a01b0388168783611c10565b811561175857600254611758906001600160a01b03898116911684611c10565b969095509350505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f806001600160a01b03831661181f5760405162461bcd60e51b81526020600482015260116024820152701a5b9d985b1a59081c9958da5c1a595b9d607a1b60448201526064016104f8565b5f806001600160a01b038616611a165760405163430021db60e11b8152306004820181905260248201525f906002604360981b019063860043b6906044016020604051808303815f875af1158015611879573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061189d91906120ed565b9050612710600354826118b0919061217a565b6118ba9190612191565b92506118c68382612167565b91505f866001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611911576040519150601f19603f3d011682016040523d82523d5f602084013e611916565b606091505b50509050806119675760405162461bcd60e51b815260206004820152601f60248201527f726563697069656e743a206661696c656420746f2073656e642065746865720060448201526064016104f8565b8315611a0f576002546040515f916001600160a01b03169086908381818185875af1925050503d805f81146119b7576040519150601f19603f3d011682016040523d82523d5f602084013e6119bc565b606091505b5050905080611a0d5760405162461bcd60e51b815260206004820152601e60248201527f74726561737572793a206661696c656420746f2073656e64206574686572000060448201526064016104f8565b505b5050611c06565b6001600160a01b0386166022602160991b011480611a4357506001600160a01b0386166023602160991b01145b15611bce5760405163e12f3a6160e01b81523060048201525f906001600160a01b0388169063e12f3a6190602401602060405180830381865afa158015611a8c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ab091906120ed565b905061271060035482611ac3919061217a565b611acd9190612191565b9250611ad98382612167565b604051635569f64b60e11b81526001600160a01b038881166004830152602482018390529193509088169063aad3ec96906044016020604051808303815f875af1158015611b29573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b4d91906120ed565b508215611bc857600254604051635569f64b60e11b81526001600160a01b039182166004820152602481018590529088169063aad3ec96906044016020604051808303815f875af1158015611ba4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a0f91906120ed565b50611c06565b60405162461bcd60e51b815260206004820152600d60248201526c1a5b9d985b1a5908185cdcd95d609a1b60448201526064016104f8565b9590945092505050565b6040516001600160a01b03838116602483015260448201839052611c4191859182169063a9059cbb906064016114b9565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661115e57604051631afcd79f60e31b815260040160405180910390fd5b6111d6611c46565b6114f1611c46565b5f611cb36001600160a01b03841683611d00565b905080515f14158015611cd7575080806020019051810190611cd591906121b0565b155b15611c4157604051635274afe760e01b81526001600160a01b03841660048201526024016104f8565b6060611d0d83835f611d16565b90505b92915050565b606081471015611d3b5760405163cd78605960e01b81523060048201526024016104f8565b5f80856001600160a01b03168486604051611d5691906121cf565b5f6040518083038185875af1925050503d805f8114611d90576040519150601f19603f3d011682016040523d82523d5f602084013e611d95565b606091505b5091509150611da5868383611db1565b925050505b9392505050565b606082611dc657611dc182611e0d565b611daa565b8151158015611ddd57506001600160a01b0384163b155b15611e0657604051639996b31560e01b81526001600160a01b03851660048201526024016104f8565b5080611daa565b805115611e1d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114611e4c575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611e8e57611e8e611e51565b604052919050565b5f67ffffffffffffffff821115611eaf57611eaf611e51565b5060051b60200190565b5f82601f830112611ec8575f80fd5b81356020611edd611ed883611e96565b611e65565b8083825260208201915060208460051b870101935086841115611efe575f80fd5b602086015b84811015611f1a5780358352918301918301611f03565b509695505050505050565b5f805f805f805f60e0888a031215611f3b575f80fd5b611f4488611e36565b96506020611f53818a01611e36565b965060408901359550611f6860608a01611e36565b94506080890135935060a089013567ffffffffffffffff80821115611f8b575f80fd5b818b0191508b601f830112611f9e575f80fd5b8135611fac611ed882611e96565b81815260059190911b8301840190848101908e831115611fca575f80fd5b938501935b82851015611fef57611fe085611e36565b82529385019390850190611fcf565b9650505060c08b0135925080831115612006575f80fd5b50506120148a828b01611eb9565b91505092959891949750929550565b5f8060408385031215612034575f80fd5b61203d83611e36565b946020939093013593505050565b5f806040838503121561205c575f80fd5b61206583611e36565b915061207360208401611e36565b90509250929050565b5f805f6060848603121561208e575f80fd5b8335925061209e60208501611e36565b9150604084013590509250925092565b5f602082840312156120be575f80fd5b611d0d82611e36565b60208101600383106120e757634e487b7160e01b5f52602160045260245ffd5b91905290565b5f602082840312156120fd575f80fd5b5051919050565b634e487b7160e01b5f52603260045260245ffd5b6020808252600e908201526d1a5b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611d1057611d10612140565b81810381811115611d1057611d10612140565b8082028115828204841417611d1057611d10612140565b5f826121ab57634e487b7160e01b5f52601260045260245ffd5b500490565b5f602082840312156121c0575f80fd5b81518015158114611daa575f80fd5b5f82515f5b818110156121ee57602081860181015185830152016121d4565b505f92019182525091905056fe9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a26469706673582212208f3b625d05763d8996e58df16831daff6889b72ffc361a033fdda71859fac4b264736f6c63430008180033
Deployed Bytecode
0x608060405260043610610126575f3560e01c806397d75776116100a8578063dea67dc11161006d578063dea67dc114610346578063e21d07231461035b578063e319a3d914610391578063ec903068146103b0578063f2fde38b146103c5578063f3fef3a3146103e4575f80fd5b806397d75776146102aa578063a53da0a0146102c4578063a8ac93f5146102e3578063ad5c46481461030e578063c5cc6b6a14610328575f80fd5b8063706b233a116100ee578063706b233a146101d0578063715018a6146101ef5780637f45125914610203578063899c2741146102355780638da5cb5b1461026e575f80fd5b80630de3cd081461012a578063285939841461014b578063304a114c1461017f57806347e7ef241461019e5780636cac65fb146101b1575b5f80fd5b348015610135575f80fd5b50610149610144366004611f25565b610403565b005b348015610156575f80fd5b5061015f6108e4565b604080519384526020840192909252908201526060015b60405180910390f35b34801561018a575f80fd5b50610149610199366004612023565b610a21565b6101496101ac366004612023565b610a44565b3480156101bc575f80fd5b506101496101cb36600461204b565b610f64565b3480156101db575f80fd5b506101496101ea36600461207c565b610ff2565b3480156101fa575f80fd5b5061014961114d565b34801561020e575f80fd5b5061021d6022602160991b0181565b6040516001600160a01b039091168152602001610176565b348015610240575f80fd5b5061026061024f3660046120ae565b60046020525f908152604090205481565b604051908152602001610176565b348015610279575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031661021d565b3480156102b5575f80fd5b5061021d6002604360981b0181565b3480156102cf575f80fd5b506101496102de36600461204b565b611160565b3480156102ee575f80fd5b506102606102fd3660046120ae565b60066020525f908152604090205481565b348015610319575f80fd5b5061021d6023602160991b0181565b348015610333575f80fd5b505f5461021d906001600160a01b031681565b348015610351575f80fd5b5061026060015481565b348015610366575f80fd5b5061026061037536600461204b565b600560209081525f928352604080842090915290825290205481565b34801561039c575f80fd5b5060025461021d906001600160a01b031681565b3480156103bb575f80fd5b5061026060035481565b3480156103d0575f80fd5b506101496103df3660046120ae565b6111ce565b3480156103ef575f80fd5b506101496103fe366004612023565b61120b565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f811580156104485750825b90505f8267ffffffffffffffff1660011480156104645750303b155b905081158015610472575080155b156104905760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156104ba57845460ff60401b1916600160401b1785555b85518751146105015760405162461bcd60e51b815260206004820152600e60248201526d696e76616c696420746f6b656e7360901b60448201526064015b60405180910390fd5b6001600160a01b038b166105475760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b21037bbb732b960991b60448201526064016104f8565b6001600160a01b038c1661058f5760405162461bcd60e51b815260206004820152600f60248201526e696e76616c696420666163746f727960881b60448201526064016104f8565b6001600160a01b0389166105d85760405162461bcd60e51b815260206004820152601060248201526f696e76616c696420747265617375727960801b60448201526064016104f8565b6113888811156106245760405162461bcd60e51b8152602060048201526017602482015276696e76616c69642074726561737572795261746542707360481b60448201526064016104f8565b6113888a111561066b5760405162461bcd60e51b8152602060048201526012602482015271696e76616c6964206665655261746542707360701b60448201526064016104f8565b6106748b6113c9565b61067c6113da565b6106846113e2565b5f80546001600160a01b03808f166001600160a01b031992831617835560018d905560028054918d169190921617905560038990556040805163784c3b3d60e11b815290516002604360981b019263f098767a926004808201939182900301818387803b1580156106f3575f80fd5b505af1158015610705573d5f803e3d5ffd5b5050604051631a33757d60e01b81526022602160991b019250631a33757d9150610734906002906004016120c7565b6020604051808303815f875af1158015610750573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061077491906120ed565b50604051631a33757d60e01b81526023602160991b0190631a33757d906107a0906002906004016120c7565b6020604051808303815f875af11580156107bc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107e091906120ed565b505f5b875181101561088f575f8782815181106107ff576107ff612104565b602002602001015190505f811161084d5760405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a59081b1bdd08185b5bdd5b9d60721b60448201526064016104f8565b8060045f8b858151811061086357610863612104565b6020908102919091018101516001600160a01b031682528101919091526040015f2055506001016107e3565b5083156108d657845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050505050505050565b604051631d864f1d60e31b81523060048201525f90819081906002604360981b019063ec3278e890602401602060405180830381865afa15801561092a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061094e91906120ed565b60405163e12f3a6160e01b81523060048201526023602160991b019063e12f3a6190602401602060405180830381865afa15801561098e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109b291906120ed565b60405163e12f3a6160e01b81523060048201526022602160991b019063e12f3a6190602401602060405180830381865afa1580156109f2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a1691906120ed565b925092509250909192565b610a296113f2565b6001600160a01b039091165f90815260046020526040902055565b610a4c61144d565b6001600160a01b0382165f9081526004602052604090205480610aa75760405162461bcd60e51b81526020600482015260136024820152721b9bdd081cdd5c1c1bdc9d195908185cdcd95d606a1b60448201526064016104f8565b5f8211610ac65760405162461bcd60e51b81526004016104f890612118565b80821015610b0b5760405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a59081b1bdd08185b5bdd5b9d60721b60448201526064016104f8565b6001600160a01b038316610b6157813414610b5c5760405162461bcd60e51b815260206004820152601160248201527018dbdb999b1a58dd195908185b5bdd5b9d607a1b60448201526064016104f8565b610e70565b3415610ba35760405162461bcd60e51b81526020600482015260116024820152701d5b995e1c1958dd195908185b5bdd5b9d607a1b60448201526064016104f8565b5f6001600160a01b0384166370a08231336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610bf6573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c1a91906120ed565b905082811015610c615760405162461bcd60e51b81526020600482015260126024820152716e6f7420656e6f7567682062616c616e636560701b60448201526064016104f8565b6040516370a0823160e01b81523060048201525f906001600160a01b038616906370a0823190602401602060405180830381865afa158015610ca5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cc991906120ed565b9050610ce06001600160a01b038616333087611484565b6040516370a0823160e01b81523060048201525f906001600160a01b038716906370a0823190602401602060405180830381865afa158015610d24573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d4891906120ed565b90505f6001600160a01b0387166370a08231336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610d9d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dc191906120ed565b9050610dcd8684612154565b8214610e1b5760405162461bcd60e51b815260206004820152601e60248201527f696e76616c696420636f6e74726163742062616c616e6365206166746572000060448201526064016104f8565b610e258685612167565b8114610e6b5760405162461bcd60e51b815260206004820152601560248201527434b73b30b634b2103130b630b731b29030b33a32b960591b60448201526064016104f8565b505050505b5f61271060015484610e82919061217a565b610e8c9190612191565b90505f610e998285612167565b6001600160a01b0386165f908152600560209081526040808320338452909152812080549293508392909190610ed0908490612154565b90915550506001600160a01b0385165f9081526006602052604081208054849290610efc908490612154565b909155505060408051828152602081018490526001600160a01b0387169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a3505050610f6060015f805160206121fc83398151915255565b5050565b610f6c6113f2565b610f7461144d565b5f80610f808484611504565b91509150836001600160a01b0316836001600160a01b03167fa5a56e24e8cbe4c43434b9fd1d71f3567e9897e6b194f6d0d2e0d638bc9aa05a8484604051610fd2929190918252602082015260400190565b60405180910390a35050610f6060015f805160206121fc83398151915255565b5f546001600160a01b0316336001600160a01b0316146110465760405162461bcd60e51b815260206004820152600f60248201526e6e6f742074686520666163746f727960881b60448201526064016104f8565b6001600160a01b03821661108f5760405162461bcd60e51b815260206004820152601060248201526f696e76616c696420747265617375727960801b60448201526064016104f8565b6113888111156110db5760405162461bcd60e51b8152602060048201526017602482015276696e76616c69642074726561737572795261746542707360481b60448201526064016104f8565b6113888311156111225760405162461bcd60e51b8152602060048201526012602482015271696e76616c6964206665655261746542707360701b60448201526064016104f8565b600192909255600280546001600160a01b0319166001600160a01b0392909216919091179055600355565b6111556113f2565b61115e5f611763565b565b6111686113f2565b61117061144d565b5f8061117c84846117d3565b91509150836001600160a01b0316836001600160a01b03167f8bc3a9723e5a1f1c9fad43c632554367016acdc2d20ed712b4117f86e368aad58484604051610fd2929190918252602082015260400190565b6111d66113f2565b6001600160a01b0381166111ff57604051631e4fbdf760e01b81525f60048201526024016104f8565b61120881611763565b50565b61121361144d565b6001600160a01b0382165f908152600560209081526040808320338452909152902054816112535760405162461bcd60e51b81526004016104f890612118565b818110156112985760405162461bcd60e51b81526020600482015260126024820152716e6f7420656e6f7567682062616c616e636560701b60448201526064016104f8565b6112a28282612167565b6001600160a01b0384165f81815260056020908152604080832033845290915290209190915561135e576040515f90339084908381818185875af1925050503d805f811461130b576040519150601f19603f3d011682016040523d82523d5f602084013e611310565b606091505b50509050806113585760405162461bcd60e51b81526020600482015260146024820152733330b4b632b2103a379039b2b7321032ba3432b960611b60448201526064016104f8565b50611372565b6113726001600160a01b0384163384611c10565b6040518281526001600160a01b0384169033907f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb9060200160405180910390a350610f6060015f805160206121fc83398151915255565b6113d1611c46565b61120881611c8f565b61115e611c46565b6113ea611c46565b61115e611c97565b336114247f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161461115e5760405163118cdaa760e01b81523360048201526024016104f8565b5f805160206121fc83398151915280546001190161147e57604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b6040516001600160a01b0384811660248301528381166044830152606482018390526114eb9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611c9f565b50505050565b60015f805160206121fc83398151915255565b5f806001600160a01b0383166115505760405162461bcd60e51b81526020600482015260116024820152701a5b9d985b1a59081c9958da5c1a595b9d607a1b60448201526064016104f8565b6001600160a01b0384165f90815260066020526040902054806115855760405162461bcd60e51b81526004016104f890612118565b6001600160a01b0385165f908152600660205260408120819055600354612710906115b0908461217a565b6115ba9190612191565b90505f6115c78284612167565b90506001600160a01b038716611724575f866001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611620576040519150601f19603f3d011682016040523d82523d5f602084013e611625565b606091505b50509050806116765760405162461bcd60e51b815260206004820152601f60248201527f726563697069656e743a206661696c656420746f2073656e642065746865720060448201526064016104f8565b821561171e576002546040515f916001600160a01b03169085908381818185875af1925050503d805f81146116c6576040519150601f19603f3d011682016040523d82523d5f602084013e6116cb565b606091505b505090508061171c5760405162461bcd60e51b815260206004820152601e60248201527f74726561737572793a206661696c656420746f2073656e64206574686572000060448201526064016104f8565b505b50611758565b6117386001600160a01b0388168783611c10565b811561175857600254611758906001600160a01b03898116911684611c10565b969095509350505050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b5f806001600160a01b03831661181f5760405162461bcd60e51b81526020600482015260116024820152701a5b9d985b1a59081c9958da5c1a595b9d607a1b60448201526064016104f8565b5f806001600160a01b038616611a165760405163430021db60e11b8152306004820181905260248201525f906002604360981b019063860043b6906044016020604051808303815f875af1158015611879573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061189d91906120ed565b9050612710600354826118b0919061217a565b6118ba9190612191565b92506118c68382612167565b91505f866001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611911576040519150601f19603f3d011682016040523d82523d5f602084013e611916565b606091505b50509050806119675760405162461bcd60e51b815260206004820152601f60248201527f726563697069656e743a206661696c656420746f2073656e642065746865720060448201526064016104f8565b8315611a0f576002546040515f916001600160a01b03169086908381818185875af1925050503d805f81146119b7576040519150601f19603f3d011682016040523d82523d5f602084013e6119bc565b606091505b5050905080611a0d5760405162461bcd60e51b815260206004820152601e60248201527f74726561737572793a206661696c656420746f2073656e64206574686572000060448201526064016104f8565b505b5050611c06565b6001600160a01b0386166022602160991b011480611a4357506001600160a01b0386166023602160991b01145b15611bce5760405163e12f3a6160e01b81523060048201525f906001600160a01b0388169063e12f3a6190602401602060405180830381865afa158015611a8c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611ab091906120ed565b905061271060035482611ac3919061217a565b611acd9190612191565b9250611ad98382612167565b604051635569f64b60e11b81526001600160a01b038881166004830152602482018390529193509088169063aad3ec96906044016020604051808303815f875af1158015611b29573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b4d91906120ed565b508215611bc857600254604051635569f64b60e11b81526001600160a01b039182166004820152602481018590529088169063aad3ec96906044016020604051808303815f875af1158015611ba4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a0f91906120ed565b50611c06565b60405162461bcd60e51b815260206004820152600d60248201526c1a5b9d985b1a5908185cdcd95d609a1b60448201526064016104f8565b9590945092505050565b6040516001600160a01b03838116602483015260448201839052611c4191859182169063a9059cbb906064016114b9565b505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661115e57604051631afcd79f60e31b815260040160405180910390fd5b6111d6611c46565b6114f1611c46565b5f611cb36001600160a01b03841683611d00565b905080515f14158015611cd7575080806020019051810190611cd591906121b0565b155b15611c4157604051635274afe760e01b81526001600160a01b03841660048201526024016104f8565b6060611d0d83835f611d16565b90505b92915050565b606081471015611d3b5760405163cd78605960e01b81523060048201526024016104f8565b5f80856001600160a01b03168486604051611d5691906121cf565b5f6040518083038185875af1925050503d805f8114611d90576040519150601f19603f3d011682016040523d82523d5f602084013e611d95565b606091505b5091509150611da5868383611db1565b925050505b9392505050565b606082611dc657611dc182611e0d565b611daa565b8151158015611ddd57506001600160a01b0384163b155b15611e0657604051639996b31560e01b81526001600160a01b03851660048201526024016104f8565b5080611daa565b805115611e1d5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114611e4c575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611e8e57611e8e611e51565b604052919050565b5f67ffffffffffffffff821115611eaf57611eaf611e51565b5060051b60200190565b5f82601f830112611ec8575f80fd5b81356020611edd611ed883611e96565b611e65565b8083825260208201915060208460051b870101935086841115611efe575f80fd5b602086015b84811015611f1a5780358352918301918301611f03565b509695505050505050565b5f805f805f805f60e0888a031215611f3b575f80fd5b611f4488611e36565b96506020611f53818a01611e36565b965060408901359550611f6860608a01611e36565b94506080890135935060a089013567ffffffffffffffff80821115611f8b575f80fd5b818b0191508b601f830112611f9e575f80fd5b8135611fac611ed882611e96565b81815260059190911b8301840190848101908e831115611fca575f80fd5b938501935b82851015611fef57611fe085611e36565b82529385019390850190611fcf565b9650505060c08b0135925080831115612006575f80fd5b50506120148a828b01611eb9565b91505092959891949750929550565b5f8060408385031215612034575f80fd5b61203d83611e36565b946020939093013593505050565b5f806040838503121561205c575f80fd5b61206583611e36565b915061207360208401611e36565b90509250929050565b5f805f6060848603121561208e575f80fd5b8335925061209e60208501611e36565b9150604084013590509250925092565b5f602082840312156120be575f80fd5b611d0d82611e36565b60208101600383106120e757634e487b7160e01b5f52602160045260245ffd5b91905290565b5f602082840312156120fd575f80fd5b5051919050565b634e487b7160e01b5f52603260045260245ffd5b6020808252600e908201526d1a5b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611d1057611d10612140565b81810381811115611d1057611d10612140565b8082028115828204841417611d1057611d10612140565b5f826121ab57634e487b7160e01b5f52601260045260245ffd5b500490565b5f602082840312156121c0575f80fd5b81518015158114611daa575f80fd5b5f82515f5b818110156121ee57602081860181015185830152016121d4565b505f92019182525091905056fe9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a26469706673582212208f3b625d05763d8996e58df16831daff6889b72ffc361a033fdda71859fac4b264736f6c63430008180033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.