Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 21 from a total of 21 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Update Pool Impl | 16448974 | 758 days ago | IN | 0 ETH | 0.00074386 | ||||
Transfer Ownersh... | 16145090 | 801 days ago | IN | 0 ETH | 0.00114632 | ||||
Set ACL Admin | 16145089 | 801 days ago | IN | 0 ETH | 0.00122104 | ||||
Update Pool Impl | 16145059 | 801 days ago | IN | 0 ETH | 0.01266572 | ||||
Update Pool Impl | 16145058 | 801 days ago | IN | 0 ETH | 0.00668508 | ||||
Update Pool Impl | 16145057 | 801 days ago | IN | 0 ETH | 0.00960796 | ||||
Update Pool Impl | 16145056 | 801 days ago | IN | 0 ETH | 0.02215764 | ||||
Set Pool Configu... | 16144842 | 801 days ago | IN | 0 ETH | 0.00083863 | ||||
Transfer Ownersh... | 16088570 | 809 days ago | IN | 0 ETH | 0.00040353 | ||||
Set ACL Admin | 16088569 | 809 days ago | IN | 0 ETH | 0.00040974 | ||||
Set WETH | 16088566 | 809 days ago | IN | 0 ETH | 0.0006243 | ||||
Set Marketplace | 16088565 | 809 days ago | IN | 0 ETH | 0.00123419 | ||||
Set Marketplace | 16088564 | 809 days ago | IN | 0 ETH | 0.00128792 | ||||
Set Protocol Dat... | 16088541 | 809 days ago | IN | 0 ETH | 0.00062707 | ||||
Set Price Oracle | 16088539 | 809 days ago | IN | 0 ETH | 0.00066637 | ||||
Set Pool Configu... | 16088533 | 809 days ago | IN | 0 ETH | 0.0089482 | ||||
Update Pool Impl | 16088530 | 809 days ago | IN | 0 ETH | 0.01426181 | ||||
Update Pool Impl | 16088460 | 809 days ago | IN | 0 ETH | 0.00359842 | ||||
Update Pool Impl | 16088458 | 809 days ago | IN | 0 ETH | 0.02561683 | ||||
Set ACL Manager | 16088438 | 809 days ago | IN | 0 ETH | 0.0006079 | ||||
Set ACL Admin | 16088436 | 809 days ago | IN | 0 ETH | 0.00063302 |
Latest 2 internal transactions
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
16088533 | 809 days ago | Contract Creation | 0 ETH | |||
16088458 | 809 days ago | Contract Creation | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
PoolAddressesProvider
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 4000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.10; import {Ownable} from "../../dependencies/openzeppelin/contracts/Ownable.sol"; import {IPoolAddressesProvider} from "../../interfaces/IPoolAddressesProvider.sol"; import {IParaProxy} from "../../interfaces/IParaProxy.sol"; import {InitializableImmutableAdminUpgradeabilityProxy} from "../libraries/paraspace-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol"; import {ParaProxy} from "../libraries/paraspace-upgradeability/ParaProxy.sol"; import {DataTypes} from "../../protocol/libraries/types/DataTypes.sol"; import {Address} from "../../dependencies/openzeppelin/contracts/Address.sol"; import {Errors} from "../../protocol/libraries/helpers/Errors.sol"; /** * @title PoolAddressesProvider * * @notice Main registry of addresses part of or connected to the protocol, including permissioned roles * @dev Acts as factory of proxies and admin of those, so with right to change its implementations * @dev Owned by the ParaSpace Governance **/ contract PoolAddressesProvider is Ownable, IPoolAddressesProvider { // Identifier of the ParaSpace Market string private _marketId; // Map of registered addresses (identifier => registeredAddress) mapping(bytes32 => address) private _addresses; // Map of marketplace contracts (id => address) mapping(bytes32 => DataTypes.Marketplace) internal _marketplaces; // Main identifiers bytes32 private constant POOL = "POOL"; bytes32 private constant POOL_CONFIGURATOR = "POOL_CONFIGURATOR"; bytes32 private constant PRICE_ORACLE = "PRICE_ORACLE"; bytes32 private constant ACL_MANAGER = "ACL_MANAGER"; bytes32 private constant ACL_ADMIN = "ACL_ADMIN"; bytes32 private constant PRICE_ORACLE_SENTINEL = "PRICE_ORACLE_SENTINEL"; bytes32 private constant DATA_PROVIDER = "DATA_PROVIDER"; bytes32 private constant WETH = "WETH"; /** * @dev Constructor. * @param marketId The identifier of the market. * @param owner The owner address of this contract. */ constructor(string memory marketId, address owner) { _setMarketId(marketId); transferOwnership(owner); } /// @inheritdoc IPoolAddressesProvider function getMarketId() external view override returns (string memory) { return _marketId; } /// @inheritdoc IPoolAddressesProvider function setMarketId(string memory newMarketId) external override onlyOwner { _setMarketId(newMarketId); } /// @inheritdoc IPoolAddressesProvider function getAddress(bytes32 id) public view override returns (address) { return _addresses[id]; } /// @inheritdoc IPoolAddressesProvider function setAddress(bytes32 id, address newAddress) external override onlyOwner { address oldAddress = _addresses[id]; _addresses[id] = newAddress; emit AddressSet(id, oldAddress, newAddress); } /// @inheritdoc IPoolAddressesProvider function setAddressAsProxy(bytes32 id, address newImplementationAddress) external override onlyOwner { require(id != POOL, Errors.INVALID_ADDRESSES_PROVIDER_ID); address proxyAddress = _addresses[id]; address oldImplementationAddress = _getProxyImplementation(id); _updateImpl(id, newImplementationAddress); emit AddressSetAsProxy( id, proxyAddress, oldImplementationAddress, newImplementationAddress ); } /// @inheritdoc IPoolAddressesProvider function getPool() external view override returns (address) { return getAddress(POOL); } /// @inheritdoc IPoolAddressesProvider function updatePoolImpl( IParaProxy.ProxyImplementation[] calldata implementationParams, address _init, bytes calldata _calldata ) external override onlyOwner { _updateParaProxyImpl(POOL, implementationParams, _init, _calldata); emit PoolUpdated(implementationParams, _init, _calldata); } /// @inheritdoc IPoolAddressesProvider function getPoolConfigurator() external view override returns (address) { return getAddress(POOL_CONFIGURATOR); } /// @inheritdoc IPoolAddressesProvider function setPoolConfiguratorImpl(address newPoolConfiguratorImpl) external override onlyOwner { address oldPoolConfiguratorImpl = _getProxyImplementation( POOL_CONFIGURATOR ); _updateImpl(POOL_CONFIGURATOR, newPoolConfiguratorImpl); emit PoolConfiguratorUpdated( oldPoolConfiguratorImpl, newPoolConfiguratorImpl ); } /// @inheritdoc IPoolAddressesProvider function getPriceOracle() external view override returns (address) { return getAddress(PRICE_ORACLE); } /// @inheritdoc IPoolAddressesProvider function setPriceOracle(address newPriceOracle) external override onlyOwner { address oldPriceOracle = _addresses[PRICE_ORACLE]; _addresses[PRICE_ORACLE] = newPriceOracle; emit PriceOracleUpdated(oldPriceOracle, newPriceOracle); } /// @inheritdoc IPoolAddressesProvider function getACLManager() external view override returns (address) { return getAddress(ACL_MANAGER); } /// @inheritdoc IPoolAddressesProvider function setACLManager(address newAclManager) external override onlyOwner { address oldAclManager = _addresses[ACL_MANAGER]; _addresses[ACL_MANAGER] = newAclManager; emit ACLManagerUpdated(oldAclManager, newAclManager); } /// @inheritdoc IPoolAddressesProvider function getACLAdmin() external view override returns (address) { return getAddress(ACL_ADMIN); } /// @inheritdoc IPoolAddressesProvider function setACLAdmin(address newAclAdmin) external override onlyOwner { address oldAclAdmin = _addresses[ACL_ADMIN]; _addresses[ACL_ADMIN] = newAclAdmin; emit ACLAdminUpdated(oldAclAdmin, newAclAdmin); } /// @inheritdoc IPoolAddressesProvider function getPriceOracleSentinel() external view override returns (address) { return getAddress(PRICE_ORACLE_SENTINEL); } /// @inheritdoc IPoolAddressesProvider function setPriceOracleSentinel(address newPriceOracleSentinel) external override onlyOwner { address oldPriceOracleSentinel = _addresses[PRICE_ORACLE_SENTINEL]; _addresses[PRICE_ORACLE_SENTINEL] = newPriceOracleSentinel; emit PriceOracleSentinelUpdated( oldPriceOracleSentinel, newPriceOracleSentinel ); } /// @inheritdoc IPoolAddressesProvider function getPoolDataProvider() external view override returns (address) { return getAddress(DATA_PROVIDER); } /// @inheritdoc IPoolAddressesProvider function getWETH() external view override returns (address) { return getAddress(WETH); } /// @inheritdoc IPoolAddressesProvider function getMarketplace(bytes32 id) external view override returns (DataTypes.Marketplace memory) { DataTypes.Marketplace memory marketplace = _marketplaces[id]; if ( marketplace.marketplace != address(0) && Address.isContract(marketplace.marketplace) ) { return marketplace; } else { revert(Errors.INVALID_MARKETPLACE_ID); } } /// @inheritdoc IPoolAddressesProvider function setProtocolDataProvider(address newDataProvider) external override onlyOwner { address oldDataProvider = _addresses[DATA_PROVIDER]; _addresses[DATA_PROVIDER] = newDataProvider; emit ProtocolDataProviderUpdated(oldDataProvider, newDataProvider); } /// @inheritdoc IPoolAddressesProvider function setWETH(address newWETH) external override onlyOwner { address oldWETH = _addresses[WETH]; _addresses[WETH] = newWETH; emit WETHUpdated(oldWETH, newWETH); } /// @inheritdoc IPoolAddressesProvider function setMarketplace( bytes32 id, address marketplace, address adapter, address operator, bool paused ) external override onlyOwner { _marketplaces[id] = DataTypes.Marketplace( marketplace, adapter, operator, paused ); emit MarketplaceUpdated(id, marketplace, adapter, operator, paused); } /** * @notice Internal function to update the implementation of a specific proxied component of the protocol. * @dev If there is no proxy registered with the given identifier, it creates the proxy setting `newAddress` * as implementation and calls the initialize() function on the proxy * @dev If there is already a proxy registered, it just updates the implementation to `newAddress` and * calls the initialize() function via upgradeToAndCall() in the proxy * @param id The id of the proxy to be updated * @param newAddress The address of the new implementation **/ function _updateImpl(bytes32 id, address newAddress) internal { require(newAddress != address(0), Errors.ZERO_ADDRESS_NOT_VALID); address proxyAddress = _addresses[id]; InitializableImmutableAdminUpgradeabilityProxy proxy; bytes memory params = abi.encodeWithSignature( "initialize(address)", address(this) ); if (proxyAddress == address(0)) { proxy = new InitializableImmutableAdminUpgradeabilityProxy( address(this) ); proxy.initialize(newAddress, params); _addresses[id] = proxyAddress = address(proxy); emit ProxyCreated(id, proxyAddress, newAddress); } else { proxy = InitializableImmutableAdminUpgradeabilityProxy( payable(proxyAddress) ); proxy.upgradeToAndCall(newAddress, params); } } /** * @notice Internal function to update the implementation of a specific proxied component of the protocol that uses ParaProxy. * @dev If there is no proxy registered with the given identifier, it creates the proxy setting `newAddress` * as implementation and calls the calldata on the _init * @dev If there is already a proxy registered, it just updates the implementation using the implementationParams * @param id The id of the proxy to be updated * @param implementationParams Contains the implementation addresses and function selectors * @param _init The address of the contract or implementation to execute _calldata * @param _calldata A function call, including function selector and arguments * _calldata is executed with delegatecall on _init **/ function _updateParaProxyImpl( bytes32 id, IParaProxy.ProxyImplementation[] calldata implementationParams, address _init, bytes calldata _calldata ) internal { address proxyAddress = _addresses[id]; IParaProxy proxy; if (proxyAddress == address(0)) { proxy = IParaProxy(address(new ParaProxy(address(this)))); proxy.updateImplementation(implementationParams, _init, _calldata); _addresses[id] = proxyAddress = address(proxy); emit ParaProxyCreated(id, proxyAddress, implementationParams); } else { proxy = IParaProxy(payable(proxyAddress)); proxy.updateImplementation(implementationParams, _init, _calldata); emit ParaProxyUpdated(id, proxyAddress, implementationParams); } } /** * @notice Updates the identifier of the ParaSpace market. * @param newMarketId The new id of the market **/ function _setMarketId(string memory newMarketId) internal { string memory oldMarketId = _marketId; _marketId = newMarketId; emit MarketIdSet(oldMarketId, newMarketId); } /** * @notice Returns the the implementation contract of the proxy contract by its identifier. * @dev It returns ZERO if there is no registered address with the given id * @dev It reverts if the registered address with the given id is not `InitializableImmutableAdminUpgradeabilityProxy` * @param id The id * @return The address of the implementation contract */ function _getProxyImplementation(bytes32 id) internal returns (address) { address proxyAddress = _addresses[id]; if (proxyAddress == address(0)) { return address(0); } else { address payable payableProxyAddress = payable(proxyAddress); return InitializableImmutableAdminUpgradeabilityProxy( payableProxyAddress ).implementation(); } } }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.8.10; import {DataTypes} from "../protocol/libraries/types/DataTypes.sol"; import {IParaProxy} from "../interfaces/IParaProxy.sol"; /** * @title IPoolAddressesProvider * * @notice Defines the basic interface for a Pool Addresses Provider. **/ interface IPoolAddressesProvider { /** * @dev Emitted when the market identifier is updated. * @param oldMarketId The old id of the market * @param newMarketId The new id of the market */ event MarketIdSet(string indexed oldMarketId, string indexed newMarketId); /** * @dev Emitted when the pool is updated. * @param implementationParams The old address of the Pool * @param _init The new address to call upon upgrade * @param _calldata The calldata input for the call */ event PoolUpdated( IParaProxy.ProxyImplementation[] indexed implementationParams, address _init, bytes _calldata ); /** * @dev Emitted when the pool configurator is updated. * @param oldAddress The old address of the PoolConfigurator * @param newAddress The new address of the PoolConfigurator */ event PoolConfiguratorUpdated( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when the WETH is updated. * @param oldAddress The old address of the WETH * @param newAddress The new address of the WETH */ event WETHUpdated(address indexed oldAddress, address indexed newAddress); /** * @dev Emitted when the price oracle is updated. * @param oldAddress The old address of the PriceOracle * @param newAddress The new address of the PriceOracle */ event PriceOracleUpdated( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when the ACL manager is updated. * @param oldAddress The old address of the ACLManager * @param newAddress The new address of the ACLManager */ event ACLManagerUpdated( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when the ACL admin is updated. * @param oldAddress The old address of the ACLAdmin * @param newAddress The new address of the ACLAdmin */ event ACLAdminUpdated( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when the price oracle sentinel is updated. * @param oldAddress The old address of the PriceOracleSentinel * @param newAddress The new address of the PriceOracleSentinel */ event PriceOracleSentinelUpdated( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when the pool data provider is updated. * @param oldAddress The old address of the PoolDataProvider * @param newAddress The new address of the PoolDataProvider */ event ProtocolDataProviderUpdated( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when a new proxy is created. * @param id The identifier of the proxy * @param proxyAddress The address of the created proxy contract * @param implementationAddress The address of the implementation contract */ event ProxyCreated( bytes32 indexed id, address indexed proxyAddress, address indexed implementationAddress ); /** * @dev Emitted when a new proxy is created. * @param id The identifier of the proxy * @param proxyAddress The address of the created proxy contract * @param implementationParams The params of the implementation update */ event ParaProxyCreated( bytes32 indexed id, address indexed proxyAddress, IParaProxy.ProxyImplementation[] indexed implementationParams ); /** * @dev Emitted when a new proxy is created. * @param id The identifier of the proxy * @param proxyAddress The address of the created proxy contract * @param implementationParams The params of the implementation update */ event ParaProxyUpdated( bytes32 indexed id, address indexed proxyAddress, IParaProxy.ProxyImplementation[] indexed implementationParams ); /** * @dev Emitted when a new non-proxied contract address is registered. * @param id The identifier of the contract * @param oldAddress The address of the old contract * @param newAddress The address of the new contract */ event AddressSet( bytes32 indexed id, address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when the implementation of the proxy registered with id is updated * @param id The identifier of the contract * @param proxyAddress The address of the proxy contract * @param oldImplementationAddress The address of the old implementation contract * @param newImplementationAddress The address of the new implementation contract */ event AddressSetAsProxy( bytes32 indexed id, address indexed proxyAddress, address oldImplementationAddress, address indexed newImplementationAddress ); /** * @dev Emitted when the marketplace registered is updated * @param id The identifier of the marketplace * @param marketplace The address of the marketplace contract * @param adapter The address of the marketplace adapter contract * @param operator The address of the marketplace transfer helper * @param paused Is the marketplace adapter paused */ event MarketplaceUpdated( bytes32 indexed id, address indexed marketplace, address indexed adapter, address operator, bool paused ); /** * @notice Returns the id of the ParaSpace market to which this contract points to. * @return The market id **/ function getMarketId() external view returns (string memory); /** * @notice Associates an id with a specific PoolAddressesProvider. * @dev This can be used to create an onchain registry of PoolAddressesProviders to * identify and validate multiple ParaSpace markets. * @param newMarketId The market id */ function setMarketId(string calldata newMarketId) external; /** * @notice Returns an address by its identifier. * @dev The returned address might be an EOA or a contract, potentially proxied * @dev It returns ZERO if there is no registered address with the given id * @param id The id * @return The address of the registered for the specified id */ function getAddress(bytes32 id) external view returns (address); /** * @notice General function to update the implementation of a proxy registered with * certain `id`. If there is no proxy registered, it will instantiate one and * set as implementation the `newImplementationAddress`. * @dev IMPORTANT Use this function carefully, only for ids that don't have an explicit * setter function, in order to avoid unexpected consequences * @param id The id * @param newImplementationAddress The address of the new implementation */ function setAddressAsProxy(bytes32 id, address newImplementationAddress) external; /** * @notice Sets an address for an id replacing the address saved in the addresses map. * @dev IMPORTANT Use this function carefully, as it will do a hard replacement * @param id The id * @param newAddress The address to set */ function setAddress(bytes32 id, address newAddress) external; /** * @notice Returns the address of the Pool proxy. * @return The Pool proxy address **/ function getPool() external view returns (address); /** * @notice Updates the implementation of the Pool, or creates a proxy * setting the new `pool` implementation when the function is called for the first time. * @param implementationParams Contains the implementation addresses and function selectors * @param _init The address of the contract or implementation to execute _calldata * @param _calldata A function call, including function selector and arguments * _calldata is executed with delegatecall on _init **/ function updatePoolImpl( IParaProxy.ProxyImplementation[] calldata implementationParams, address _init, bytes calldata _calldata ) external; /** * @notice Returns the address of the PoolConfigurator proxy. * @return The PoolConfigurator proxy address **/ function getPoolConfigurator() external view returns (address); /** * @notice Updates the implementation of the PoolConfigurator, or creates a proxy * setting the new `PoolConfigurator` implementation when the function is called for the first time. * @param newPoolConfiguratorImpl The new PoolConfigurator implementation **/ function setPoolConfiguratorImpl(address newPoolConfiguratorImpl) external; /** * @notice Returns the address of the price oracle. * @return The address of the PriceOracle */ function getPriceOracle() external view returns (address); /** * @notice Updates the address of the price oracle. * @param newPriceOracle The address of the new PriceOracle */ function setPriceOracle(address newPriceOracle) external; /** * @notice Returns the address of the ACL manager. * @return The address of the ACLManager */ function getACLManager() external view returns (address); /** * @notice Updates the address of the ACL manager. * @param newAclManager The address of the new ACLManager **/ function setACLManager(address newAclManager) external; /** * @notice Returns the address of the ACL admin. * @return The address of the ACL admin */ function getACLAdmin() external view returns (address); /** * @notice Updates the address of the ACL admin. * @param newAclAdmin The address of the new ACL admin */ function setACLAdmin(address newAclAdmin) external; /** * @notice Returns the address of the price oracle sentinel. * @return The address of the PriceOracleSentinel */ function getPriceOracleSentinel() external view returns (address); /** * @notice Updates the address of the price oracle sentinel. * @param newPriceOracleSentinel The address of the new PriceOracleSentinel **/ function setPriceOracleSentinel(address newPriceOracleSentinel) external; /** * @notice Returns the address of the data provider. * @return The address of the DataProvider */ function getPoolDataProvider() external view returns (address); /** * @notice Returns the address of the Wrapped ETH. * @return The address of the Wrapped ETH */ function getWETH() external view returns (address); /** * @notice Returns the info of the marketplace. * @return The info of the marketplace */ function getMarketplace(bytes32 id) external view returns (DataTypes.Marketplace memory); /** * @notice Updates the address of the data provider. * @param newDataProvider The address of the new DataProvider **/ function setProtocolDataProvider(address newDataProvider) external; /** * @notice Updates the address of the WETH. * @param newWETH The address of the new WETH **/ function setWETH(address newWETH) external; /** * @notice Updates the info of the marketplace. * @param marketplace The address of the marketplace * @param adapter The contract which handles marketplace logic * @param operator The contract which operates users' tokens **/ function setMarketplace( bytes32 id, address marketplace, address adapter, address operator, bool paused ) external; }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.10; /******************************************************************************\ * EIP-2535: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ interface IParaProxy { enum ProxyImplementationAction { Add, Replace, Remove } // Add=0, Replace=1, Remove=2 struct ProxyImplementation { address implAddress; ProxyImplementationAction action; bytes4[] functionSelectors; } /// @notice Add/replace/remove any number of functions and optionally execute /// a function with delegatecall /// @param _implementationParams Contains the implementation addresses and function selectors /// @param _init The address of the contract or implementation to execute _calldata /// @param _calldata A function call, including function selector and arguments /// _calldata is executed with delegatecall on _init function updateImplementation( ProxyImplementation[] calldata _implementationParams, address _init, bytes calldata _calldata ) external; event ImplementationUpdated( ProxyImplementation[] _implementationParams, address _init, bytes _calldata ); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "./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. */ 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() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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" ); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.8.10; import {InitializableUpgradeabilityProxy} from "../../../dependencies/openzeppelin/upgradeability/InitializableUpgradeabilityProxy.sol"; import {Proxy} from "../../../dependencies/openzeppelin/upgradeability/Proxy.sol"; import {BaseImmutableAdminUpgradeabilityProxy} from "./BaseImmutableAdminUpgradeabilityProxy.sol"; /** * @title InitializableAdminUpgradeabilityProxy * * @dev Extends BaseAdminUpgradeabilityProxy with an initializer function */ contract InitializableImmutableAdminUpgradeabilityProxy is BaseImmutableAdminUpgradeabilityProxy, InitializableUpgradeabilityProxy { /** * @dev Constructor. * @param admin The address of the admin */ constructor(address admin) BaseImmutableAdminUpgradeabilityProxy(admin) { // Intentionally left blank } /// @inheritdoc BaseImmutableAdminUpgradeabilityProxy function _willFallback() internal override(BaseImmutableAdminUpgradeabilityProxy, Proxy) { BaseImmutableAdminUpgradeabilityProxy._willFallback(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; /******************************************************************************\ * A custom implementation of EIP-2535 * EIP-2535: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ import {ParaProxyLib} from "./lib/ParaProxyLib.sol"; import {IParaProxy} from "../../../interfaces/IParaProxy.sol"; contract ParaProxy is IParaProxy { constructor(address _contractOwner) payable { ParaProxyLib.setContractOwner(_contractOwner); } function updateImplementation( ProxyImplementation[] calldata _implementationParams, address _init, bytes calldata _calldata ) external override { ParaProxyLib.enforceIsContractOwner(); ParaProxyLib.updateImplementation( _implementationParams, _init, _calldata ); } // Find implementation for function that is called and execute the // function if a implementation is found and return any value. fallback() external payable { ParaProxyLib.ProxyStorage storage ds; bytes32 position = ParaProxyLib.PROXY_STORAGE_POSITION; // get proxy storage assembly { ds.slot := position } // get implementation from function selector address implementation = ds .selectorToImplAndPosition[msg.sig] .implAddress; require( implementation != address(0), "ParaProxy: Function does not exist" ); // Execute external function from implementation using delegatecall and return any value. assembly { // copy function selector and any arguments calldatacopy(0, 0, calldatasize()) // execute function call using the implementation let result := delegatecall( gas(), implementation, 0, calldatasize(), 0, 0 ) // get any return value returndatacopy(0, 0, returndatasize()) // return any return value or error back to the caller switch result case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } receive() external payable {} }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.10; import {OfferItem, ConsiderationItem} from "../../../dependencies/seaport/contracts/lib/ConsiderationStructs.sol"; library DataTypes { enum AssetType { ERC20, ERC721 } address public constant SApeAddress = address(0x1); uint256 public constant HEALTH_FACTOR_LIQUIDATION_THRESHOLD = 1e18; struct ReserveData { //stores the reserve configuration ReserveConfigurationMap configuration; //the liquidity index. Expressed in ray uint128 liquidityIndex; //the current supply rate. Expressed in ray uint128 currentLiquidityRate; //variable borrow index. Expressed in ray uint128 variableBorrowIndex; //the current variable borrow rate. Expressed in ray uint128 currentVariableBorrowRate; //timestamp of last update uint40 lastUpdateTimestamp; //the id of the reserve. Represents the position in the list of the active reserves uint16 id; //xToken address address xTokenAddress; //variableDebtToken address address variableDebtTokenAddress; //address of the interest rate strategy address interestRateStrategyAddress; //address of the auction strategy address auctionStrategyAddress; //the current treasury balance, scaled uint128 accruedToTreasury; } struct ReserveConfigurationMap { //bit 0-15: LTV //bit 16-31: Liq. threshold //bit 32-47: Liq. bonus //bit 48-55: Decimals //bit 56: reserve is active //bit 57: reserve is frozen //bit 58: borrowing is enabled //bit 59: stable rate borrowing enabled //bit 60: asset is paused //bit 61: borrowing in isolation mode is enabled //bit 62-63: reserved //bit 64-79: reserve factor //bit 80-115 borrow cap in whole tokens, borrowCap == 0 => no cap //bit 116-151 supply cap in whole tokens, supplyCap == 0 => no cap //bit 152-167 liquidation protocol fee //bit 168-175 eMode category //bit 176-211 unbacked mint cap in whole tokens, unbackedMintCap == 0 => minting disabled //bit 212-251 debt ceiling for isolation mode with (ReserveConfiguration::DEBT_CEILING_DECIMALS) decimals //bit 252-255 unused uint256 data; } struct UserConfigurationMap { /** * @dev Bitmap of the users collaterals and borrows. It is divided in pairs of bits, one pair per asset. * The first bit indicates if an asset is used as collateral by the user, the second whether an * asset is borrowed by the user. */ uint256 data; // auction validity time for closing invalid auctions in one tx. uint256 auctionValidityTime; } struct ERC721SupplyParams { uint256 tokenId; bool useAsCollateral; } struct NTokenData { uint256 tokenId; bool useAsCollateral; bool isAuctioned; } struct ReserveCache { uint256 currScaledVariableDebt; uint256 nextScaledVariableDebt; uint256 currLiquidityIndex; uint256 nextLiquidityIndex; uint256 currVariableBorrowIndex; uint256 nextVariableBorrowIndex; uint256 currLiquidityRate; uint256 currVariableBorrowRate; uint256 reserveFactor; ReserveConfigurationMap reserveConfiguration; address xTokenAddress; address variableDebtTokenAddress; uint40 reserveLastUpdateTimestamp; } struct ExecuteLiquidateParams { uint256 reservesCount; uint256 liquidationAmount; uint256 collateralTokenId; uint256 auctionRecoveryHealthFactor; address weth; address collateralAsset; address liquidationAsset; address borrower; address liquidator; bool receiveXToken; address priceOracle; address priceOracleSentinel; } struct ExecuteAuctionParams { uint256 reservesCount; uint256 auctionRecoveryHealthFactor; uint256 collateralTokenId; address collateralAsset; address user; address priceOracle; } struct ExecuteSupplyParams { address asset; uint256 amount; address onBehalfOf; address payer; uint16 referralCode; } struct ExecuteSupplyERC721Params { address asset; DataTypes.ERC721SupplyParams[] tokenData; address onBehalfOf; address payer; uint16 referralCode; } struct ExecuteBorrowParams { address asset; address user; address onBehalfOf; uint256 amount; uint16 referralCode; bool releaseUnderlying; uint256 reservesCount; address oracle; address priceOracleSentinel; } struct ExecuteRepayParams { address asset; uint256 amount; address onBehalfOf; bool usePTokens; } struct ExecuteWithdrawParams { address asset; uint256 amount; address to; uint256 reservesCount; address oracle; } struct ExecuteWithdrawERC721Params { address asset; uint256[] tokenIds; address to; uint256 reservesCount; address oracle; } struct ExecuteDecreaseUniswapV3LiquidityParams { address user; address asset; uint256 tokenId; uint256 reservesCount; uint128 liquidityDecrease; uint256 amount0Min; uint256 amount1Min; bool receiveEthAsWeth; address oracle; } struct FinalizeTransferParams { address asset; address from; address to; bool usedAsCollateral; uint256 amount; uint256 balanceFromBefore; uint256 balanceToBefore; uint256 reservesCount; address oracle; } struct FinalizeTransferERC721Params { address asset; address from; address to; bool usedAsCollateral; uint256 tokenId; uint256 balanceFromBefore; uint256 balanceToBefore; uint256 reservesCount; address oracle; } struct CalculateUserAccountDataParams { UserConfigurationMap userConfig; uint256 reservesCount; address user; address oracle; } struct ValidateBorrowParams { ReserveCache reserveCache; UserConfigurationMap userConfig; address asset; address userAddress; uint256 amount; uint256 reservesCount; address oracle; address priceOracleSentinel; } struct ValidateLiquidateERC20Params { ReserveCache liquidationAssetReserveCache; address liquidationAsset; address weth; uint256 totalDebt; uint256 healthFactor; uint256 liquidationAmount; uint256 actualLiquidationAmount; address priceOracleSentinel; } struct ValidateLiquidateERC721Params { ReserveCache liquidationAssetReserveCache; address liquidator; address borrower; uint256 globalDebt; uint256 healthFactor; address collateralAsset; uint256 tokenId; uint256 actualLiquidationAmount; uint256 maxLiquidationAmount; uint256 auctionRecoveryHealthFactor; address priceOracleSentinel; address xTokenAddress; bool auctionEnabled; } struct ValidateAuctionParams { address user; uint256 auctionRecoveryHealthFactor; uint256 erc721HealthFactor; address collateralAsset; uint256 tokenId; address xTokenAddress; } struct CalculateInterestRatesParams { uint256 liquidityAdded; uint256 liquidityTaken; uint256 totalVariableDebt; uint256 reserveFactor; address reserve; address xToken; } struct InitReserveParams { address asset; address xTokenAddress; address variableDebtAddress; address interestRateStrategyAddress; address auctionStrategyAddress; uint16 reservesCount; uint16 maxNumberReserves; } struct ExecuteFlashClaimParams { address receiverAddress; address nftAsset; uint256[] nftTokenIds; bytes params; address oracle; } struct Credit { address token; uint256 amount; bytes orderId; uint8 v; bytes32 r; bytes32 s; } struct ExecuteMarketplaceParams { bytes32 marketplaceId; bytes payload; Credit credit; uint256 ethLeft; DataTypes.Marketplace marketplace; OrderInfo orderInfo; address weth; uint16 referralCode; uint256 reservesCount; address oracle; address priceOracleSentinel; } struct OrderInfo { address maker; address taker; bytes id; OfferItem[] offer; ConsiderationItem[] consideration; } struct Marketplace { address marketplace; address adapter; address operator; bool paused; } struct Auction { uint256 startTime; } struct AuctionData { address asset; uint256 tokenId; uint256 startTime; uint256 currentPriceMultiplier; uint256 maxPriceMultiplier; uint256 minExpPriceMultiplier; uint256 minPriceMultiplier; uint256 stepLinear; uint256 stepExp; uint256 tickLength; } struct TokenData { string symbol; address tokenAddress; } struct PoolStorage { // Map of reserves and their data (underlyingAssetOfReserve => reserveData) mapping(address => ReserveData) _reserves; // Map of users address and their configuration data (userAddress => userConfiguration) mapping(address => UserConfigurationMap) _usersConfig; // List of reserves as a map (reserveId => reserve). // It is structured as a mapping for gas savings reasons, using the reserve id as index mapping(uint256 => address) _reservesList; // Maximum number of active reserves there have been in the protocol. It is the upper bound of the reserves list uint16 _reservesCount; // Auction recovery health factor uint64 _auctionRecoveryHealthFactor; } struct ReserveConfigData { uint256 decimals; uint256 ltv; uint256 liquidationThreshold; uint256 liquidationBonus; uint256 reserveFactor; bool usageAsCollateralEnabled; bool borrowingEnabled; bool isActive; bool isFrozen; bool isPaused; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.10; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.10; /** * @title Errors library * * @notice Defines the error messages emitted by the different contracts of the ParaSpace protocol */ library Errors { string public constant CALLER_NOT_POOL_ADMIN = "1"; // 'The caller of the function is not a pool admin' string public constant CALLER_NOT_EMERGENCY_ADMIN = "2"; // 'The caller of the function is not an emergency admin' string public constant CALLER_NOT_POOL_OR_EMERGENCY_ADMIN = "3"; // 'The caller of the function is not a pool or emergency admin' string public constant CALLER_NOT_RISK_OR_POOL_ADMIN = "4"; // 'The caller of the function is not a risk or pool admin' string public constant CALLER_NOT_ASSET_LISTING_OR_POOL_ADMIN = "5"; // 'The caller of the function is not an asset listing or pool admin' string public constant CALLER_NOT_BRIDGE = "6"; // 'The caller of the function is not a bridge' string public constant ADDRESSES_PROVIDER_NOT_REGISTERED = "7"; // 'Pool addresses provider is not registered' string public constant INVALID_ADDRESSES_PROVIDER_ID = "8"; // 'Invalid id for the pool addresses provider' string public constant NOT_CONTRACT = "9"; // 'Address is not a contract' string public constant CALLER_NOT_POOL_CONFIGURATOR = "10"; // 'The caller of the function is not the pool configurator' string public constant CALLER_NOT_XTOKEN = "11"; // 'The caller of the function is not an PToken or NToken' string public constant INVALID_ADDRESSES_PROVIDER = "12"; // 'The address of the pool addresses provider is invalid' string public constant RESERVE_ALREADY_ADDED = "14"; // 'Reserve has already been added to reserve list' string public constant NO_MORE_RESERVES_ALLOWED = "15"; // 'Maximum amount of reserves in the pool reached' string public constant RESERVE_LIQUIDITY_NOT_ZERO = "18"; // 'The liquidity of the reserve needs to be 0' string public constant INVALID_RESERVE_PARAMS = "20"; // 'Invalid risk parameters for the reserve' string public constant CALLER_MUST_BE_POOL = "23"; // 'The caller of this function must be a pool' string public constant INVALID_MINT_AMOUNT = "24"; // 'Invalid amount to mint' string public constant INVALID_BURN_AMOUNT = "25"; // 'Invalid amount to burn' string public constant INVALID_AMOUNT = "26"; // 'Amount must be greater than 0' string public constant RESERVE_INACTIVE = "27"; // 'Action requires an active reserve' string public constant RESERVE_FROZEN = "28"; // 'Action cannot be performed because the reserve is frozen' string public constant RESERVE_PAUSED = "29"; // 'Action cannot be performed because the reserve is paused' string public constant BORROWING_NOT_ENABLED = "30"; // 'Borrowing is not enabled' string public constant STABLE_BORROWING_NOT_ENABLED = "31"; // 'Stable borrowing is not enabled' string public constant NOT_ENOUGH_AVAILABLE_USER_BALANCE = "32"; // 'User cannot withdraw more than the available balance' string public constant INVALID_INTEREST_RATE_MODE_SELECTED = "33"; // 'Invalid interest rate mode selected' string public constant COLLATERAL_BALANCE_IS_ZERO = "34"; // 'The collateral balance is 0' string public constant HEALTH_FACTOR_LOWER_THAN_LIQUIDATION_THRESHOLD = "35"; // 'Health factor is lesser than the liquidation threshold' string public constant COLLATERAL_CANNOT_COVER_NEW_BORROW = "36"; // 'There is not enough collateral to cover a new borrow' string public constant COLLATERAL_SAME_AS_BORROWING_CURRENCY = "37"; // 'Collateral is (mostly) the same currency that is being borrowed' string public constant AMOUNT_BIGGER_THAN_MAX_LOAN_SIZE_STABLE = "38"; // 'The requested amount is greater than the max loan size in stable rate mode' string public constant NO_DEBT_OF_SELECTED_TYPE = "39"; // 'For repayment of a specific type of debt, the user needs to have debt that type' string public constant NO_EXPLICIT_AMOUNT_TO_REPAY_ON_BEHALF = "40"; // 'To repay on behalf of a user an explicit amount to repay is needed' string public constant NO_OUTSTANDING_STABLE_DEBT = "41"; // 'User does not have outstanding stable rate debt on this reserve' string public constant NO_OUTSTANDING_VARIABLE_DEBT = "42"; // 'User does not have outstanding variable rate debt on this reserve' string public constant UNDERLYING_BALANCE_ZERO = "43"; // 'The underlying balance needs to be greater than 0' string public constant INTEREST_RATE_REBALANCE_CONDITIONS_NOT_MET = "44"; // 'Interest rate rebalance conditions were not met' string public constant HEALTH_FACTOR_NOT_BELOW_THRESHOLD = "45"; // 'Health factor is not below the threshold' string public constant COLLATERAL_CANNOT_BE_AUCTIONED_OR_LIQUIDATED = "46"; // 'The collateral chosen cannot be auctioned OR liquidated' string public constant SPECIFIED_CURRENCY_NOT_BORROWED_BY_USER = "47"; // 'User did not borrow the specified currency' string public constant SAME_BLOCK_BORROW_REPAY = "48"; // 'Borrow and repay in same block is not allowed' string public constant BORROW_CAP_EXCEEDED = "50"; // 'Borrow cap is exceeded' string public constant SUPPLY_CAP_EXCEEDED = "51"; // 'Supply cap is exceeded' string public constant XTOKEN_SUPPLY_NOT_ZERO = "54"; // 'PToken supply is not zero' string public constant STABLE_DEBT_NOT_ZERO = "55"; // 'Stable debt supply is not zero' string public constant VARIABLE_DEBT_SUPPLY_NOT_ZERO = "56"; // 'Variable debt supply is not zero' string public constant LTV_VALIDATION_FAILED = "57"; // 'Ltv validation failed' string public constant PRICE_ORACLE_SENTINEL_CHECK_FAILED = "59"; // 'Price oracle sentinel validation failed' string public constant RESERVE_ALREADY_INITIALIZED = "61"; // 'Reserve has already been initialized' string public constant INVALID_LTV = "63"; // 'Invalid ltv parameter for the reserve' string public constant INVALID_LIQ_THRESHOLD = "64"; // 'Invalid liquidity threshold parameter for the reserve' string public constant INVALID_LIQ_BONUS = "65"; // 'Invalid liquidity bonus parameter for the reserve' string public constant INVALID_DECIMALS = "66"; // 'Invalid decimals parameter of the underlying asset of the reserve' string public constant INVALID_RESERVE_FACTOR = "67"; // 'Invalid reserve factor parameter for the reserve' string public constant INVALID_BORROW_CAP = "68"; // 'Invalid borrow cap for the reserve' string public constant INVALID_SUPPLY_CAP = "69"; // 'Invalid supply cap for the reserve' string public constant INVALID_LIQUIDATION_PROTOCOL_FEE = "70"; // 'Invalid liquidation protocol fee for the reserve' string public constant INVALID_DEBT_CEILING = "73"; // 'Invalid debt ceiling for the reserve string public constant INVALID_RESERVE_INDEX = "74"; // 'Invalid reserve index' string public constant ACL_ADMIN_CANNOT_BE_ZERO = "75"; // 'ACL admin cannot be set to the zero address' string public constant INCONSISTENT_PARAMS_LENGTH = "76"; // 'Array parameters that should be equal length are not' string public constant ZERO_ADDRESS_NOT_VALID = "77"; // 'Zero address not valid' string public constant INVALID_EXPIRATION = "78"; // 'Invalid expiration' string public constant INVALID_SIGNATURE = "79"; // 'Invalid signature' string public constant OPERATION_NOT_SUPPORTED = "80"; // 'Operation not supported' string public constant ASSET_NOT_LISTED = "82"; // 'Asset is not listed' string public constant INVALID_OPTIMAL_USAGE_RATIO = "83"; // 'Invalid optimal usage ratio' string public constant INVALID_OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO = "84"; // 'Invalid optimal stable to total debt ratio' string public constant UNDERLYING_CANNOT_BE_RESCUED = "85"; // 'The underlying asset cannot be rescued' string public constant ADDRESSES_PROVIDER_ALREADY_ADDED = "86"; // 'Reserve has already been added to reserve list' string public constant POOL_ADDRESSES_DO_NOT_MATCH = "87"; // 'The token implementation pool address and the pool address provided by the initializing pool do not match' string public constant STABLE_BORROWING_ENABLED = "88"; // 'Stable borrowing is enabled' string public constant SILOED_BORROWING_VIOLATION = "89"; // 'User is trying to borrow multiple assets including a siloed one' string public constant RESERVE_DEBT_NOT_ZERO = "90"; // the total debt of the reserve needs to be 0 string public constant NOT_THE_OWNER = "91"; // user is not the owner of a given asset string public constant LIQUIDATION_AMOUNT_NOT_ENOUGH = "92"; string public constant INVALID_ASSET_TYPE = "93"; // invalid asset type for action. string public constant INVALID_FLASH_CLAIM_RECEIVER = "94"; // invalid flash claim receiver. string public constant ERC721_HEALTH_FACTOR_NOT_BELOW_THRESHOLD = "95"; // ERC721 Health factor is not below the threshold. Can only liquidate ERC20. string public constant UNDERLYING_ASSET_CAN_NOT_BE_TRANSFERRED = "96"; //underlying asset can not be transferred. string public constant TOKEN_TRANSFERRED_CAN_NOT_BE_SELF_ADDRESS = "97"; //token transferred can not be self address. string public constant INVALID_AIRDROP_CONTRACT_ADDRESS = "98"; //invalid airdrop contract address. string public constant INVALID_AIRDROP_PARAMETERS = "99"; //invalid airdrop parameters. string public constant CALL_AIRDROP_METHOD_FAILED = "100"; //call airdrop method failed. string public constant SUPPLIER_NOT_NTOKEN = "101"; //supplier is not the NToken contract string public constant CALL_MARKETPLACE_FAILED = "102"; //call marketplace failed. string public constant INVALID_MARKETPLACE_ID = "103"; //invalid marketplace id. string public constant INVALID_MARKETPLACE_ORDER = "104"; //invalid marketplace id. string public constant CREDIT_DOES_NOT_MATCH_ORDER = "105"; //credit doesn't match order. string public constant PAYNOW_NOT_ENOUGH = "106"; //paynow not enough. string public constant INVALID_CREDIT_SIGNATURE = "107"; //invalid credit signature. string public constant INVALID_ORDER_TAKER = "108"; //invalid order taker. string public constant MARKETPLACE_PAUSED = "109"; //marketplace paused. string public constant INVALID_AUCTION_RECOVERY_HEALTH_FACTOR = "110"; //invalid auction recovery health factor. string public constant AUCTION_ALREADY_STARTED = "111"; //auction already started. string public constant AUCTION_NOT_STARTED = "112"; //auction not started yet. string public constant AUCTION_NOT_ENABLED = "113"; //auction not enabled on the reserve. string public constant ERC721_HEALTH_FACTOR_NOT_ABOVE_THRESHOLD = "114"; //ERC721 Health factor is not above the threshold. string public constant TOKEN_IN_AUCTION = "115"; //tokenId is in auction. string public constant AUCTIONED_BALANCE_NOT_ZERO = "116"; //auctioned balance not zero. string public constant LIQUIDATOR_CAN_NOT_BE_SELF = "117"; //user can not liquidate himself. string public constant INVALID_RECIPIENT = "118"; //invalid recipient specified in order. string public constant UNIV3_NOT_ALLOWED = "119"; //flash claim is not allowed for UniswapV3. string public constant NTOKEN_BALANCE_EXCEEDED = "120"; //ntoken balance exceed limit. string public constant ORACLE_PRICE_NOT_READY = "121"; //oracle price not ready. string public constant SET_ORACLE_SOURCE_NOT_ALLOWED = "122"; //source of oracle not allowed to set. string public constant INVALID_LIQUIDATION_ASSET = "123"; //invalid liquidation asset. string public constant ONLY_UNIV3_ALLOWED = "124"; //only UniswapV3 allowed. string public constant GLOBAL_DEBT_IS_ZERO = "125"; //liquidation is not allowed when global debt is zero. string public constant ORACLE_PRICE_EXPIRED = "126"; //oracle price expired. string public constant APE_STAKING_POSITION_EXISTED = "127"; //ape staking position is existed. string public constant SAPE_NOT_ALLOWED = "128"; //operation is not allow for sApe. string public constant TOTAL_STAKING_AMOUNT_WRONG = "129"; //cash plus borrow amount not equal to total staking amount. string public constant APE_STAKING_AMOUNT_NON_ZERO = "130"; //ape staking amount should be zero when supply bayc/mayc. }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import { OrderType, BasicOrderType, ItemType, Side } from "./ConsiderationEnums.sol"; /** * @dev An order contains eleven components: an offerer, a zone (or account that * can cancel the order or restrict who can fulfill the order depending on * the type), the order type (specifying partial fill support as well as * restricted order status), the start and end time, a hash that will be * provided to the zone when validating restricted orders, a salt, a key * corresponding to a given conduit, a counter, and an arbitrary number of * offer items that can be spent along with consideration items that must * be received by their respective recipient. */ struct OrderComponents { address offerer; address zone; OfferItem[] offer; ConsiderationItem[] consideration; OrderType orderType; uint256 startTime; uint256 endTime; bytes32 zoneHash; uint256 salt; bytes32 conduitKey; uint256 counter; } /** * @dev An offer item has five components: an item type (ETH or other native * tokens, ERC20, ERC721, and ERC1155, as well as criteria-based ERC721 and * ERC1155), a token address, a dual-purpose "identifierOrCriteria" * component that will either represent a tokenId or a merkle root * depending on the item type, and a start and end amount that support * increasing or decreasing amounts over the duration of the respective * order. */ struct OfferItem { ItemType itemType; address token; uint256 identifierOrCriteria; uint256 startAmount; uint256 endAmount; } /** * @dev A consideration item has the same five components as an offer item and * an additional sixth component designating the required recipient of the * item. */ struct ConsiderationItem { ItemType itemType; address token; uint256 identifierOrCriteria; uint256 startAmount; uint256 endAmount; address payable recipient; } /** * @dev A spent item is translated from a utilized offer item and has four * components: an item type (ETH or other native tokens, ERC20, ERC721, and * ERC1155), a token address, a tokenId, and an amount. */ struct SpentItem { ItemType itemType; address token; uint256 identifier; uint256 amount; } /** * @dev A received item is translated from a utilized consideration item and has * the same four components as a spent item, as well as an additional fifth * component designating the required recipient of the item. */ struct ReceivedItem { ItemType itemType; address token; uint256 identifier; uint256 amount; address payable recipient; } /** * @dev For basic orders involving ETH / native / ERC20 <=> ERC721 / ERC1155 * matching, a group of six functions may be called that only requires a * subset of the usual order arguments. Note the use of a "basicOrderType" * enum; this represents both the usual order type as well as the "route" * of the basic order (a simple derivation function for the basic order * type is `basicOrderType = orderType + (4 * basicOrderRoute)`.) */ struct BasicOrderParameters { // calldata offset address considerationToken; // 0x24 uint256 considerationIdentifier; // 0x44 uint256 considerationAmount; // 0x64 address payable offerer; // 0x84 address zone; // 0xa4 address offerToken; // 0xc4 uint256 offerIdentifier; // 0xe4 uint256 offerAmount; // 0x104 BasicOrderType basicOrderType; // 0x124 uint256 startTime; // 0x144 uint256 endTime; // 0x164 bytes32 zoneHash; // 0x184 uint256 salt; // 0x1a4 bytes32 offererConduitKey; // 0x1c4 bytes32 fulfillerConduitKey; // 0x1e4 uint256 totalOriginalAdditionalRecipients; // 0x204 AdditionalRecipient[] additionalRecipients; // 0x224 bytes signature; // 0x244 // Total length, excluding dynamic array data: 0x264 (580) } /** * @dev Basic orders can supply any number of additional recipients, with the * implied assumption that they are supplied from the offered ETH (or other * native token) or ERC20 token for the order. */ struct AdditionalRecipient { uint256 amount; address payable recipient; } /** * @dev The full set of order components, with the exception of the counter, * must be supplied when fulfilling more sophisticated orders or groups of * orders. The total number of original consideration items must also be * supplied, as the caller may specify additional consideration items. */ struct OrderParameters { address offerer; // 0x00 address zone; // 0x20 OfferItem[] offer; // 0x40 ConsiderationItem[] consideration; // 0x60 OrderType orderType; // 0x80 uint256 startTime; // 0xa0 uint256 endTime; // 0xc0 bytes32 zoneHash; // 0xe0 uint256 salt; // 0x100 bytes32 conduitKey; // 0x120 uint256 totalOriginalConsiderationItems; // 0x140 // offer.length // 0x160 } /** * @dev Orders require a signature in addition to the other order parameters. */ struct Order { OrderParameters parameters; bytes signature; } /** * @dev Advanced orders include a numerator (i.e. a fraction to attempt to fill) * and a denominator (the total size of the order) in addition to the * signature and other order parameters. It also supports an optional field * for supplying extra data; this data will be included in a staticcall to * `isValidOrderIncludingExtraData` on the zone for the order if the order * type is restricted and the offerer or zone are not the caller. */ struct AdvancedOrder { OrderParameters parameters; uint120 numerator; uint120 denominator; bytes signature; bytes extraData; } /** * @dev Orders can be validated (either explicitly via `validate`, or as a * consequence of a full or partial fill), specifically cancelled (they can * also be cancelled in bulk via incrementing a per-zone counter), and * partially or fully filled (with the fraction filled represented by a * numerator and denominator). */ struct OrderStatus { bool isValidated; bool isCancelled; uint120 numerator; uint120 denominator; } /** * @dev A criteria resolver specifies an order, side (offer vs. consideration), * and item index. It then provides a chosen identifier (i.e. tokenId) * alongside a merkle proof demonstrating the identifier meets the required * criteria. */ struct CriteriaResolver { uint256 orderIndex; Side side; uint256 index; uint256 identifier; bytes32[] criteriaProof; } /** * @dev A fulfillment is applied to a group of orders. It decrements a series of * offer and consideration items, then generates a single execution * element. A given fulfillment can be applied to as many offer and * consideration items as desired, but must contain at least one offer and * at least one consideration that match. The fulfillment must also remain * consistent on all key parameters across all offer items (same offerer, * token, type, tokenId, and conduit preference) as well as across all * consideration items (token, type, tokenId, and recipient). */ struct Fulfillment { FulfillmentComponent[] offerComponents; FulfillmentComponent[] considerationComponents; } /** * @dev Each fulfillment component contains one index referencing a specific * order and another referencing a specific offer or consideration item. */ struct FulfillmentComponent { uint256 orderIndex; uint256 itemIndex; } /** * @dev An execution is triggered once all consideration items have been zeroed * out. It sends the item in question from the offerer to the item's * recipient, optionally sourcing approvals from either this contract * directly or from the offerer's chosen conduit if one is specified. An * execution is not provided as an argument, but rather is derived via * orders, criteria resolvers, and fulfillments (where the total number of * executions will be less than or equal to the total number of indicated * fulfillments) and returned as part of `matchOrders`. */ struct Execution { ReceivedItem item; address offerer; bytes32 conduitKey; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; // prettier-ignore enum OrderType { // 0: no partial fills, anyone can execute FULL_OPEN, // 1: partial fills supported, anyone can execute PARTIAL_OPEN, // 2: no partial fills, only offerer or zone can execute FULL_RESTRICTED, // 3: partial fills supported, only offerer or zone can execute PARTIAL_RESTRICTED } // prettier-ignore enum BasicOrderType { // 0: no partial fills, anyone can execute ETH_TO_ERC721_FULL_OPEN, // 1: partial fills supported, anyone can execute ETH_TO_ERC721_PARTIAL_OPEN, // 2: no partial fills, only offerer or zone can execute ETH_TO_ERC721_FULL_RESTRICTED, // 3: partial fills supported, only offerer or zone can execute ETH_TO_ERC721_PARTIAL_RESTRICTED, // 4: no partial fills, anyone can execute ETH_TO_ERC1155_FULL_OPEN, // 5: partial fills supported, anyone can execute ETH_TO_ERC1155_PARTIAL_OPEN, // 6: no partial fills, only offerer or zone can execute ETH_TO_ERC1155_FULL_RESTRICTED, // 7: partial fills supported, only offerer or zone can execute ETH_TO_ERC1155_PARTIAL_RESTRICTED, // 8: no partial fills, anyone can execute ERC20_TO_ERC721_FULL_OPEN, // 9: partial fills supported, anyone can execute ERC20_TO_ERC721_PARTIAL_OPEN, // 10: no partial fills, only offerer or zone can execute ERC20_TO_ERC721_FULL_RESTRICTED, // 11: partial fills supported, only offerer or zone can execute ERC20_TO_ERC721_PARTIAL_RESTRICTED, // 12: no partial fills, anyone can execute ERC20_TO_ERC1155_FULL_OPEN, // 13: partial fills supported, anyone can execute ERC20_TO_ERC1155_PARTIAL_OPEN, // 14: no partial fills, only offerer or zone can execute ERC20_TO_ERC1155_FULL_RESTRICTED, // 15: partial fills supported, only offerer or zone can execute ERC20_TO_ERC1155_PARTIAL_RESTRICTED, // 16: no partial fills, anyone can execute ERC721_TO_ERC20_FULL_OPEN, // 17: partial fills supported, anyone can execute ERC721_TO_ERC20_PARTIAL_OPEN, // 18: no partial fills, only offerer or zone can execute ERC721_TO_ERC20_FULL_RESTRICTED, // 19: partial fills supported, only offerer or zone can execute ERC721_TO_ERC20_PARTIAL_RESTRICTED, // 20: no partial fills, anyone can execute ERC1155_TO_ERC20_FULL_OPEN, // 21: partial fills supported, anyone can execute ERC1155_TO_ERC20_PARTIAL_OPEN, // 22: no partial fills, only offerer or zone can execute ERC1155_TO_ERC20_FULL_RESTRICTED, // 23: partial fills supported, only offerer or zone can execute ERC1155_TO_ERC20_PARTIAL_RESTRICTED } // prettier-ignore enum BasicOrderRouteType { // 0: provide Ether (or other native token) to receive offered ERC721 item. ETH_TO_ERC721, // 1: provide Ether (or other native token) to receive offered ERC1155 item. ETH_TO_ERC1155, // 2: provide ERC20 item to receive offered ERC721 item. ERC20_TO_ERC721, // 3: provide ERC20 item to receive offered ERC1155 item. ERC20_TO_ERC1155, // 4: provide ERC721 item to receive offered ERC20 item. ERC721_TO_ERC20, // 5: provide ERC1155 item to receive offered ERC20 item. ERC1155_TO_ERC20 } // prettier-ignore enum ItemType { // 0: ETH on mainnet, MATIC on polygon, etc. NATIVE, // 1: ERC20 items (ERC777 and ERC20 analogues could also technically work) ERC20, // 2: ERC721 items ERC721, // 3: ERC1155 items ERC1155, // 4: ERC721 items where a number of tokenIds are supported ERC721_WITH_CRITERIA, // 5: ERC1155 items where a number of ids are supported ERC1155_WITH_CRITERIA } // prettier-ignore enum Side { // 0: Items that can be spent OFFER, // 1: Items that must be received CONSIDERATION }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; /* * @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 GSN 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 payable) { return payable(msg.sender); } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.10; import "./BaseUpgradeabilityProxy.sol"; /** * @title InitializableUpgradeabilityProxy * @dev Extends BaseUpgradeabilityProxy with an initializer for initializing * implementation and init data. */ contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy { /** * @dev Contract initializer. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ function initialize(address _logic, bytes memory _data) public payable { require(_implementation() == address(0)); assert( IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1) ); _setImplementation(_logic); if (_data.length > 0) { (bool success, ) = _logic.delegatecall(_data); require(success); } } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.10; /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Will run if no other function in the contract matches the call data. * Implemented entirely in `_fallback`. */ fallback() external payable { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { //solium-disable-next-line assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall( gas(), implementation, 0, calldatasize(), 0, 0 ) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual {} /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */ receive() external payable virtual { _fallback(); } }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity 0.8.10; import {BaseUpgradeabilityProxy} from "../../../dependencies/openzeppelin/upgradeability/BaseUpgradeabilityProxy.sol"; /** * @title BaseImmutableAdminUpgradeabilityProxy * , inspired by the OpenZeppelin upgradeability proxy pattern * @notice This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * @dev The _admin role is stored in an immutable, which helps saving transactions costs * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract BaseImmutableAdminUpgradeabilityProxy is BaseUpgradeabilityProxy { address internal immutable _admin; /** * @dev Constructor. * @param admin_ The address of the admin */ constructor(address admin_) { _admin = admin_; } modifier ifAdmin() { if (msg.sender == _admin) { _; } else { _fallback(); } } /** * @notice Return the admin address * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin; } /** * @notice Return the implementation address * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @notice Upgrade the backing implementation of the proxy. * @dev Only the admin can call this function. * @param newImplementation The address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @notice Upgrade the backing implementation of the proxy and call a function * on the new implementation. * @dev This is useful to initialize the proxied contract. * @param newImplementation The address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin { _upgradeTo(newImplementation); (bool success, ) = newImplementation.delegatecall(data); require(success); } /** * @notice Only fall back when the sender is not the admin. */ function _willFallback() internal virtual override { require( msg.sender != _admin, "Cannot call fallback function from the proxy admin" ); super._willFallback(); } }
// SPDX-License-Identifier: agpl-3.0 pragma solidity 0.8.10; import "./Proxy.sol"; import "../contracts/Address.sol"; /** * @title BaseUpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract BaseUpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal view override returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; //solium-disable-next-line assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require( Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address" ); bytes32 slot = IMPLEMENTATION_SLOT; //solium-disable-next-line assembly { sstore(slot, newImplementation) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; /******************************************************************************\ * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535 /******************************************************************************/ import {IParaProxy} from "../../../../interfaces/IParaProxy.sol"; library ParaProxyLib { bytes32 constant PROXY_STORAGE_POSITION = bytes32( uint256(keccak256("paraspace.proxy.implementation.storage")) - 1 ); struct ImplementationAddressAndPosition { address implAddress; uint96 functionSelectorPosition; // position in implementationFunctionSelectors.functionSelectors array } struct ImplementationFunctionSelectors { bytes4[] functionSelectors; uint256 implementationAddressPosition; // position of implAddress in implementationAddresses array } struct ProxyStorage { // maps function selector to the implementation address and // the position of the selector in the implementationFunctionSelectors.selectors array mapping(bytes4 => ImplementationAddressAndPosition) selectorToImplAndPosition; // maps implementation addresses to function selectors mapping(address => ImplementationFunctionSelectors) implementationFunctionSelectors; // implementation addresses address[] implementationAddresses; // Used to query if a contract implements an interface. // Used to implement ERC-165. mapping(bytes4 => bool) supportedInterfaces; // owner of the contract address contractOwner; } function diamondStorage() internal pure returns (ProxyStorage storage ds) { bytes32 position = PROXY_STORAGE_POSITION; assembly { ds.slot := position } } event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); function setContractOwner(address _newOwner) internal { ProxyStorage storage ds = diamondStorage(); address previousOwner = ds.contractOwner; ds.contractOwner = _newOwner; emit OwnershipTransferred(previousOwner, _newOwner); } function contractOwner() internal view returns (address contractOwner_) { contractOwner_ = diamondStorage().contractOwner; } function enforceIsContractOwner() internal view { require( msg.sender == diamondStorage().contractOwner, "ParaProxy: Must be contract owner" ); } event ImplementationUpdated( IParaProxy.ProxyImplementation[] _implementationData, address _init, bytes _calldata ); // Internal function version of diamondCut function updateImplementation( IParaProxy.ProxyImplementation[] memory _implementationData, address _init, bytes memory _calldata ) internal { for ( uint256 implIndex; implIndex < _implementationData.length; implIndex++ ) { IParaProxy.ProxyImplementationAction action = _implementationData[ implIndex ].action; if (action == IParaProxy.ProxyImplementationAction.Add) { addFunctions( _implementationData[implIndex].implAddress, _implementationData[implIndex].functionSelectors ); } else if (action == IParaProxy.ProxyImplementationAction.Replace) { replaceFunctions( _implementationData[implIndex].implAddress, _implementationData[implIndex].functionSelectors ); } else if (action == IParaProxy.ProxyImplementationAction.Remove) { removeFunctions( _implementationData[implIndex].implAddress, _implementationData[implIndex].functionSelectors ); } else { revert("ParaProxy: Incorrect ProxyImplementationAction"); } } emit ImplementationUpdated(_implementationData, _init, _calldata); initializeImplementation(_init, _calldata); } function addFunctions( address _implementationAddress, bytes4[] memory _functionSelectors ) internal { require( _functionSelectors.length > 0, "ParaProxy: No selectors in implementation to cut" ); ProxyStorage storage ds = diamondStorage(); require( _implementationAddress != address(0), "ParaProxy: Add implementation can't be address(0)" ); uint96 selectorPosition = uint96( ds .implementationFunctionSelectors[_implementationAddress] .functionSelectors .length ); // add new implementation address if it does not exist if (selectorPosition == 0) { addFacet(ds, _implementationAddress); } for ( uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++ ) { bytes4 selector = _functionSelectors[selectorIndex]; address oldImplementationAddress = ds .selectorToImplAndPosition[selector] .implAddress; require( oldImplementationAddress == address(0), "ParaProxy: Can't add function that already exists" ); addFunction(ds, selector, selectorPosition, _implementationAddress); selectorPosition++; } } function replaceFunctions( address _implementationAddress, bytes4[] memory _functionSelectors ) internal { require( _functionSelectors.length > 0, "ParaProxy: No selectors in implementation to cut" ); ProxyStorage storage ds = diamondStorage(); require( _implementationAddress != address(0), "ParaProxy: Add implementation can't be address(0)" ); uint96 selectorPosition = uint96( ds .implementationFunctionSelectors[_implementationAddress] .functionSelectors .length ); // add new implementation address if it does not exist if (selectorPosition == 0) { addFacet(ds, _implementationAddress); } for ( uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++ ) { bytes4 selector = _functionSelectors[selectorIndex]; address oldImplementationAddress = ds .selectorToImplAndPosition[selector] .implAddress; require( oldImplementationAddress != _implementationAddress, "ParaProxy: Can't replace function with same function" ); removeFunction(ds, oldImplementationAddress, selector); addFunction(ds, selector, selectorPosition, _implementationAddress); selectorPosition++; } } function removeFunctions( address _implementationAddress, bytes4[] memory _functionSelectors ) internal { require( _functionSelectors.length > 0, "ParaProxy: No selectors in implementation to cut" ); ProxyStorage storage ds = diamondStorage(); // if function does not exist then do nothing and return require( _implementationAddress == address(0), "ParaProxy: Remove implementation address must be address(0)" ); for ( uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++ ) { bytes4 selector = _functionSelectors[selectorIndex]; address oldImplementationAddress = ds .selectorToImplAndPosition[selector] .implAddress; removeFunction(ds, oldImplementationAddress, selector); } } function addFacet(ProxyStorage storage ds, address _implementationAddress) internal { enforceHasContractCode( _implementationAddress, "ParaProxy: New implementation has no code" ); ds .implementationFunctionSelectors[_implementationAddress] .implementationAddressPosition = ds.implementationAddresses.length; ds.implementationAddresses.push(_implementationAddress); } function addFunction( ProxyStorage storage ds, bytes4 _selector, uint96 _selectorPosition, address _implementationAddress ) internal { ds .selectorToImplAndPosition[_selector] .functionSelectorPosition = _selectorPosition; ds .implementationFunctionSelectors[_implementationAddress] .functionSelectors .push(_selector); ds .selectorToImplAndPosition[_selector] .implAddress = _implementationAddress; } function removeFunction( ProxyStorage storage ds, address _implementationAddress, bytes4 _selector ) internal { require( _implementationAddress != address(0), "ParaProxy: Can't remove function that doesn't exist" ); // an immutable function is a function defined directly in a paraProxy require( _implementationAddress != address(this), "ParaProxy: Can't remove immutable function" ); // replace selector with last selector, then delete last selector uint256 selectorPosition = ds .selectorToImplAndPosition[_selector] .functionSelectorPosition; uint256 lastSelectorPosition = ds .implementationFunctionSelectors[_implementationAddress] .functionSelectors .length - 1; // if not the same then replace _selector with lastSelector if (selectorPosition != lastSelectorPosition) { bytes4 lastSelector = ds .implementationFunctionSelectors[_implementationAddress] .functionSelectors[lastSelectorPosition]; ds .implementationFunctionSelectors[_implementationAddress] .functionSelectors[selectorPosition] = lastSelector; ds .selectorToImplAndPosition[lastSelector] .functionSelectorPosition = uint96(selectorPosition); } // delete the last selector ds .implementationFunctionSelectors[_implementationAddress] .functionSelectors .pop(); delete ds.selectorToImplAndPosition[_selector]; // if no more selectors for implementation address then delete the implementation address if (lastSelectorPosition == 0) { // replace implementation address with last implementation address and delete last implementation address uint256 lastImplementationAddressPosition = ds .implementationAddresses .length - 1; uint256 implementationAddressPosition = ds .implementationFunctionSelectors[_implementationAddress] .implementationAddressPosition; if ( implementationAddressPosition != lastImplementationAddressPosition ) { address lastImplementationAddress = ds.implementationAddresses[ lastImplementationAddressPosition ]; ds.implementationAddresses[ implementationAddressPosition ] = lastImplementationAddress; ds .implementationFunctionSelectors[lastImplementationAddress] .implementationAddressPosition = implementationAddressPosition; } ds.implementationAddresses.pop(); delete ds .implementationFunctionSelectors[_implementationAddress] .implementationAddressPosition; } } function initializeImplementation(address _init, bytes memory _calldata) internal { if (_init == address(0)) { require( _calldata.length == 0, "ParaProxy: _init is address(0) but_calldata is not empty" ); } else { require( _calldata.length > 0, "ParaProxy: _calldata is empty but _init is not address(0)" ); if (_init != address(this)) { enforceHasContractCode( _init, "ParaProxy: _init address has no code" ); } (bool success, bytes memory error) = _init.delegatecall(_calldata); if (!success) { if (error.length > 0) { // bubble up the error revert(string(error)); } else { revert("ParaProxy: _init function reverted"); } } } } function enforceHasContractCode( address _contract, string memory _errorMessage ) internal view { uint256 contractSize; assembly { contractSize := extcodesize(_contract) } require(contractSize > 0, _errorMessage); } }
{ "optimizer": { "enabled": true, "runs": 4000 }, "evmVersion": "london", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"marketId","type":"string"},{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"ACLAdminUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"ACLManagerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"AddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"proxyAddress","type":"address"},{"indexed":false,"internalType":"address","name":"oldImplementationAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newImplementationAddress","type":"address"}],"name":"AddressSetAsProxy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"oldMarketId","type":"string"},{"indexed":true,"internalType":"string","name":"newMarketId","type":"string"}],"name":"MarketIdSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"marketplace","type":"address"},{"indexed":true,"internalType":"address","name":"adapter","type":"address"},{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"paused","type":"bool"}],"name":"MarketplaceUpdated","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":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"proxyAddress","type":"address"},{"components":[{"internalType":"address","name":"implAddress","type":"address"},{"internalType":"enum IParaProxy.ProxyImplementationAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":true,"internalType":"struct IParaProxy.ProxyImplementation[]","name":"implementationParams","type":"tuple[]"}],"name":"ParaProxyCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"proxyAddress","type":"address"},{"components":[{"internalType":"address","name":"implAddress","type":"address"},{"internalType":"enum IParaProxy.ProxyImplementationAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":true,"internalType":"struct IParaProxy.ProxyImplementation[]","name":"implementationParams","type":"tuple[]"}],"name":"ParaProxyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"PoolConfiguratorUpdated","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"implAddress","type":"address"},{"internalType":"enum IParaProxy.ProxyImplementationAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":true,"internalType":"struct IParaProxy.ProxyImplementation[]","name":"implementationParams","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"_init","type":"address"},{"indexed":false,"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"PoolUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"PriceOracleSentinelUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"PriceOracleUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"ProtocolDataProviderUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"address","name":"proxyAddress","type":"address"},{"indexed":true,"internalType":"address","name":"implementationAddress","type":"address"}],"name":"ProxyCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"WETHUpdated","type":"event"},{"inputs":[],"name":"getACLAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getACLManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMarketId","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getMarketplace","outputs":[{"components":[{"internalType":"address","name":"marketplace","type":"address"},{"internalType":"address","name":"adapter","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"paused","type":"bool"}],"internalType":"struct DataTypes.Marketplace","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPoolConfigurator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPoolDataProvider","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPriceOracle","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPriceOracleSentinel","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"newAclAdmin","type":"address"}],"name":"setACLAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAclManager","type":"address"}],"name":"setACLManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"address","name":"newAddress","type":"address"}],"name":"setAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"address","name":"newImplementationAddress","type":"address"}],"name":"setAddressAsProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newMarketId","type":"string"}],"name":"setMarketId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"address","name":"marketplace","type":"address"},{"internalType":"address","name":"adapter","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"paused","type":"bool"}],"name":"setMarketplace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPoolConfiguratorImpl","type":"address"}],"name":"setPoolConfiguratorImpl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPriceOracle","type":"address"}],"name":"setPriceOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPriceOracleSentinel","type":"address"}],"name":"setPriceOracleSentinel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newDataProvider","type":"address"}],"name":"setProtocolDataProvider","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newWETH","type":"address"}],"name":"setWETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"implAddress","type":"address"},{"internalType":"enum IParaProxy.ProxyImplementationAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct IParaProxy.ProxyImplementation[]","name":"implementationParams","type":"tuple[]"},{"internalType":"address","name":"_init","type":"address"},{"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"updatePoolImpl","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162004fe638038062004fe68339810160408190526200003491620003aa565b600080546001600160a01b0319163390811782556040519091829160008051602062004fc6833981519152908290a3506200006f8262000082565b6200007a816200018d565b5050620004d2565b600060018054620000939062000477565b80601f0160208091040260200160405190810160405280929190818152602001828054620000c19062000477565b8015620001125780601f10620000e65761010080835404028352916020019162000112565b820191906000526020600020905b815481529060010190602001808311620000f457829003601f168201915b5050855193945062000130936001935060208701925090506200029e565b5081604051620001419190620004b4565b604051809103902081604051620001599190620004b4565b604051908190038120907fe685c8cdecc6030c45030fd54778812cb84ed8e4467c38294403d68ba786082390600090a35050565b6000546001600160a01b03163314620001ed5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b038116620002545760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620001e4565b600080546040516001600160a01b038085169392169160008051602062004fc683398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b828054620002ac9062000477565b90600052602060002090601f016020900481019282620002d057600085556200031b565b82601f10620002eb57805160ff19168380011785556200031b565b828001600101855582156200031b579182015b828111156200031b578251825591602001919060010190620002fe565b50620003299291506200032d565b5090565b5b808211156200032957600081556001016200032e565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620003775781810151838201526020016200035d565b8381111562000387576000848401525b50505050565b80516001600160a01b0381168114620003a557600080fd5b919050565b60008060408385031215620003be57600080fd5b82516001600160401b0380821115620003d657600080fd5b818501915085601f830112620003eb57600080fd5b81518181111562000400576200040062000344565b604051601f8201601f19908116603f011681019083821181831017156200042b576200042b62000344565b816040528281528860208487010111156200044557600080fd5b620004588360208301602088016200035a565b80965050505050506200046e602084016200038d565b90509250929050565b600181811c908216806200048c57607f821691505b60208210811415620004ae57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251620004c88184602087016200035a565b9190910192915050565b614ae480620004e26000396000f3fe60806040523480156200001157600080fd5b5060043610620001d15760003560e01c806376d84ffc1162000101578063e4ca28b711620000a3578063f2fde38b116200007a578063f2fde38b1462000607578063f3af858a146200061e578063f67b18471462000635578063fca513a8146200064c57600080fd5b8063e4ca28b7146200057f578063e860accb1462000596578063ed301ca914620005f057600080fd5b8063cae5f11e11620000d8578063cae5f11e14620004b4578063e0f31eb5146200050e578063e4501d29146200056857600080fd5b806376d84ffc14620004745780638da5cb5b146200048b578063ca446dd9146200049d57600080fd5b80635b769f3c1162000177578063631adfca116200014e578063631adfca146200039f578063707cd71614620003f9578063715018a6146200045357806374944cec146200045d57600080fd5b80635b769f3c14620003175780635dcc528c146200032e5780635eb88d3d146200034557600080fd5b80634585264a11620001ac5780634585264a14620002ce578063530e784f14620002e7578063568ef47014620002fe57600080fd5b8063026b1d5f14620001d65780630e67178c146200024857806321f8a72114620002a2575b600080fd5b7f504f4f4c0000000000000000000000000000000000000000000000000000000060005260026020527f4fe005067814bb4b024d9515847377d15011b64593c006223b4a722952d2c05a546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b7f41434c5f41444d494e000000000000000000000000000000000000000000000060005260026020527ffab167ad2009dcb80ee379700bb4bd029d97c1181ed9d961625632c8a6f051c6546001600160a01b03166200022b565b6200022b620002b336600462001d9e565b6000908152600260205260409020546001600160a01b031690565b620002e5620002df36600462001de0565b620006a6565b005b620002e5620002f836600462001e55565b62000832565b6200030862000934565b6040516200023f919062001edd565b620002e56200032836600462001e55565b620009ce565b620002e56200033f36600462001ef2565b62000ad0565b7f50524943455f4f5241434c455f53454e54494e454c000000000000000000000060005260026020527f0d2c1bcee56447b4f46248272f34207a580a5c40f666a31f4e2fbb470ea53ab8546001600160a01b03166200022b565b7f504f4f4c5f434f4e464947555241544f5200000000000000000000000000000060005260026020527f90c127ef1c12c03f5781afeca3079527ea5333738078bba6fea26825bf9bf2c5546001600160a01b03166200022b565b7f41434c5f4d414e4147455200000000000000000000000000000000000000000060005260026020527f9edef266ef35fd0c6e131df0f31a330f3dd4c4d19dd31ed615c21d005c68116b546001600160a01b03166200022b565b620002e562000c24565b620002e56200046e36600462001e55565b62000cd7565b620002e56200048536600462001e55565b62000dd9565b6000546001600160a01b03166200022b565b620002e5620004ae36600462001ef2565b62000edb565b7f574554480000000000000000000000000000000000000000000000000000000060005260026020527f9d079330cab48a13979924dfd7e87d65711257c575e853d3b075acf5fc8707c7546001600160a01b03166200022b565b620005256200051f36600462001d9e565b62000fa2565b6040805182516001600160a01b0390811682526020808501518216908301528383015116918101919091526060918201511515918101919091526080016200023f565b620002e56200057936600462001e55565b620010a8565b620002e56200059036600462001e55565b620011aa565b7f444154415f50524f56494445520000000000000000000000000000000000000060005260026020527fcd7944601aaa5cd7ccdae1bebec659e98c6aac8f12486b30e59db0d39698051f546001600160a01b03166200022b565b620002e56200060136600462001e55565b620012a5565b620002e56200061836600462001e55565b620013a7565b620002e56200062f36600462001f71565b620014e9565b620002e5620006463660046200205c565b620015d3565b7f50524943455f4f5241434c45000000000000000000000000000000000000000060005260026020527f740f710666bd7a12af42df98311e541e47f7fd33d382d11602457a6d540cbd63546001600160a01b03166200022b565b6000546001600160a01b03163314620007065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b604080516080810182526001600160a01b0380871680835286821660208085018281528885168688019081528815156060880190815260008e81526003909452928890209651875490871673ffffffffffffffffffffffffffffffffffffffff199182161788559151600188018054918816919093161790915551600290950180549151151574010000000000000000000000000000000000000000027fffffffffffffffffffffff000000000000000000000000000000000000000000909216959094169490941793909317909155915190919087907f1d6ec4e10cedd4a2a652d0be45309f11e682fef6bb970c752a48cba872a6ae86906200082390879087906001600160a01b039290921682521515602082015260400190565b60405180910390a45050505050565b6000546001600160a01b031633146200088e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b7f50524943455f4f5241434c450000000000000000000000000000000000000000600090815260026020527f740f710666bd7a12af42df98311e541e47f7fd33d382d11602457a6d540cbd6380546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169283917f56b5f80d8cac1479698aa7d01605fd6111e90b15fc4d2b377417f46034876cbd9190a35050565b606060018054620009459062002117565b80601f0160208091040260200160405190810160405280929190818152602001828054620009739062002117565b8015620009c45780601f106200099857610100808354040283529160200191620009c4565b820191906000526020600020905b815481529060010190602001808311620009a657829003601f168201915b5050505050905090565b6000546001600160a01b0316331462000a2a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b7f5745544800000000000000000000000000000000000000000000000000000000600090815260026020527f9d079330cab48a13979924dfd7e87d65711257c575e853d3b075acf5fc8707c780546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169283917f1c08ec67b877c60261a1d95ebb7f008d38470096d29e66d715aed49e66ee8f5a9190a35050565b6000546001600160a01b0316331462000b2c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b60408051808201909152600181527f380000000000000000000000000000000000000000000000000000000000000060208201527f504f4f4c0000000000000000000000000000000000000000000000000000000083141562000ba45760405162461bcd60e51b8152600401620006fd919062001edd565b506000828152600260205260408120546001600160a01b03169062000bc9846200163d565b905062000bd78484620016d8565b6040516001600160a01b038281168252808516919084169086907f3bbd45b5429b385e3fb37ad5cd1cd1435a3c8ec32196c7937597365a3fd3e99c9060200160405180910390a450505050565b6000546001600160a01b0316331462000c805760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b0316331462000d335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b7f50524943455f4f5241434c455f53454e54494e454c0000000000000000000000600090815260026020527f0d2c1bcee56447b4f46248272f34207a580a5c40f666a31f4e2fbb470ea53ab880546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169283917f5326514eeca90494a14bedabcff812a0e683029ee85d1e23824d44fd14cd6ae79190a35050565b6000546001600160a01b0316331462000e355760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b7f41434c5f41444d494e0000000000000000000000000000000000000000000000600090815260026020527ffab167ad2009dcb80ee379700bb4bd029d97c1181ed9d961625632c8a6f051c680546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169283917fe9cf53972264dc95304fd424458745019ddfca0e37ae8f703d74772c41ad115b9190a35050565b6000546001600160a01b0316331462000f375760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b600082815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b038681169182179093559251911692839186917f9ef0e8c8e52743bb38b83b17d9429141d494b8041ca6d616a6c77cebae9cd8b791a4505050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260036020908152604091829020825160808101845281546001600160a01b0390811680835260018401548216948301949094526002909201549182169381019390935274010000000000000000000000000000000000000000900460ff16151560608301521580159062001049575080516001600160a01b03163b15155b15620010555792915050565b604080518082018252600381527f31303300000000000000000000000000000000000000000000000000000000006020820152905162461bcd60e51b8152620006fd919060040162001edd565b50919050565b6000546001600160a01b03163314620011045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b7f444154415f50524f564944455200000000000000000000000000000000000000600090815260026020527fcd7944601aaa5cd7ccdae1bebec659e98c6aac8f12486b30e59db0d39698051f80546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169283917fc2c64a506949ea6b362b49fdfd78dbeade68586ea45c44edb102a311d3535dde9190a35050565b6000546001600160a01b03163314620012065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b6000620012337f504f4f4c5f434f4e464947555241544f520000000000000000000000000000006200163d565b9050620012617f504f4f4c5f434f4e464947555241544f5200000000000000000000000000000083620016d8565b816001600160a01b0316816001600160a01b03167f8932892569eba59c8382a089d9b732d1f49272878775235761a2a6b0309cd46560405160405180910390a35050565b6000546001600160a01b03163314620013015760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b7f41434c5f4d414e41474552000000000000000000000000000000000000000000600090815260026020527f9edef266ef35fd0c6e131df0f31a330f3dd4c4d19dd31ed615c21d005c68116b80546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169283917fb30efa04327bb8a537d61cc1e5c48095345ad18ef7cc04e6bacf7dfb6caaf5079190a35050565b6000546001600160a01b03163314620014035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b6001600160a01b038116620014815760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401620006fd565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314620015455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b620015757f504f4f4c00000000000000000000000000000000000000000000000000000000868686868662001981565b8484604051620015879291906200228c565b60405180910390207f04bca245412c4584bfbdbd2d543feaac9e454dc3764b86c9837eed246531f4dc848484604051620015c4939291906200238b565b60405180910390a25050505050565b6000546001600160a01b031633146200162f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b6200163a8162001bd1565b50565b6000818152600260205260408120546001600160a01b031680620016645750600092915050565b6000819050806001600160a01b0316635c60da1b6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015620016aa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620016d09190620023b9565b949350505050565b60408051808201909152600281527f373700000000000000000000000000000000000000000000000000000000000060208201526001600160a01b038216620017365760405162461bcd60e51b8152600401620006fd919062001edd565b506000828152600260205260408082205490513060248201526001600160a01b039091169190819060440160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fc4d66de80000000000000000000000000000000000000000000000000000000017905290506001600160a01b038316620018f95730604051620017d99062001cdc565b6001600160a01b039091168152602001604051809103906000f08015801562001806573d6000803e3d6000fd5b506040517fd1f578940000000000000000000000000000000000000000000000000000000081529092506001600160a01b0383169063d1f5789490620018539087908590600401620023d9565b600060405180830381600087803b1580156200186e57600080fd5b505af115801562001883573d6000803e3d6000fd5b505050600086815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03878116918217909255915195965086959088169350909188917f4a465a9bd819d9662563c1e11ae958f8109e437e7f4bf1c6ef0b9a7b3f35d4789190a46200197a565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081528392506001600160a01b03831690634f1ef28690620019459087908590600401620023d9565b600060405180830381600087803b1580156200196057600080fd5b505af115801562001975573d6000803e3d6000fd5b505050505b5050505050565b6000868152600260205260408120546001600160a01b0316908162001af15730604051620019af9062001cea565b6001600160a01b039091168152602001604051809103906000f080158015620019dc573d6000803e3d6000fd5b506040517f5a8339910000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690635a8339919062001a2f908a908a908a908a908a90600401620023fd565b600060405180830381600087803b15801562001a4a57600080fd5b505af115801562001a5f573d6000803e3d6000fd5b50505060008981526002602052604090819020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03851617905551919250829162001aae9150889088906200228c565b604051908190038120906001600160a01b038416908a907fc98c4080dbb73b6ab93d55682dc2921c0acc2ce5a7dbe170be426b691301f31690600090a462001bc7565b506040517f5a83399100000000000000000000000000000000000000000000000000000000815281906001600160a01b03821690635a8339919062001b43908a908a908a908a908a90600401620023fd565b600060405180830381600087803b15801562001b5e57600080fd5b505af115801562001b73573d6000803e3d6000fd5b50505050868660405162001b899291906200228c565b604051908190038120906001600160a01b038416908a907f7364d7b110775dfa21e4e4d3339c6962e91ab9cc8abdec6c9ec1dc435cdd606e90600090a45b5050505050505050565b60006001805462001be29062002117565b80601f016020809104026020016040519081016040528092919081815260200182805462001c109062002117565b801562001c615780601f1062001c355761010080835404028352916020019162001c61565b820191906000526020600020905b81548152906001019060200180831162001c4357829003601f168201915b5050855193945062001c7f9360019350602087019250905062001cf8565b508160405162001c90919062002549565b60405180910390208160405162001ca8919062002549565b604051908190038120907fe685c8cdecc6030c45030fd54778812cb84ed8e4467c38294403d68ba786082390600090a35050565b6109f2806200256883390190565b611b558062002f5a83390190565b82805462001d069062002117565b90600052602060002090601f01602090048101928262001d2a576000855562001d75565b82601f1062001d4557805160ff191683800117855562001d75565b8280016001018555821562001d75579182015b8281111562001d7557825182559160200191906001019062001d58565b5062001d8392915062001d87565b5090565b5b8082111562001d83576000815560010162001d88565b60006020828403121562001db157600080fd5b5035919050565b6001600160a01b03811681146200163a57600080fd5b803562001ddb8162001db8565b919050565b600080600080600060a0868803121562001df957600080fd5b85359450602086013562001e0d8162001db8565b9350604086013562001e1f8162001db8565b9250606086013562001e318162001db8565b91506080860135801515811462001e4757600080fd5b809150509295509295909350565b60006020828403121562001e6857600080fd5b813562001e758162001db8565b9392505050565b60005b8381101562001e9957818101518382015260200162001e7f565b8381111562001ea9576000848401525b50505050565b6000815180845262001ec981602086016020860162001e7c565b601f01601f19169290920160200192915050565b60208152600062001e75602083018462001eaf565b6000806040838503121562001f0657600080fd5b82359150602083013562001f1a8162001db8565b809150509250929050565b60008083601f84011262001f3857600080fd5b50813567ffffffffffffffff81111562001f5157600080fd5b60208301915083602082850101111562001f6a57600080fd5b9250929050565b60008060008060006060868803121562001f8a57600080fd5b853567ffffffffffffffff8082111562001fa357600080fd5b818801915088601f83011262001fb857600080fd5b81358181111562001fc857600080fd5b8960208260051b850101111562001fde57600080fd5b6020830197508096505062001ff66020890162001dce565b945060408801359150808211156200200d57600080fd5b506200201c8882890162001f25565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156200206f57600080fd5b813567ffffffffffffffff808211156200208857600080fd5b818401915084601f8301126200209d57600080fd5b813581811115620020b257620020b26200202d565b604051601f8201601f19908116603f01168101908382118183101715620020dd57620020dd6200202d565b81604052828152876020848701011115620020f757600080fd5b826020860160208301376000928101602001929092525095945050505050565b600181811c908216806200212c57607f821691505b60208210811415620010a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b80356003811062001ddb57600080fd5b60038110620021af577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112620021e957600080fd5b830160208101925035905067ffffffffffffffff8111156200220a57600080fd5b8060051b360383131562001f6a57600080fd5b80357fffffffff000000000000000000000000000000000000000000000000000000008116811462001ddb57600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181126200228357600080fd5b90910192915050565b6000818482805b868110156200235457620022a883896200224e565b8035620022b58162001db8565b6001600160a01b031685526020620022dc818701620022d684840162002167565b62002177565b6040808701620022ef82850185620021b3565b9450915085905b8482101562002341577fffffffff000000000000000000000000000000000000000000000000000000006200232b846200221d565b16815291830191600191909101908301620022f6565b9750505093909301925060010162002293565b50919695505050505050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b6001600160a01b0384168152604060208201526000620023b060408301848662002360565b95945050505050565b600060208284031215620023cc57600080fd5b815162001e758162001db8565b6001600160a01b0383168152604060208201526000620016d0604083018462001eaf565b60608082528181018690526000906080808401600589901b850182018a85805b8c81101562002513577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8089850301855262002459838f6200224e565b8785018135620024698162001db8565b6001600160a01b0316865260206200248383820162002167565b620024918289018262002177565b506040620024a281850185620021b3565b9189018c9052928190529250888701855b84811015620024fc577fffffffff00000000000000000000000000000000000000000000000000000000620024e8856200221d565b1682529282019290820190600101620024b3565b50978101979650949094019350506001016200241d565b5050506001600160a01b038916602087015285810360408701526200253a81888a62002360565b9b9a5050505050505050505050565b600082516200255d81846020870162001e7c565b919091019291505056fe60a060405234801561001057600080fd5b506040516109f23803806109f283398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516109446100ae60003960008181610160015281816101b201528181610285015281816104220152818161044b01526105cb01526109446000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a8578063d1f57894146100e6578063f851a440146100f95761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61010e565b005b61006b61010e565b34801561008157600080fd5b5061006b6100903660046106a2565b610148565b61006b6100a33660046106c4565b61019a565b3480156100b457600080fd5b506100bd61026b565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61006b6100f4366004610776565b6102dc565b34801561010557600080fd5b506100bd610408565b61011661046d565b6101466101417f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b610475565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101925761018f81610499565b50565b61018f61010e565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561025e576101e183610499565b60008373ffffffffffffffffffffffffffffffffffffffff16838360405161020a929190610856565b600060405180830381855af49150503d8060008114610245576040519150601f19603f3d011682016040523d82523d6000602084013e61024a565b606091505b505090508061025857600080fd5b50505050565b61026661010e565b505050565b60003373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156102d157507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6102d961010e565b90565b60006103067f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b73ffffffffffffffffffffffffffffffffffffffff161461032657600080fd5b61035160017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610866565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc1461037f5761037f6108a4565b610388826104e6565b8051156104045760008273ffffffffffffffffffffffffffffffffffffffff16826040516103b691906108d3565b600060405180830381855af49150503d80600081146103f1576040519150601f19603f3d011682016040523d82523d6000602084013e6103f6565b606091505b505090508061026657600080fd5b5050565b60003373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156102d157507f000000000000000000000000000000000000000000000000000000000000000090565b6101466105b3565b3660008037600080366000845af43d6000803e808015610494573d6000f35b3d6000fd5b6104a2816104e6565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff81163b61058f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f43616e6e6f742073657420612070726f787920696d706c656d656e746174696f60448201527f6e20746f2061206e6f6e2d636f6e74726163742061646472657373000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610146576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e20667260448201527f6f6d207468652070726f78792061646d696e00000000000000000000000000006064820152608401610586565b803573ffffffffffffffffffffffffffffffffffffffff8116811461069d57600080fd5b919050565b6000602082840312156106b457600080fd5b6106bd82610679565b9392505050565b6000806000604084860312156106d957600080fd5b6106e284610679565b9250602084013567ffffffffffffffff808211156106ff57600080fd5b818601915086601f83011261071357600080fd5b81358181111561072257600080fd5b87602082850101111561073457600080fd5b6020830194508093505050509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806040838503121561078957600080fd5b61079283610679565b9150602083013567ffffffffffffffff808211156107af57600080fd5b818501915085601f8301126107c357600080fd5b8135818111156107d5576107d5610747565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561081b5761081b610747565b8160405282815288602084870101111561083457600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b8183823760009101908152919050565b60008282101561089f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6000825160005b818110156108f457602081860181015185830152016108da565b81811115610903576000828501525b50919091019291505056fea2646970667358221220f2710533727b7d1b9850327507306138033f07ef93b7f71a3253c72d9546b9a764736f6c634300080a0033608060405260405162001b5538038062001b558339810160408190526200002691620000db565b6200003c816200004360201b620001af1760201c565b5062000133565b60006200004f620000a5565b6004810180546001600160a01b038581166001600160a01b031983168117909355604051939450169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b600080620000d560017f6337542cd2f84f19034eb9306f0e56d253861ffec87880bde5606f90448356eb6200010d565b92915050565b600060208284031215620000ee57600080fd5b81516001600160a01b03811681146200010657600080fd5b9392505050565b6000828210156200012e57634e487b7160e01b600052601160045260246000fd5b500390565b611a1280620001436000396000f3fe6080604052600436106100225760003560e01c80635a8339911461013457610029565b3661002957005b60008061005760017f6337542cd2f84f19034eb9306f0e56d253861ffec87880bde5606f90448356eb6113e9565b600080357fffffffff00000000000000000000000000000000000000000000000000000000168152602082905260409020549092508291506001600160a01b0316806101105760405162461bcd60e51b815260206004820152602260248201527f5061726150726f78793a2046756e6374696f6e20646f6573206e6f742065786960448201527f737400000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e80801561012f573d6000f35b3d6000fd5b34801561014057600080fd5b5061015461014f366004611465565b610156565b005b61015e61021c565b6101a861016b85876115c9565b8484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506102a792505050565b5050505050565b60006101b96104d1565b6004810180546001600160a01b0385811673ffffffffffffffffffffffffffffffffffffffff1983168117909355604051939450169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6102246104d1565b600401546001600160a01b031633146102a55760405162461bcd60e51b815260206004820152602160248201527f5061726150726f78793a204d75737420626520636f6e7472616374206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610107565b565b60005b83518110156104865760008482815181106102c7576102c7611725565b6020026020010151602001519050600060028111156102e8576102e861173b565b8160028111156102fa576102fa61173b565b14156103495761034485838151811061031557610315611725565b60200260200101516000015186848151811061033357610333611725565b602002602001015160400151610505565b610473565b600181600281111561035d5761035d61173b565b14156103a75761034485838151811061037857610378611725565b60200260200101516000015186848151811061039657610396611725565b60200260200101516040015161080f565b60028160028111156103bb576103bb61173b565b1415610405576103448583815181106103d6576103d6611725565b6020026020010151600001518684815181106103f4576103f4611725565b602002602001015160400151610b2a565b60405162461bcd60e51b815260206004820152602e60248201527f5061726150726f78793a20496e636f72726563742050726f7879496d706c656d60448201527f656e746174696f6e416374696f6e0000000000000000000000000000000000006064820152608401610107565b508061047e81611751565b9150506102aa565b507f7994b9362f6f8b2522d7dfbe2519931ad73d1308b8bcfbc600db6de899c3d5288383836040516104ba939291906117e2565b60405180910390a16104cc8282610cba565b505050565b6000806104ff60017f6337542cd2f84f19034eb9306f0e56d253861ffec87880bde5606f90448356eb6113e9565b92915050565b600081511161057c5760405162461bcd60e51b815260206004820152603060248201527f5061726150726f78793a204e6f2073656c6563746f727320696e20696d706c6560448201527f6d656e746174696f6e20746f20637574000000000000000000000000000000006064820152608401610107565b60006105866104d1565b90506001600160a01b0383166106045760405162461bcd60e51b815260206004820152603160248201527f5061726150726f78793a2041646420696d706c656d656e746174696f6e20636160448201527f6e277420626520616464726573732830290000000000000000000000000000006064820152608401610107565b6001600160a01b03831660009081526001820160205260409020546bffffffffffffffffffffffff811661063c5761063c8285610ede565b60005b83518110156101a857600084828151811061065c5761065c611725565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081166000908152918690526040909120549091506001600160a01b0316801561071a5760405162461bcd60e51b815260206004820152603160248201527f5061726150726f78793a2043616e2774206164642066756e6374696f6e20746860448201527f617420616c7265616479206578697374730000000000000000000000000000006064820152608401610107565b7fffffffff00000000000000000000000000000000000000000000000000000000821660008181526020878152604080832080546001600160a01b03908116740100000000000000000000000000000000000000006bffffffffffffffffffffffff8c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c949094029390931790925593909252879052815473ffffffffffffffffffffffffffffffffffffffff1916179055836107f781611917565b9450505050808061080790611751565b91505061063f565b60008151116108865760405162461bcd60e51b815260206004820152603060248201527f5061726150726f78793a204e6f2073656c6563746f727320696e20696d706c6560448201527f6d656e746174696f6e20746f20637574000000000000000000000000000000006064820152608401610107565b60006108906104d1565b90506001600160a01b03831661090e5760405162461bcd60e51b815260206004820152603160248201527f5061726150726f78793a2041646420696d706c656d656e746174696f6e20636160448201527f6e277420626520616464726573732830290000000000000000000000000000006064820152608401610107565b6001600160a01b03831660009081526001820160205260409020546bffffffffffffffffffffffff8116610946576109468285610ede565b60005b83518110156101a857600084828151811061096657610966611725565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081166000908152918690526040909120549091506001600160a01b03908116908716811415610a2a5760405162461bcd60e51b815260206004820152603460248201527f5061726150726f78793a2043616e2774207265706c6163652066756e6374696f60448201527f6e20776974682073616d652066756e6374696f6e0000000000000000000000006064820152608401610107565b610a35858284610f55565b7fffffffff00000000000000000000000000000000000000000000000000000000821660008181526020878152604080832080546001600160a01b03908116740100000000000000000000000000000000000000006bffffffffffffffffffffffff8c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c949094029390931790925593909252879052815473ffffffffffffffffffffffffffffffffffffffff191617905583610b1281611917565b94505050508080610b2290611751565b915050610949565b6000815111610ba15760405162461bcd60e51b815260206004820152603060248201527f5061726150726f78793a204e6f2073656c6563746f727320696e20696d706c6560448201527f6d656e746174696f6e20746f20637574000000000000000000000000000000006064820152608401610107565b6000610bab6104d1565b90506001600160a01b03831615610c2a5760405162461bcd60e51b815260206004820152603b60248201527f5061726150726f78793a2052656d6f766520696d706c656d656e746174696f6e60448201527f2061646472657373206d757374206265206164647265737328302900000000006064820152608401610107565b60005b8251811015610cb4576000838281518110610c4a57610c4a611725565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081166000908152918590526040909120549091506001600160a01b0316610c9f848284610f55565b50508080610cac90611751565b915050610c2d565b50505050565b6001600160a01b038216610d4157805115610d3d5760405162461bcd60e51b815260206004820152603860248201527f5061726150726f78793a205f696e69742069732061646472657373283029206260448201527f75745f63616c6c64617461206973206e6f7420656d70747900000000000000006064820152608401610107565b5050565b6000815111610db85760405162461bcd60e51b815260206004820152603960248201527f5061726150726f78793a205f63616c6c6461746120697320656d70747920627560448201527f74205f696e6974206973206e6f742061646472657373283029000000000000006064820152608401610107565b6001600160a01b0382163014610dea57610dea82604051806060016040528060248152602001611990602491396113b2565b600080836001600160a01b031683604051610e059190611943565b600060405180830381855af49150503d8060008114610e40576040519150601f19603f3d011682016040523d82523d6000602084013e610e45565b606091505b509150915081610cb457805115610e70578060405162461bcd60e51b8152600401610107919061195f565b60405162461bcd60e51b815260206004820152602260248201527f5061726150726f78793a205f696e69742066756e6374696f6e2072657665727460448201527f65640000000000000000000000000000000000000000000000000000000000006064820152608401610107565b610f00816040518060600160405280602981526020016119b4602991396113b2565b6002820180546001600160a01b03909216600081815260019485016020908152604082208601859055948401835591825292902001805473ffffffffffffffffffffffffffffffffffffffff19169091179055565b6001600160a01b038216610fd15760405162461bcd60e51b815260206004820152603360248201527f5061726150726f78793a2043616e27742072656d6f76652066756e6374696f6e60448201527f207468617420646f65736e2774206578697374000000000000000000000000006064820152608401610107565b6001600160a01b0382163014156110505760405162461bcd60e51b815260206004820152602a60248201527f5061726150726f78793a2043616e27742072656d6f766520696d6d757461626c60448201527f652066756e6374696f6e000000000000000000000000000000000000000000006064820152608401610107565b7fffffffff000000000000000000000000000000000000000000000000000000008116600090815260208481526040808320546001600160a01b0386168452600180880190935290832054740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1692916110cd916113e9565b90508082146111ed576001600160a01b0384166000908152600186016020526040812080548390811061110257611102611725565b600091825260208083206008830401546001600160a01b038916845260018a019091526040909220805460079092166004026101000a90920460e01b92508291908590811061115357611153611725565b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c929092029390931790557fffffffff000000000000000000000000000000000000000000000000000000009290921682528690526040902080546001600160a01b0316740100000000000000000000000000000000000000006bffffffffffffffffffffffff8516021790555b6001600160a01b0384166000908152600186016020526040902080548061121657611216611979565b60008281526020808220600860001990940193840401805463ffffffff600460078716026101000a0219169055919092557fffffffff00000000000000000000000000000000000000000000000000000000851682528690526040812055806101a857600285015460009061128d906001906113e9565b6001600160a01b03861660009081526001808901602052604090912001549091508082146113495760008760020183815481106112cc576112cc611725565b6000918252602090912001546002890180546001600160a01b0390921692508291849081106112fd576112fd611725565b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03948516179055929091168152600189810190925260409020018190555b8660020180548061135c5761135c611979565b600082815260208082208301600019908101805473ffffffffffffffffffffffffffffffffffffffff191690559092019092556001600160a01b0388168252600189810190915260408220015550505050505050565b813b8181610cb45760405162461bcd60e51b8152600401610107919061195f565b634e487b7160e01b600052601160045260246000fd5b6000828210156113fb576113fb6113d3565b500390565b80356001600160a01b038116811461141757600080fd5b919050565b60008083601f84011261142e57600080fd5b50813567ffffffffffffffff81111561144657600080fd5b60208301915083602082850101111561145e57600080fd5b9250929050565b60008060008060006060868803121561147d57600080fd5b853567ffffffffffffffff8082111561149557600080fd5b818801915088601f8301126114a957600080fd5b8135818111156114b857600080fd5b8960208260051b85010111156114cd57600080fd5b602083019750809650506114e360208901611400565b945060408801359150808211156114f957600080fd5b506115068882890161141c565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561155057611550611517565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561159d5761159d611517565b604052919050565b600067ffffffffffffffff8211156115bf576115bf611517565b5060051b60200190565b60006115dc6115d7846115a5565b611556565b83815260208082019190600586811b8601368111156115fa57600080fd5b865b8181101561171857803567ffffffffffffffff8082111561161d5760008081fd5b818a019150606082360312156116335760008081fd5b61163b61152d565b61164483611400565b815286830135600381106116585760008081fd5b81880152604083810135838111156116705760008081fd5b939093019236601f85011261168757600092508283fd5b833592506116976115d7846115a5565b83815292871b840188019288810190368511156116b45760008081fd5b948901945b848610156117015785357fffffffff00000000000000000000000000000000000000000000000000000000811681146116f25760008081fd5b825294890194908901906116b9565b9183019190915250885250509483019483016115fc565b5092979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b6000600019821415611765576117656113d3565b5060010190565b60005b8381101561178757818101518382015260200161176f565b83811115610cb45750506000910152565b600081518084526117b081602086016020860161176c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60006060808301818452808751808352608092508286019150828160051b8701016020808b0160005b848110156118e7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808a850301865281518885016001600160a01b038251168652848201516003811061186e57634e487b7160e01b600052602160045260246000fd5b868601526040918201519186018a905281519081905290840190600090898701905b808310156118d25783517fffffffff00000000000000000000000000000000000000000000000000000000168252928601926001929092019190860190611890565b5097850197955050509082019060010161180b565b50506001600160a01b038a169088015286810360408801526119098189611798565b9a9950505050505050505050565b60006bffffffffffffffffffffffff80831681811415611939576119396113d3565b6001019392505050565b6000825161195581846020870161176c565b9190910192915050565b6020815260006119726020830184611798565b9392505050565b634e487b7160e01b600052603160045260246000fdfe5061726150726f78793a205f696e6974206164647265737320686173206e6f20636f64655061726150726f78793a204e657720696d706c656d656e746174696f6e20686173206e6f20636f6465a26469706673582212209e02e0420062cc1933af5fa6b98e3d7f363c1c4aa9720e23bb57b65edc892f1864736f6c634300080a0033a264697066735822122064ff4ac56e37f1b6db933b52765437554eb4afb7deb96402af28246dab5aa35e64736f6c634300080a00338be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e000000000000000000000000000000000000000000000000000000000000000400000000000000000000000002f2d07d60ea7330dd2314f4413ccbb2dc25276ef000000000000000000000000000000000000000000000000000000000000000b5061726153706163654d4d000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040523480156200001157600080fd5b5060043610620001d15760003560e01c806376d84ffc1162000101578063e4ca28b711620000a3578063f2fde38b116200007a578063f2fde38b1462000607578063f3af858a146200061e578063f67b18471462000635578063fca513a8146200064c57600080fd5b8063e4ca28b7146200057f578063e860accb1462000596578063ed301ca914620005f057600080fd5b8063cae5f11e11620000d8578063cae5f11e14620004b4578063e0f31eb5146200050e578063e4501d29146200056857600080fd5b806376d84ffc14620004745780638da5cb5b146200048b578063ca446dd9146200049d57600080fd5b80635b769f3c1162000177578063631adfca116200014e578063631adfca146200039f578063707cd71614620003f9578063715018a6146200045357806374944cec146200045d57600080fd5b80635b769f3c14620003175780635dcc528c146200032e5780635eb88d3d146200034557600080fd5b80634585264a11620001ac5780634585264a14620002ce578063530e784f14620002e7578063568ef47014620002fe57600080fd5b8063026b1d5f14620001d65780630e67178c146200024857806321f8a72114620002a2575b600080fd5b7f504f4f4c0000000000000000000000000000000000000000000000000000000060005260026020527f4fe005067814bb4b024d9515847377d15011b64593c006223b4a722952d2c05a546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b7f41434c5f41444d494e000000000000000000000000000000000000000000000060005260026020527ffab167ad2009dcb80ee379700bb4bd029d97c1181ed9d961625632c8a6f051c6546001600160a01b03166200022b565b6200022b620002b336600462001d9e565b6000908152600260205260409020546001600160a01b031690565b620002e5620002df36600462001de0565b620006a6565b005b620002e5620002f836600462001e55565b62000832565b6200030862000934565b6040516200023f919062001edd565b620002e56200032836600462001e55565b620009ce565b620002e56200033f36600462001ef2565b62000ad0565b7f50524943455f4f5241434c455f53454e54494e454c000000000000000000000060005260026020527f0d2c1bcee56447b4f46248272f34207a580a5c40f666a31f4e2fbb470ea53ab8546001600160a01b03166200022b565b7f504f4f4c5f434f4e464947555241544f5200000000000000000000000000000060005260026020527f90c127ef1c12c03f5781afeca3079527ea5333738078bba6fea26825bf9bf2c5546001600160a01b03166200022b565b7f41434c5f4d414e4147455200000000000000000000000000000000000000000060005260026020527f9edef266ef35fd0c6e131df0f31a330f3dd4c4d19dd31ed615c21d005c68116b546001600160a01b03166200022b565b620002e562000c24565b620002e56200046e36600462001e55565b62000cd7565b620002e56200048536600462001e55565b62000dd9565b6000546001600160a01b03166200022b565b620002e5620004ae36600462001ef2565b62000edb565b7f574554480000000000000000000000000000000000000000000000000000000060005260026020527f9d079330cab48a13979924dfd7e87d65711257c575e853d3b075acf5fc8707c7546001600160a01b03166200022b565b620005256200051f36600462001d9e565b62000fa2565b6040805182516001600160a01b0390811682526020808501518216908301528383015116918101919091526060918201511515918101919091526080016200023f565b620002e56200057936600462001e55565b620010a8565b620002e56200059036600462001e55565b620011aa565b7f444154415f50524f56494445520000000000000000000000000000000000000060005260026020527fcd7944601aaa5cd7ccdae1bebec659e98c6aac8f12486b30e59db0d39698051f546001600160a01b03166200022b565b620002e56200060136600462001e55565b620012a5565b620002e56200061836600462001e55565b620013a7565b620002e56200062f36600462001f71565b620014e9565b620002e5620006463660046200205c565b620015d3565b7f50524943455f4f5241434c45000000000000000000000000000000000000000060005260026020527f740f710666bd7a12af42df98311e541e47f7fd33d382d11602457a6d540cbd63546001600160a01b03166200022b565b6000546001600160a01b03163314620007065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b604080516080810182526001600160a01b0380871680835286821660208085018281528885168688019081528815156060880190815260008e81526003909452928890209651875490871673ffffffffffffffffffffffffffffffffffffffff199182161788559151600188018054918816919093161790915551600290950180549151151574010000000000000000000000000000000000000000027fffffffffffffffffffffff000000000000000000000000000000000000000000909216959094169490941793909317909155915190919087907f1d6ec4e10cedd4a2a652d0be45309f11e682fef6bb970c752a48cba872a6ae86906200082390879087906001600160a01b039290921682521515602082015260400190565b60405180910390a45050505050565b6000546001600160a01b031633146200088e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b7f50524943455f4f5241434c450000000000000000000000000000000000000000600090815260026020527f740f710666bd7a12af42df98311e541e47f7fd33d382d11602457a6d540cbd6380546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169283917f56b5f80d8cac1479698aa7d01605fd6111e90b15fc4d2b377417f46034876cbd9190a35050565b606060018054620009459062002117565b80601f0160208091040260200160405190810160405280929190818152602001828054620009739062002117565b8015620009c45780601f106200099857610100808354040283529160200191620009c4565b820191906000526020600020905b815481529060010190602001808311620009a657829003601f168201915b5050505050905090565b6000546001600160a01b0316331462000a2a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b7f5745544800000000000000000000000000000000000000000000000000000000600090815260026020527f9d079330cab48a13979924dfd7e87d65711257c575e853d3b075acf5fc8707c780546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169283917f1c08ec67b877c60261a1d95ebb7f008d38470096d29e66d715aed49e66ee8f5a9190a35050565b6000546001600160a01b0316331462000b2c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b60408051808201909152600181527f380000000000000000000000000000000000000000000000000000000000000060208201527f504f4f4c0000000000000000000000000000000000000000000000000000000083141562000ba45760405162461bcd60e51b8152600401620006fd919062001edd565b506000828152600260205260408120546001600160a01b03169062000bc9846200163d565b905062000bd78484620016d8565b6040516001600160a01b038281168252808516919084169086907f3bbd45b5429b385e3fb37ad5cd1cd1435a3c8ec32196c7937597365a3fd3e99c9060200160405180910390a450505050565b6000546001600160a01b0316331462000c805760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b0316331462000d335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b7f50524943455f4f5241434c455f53454e54494e454c0000000000000000000000600090815260026020527f0d2c1bcee56447b4f46248272f34207a580a5c40f666a31f4e2fbb470ea53ab880546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169283917f5326514eeca90494a14bedabcff812a0e683029ee85d1e23824d44fd14cd6ae79190a35050565b6000546001600160a01b0316331462000e355760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b7f41434c5f41444d494e0000000000000000000000000000000000000000000000600090815260026020527ffab167ad2009dcb80ee379700bb4bd029d97c1181ed9d961625632c8a6f051c680546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169283917fe9cf53972264dc95304fd424458745019ddfca0e37ae8f703d74772c41ad115b9190a35050565b6000546001600160a01b0316331462000f375760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b600082815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b038681169182179093559251911692839186917f9ef0e8c8e52743bb38b83b17d9429141d494b8041ca6d616a6c77cebae9cd8b791a4505050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260036020908152604091829020825160808101845281546001600160a01b0390811680835260018401548216948301949094526002909201549182169381019390935274010000000000000000000000000000000000000000900460ff16151560608301521580159062001049575080516001600160a01b03163b15155b15620010555792915050565b604080518082018252600381527f31303300000000000000000000000000000000000000000000000000000000006020820152905162461bcd60e51b8152620006fd919060040162001edd565b50919050565b6000546001600160a01b03163314620011045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b7f444154415f50524f564944455200000000000000000000000000000000000000600090815260026020527fcd7944601aaa5cd7ccdae1bebec659e98c6aac8f12486b30e59db0d39698051f80546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169283917fc2c64a506949ea6b362b49fdfd78dbeade68586ea45c44edb102a311d3535dde9190a35050565b6000546001600160a01b03163314620012065760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b6000620012337f504f4f4c5f434f4e464947555241544f520000000000000000000000000000006200163d565b9050620012617f504f4f4c5f434f4e464947555241544f5200000000000000000000000000000083620016d8565b816001600160a01b0316816001600160a01b03167f8932892569eba59c8382a089d9b732d1f49272878775235761a2a6b0309cd46560405160405180910390a35050565b6000546001600160a01b03163314620013015760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b7f41434c5f4d414e41474552000000000000000000000000000000000000000000600090815260026020527f9edef266ef35fd0c6e131df0f31a330f3dd4c4d19dd31ed615c21d005c68116b80546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff198316811790935560405191169283917fb30efa04327bb8a537d61cc1e5c48095345ad18ef7cc04e6bacf7dfb6caaf5079190a35050565b6000546001600160a01b03163314620014035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b6001600160a01b038116620014815760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401620006fd565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000546001600160a01b03163314620015455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b620015757f504f4f4c00000000000000000000000000000000000000000000000000000000868686868662001981565b8484604051620015879291906200228c565b60405180910390207f04bca245412c4584bfbdbd2d543feaac9e454dc3764b86c9837eed246531f4dc848484604051620015c4939291906200238b565b60405180910390a25050505050565b6000546001600160a01b031633146200162f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620006fd565b6200163a8162001bd1565b50565b6000818152600260205260408120546001600160a01b031680620016645750600092915050565b6000819050806001600160a01b0316635c60da1b6040518163ffffffff1660e01b81526004016020604051808303816000875af1158015620016aa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620016d09190620023b9565b949350505050565b60408051808201909152600281527f373700000000000000000000000000000000000000000000000000000000000060208201526001600160a01b038216620017365760405162461bcd60e51b8152600401620006fd919062001edd565b506000828152600260205260408082205490513060248201526001600160a01b039091169190819060440160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fc4d66de80000000000000000000000000000000000000000000000000000000017905290506001600160a01b038316620018f95730604051620017d99062001cdc565b6001600160a01b039091168152602001604051809103906000f08015801562001806573d6000803e3d6000fd5b506040517fd1f578940000000000000000000000000000000000000000000000000000000081529092506001600160a01b0383169063d1f5789490620018539087908590600401620023d9565b600060405180830381600087803b1580156200186e57600080fd5b505af115801562001883573d6000803e3d6000fd5b505050600086815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03878116918217909255915195965086959088169350909188917f4a465a9bd819d9662563c1e11ae958f8109e437e7f4bf1c6ef0b9a7b3f35d4789190a46200197a565b6040517f4f1ef2860000000000000000000000000000000000000000000000000000000081528392506001600160a01b03831690634f1ef28690620019459087908590600401620023d9565b600060405180830381600087803b1580156200196057600080fd5b505af115801562001975573d6000803e3d6000fd5b505050505b5050505050565b6000868152600260205260408120546001600160a01b0316908162001af15730604051620019af9062001cea565b6001600160a01b039091168152602001604051809103906000f080158015620019dc573d6000803e3d6000fd5b506040517f5a8339910000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690635a8339919062001a2f908a908a908a908a908a90600401620023fd565b600060405180830381600087803b15801562001a4a57600080fd5b505af115801562001a5f573d6000803e3d6000fd5b50505060008981526002602052604090819020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03851617905551919250829162001aae9150889088906200228c565b604051908190038120906001600160a01b038416908a907fc98c4080dbb73b6ab93d55682dc2921c0acc2ce5a7dbe170be426b691301f31690600090a462001bc7565b506040517f5a83399100000000000000000000000000000000000000000000000000000000815281906001600160a01b03821690635a8339919062001b43908a908a908a908a908a90600401620023fd565b600060405180830381600087803b15801562001b5e57600080fd5b505af115801562001b73573d6000803e3d6000fd5b50505050868660405162001b899291906200228c565b604051908190038120906001600160a01b038416908a907f7364d7b110775dfa21e4e4d3339c6962e91ab9cc8abdec6c9ec1dc435cdd606e90600090a45b5050505050505050565b60006001805462001be29062002117565b80601f016020809104026020016040519081016040528092919081815260200182805462001c109062002117565b801562001c615780601f1062001c355761010080835404028352916020019162001c61565b820191906000526020600020905b81548152906001019060200180831162001c4357829003601f168201915b5050855193945062001c7f9360019350602087019250905062001cf8565b508160405162001c90919062002549565b60405180910390208160405162001ca8919062002549565b604051908190038120907fe685c8cdecc6030c45030fd54778812cb84ed8e4467c38294403d68ba786082390600090a35050565b6109f2806200256883390190565b611b558062002f5a83390190565b82805462001d069062002117565b90600052602060002090601f01602090048101928262001d2a576000855562001d75565b82601f1062001d4557805160ff191683800117855562001d75565b8280016001018555821562001d75579182015b8281111562001d7557825182559160200191906001019062001d58565b5062001d8392915062001d87565b5090565b5b8082111562001d83576000815560010162001d88565b60006020828403121562001db157600080fd5b5035919050565b6001600160a01b03811681146200163a57600080fd5b803562001ddb8162001db8565b919050565b600080600080600060a0868803121562001df957600080fd5b85359450602086013562001e0d8162001db8565b9350604086013562001e1f8162001db8565b9250606086013562001e318162001db8565b91506080860135801515811462001e4757600080fd5b809150509295509295909350565b60006020828403121562001e6857600080fd5b813562001e758162001db8565b9392505050565b60005b8381101562001e9957818101518382015260200162001e7f565b8381111562001ea9576000848401525b50505050565b6000815180845262001ec981602086016020860162001e7c565b601f01601f19169290920160200192915050565b60208152600062001e75602083018462001eaf565b6000806040838503121562001f0657600080fd5b82359150602083013562001f1a8162001db8565b809150509250929050565b60008083601f84011262001f3857600080fd5b50813567ffffffffffffffff81111562001f5157600080fd5b60208301915083602082850101111562001f6a57600080fd5b9250929050565b60008060008060006060868803121562001f8a57600080fd5b853567ffffffffffffffff8082111562001fa357600080fd5b818801915088601f83011262001fb857600080fd5b81358181111562001fc857600080fd5b8960208260051b850101111562001fde57600080fd5b6020830197508096505062001ff66020890162001dce565b945060408801359150808211156200200d57600080fd5b506200201c8882890162001f25565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156200206f57600080fd5b813567ffffffffffffffff808211156200208857600080fd5b818401915084601f8301126200209d57600080fd5b813581811115620020b257620020b26200202d565b604051601f8201601f19908116603f01168101908382118183101715620020dd57620020dd6200202d565b81604052828152876020848701011115620020f757600080fd5b826020860160208301376000928101602001929092525095945050505050565b600181811c908216806200212c57607f821691505b60208210811415620010a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b80356003811062001ddb57600080fd5b60038110620021af577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112620021e957600080fd5b830160208101925035905067ffffffffffffffff8111156200220a57600080fd5b8060051b360383131562001f6a57600080fd5b80357fffffffff000000000000000000000000000000000000000000000000000000008116811462001ddb57600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa18336030181126200228357600080fd5b90910192915050565b6000818482805b868110156200235457620022a883896200224e565b8035620022b58162001db8565b6001600160a01b031685526020620022dc818701620022d684840162002167565b62002177565b6040808701620022ef82850185620021b3565b9450915085905b8482101562002341577fffffffff000000000000000000000000000000000000000000000000000000006200232b846200221d565b16815291830191600191909101908301620022f6565b9750505093909301925060010162002293565b50919695505050505050565b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b6001600160a01b0384168152604060208201526000620023b060408301848662002360565b95945050505050565b600060208284031215620023cc57600080fd5b815162001e758162001db8565b6001600160a01b0383168152604060208201526000620016d0604083018462001eaf565b60608082528181018690526000906080808401600589901b850182018a85805b8c81101562002513577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8089850301855262002459838f6200224e565b8785018135620024698162001db8565b6001600160a01b0316865260206200248383820162002167565b620024918289018262002177565b506040620024a281850185620021b3565b9189018c9052928190529250888701855b84811015620024fc577fffffffff00000000000000000000000000000000000000000000000000000000620024e8856200221d565b1682529282019290820190600101620024b3565b50978101979650949094019350506001016200241d565b5050506001600160a01b038916602087015285810360408701526200253a81888a62002360565b9b9a5050505050505050505050565b600082516200255d81846020870162001e7c565b919091019291505056fe60a060405234801561001057600080fd5b506040516109f23803806109f283398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b6080516109446100ae60003960008181610160015281816101b201528181610285015281816104220152818161044b01526105cb01526109446000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146100a8578063d1f57894146100e6578063f851a440146100f95761006d565b80633659cfe6146100755780634f1ef286146100955761006d565b3661006d5761006b61010e565b005b61006b61010e565b34801561008157600080fd5b5061006b6100903660046106a2565b610148565b61006b6100a33660046106c4565b61019a565b3480156100b457600080fd5b506100bd61026b565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61006b6100f4366004610776565b6102dc565b34801561010557600080fd5b506100bd610408565b61011661046d565b6101466101417f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b610475565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156101925761018f81610499565b50565b61018f61010e565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016141561025e576101e183610499565b60008373ffffffffffffffffffffffffffffffffffffffff16838360405161020a929190610856565b600060405180830381855af49150503d8060008114610245576040519150601f19603f3d011682016040523d82523d6000602084013e61024a565b606091505b505090508061025857600080fd5b50505050565b61026661010e565b505050565b60003373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156102d157507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6102d961010e565b90565b60006103067f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b73ffffffffffffffffffffffffffffffffffffffff161461032657600080fd5b61035160017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd610866565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc1461037f5761037f6108a4565b610388826104e6565b8051156104045760008273ffffffffffffffffffffffffffffffffffffffff16826040516103b691906108d3565b600060405180830381855af49150503d80600081146103f1576040519150601f19603f3d011682016040523d82523d6000602084013e6103f6565b606091505b505090508061026657600080fd5b5050565b60003373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614156102d157507f000000000000000000000000000000000000000000000000000000000000000090565b6101466105b3565b3660008037600080366000845af43d6000803e808015610494573d6000f35b3d6000fd5b6104a2816104e6565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b73ffffffffffffffffffffffffffffffffffffffff81163b61058f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f43616e6e6f742073657420612070726f787920696d706c656d656e746174696f60448201527f6e20746f2061206e6f6e2d636f6e74726163742061646472657373000000000060648201526084015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161415610146576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e20667260448201527f6f6d207468652070726f78792061646d696e00000000000000000000000000006064820152608401610586565b803573ffffffffffffffffffffffffffffffffffffffff8116811461069d57600080fd5b919050565b6000602082840312156106b457600080fd5b6106bd82610679565b9392505050565b6000806000604084860312156106d957600080fd5b6106e284610679565b9250602084013567ffffffffffffffff808211156106ff57600080fd5b818601915086601f83011261071357600080fd5b81358181111561072257600080fd5b87602082850101111561073457600080fd5b6020830194508093505050509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806040838503121561078957600080fd5b61079283610679565b9150602083013567ffffffffffffffff808211156107af57600080fd5b818501915085601f8301126107c357600080fd5b8135818111156107d5576107d5610747565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561081b5761081b610747565b8160405282815288602084870101111561083457600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b8183823760009101908152919050565b60008282101561089f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b6000825160005b818110156108f457602081860181015185830152016108da565b81811115610903576000828501525b50919091019291505056fea2646970667358221220f2710533727b7d1b9850327507306138033f07ef93b7f71a3253c72d9546b9a764736f6c634300080a0033608060405260405162001b5538038062001b558339810160408190526200002691620000db565b6200003c816200004360201b620001af1760201c565b5062000133565b60006200004f620000a5565b6004810180546001600160a01b038581166001600160a01b031983168117909355604051939450169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b600080620000d560017f6337542cd2f84f19034eb9306f0e56d253861ffec87880bde5606f90448356eb6200010d565b92915050565b600060208284031215620000ee57600080fd5b81516001600160a01b03811681146200010657600080fd5b9392505050565b6000828210156200012e57634e487b7160e01b600052601160045260246000fd5b500390565b611a1280620001436000396000f3fe6080604052600436106100225760003560e01c80635a8339911461013457610029565b3661002957005b60008061005760017f6337542cd2f84f19034eb9306f0e56d253861ffec87880bde5606f90448356eb6113e9565b600080357fffffffff00000000000000000000000000000000000000000000000000000000168152602082905260409020549092508291506001600160a01b0316806101105760405162461bcd60e51b815260206004820152602260248201527f5061726150726f78793a2046756e6374696f6e20646f6573206e6f742065786960448201527f737400000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e80801561012f573d6000f35b3d6000fd5b34801561014057600080fd5b5061015461014f366004611465565b610156565b005b61015e61021c565b6101a861016b85876115c9565b8484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506102a792505050565b5050505050565b60006101b96104d1565b6004810180546001600160a01b0385811673ffffffffffffffffffffffffffffffffffffffff1983168117909355604051939450169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6102246104d1565b600401546001600160a01b031633146102a55760405162461bcd60e51b815260206004820152602160248201527f5061726150726f78793a204d75737420626520636f6e7472616374206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610107565b565b60005b83518110156104865760008482815181106102c7576102c7611725565b6020026020010151602001519050600060028111156102e8576102e861173b565b8160028111156102fa576102fa61173b565b14156103495761034485838151811061031557610315611725565b60200260200101516000015186848151811061033357610333611725565b602002602001015160400151610505565b610473565b600181600281111561035d5761035d61173b565b14156103a75761034485838151811061037857610378611725565b60200260200101516000015186848151811061039657610396611725565b60200260200101516040015161080f565b60028160028111156103bb576103bb61173b565b1415610405576103448583815181106103d6576103d6611725565b6020026020010151600001518684815181106103f4576103f4611725565b602002602001015160400151610b2a565b60405162461bcd60e51b815260206004820152602e60248201527f5061726150726f78793a20496e636f72726563742050726f7879496d706c656d60448201527f656e746174696f6e416374696f6e0000000000000000000000000000000000006064820152608401610107565b508061047e81611751565b9150506102aa565b507f7994b9362f6f8b2522d7dfbe2519931ad73d1308b8bcfbc600db6de899c3d5288383836040516104ba939291906117e2565b60405180910390a16104cc8282610cba565b505050565b6000806104ff60017f6337542cd2f84f19034eb9306f0e56d253861ffec87880bde5606f90448356eb6113e9565b92915050565b600081511161057c5760405162461bcd60e51b815260206004820152603060248201527f5061726150726f78793a204e6f2073656c6563746f727320696e20696d706c6560448201527f6d656e746174696f6e20746f20637574000000000000000000000000000000006064820152608401610107565b60006105866104d1565b90506001600160a01b0383166106045760405162461bcd60e51b815260206004820152603160248201527f5061726150726f78793a2041646420696d706c656d656e746174696f6e20636160448201527f6e277420626520616464726573732830290000000000000000000000000000006064820152608401610107565b6001600160a01b03831660009081526001820160205260409020546bffffffffffffffffffffffff811661063c5761063c8285610ede565b60005b83518110156101a857600084828151811061065c5761065c611725565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081166000908152918690526040909120549091506001600160a01b0316801561071a5760405162461bcd60e51b815260206004820152603160248201527f5061726150726f78793a2043616e2774206164642066756e6374696f6e20746860448201527f617420616c7265616479206578697374730000000000000000000000000000006064820152608401610107565b7fffffffff00000000000000000000000000000000000000000000000000000000821660008181526020878152604080832080546001600160a01b03908116740100000000000000000000000000000000000000006bffffffffffffffffffffffff8c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c949094029390931790925593909252879052815473ffffffffffffffffffffffffffffffffffffffff1916179055836107f781611917565b9450505050808061080790611751565b91505061063f565b60008151116108865760405162461bcd60e51b815260206004820152603060248201527f5061726150726f78793a204e6f2073656c6563746f727320696e20696d706c6560448201527f6d656e746174696f6e20746f20637574000000000000000000000000000000006064820152608401610107565b60006108906104d1565b90506001600160a01b03831661090e5760405162461bcd60e51b815260206004820152603160248201527f5061726150726f78793a2041646420696d706c656d656e746174696f6e20636160448201527f6e277420626520616464726573732830290000000000000000000000000000006064820152608401610107565b6001600160a01b03831660009081526001820160205260409020546bffffffffffffffffffffffff8116610946576109468285610ede565b60005b83518110156101a857600084828151811061096657610966611725565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081166000908152918690526040909120549091506001600160a01b03908116908716811415610a2a5760405162461bcd60e51b815260206004820152603460248201527f5061726150726f78793a2043616e2774207265706c6163652066756e6374696f60448201527f6e20776974682073616d652066756e6374696f6e0000000000000000000000006064820152608401610107565b610a35858284610f55565b7fffffffff00000000000000000000000000000000000000000000000000000000821660008181526020878152604080832080546001600160a01b03908116740100000000000000000000000000000000000000006bffffffffffffffffffffffff8c16021782558c168085526001808c0185529285208054938401815585528385206008840401805463ffffffff60079095166004026101000a948502191660e08a901c949094029390931790925593909252879052815473ffffffffffffffffffffffffffffffffffffffff191617905583610b1281611917565b94505050508080610b2290611751565b915050610949565b6000815111610ba15760405162461bcd60e51b815260206004820152603060248201527f5061726150726f78793a204e6f2073656c6563746f727320696e20696d706c6560448201527f6d656e746174696f6e20746f20637574000000000000000000000000000000006064820152608401610107565b6000610bab6104d1565b90506001600160a01b03831615610c2a5760405162461bcd60e51b815260206004820152603b60248201527f5061726150726f78793a2052656d6f766520696d706c656d656e746174696f6e60448201527f2061646472657373206d757374206265206164647265737328302900000000006064820152608401610107565b60005b8251811015610cb4576000838281518110610c4a57610c4a611725565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081166000908152918590526040909120549091506001600160a01b0316610c9f848284610f55565b50508080610cac90611751565b915050610c2d565b50505050565b6001600160a01b038216610d4157805115610d3d5760405162461bcd60e51b815260206004820152603860248201527f5061726150726f78793a205f696e69742069732061646472657373283029206260448201527f75745f63616c6c64617461206973206e6f7420656d70747900000000000000006064820152608401610107565b5050565b6000815111610db85760405162461bcd60e51b815260206004820152603960248201527f5061726150726f78793a205f63616c6c6461746120697320656d70747920627560448201527f74205f696e6974206973206e6f742061646472657373283029000000000000006064820152608401610107565b6001600160a01b0382163014610dea57610dea82604051806060016040528060248152602001611990602491396113b2565b600080836001600160a01b031683604051610e059190611943565b600060405180830381855af49150503d8060008114610e40576040519150601f19603f3d011682016040523d82523d6000602084013e610e45565b606091505b509150915081610cb457805115610e70578060405162461bcd60e51b8152600401610107919061195f565b60405162461bcd60e51b815260206004820152602260248201527f5061726150726f78793a205f696e69742066756e6374696f6e2072657665727460448201527f65640000000000000000000000000000000000000000000000000000000000006064820152608401610107565b610f00816040518060600160405280602981526020016119b4602991396113b2565b6002820180546001600160a01b03909216600081815260019485016020908152604082208601859055948401835591825292902001805473ffffffffffffffffffffffffffffffffffffffff19169091179055565b6001600160a01b038216610fd15760405162461bcd60e51b815260206004820152603360248201527f5061726150726f78793a2043616e27742072656d6f76652066756e6374696f6e60448201527f207468617420646f65736e2774206578697374000000000000000000000000006064820152608401610107565b6001600160a01b0382163014156110505760405162461bcd60e51b815260206004820152602a60248201527f5061726150726f78793a2043616e27742072656d6f766520696d6d757461626c60448201527f652066756e6374696f6e000000000000000000000000000000000000000000006064820152608401610107565b7fffffffff000000000000000000000000000000000000000000000000000000008116600090815260208481526040808320546001600160a01b0386168452600180880190935290832054740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1692916110cd916113e9565b90508082146111ed576001600160a01b0384166000908152600186016020526040812080548390811061110257611102611725565b600091825260208083206008830401546001600160a01b038916845260018a019091526040909220805460079092166004026101000a90920460e01b92508291908590811061115357611153611725565b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c929092029390931790557fffffffff000000000000000000000000000000000000000000000000000000009290921682528690526040902080546001600160a01b0316740100000000000000000000000000000000000000006bffffffffffffffffffffffff8516021790555b6001600160a01b0384166000908152600186016020526040902080548061121657611216611979565b60008281526020808220600860001990940193840401805463ffffffff600460078716026101000a0219169055919092557fffffffff00000000000000000000000000000000000000000000000000000000851682528690526040812055806101a857600285015460009061128d906001906113e9565b6001600160a01b03861660009081526001808901602052604090912001549091508082146113495760008760020183815481106112cc576112cc611725565b6000918252602090912001546002890180546001600160a01b0390921692508291849081106112fd576112fd611725565b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03948516179055929091168152600189810190925260409020018190555b8660020180548061135c5761135c611979565b600082815260208082208301600019908101805473ffffffffffffffffffffffffffffffffffffffff191690559092019092556001600160a01b0388168252600189810190915260408220015550505050505050565b813b8181610cb45760405162461bcd60e51b8152600401610107919061195f565b634e487b7160e01b600052601160045260246000fd5b6000828210156113fb576113fb6113d3565b500390565b80356001600160a01b038116811461141757600080fd5b919050565b60008083601f84011261142e57600080fd5b50813567ffffffffffffffff81111561144657600080fd5b60208301915083602082850101111561145e57600080fd5b9250929050565b60008060008060006060868803121561147d57600080fd5b853567ffffffffffffffff8082111561149557600080fd5b818801915088601f8301126114a957600080fd5b8135818111156114b857600080fd5b8960208260051b85010111156114cd57600080fd5b602083019750809650506114e360208901611400565b945060408801359150808211156114f957600080fd5b506115068882890161141c565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff8111828210171561155057611550611517565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561159d5761159d611517565b604052919050565b600067ffffffffffffffff8211156115bf576115bf611517565b5060051b60200190565b60006115dc6115d7846115a5565b611556565b83815260208082019190600586811b8601368111156115fa57600080fd5b865b8181101561171857803567ffffffffffffffff8082111561161d5760008081fd5b818a019150606082360312156116335760008081fd5b61163b61152d565b61164483611400565b815286830135600381106116585760008081fd5b81880152604083810135838111156116705760008081fd5b939093019236601f85011261168757600092508283fd5b833592506116976115d7846115a5565b83815292871b840188019288810190368511156116b45760008081fd5b948901945b848610156117015785357fffffffff00000000000000000000000000000000000000000000000000000000811681146116f25760008081fd5b825294890194908901906116b9565b9183019190915250885250509483019483016115fc565b5092979650505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b6000600019821415611765576117656113d3565b5060010190565b60005b8381101561178757818101518382015260200161176f565b83811115610cb45750506000910152565b600081518084526117b081602086016020860161176c565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60006060808301818452808751808352608092508286019150828160051b8701016020808b0160005b848110156118e7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808a850301865281518885016001600160a01b038251168652848201516003811061186e57634e487b7160e01b600052602160045260246000fd5b868601526040918201519186018a905281519081905290840190600090898701905b808310156118d25783517fffffffff00000000000000000000000000000000000000000000000000000000168252928601926001929092019190860190611890565b5097850197955050509082019060010161180b565b50506001600160a01b038a169088015286810360408801526119098189611798565b9a9950505050505050505050565b60006bffffffffffffffffffffffff80831681811415611939576119396113d3565b6001019392505050565b6000825161195581846020870161176c565b9190910192915050565b6020815260006119726020830184611798565b9392505050565b634e487b7160e01b600052603160045260246000fdfe5061726150726f78793a205f696e6974206164647265737320686173206e6f20636f64655061726150726f78793a204e657720696d706c656d656e746174696f6e20686173206e6f20636f6465a26469706673582212209e02e0420062cc1933af5fa6b98e3d7f363c1c4aa9720e23bb57b65edc892f1864736f6c634300080a0033a264697066735822122064ff4ac56e37f1b6db933b52765437554eb4afb7deb96402af28246dab5aa35e64736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000400000000000000000000000002f2d07d60ea7330dd2314f4413ccbb2dc25276ef000000000000000000000000000000000000000000000000000000000000000b5061726153706163654d4d000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : marketId (string): ParaSpaceMM
Arg [1] : owner (address): 0x2f2d07d60ea7330DD2314f4413CCbB2dC25276EF
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000002f2d07d60ea7330dd2314f4413ccbb2dc25276ef
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [3] : 5061726153706163654d4d000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 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.