Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
Latest 25 from a total of 502 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Launch Project F... | 20145328 | 68 days ago | IN | 0 ETH | 0.00082392 | ||||
Distribute Reser... | 20115026 | 72 days ago | IN | 0 ETH | 0.00062266 | ||||
Reconfigure Fund... | 19872159 | 106 days ago | IN | 0 ETH | 0.00080447 | ||||
Reconfigure Fund... | 19635334 | 140 days ago | IN | 0 ETH | 0.00212443 | ||||
Reconfigure Fund... | 19635328 | 140 days ago | IN | 0 ETH | 0.00317164 | ||||
Reconfigure Fund... | 19517702 | 156 days ago | IN | 0 ETH | 0.00549501 | ||||
Reconfigure Fund... | 19327518 | 183 days ago | IN | 0 ETH | 0.02999635 | ||||
Reconfigure Fund... | 18915922 | 241 days ago | IN | 0 ETH | 0.00566201 | ||||
Reconfigure Fund... | 17584037 | 427 days ago | IN | 0 ETH | 0.00638869 | ||||
Reconfigure Fund... | 17566002 | 430 days ago | IN | 0 ETH | 0.00524975 | ||||
Reconfigure Fund... | 17531637 | 434 days ago | IN | 0 ETH | 0.00379052 | ||||
Reconfigure Fund... | 17531634 | 434 days ago | IN | 0 ETH | 0.00695331 | ||||
Reconfigure Fund... | 17531624 | 434 days ago | IN | 0 ETH | 0.00335451 | ||||
Mint Tokens Of | 17524222 | 436 days ago | IN | 0 ETH | 0.0018151 | ||||
Mint Tokens Of | 17517232 | 436 days ago | IN | 0 ETH | 0.00178146 | ||||
Reconfigure Fund... | 16673328 | 555 days ago | IN | 0 ETH | 0.00324842 | ||||
Reconfigure Fund... | 16450085 | 587 days ago | IN | 0 ETH | 0.00780329 | ||||
Reconfigure Fund... | 16450078 | 587 days ago | IN | 0 ETH | 0.00656846 | ||||
Reconfigure Fund... | 16400938 | 594 days ago | IN | 0 ETH | 0.00716541 | ||||
Reconfigure Fund... | 16306390 | 607 days ago | IN | 0 ETH | 0.0039775 | ||||
Reconfigure Fund... | 16306369 | 607 days ago | IN | 0 ETH | 0.00380529 | ||||
Reconfigure Fund... | 16229284 | 618 days ago | IN | 0 ETH | 0.00377598 | ||||
Reconfigure Fund... | 16198913 | 622 days ago | IN | 0 ETH | 0.00422587 | ||||
Distribute Reser... | 16170127 | 626 days ago | IN | 0 ETH | 0.0141177 | ||||
Reconfigure Fund... | 16144734 | 629 days ago | IN | 0 ETH | 0.0024491 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
JBController
Compiler Version
v0.8.6+commit.11564f7e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; import '@paulrberg/contracts/math/PRBMath.sol'; import './abstract/JBOperatable.sol'; import './interfaces/IJBController.sol'; import './interfaces/IJBMigratable.sol'; import './interfaces/IJBOperatorStore.sol'; import './interfaces/IJBPaymentTerminal.sol'; import './interfaces/IJBProjects.sol'; import './libraries/JBConstants.sol'; import './libraries/JBFundingCycleMetadataResolver.sol'; import './libraries/JBOperations.sol'; import './libraries/JBSplitsGroups.sol'; /** @notice Stitches together funding cycles and community tokens, making sure all activity is accounted for and correct. @dev Adheres to - IJBController: General interface for the generic controller methods in this contract that interacts with funding cycles and tokens according to the protocol's rules. IJBMigratable: Allows migrating to this contract, with a hook called to prepare for the migration. @dev Inherits from - JBOperatable: Several functions in this contract can only be accessed by a project owner, or an address that has been preconfifigured to be an operator of the project. ERC165: Introspection on interface adherance. */ contract JBController is IJBController, IJBMigratable, JBOperatable, ERC165 { // A library that parses the packed funding cycle metadata into a more friendly format. using JBFundingCycleMetadataResolver for JBFundingCycle; //*********************************************************************// // --------------------------- custom errors ------------------------- // //*********************************************************************// error BURN_PAUSED_AND_SENDER_NOT_VALID_TERMINAL_DELEGATE(); error CANT_MIGRATE_TO_CURRENT_CONTROLLER(); error CHANGE_TOKEN_NOT_ALLOWED(); error FUNDING_CYCLE_ALREADY_LAUNCHED(); error INVALID_BALLOT_REDEMPTION_RATE(); error INVALID_DISTRIBUTION_LIMIT(); error INVALID_DISTRIBUTION_LIMIT_CURRENCY(); error INVALID_OVERFLOW_ALLOWANCE(); error INVALID_OVERFLOW_ALLOWANCE_CURRENCY(); error INVALID_REDEMPTION_RATE(); error INVALID_RESERVED_RATE(); error MIGRATION_NOT_ALLOWED(); error MINT_NOT_ALLOWED_AND_NOT_TERMINAL_DELEGATE(); error NO_BURNABLE_TOKENS(); error NOT_CURRENT_CONTROLLER(); error ZERO_TOKENS_TO_MINT(); //*********************************************************************// // --------------------- internal stored properties ------------------ // //*********************************************************************// /** @notice The difference between the processed token tracker of a project and the project's token's total supply is the amount of tokens that still need to have reserves minted against them. _projectId The ID of the project to get the tracker of. */ mapping(uint256 => int256) internal _processedTokenTrackerOf; /** @notice Data regarding the distribution limit of a project during a configuration. @dev bits 0-231: The amount of token that a project can distribute per funding cycle. @dev bits 232-255: The currency of amount that a project can distribute. _projectId The ID of the project to get the packed distribution limit data of. _configuration The configuration during which the packed distribution limit data applies. _terminal The terminal from which distributions are being limited. _token The token for which distributions are being limited. */ mapping(uint256 => mapping(uint256 => mapping(IJBPaymentTerminal => mapping(address => uint256)))) internal _packedDistributionLimitDataOf; /** @notice Data regarding the overflow allowance of a project during a configuration. @dev bits 0-231: The amount of overflow that a project is allowed to tap into on-demand throughout the configuration. @dev bits 232-255: The currency of the amount of overflow that a project is allowed to tap. _projectId The ID of the project to get the packed overflow allowance data of. _configuration The configuration during which the packed overflow allowance data applies. _terminal The terminal managing the overflow. _token The token for which overflow is being allowed. */ mapping(uint256 => mapping(uint256 => mapping(IJBPaymentTerminal => mapping(address => uint256)))) internal _packedOverflowAllowanceDataOf; //*********************************************************************// // --------------- public immutable stored properties ---------------- // //*********************************************************************// /** @notice Mints ERC-721's that represent project ownership. */ IJBProjects public immutable override projects; /** @notice The contract storing all funding cycle configurations. */ IJBFundingCycleStore public immutable override fundingCycleStore; /** @notice The contract that manages token minting and burning. */ IJBTokenStore public immutable override tokenStore; /** @notice The contract that stores splits for each project. */ IJBSplitsStore public immutable override splitsStore; /** @notice The directory of terminals and controllers for projects. */ IJBDirectory public immutable override directory; //*********************************************************************// // ------------------------- external views -------------------------- // //*********************************************************************// /** @notice The amount of token that a project can distribute per funding cycle, and the currency it's in terms of. @dev The number of decimals in the returned fixed point amount is the same as that of the specified terminal. @param _projectId The ID of the project to get the distribution limit of. @param _configuration The configuration during which the distribution limit applies. @param _terminal The terminal from which distributions are being limited. @param _token The token for which the distribution limit applies. @return The distribution limit, as a fixed point number with the same number of decimals as the provided terminal. @return The currency of the distribution limit. */ function distributionLimitOf( uint256 _projectId, uint256 _configuration, IJBPaymentTerminal _terminal, address _token ) external view override returns (uint256, uint256) { // Get a reference to the packed data. uint256 _data = _packedDistributionLimitDataOf[_projectId][_configuration][_terminal][_token]; // The limit is in bits 0-231. The currency is in bits 232-255. return (uint256(uint232(_data)), _data >> 232); } /** @notice The amount of overflow that a project is allowed to tap into on-demand throughout a configuration, and the currency it's in terms of. @dev The number of decimals in the returned fixed point amount is the same as that of the specified terminal. @param _projectId The ID of the project to get the overflow allowance of. @param _configuration The configuration of the during which the allowance applies. @param _terminal The terminal managing the overflow. @param _token The token for which the overflow allowance applies. @return The overflow allowance, as a fixed point number with the same number of decimals as the provided terminal. @return The currency of the overflow allowance. */ function overflowAllowanceOf( uint256 _projectId, uint256 _configuration, IJBPaymentTerminal _terminal, address _token ) external view override returns (uint256, uint256) { // Get a reference to the packed data. uint256 _data = _packedOverflowAllowanceDataOf[_projectId][_configuration][_terminal][_token]; // The allowance is in bits 0-231. The currency is in bits 232-255. return (uint256(uint232(_data)), _data >> 232); } /** @notice Gets the amount of reserved tokens that a project has available to distribute. @param _projectId The ID of the project to get a reserved token balance of. @param _reservedRate The reserved rate to use when making the calculation. @return The current amount of reserved tokens. */ function reservedTokenBalanceOf(uint256 _projectId, uint256 _reservedRate) external view override returns (uint256) { return _reservedTokenAmountFrom( _processedTokenTrackerOf[_projectId], _reservedRate, tokenStore.totalSupplyOf(_projectId) ); } /** @notice Gets the current total amount of outstanding tokens for a project, given a reserved rate. @param _projectId The ID of the project to get total outstanding tokens of. @param _reservedRate The reserved rate to use when making the calculation. @return The current total amount of outstanding tokens for the project. */ function totalOutstandingTokensOf(uint256 _projectId, uint256 _reservedRate) external view override returns (uint256) { // Get the total number of tokens in circulation. uint256 _totalSupply = tokenStore.totalSupplyOf(_projectId); // Get the number of reserved tokens the project has. uint256 _reservedTokenAmount = _reservedTokenAmountFrom( _processedTokenTrackerOf[_projectId], _reservedRate, _totalSupply ); // Add the reserved tokens to the total supply. return _totalSupply + _reservedTokenAmount; } /** @notice A project's funding cycle for the specified configuration along with its metadata. @param _projectId The ID of the project to which the funding cycle belongs. @return fundingCycle The funding cycle. @return metadata The funding cycle's metadata. */ function getFundingCycleOf(uint256 _projectId, uint256 _configuration) external view override returns (JBFundingCycle memory fundingCycle, JBFundingCycleMetadata memory metadata) { fundingCycle = fundingCycleStore.get(_projectId, _configuration); metadata = fundingCycle.expandMetadata(); } /** @notice A project's latest configured funding cycle along with its metadata and the ballot state of the configuration. @param _projectId The ID of the project to which the funding cycle belongs. @return fundingCycle The latest configured funding cycle. @return metadata The latest configured funding cycle's metadata. @return ballotState The state of the configuration. */ function latestConfiguredFundingCycleOf(uint256 _projectId) external view override returns ( JBFundingCycle memory fundingCycle, JBFundingCycleMetadata memory metadata, JBBallotState ballotState ) { (fundingCycle, ballotState) = fundingCycleStore.latestConfiguredOf(_projectId); metadata = fundingCycle.expandMetadata(); } /** @notice A project's current funding cycle along with its metadata. @param _projectId The ID of the project to which the funding cycle belongs. @return fundingCycle The current funding cycle. @return metadata The current funding cycle's metadata. */ function currentFundingCycleOf(uint256 _projectId) external view override returns (JBFundingCycle memory fundingCycle, JBFundingCycleMetadata memory metadata) { fundingCycle = fundingCycleStore.currentOf(_projectId); metadata = fundingCycle.expandMetadata(); } /** @notice A project's queued funding cycle along with its metadata. @param _projectId The ID of the project to which the funding cycle belongs. @return fundingCycle The queued funding cycle. @return metadata The queued funding cycle's metadata. */ function queuedFundingCycleOf(uint256 _projectId) external view override returns (JBFundingCycle memory fundingCycle, JBFundingCycleMetadata memory metadata) { fundingCycle = fundingCycleStore.queuedOf(_projectId); metadata = fundingCycle.expandMetadata(); } //*********************************************************************// // -------------------------- public views --------------------------- // //*********************************************************************// /** @notice Indicates if this contract adheres to the specified interface. @dev See {IERC165-supportsInterface}. @param _interfaceId The ID of the interface to check for adherance to. */ function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return _interfaceId == type(IJBController).interfaceId || _interfaceId == type(IJBMigratable).interfaceId || _interfaceId == type(IJBOperatable).interfaceId || super.supportsInterface(_interfaceId); } //*********************************************************************// // ---------------------------- constructor -------------------------- // //*********************************************************************// /** @param _operatorStore A contract storing operator assignments. @param _projects A contract which mints ERC-721's that represent project ownership and transfers. @param _directory A contract storing directories of terminals and controllers for each project. @param _fundingCycleStore A contract storing all funding cycle configurations. @param _tokenStore A contract that manages token minting and burning. @param _splitsStore A contract that stores splits for each project. */ constructor( IJBOperatorStore _operatorStore, IJBProjects _projects, IJBDirectory _directory, IJBFundingCycleStore _fundingCycleStore, IJBTokenStore _tokenStore, IJBSplitsStore _splitsStore ) JBOperatable(_operatorStore) { projects = _projects; directory = _directory; fundingCycleStore = _fundingCycleStore; tokenStore = _tokenStore; splitsStore = _splitsStore; } //*********************************************************************// // --------------------- external transactions ----------------------- // //*********************************************************************// /** @notice Creates a project. This will mint an ERC-721 into the specified owner's account, configure a first funding cycle, and set up any splits. @dev Each operation within this transaction can be done in sequence separately. @dev Anyone can deploy a project on an owner's behalf. @param _owner The address to set as the owner of the project. The project ERC-721 will be owned by this address. @param _projectMetadata Metadata to associate with the project within a particular domain. This can be updated any time by the owner of the project. @param _data Data that defines the project's first funding cycle. These properties will remain fixed for the duration of the funding cycle. @param _metadata Metadata specifying the controller specific params that a funding cycle can have. These properties will remain fixed for the duration of the funding cycle. @param _mustStartAtOrAfter The time before which the configured funding cycle cannot start. @param _groupedSplits An array of splits to set for any number of groups. @param _fundAccessConstraints An array containing amounts that a project can use from its treasury for each payment terminal. Amounts are fixed point numbers using the same number of decimals as the accompanying terminal. The `_distributionLimit` and `_overflowAllowance` parameters must fit in a `uint232`. @param _terminals Payment terminals to add for the project. @param _memo A memo to pass along to the emitted event. @return projectId The ID of the project. */ function launchProjectFor( address _owner, JBProjectMetadata calldata _projectMetadata, JBFundingCycleData calldata _data, JBFundingCycleMetadata calldata _metadata, uint256 _mustStartAtOrAfter, JBGroupedSplits[] calldata _groupedSplits, JBFundAccessConstraints[] calldata _fundAccessConstraints, IJBPaymentTerminal[] memory _terminals, string memory _memo ) external virtual override returns (uint256 projectId) { // Mint the project into the wallet of the message sender. projectId = projects.createFor(_owner, _projectMetadata); // Set this contract as the project's controller in the directory. directory.setControllerOf(projectId, address(this)); // Configure the first funding cycle. uint256 _configuration = _configure( projectId, _data, _metadata, _mustStartAtOrAfter, _groupedSplits, _fundAccessConstraints ); // Add the provided terminals to the list of terminals. if (_terminals.length > 0) directory.setTerminalsOf(projectId, _terminals); emit LaunchProject(_configuration, projectId, _memo, msg.sender); } /** @notice Creates a funding cycle for an already existing project ERC-721. @dev Each operation within this transaction can be done in sequence separately. @dev Only a project owner or operator can launch its funding cycles. @param _projectId The ID of the project to launch funding cycles for. @param _data Data that defines the project's first funding cycle. These properties will remain fixed for the duration of the funding cycle. @param _metadata Metadata specifying the controller specific params that a funding cycle can have. These properties will remain fixed for the duration of the funding cycle. @param _mustStartAtOrAfter The time before which the configured funding cycle cannot start. @param _groupedSplits An array of splits to set for any number of groups. @param _fundAccessConstraints An array containing amounts that a project can use from its treasury for each payment terminal. Amounts are fixed point numbers using the same number of decimals as the accompanying terminal. The `_distributionLimit` and `_overflowAllowance` parameters must fit in a `uint232`. @param _terminals Payment terminals to add for the project. @param _memo A memo to pass along to the emitted event. @return configuration The configuration of the funding cycle that was successfully created. */ function launchFundingCyclesFor( uint256 _projectId, JBFundingCycleData calldata _data, JBFundingCycleMetadata calldata _metadata, uint256 _mustStartAtOrAfter, JBGroupedSplits[] calldata _groupedSplits, JBFundAccessConstraints[] memory _fundAccessConstraints, IJBPaymentTerminal[] memory _terminals, string memory _memo ) external virtual override requirePermission(projects.ownerOf(_projectId), _projectId, JBOperations.RECONFIGURE) returns (uint256 configuration) { // If there is a previous configuration, reconfigureFundingCyclesOf should be called instead if (fundingCycleStore.latestConfigurationOf(_projectId) > 0) revert FUNDING_CYCLE_ALREADY_LAUNCHED(); // Set this contract as the project's controller in the directory. directory.setControllerOf(_projectId, address(this)); // Configure the first funding cycle. configuration = _configure( _projectId, _data, _metadata, _mustStartAtOrAfter, _groupedSplits, _fundAccessConstraints ); // Add the provided terminals to the list of terminals. if (_terminals.length > 0) directory.setTerminalsOf(_projectId, _terminals); emit LaunchFundingCycles(configuration, _projectId, _memo, msg.sender); } /** @notice Proposes a configuration of a subsequent funding cycle that will take effect once the current one expires if it is approved by the current funding cycle's ballot. @dev Only a project's owner or a designated operator can configure its funding cycles. @param _projectId The ID of the project whose funding cycles are being reconfigured. @param _data Data that defines the funding cycle. These properties will remain fixed for the duration of the funding cycle. @param _metadata Metadata specifying the controller specific params that a funding cycle can have. These properties will remain fixed for the duration of the funding cycle. @param _mustStartAtOrAfter The time before which the configured funding cycle cannot start. @param _groupedSplits An array of splits to set for any number of groups. @param _fundAccessConstraints An array containing amounts that a project can use from its treasury for each payment terminal. Amounts are fixed point numbers using the same number of decimals as the accompanying terminal. The `_distributionLimit` and `_overflowAllowance` parameters must fit in a `uint232`. @param _memo A memo to pass along to the emitted event. @return configuration The configuration of the funding cycle that was successfully reconfigured. */ function reconfigureFundingCyclesOf( uint256 _projectId, JBFundingCycleData calldata _data, JBFundingCycleMetadata calldata _metadata, uint256 _mustStartAtOrAfter, JBGroupedSplits[] calldata _groupedSplits, JBFundAccessConstraints[] calldata _fundAccessConstraints, string calldata _memo ) external virtual override requirePermission(projects.ownerOf(_projectId), _projectId, JBOperations.RECONFIGURE) returns (uint256 configuration) { // Configure the next funding cycle. configuration = _configure( _projectId, _data, _metadata, _mustStartAtOrAfter, _groupedSplits, _fundAccessConstraints ); emit ReconfigureFundingCycles(configuration, _projectId, _memo, msg.sender); } /** @notice Issues an owner's ERC20 JBTokens that'll be used when claiming tokens. @dev Deploys a project's ERC20 JBToken contract. @dev Only a project's owner or operator can issue its token. @param _projectId The ID of the project being issued tokens. @param _name The ERC20's name. @param _symbol The ERC20's symbol. */ function issueTokenFor( uint256 _projectId, string calldata _name, string calldata _symbol ) external virtual override requirePermission(projects.ownerOf(_projectId), _projectId, JBOperations.ISSUE) returns (IJBToken token) { // Issue the token in the store. return tokenStore.issueFor(_projectId, _name, _symbol); } /** @notice Swap the current project's token that is minted and burned for another, and transfer ownership of the current token to another address if needed. @dev Only a project's owner or operator can change its token. @param _projectId The ID of the project to which the changed token belongs. @param _token The new token. @param _newOwner An address to transfer the current token's ownership to. This is optional, but it cannot be done later. */ function changeTokenOf( uint256 _projectId, IJBToken _token, address _newOwner ) external virtual override requirePermission(projects.ownerOf(_projectId), _projectId, JBOperations.CHANGE_TOKEN) { // Get a reference to the project's current funding cycle. JBFundingCycle memory _fundingCycle = fundingCycleStore.currentOf(_projectId); // The current funding cycle must not be paused. if (!_fundingCycle.changeTokenAllowed()) revert CHANGE_TOKEN_NOT_ALLOWED(); // Change the token in the store. tokenStore.changeFor(_projectId, _token, _newOwner); } /** @notice Mint new token supply into an account, and optionally reserve a supply to be distributed according to the project's current funding cycle configuration. @dev Only a project's owner, a designated operator, one of its terminals, or the current data source can mint its tokens. @param _projectId The ID of the project to which the tokens being minted belong. @param _tokenCount The amount of tokens to mint in total, counting however many should be reserved. @param _beneficiary The account that the tokens are being minted for. @param _memo A memo to pass along to the emitted event. @param _preferClaimedTokens A flag indicating whether a project's attached token contract should be minted if they have been issued. @param _useReservedRate Whether to use the current funding cycle's reserved rate in the mint calculation. @return beneficiaryTokenCount The amount of tokens minted for the beneficiary. */ function mintTokensOf( uint256 _projectId, uint256 _tokenCount, address _beneficiary, string calldata _memo, bool _preferClaimedTokens, bool _useReservedRate ) external virtual override returns (uint256 beneficiaryTokenCount) { // There should be tokens to mint. if (_tokenCount == 0) revert ZERO_TOKENS_TO_MINT(); // Define variables that will be needed outside scoped section below. // Keep a reference to the reserved rate to use uint256 _reservedRate; // Scoped section prevents stack too deep. `_fundingCycle` only used within scope. { // Get a reference to the project's current funding cycle. JBFundingCycle memory _fundingCycle = fundingCycleStore.currentOf(_projectId); // Minting limited to: project owner, authorized callers, project terminal and current funding cycle data source _requirePermissionAllowingOverride( projects.ownerOf(_projectId), _projectId, JBOperations.MINT, directory.isTerminalOf(_projectId, IJBPaymentTerminal(msg.sender)) || msg.sender == address(_fundingCycle.dataSource()) ); // If the message sender is not a terminal or a datasource, the current funding cycle must allow minting. if ( !_fundingCycle.mintingAllowed() && !directory.isTerminalOf(_projectId, IJBPaymentTerminal(msg.sender)) && msg.sender != address(_fundingCycle.dataSource()) ) revert MINT_NOT_ALLOWED_AND_NOT_TERMINAL_DELEGATE(); // Determine the reserved rate to use. _reservedRate = _useReservedRate ? _fundingCycle.reservedRate() : 0; } if (_reservedRate == JBConstants.MAX_RESERVED_RATE) // Subtract the total weighted amount from the tracker so the full reserved token amount can be printed later. _processedTokenTrackerOf[_projectId] = _processedTokenTrackerOf[_projectId] - int256(_tokenCount); else { // The unreserved token count that will be minted for the beneficiary. beneficiaryTokenCount = PRBMath.mulDiv( _tokenCount, JBConstants.MAX_RESERVED_RATE - _reservedRate, JBConstants.MAX_RESERVED_RATE ); if (_reservedRate == 0) // If there's no reserved rate, increment the tracker with the newly minted tokens. _processedTokenTrackerOf[_projectId] = _processedTokenTrackerOf[_projectId] + int256(beneficiaryTokenCount); // Mint the tokens. tokenStore.mintFor(_beneficiary, _projectId, beneficiaryTokenCount, _preferClaimedTokens); } emit MintTokens( _beneficiary, _projectId, _tokenCount, beneficiaryTokenCount, _memo, _reservedRate, msg.sender ); } /** @notice Burns a token holder's supply. @dev Only a token's holder, a designated operator, or a project's terminal can burn it. @param _holder The account that is having its tokens burned. @param _projectId The ID of the project to which the tokens being burned belong. @param _tokenCount The number of tokens to burn. @param _memo A memo to pass along to the emitted event. @param _preferClaimedTokens A flag indicating whether a project's attached token contract should be burned first if they have been issued. */ function burnTokensOf( address _holder, uint256 _projectId, uint256 _tokenCount, string calldata _memo, bool _preferClaimedTokens ) external virtual override requirePermissionAllowingOverride( _holder, _projectId, JBOperations.BURN, directory.isTerminalOf(_projectId, IJBPaymentTerminal(msg.sender)) ) { // There should be tokens to burn if (_tokenCount == 0) revert NO_BURNABLE_TOKENS(); // Get a reference to the project's current funding cycle. JBFundingCycle memory _fundingCycle = fundingCycleStore.currentOf(_projectId); // If the message sender is not a terminal, the current funding cycle must not be paused. if ( _fundingCycle.burnPaused() && !directory.isTerminalOf(_projectId, IJBPaymentTerminal(msg.sender)) ) revert BURN_PAUSED_AND_SENDER_NOT_VALID_TERMINAL_DELEGATE(); // Update the token tracker so that reserved tokens will still be correctly mintable. _processedTokenTrackerOf[_projectId] = _processedTokenTrackerOf[_projectId] - int256(_tokenCount); // Burn the tokens. tokenStore.burnFrom(_holder, _projectId, _tokenCount, _preferClaimedTokens); emit BurnTokens(_holder, _projectId, _tokenCount, _memo, msg.sender); } /** @notice Distributes all outstanding reserved tokens for a project. @param _projectId The ID of the project to which the reserved tokens belong. @param _memo A memo to pass along to the emitted event. @return The amount of minted reserved tokens. */ function distributeReservedTokensOf(uint256 _projectId, string calldata _memo) external virtual override returns (uint256) { return _distributeReservedTokensOf(_projectId, _memo); } /** @notice Allows other controllers to signal to this one that a migration is expected for the specified project. @dev This controller should not yet be the project's controller. @param _projectId The ID of the project that will be migrated to this controller. @param _from The controller being migrated from. */ function prepForMigrationOf(uint256 _projectId, address _from) external virtual override { // This controller must not be the project's current controller. if (directory.controllerOf(_projectId) == address(this)) revert CANT_MIGRATE_TO_CURRENT_CONTROLLER(); // Set the tracker as the total supply. _processedTokenTrackerOf[_projectId] = int256(tokenStore.totalSupplyOf(_projectId)); emit PrepMigration(_projectId, _from, msg.sender); } /** @notice Allows a project to migrate from this controller to another. @dev Only a project's owner or a designated operator can migrate it. @param _projectId The ID of the project that will be migrated from this controller. @param _to The controller to which the project is migrating. */ function migrate(uint256 _projectId, IJBMigratable _to) external virtual override requirePermission(projects.ownerOf(_projectId), _projectId, JBOperations.MIGRATE_CONTROLLER) { // This controller must be the project's current controller. if (directory.controllerOf(_projectId) != address(this)) revert NOT_CURRENT_CONTROLLER(); // Get a reference to the project's current funding cycle. JBFundingCycle memory _fundingCycle = fundingCycleStore.currentOf(_projectId); // Migration must be allowed. if (!_fundingCycle.controllerMigrationAllowed()) revert MIGRATION_NOT_ALLOWED(); // All reserved tokens must be minted before migrating. if (uint256(_processedTokenTrackerOf[_projectId]) != tokenStore.totalSupplyOf(_projectId)) _distributeReservedTokensOf(_projectId, ''); // Make sure the new controller is prepped for the migration. _to.prepForMigrationOf(_projectId, address(this)); // Set the new controller. directory.setControllerOf(_projectId, address(_to)); emit Migrate(_projectId, _to, msg.sender); } //*********************************************************************// // ------------------------ internal functions ----------------------- // //*********************************************************************// /** @notice Distributes all outstanding reserved tokens for a project. @param _projectId The ID of the project to which the reserved tokens belong. @param _memo A memo to pass along to the emitted event. @return tokenCount The amount of minted reserved tokens. */ function _distributeReservedTokensOf(uint256 _projectId, string memory _memo) internal returns (uint256 tokenCount) { // Get the current funding cycle to read the reserved rate from. JBFundingCycle memory _fundingCycle = fundingCycleStore.currentOf(_projectId); // Get a reference to new total supply of tokens before minting reserved tokens. uint256 _totalTokens = tokenStore.totalSupplyOf(_projectId); // Get a reference to the number of tokens that need to be minted. tokenCount = _reservedTokenAmountFrom( _processedTokenTrackerOf[_projectId], _fundingCycle.reservedRate(), _totalTokens ); // Set the tracker to be the new total supply. _processedTokenTrackerOf[_projectId] = int256(_totalTokens + tokenCount); // Get a reference to the project owner. address _owner = projects.ownerOf(_projectId); // Distribute tokens to splits and get a reference to the leftover amount to mint after all splits have gotten their share. uint256 _leftoverTokenCount = tokenCount == 0 ? 0 : _distributeToReservedTokenSplitsOf( _projectId, _fundingCycle.configuration, JBSplitsGroups.RESERVED_TOKENS, tokenCount ); // Mint any leftover tokens to the project owner. if (_leftoverTokenCount > 0) tokenStore.mintFor(_owner, _projectId, _leftoverTokenCount, false); emit DistributeReservedTokens( _fundingCycle.configuration, _fundingCycle.number, _projectId, _owner, tokenCount, _leftoverTokenCount, _memo, msg.sender ); } /** @notice Distribute tokens to the splits according to the specified funding cycle configuration. @param _projectId The ID of the project for which reserved token splits are being distributed. @param _domain The domain of the splits to distribute the reserved tokens between. @param _group The group of the splits to distribute the reserved tokens between. @param _amount The total amount of tokens to mint. @return leftoverAmount If the splits percents dont add up to 100%, the leftover amount is returned. */ function _distributeToReservedTokenSplitsOf( uint256 _projectId, uint256 _domain, uint256 _group, uint256 _amount ) internal returns (uint256 leftoverAmount) { // Set the leftover amount to the initial amount. leftoverAmount = _amount; // Get a reference to the project's reserved token splits. JBSplit[] memory _splits = splitsStore.splitsOf(_projectId, _domain, _group); //Transfer between all splits. for (uint256 _i = 0; _i < _splits.length; _i++) { // Get a reference to the split being iterated on. JBSplit memory _split = _splits[_i]; // The amount to send towards the split. uint256 _tokenCount = PRBMath.mulDiv( _amount, _split.percent, JBConstants.SPLITS_TOTAL_PERCENT ); // Mints tokens for the split if needed. if (_tokenCount > 0) { tokenStore.mintFor( // If an allocator is set in the splits, set it as the beneficiary. // Otherwise if a projectId is set in the split, set the project's owner as the beneficiary. // If the split has a beneficiary send to the split's beneficiary. Otherwise send to the msg.sender. _split.allocator != IJBSplitAllocator(address(0)) ? address(_split.allocator) : _split.projectId != 0 ? projects.ownerOf(_split.projectId) : _split.beneficiary != address(0) ? _split.beneficiary : msg.sender, _projectId, _tokenCount, _split.preferClaimed ); // If there's an allocator set, trigger its `allocate` function. if (_split.allocator != IJBSplitAllocator(address(0))) _split.allocator.allocate( JBSplitAllocationData( address(tokenStore.tokenOf(_projectId)), _tokenCount, 18, _projectId, _group, _split ) ); // Subtract from the amount to be sent to the beneficiary. leftoverAmount = leftoverAmount - _tokenCount; } emit DistributeToReservedTokenSplit( _projectId, _domain, _group, _split, _tokenCount, msg.sender ); } } /** @notice Configures a funding cycle and stores information pertinent to the configuration. @param _projectId The ID of the project whose funding cycles are being reconfigured. @param _data Data that defines the funding cycle. These properties will remain fixed for the duration of the funding cycle. @param _metadata Metadata specifying the controller specific params that a funding cycle can have. These properties will remain fixed for the duration of the funding cycle. @param _mustStartAtOrAfter The time before which the configured funding cycle cannot start. @param _groupedSplits An array of splits to set for any number of groups. @param _fundAccessConstraints An array containing amounts that a project can use from its treasury for each payment terminal. Amounts are fixed point numbers using the same number of decimals as the accompanying terminal. @return configuration The configuration of the funding cycle that was successfully reconfigured. */ function _configure( uint256 _projectId, JBFundingCycleData calldata _data, JBFundingCycleMetadata calldata _metadata, uint256 _mustStartAtOrAfter, JBGroupedSplits[] memory _groupedSplits, JBFundAccessConstraints[] memory _fundAccessConstraints ) internal returns (uint256) { // Make sure the provided reserved rate is valid. if (_metadata.reservedRate > JBConstants.MAX_RESERVED_RATE) revert INVALID_RESERVED_RATE(); // Make sure the provided redemption rate is valid. if (_metadata.redemptionRate > JBConstants.MAX_REDEMPTION_RATE) revert INVALID_REDEMPTION_RATE(); // Make sure the provided ballot redemption rate is valid. if (_metadata.ballotRedemptionRate > JBConstants.MAX_REDEMPTION_RATE) revert INVALID_BALLOT_REDEMPTION_RATE(); // Configure the funding cycle's properties. JBFundingCycle memory _fundingCycle = fundingCycleStore.configureFor( _projectId, _data, JBFundingCycleMetadataResolver.packFundingCycleMetadata(_metadata), _mustStartAtOrAfter ); // Set splits for the group. splitsStore.set(_projectId, _fundingCycle.configuration, _groupedSplits); // Set distribution limits if there are any. for (uint256 _i; _i < _fundAccessConstraints.length; _i++) { JBFundAccessConstraints memory _constraints = _fundAccessConstraints[_i]; // If distribution limit value is larger than 232 bits, revert. if (_constraints.distributionLimit > type(uint232).max) revert INVALID_DISTRIBUTION_LIMIT(); // If distribution limit currency value is larger than 24 bits, revert. if (_constraints.distributionLimitCurrency > type(uint24).max) revert INVALID_DISTRIBUTION_LIMIT_CURRENCY(); // If overflow allowance value is larger than 232 bits, revert. if (_constraints.overflowAllowance > type(uint232).max) revert INVALID_OVERFLOW_ALLOWANCE(); // If overflow allowance currency value is larger than 24 bits, revert. if (_constraints.overflowAllowanceCurrency > type(uint24).max) revert INVALID_OVERFLOW_ALLOWANCE_CURRENCY(); // Set the distribution limit if there is one. if (_constraints.distributionLimit > 0) _packedDistributionLimitDataOf[_projectId][_fundingCycle.configuration][ _constraints.terminal ][_constraints.token] = _constraints.distributionLimit | (_constraints.distributionLimitCurrency << 232); // Set the overflow allowance if there is one. if (_constraints.overflowAllowance > 0) _packedOverflowAllowanceDataOf[_projectId][_fundingCycle.configuration][ _constraints.terminal ][_constraints.token] = _constraints.overflowAllowance | (_constraints.overflowAllowanceCurrency << 232); emit SetFundAccessConstraints( _fundingCycle.configuration, _fundingCycle.number, _projectId, _constraints, msg.sender ); } return _fundingCycle.configuration; } /** @notice Gets the amount of reserved tokens currently tracked for a project given a reserved rate. @param _processedTokenTracker The tracker to make the calculation with. @param _reservedRate The reserved rate to use to make the calculation. @param _totalEligibleTokens The total amount to make the calculation with. @return amount reserved token amount. */ function _reservedTokenAmountFrom( int256 _processedTokenTracker, uint256 _reservedRate, uint256 _totalEligibleTokens ) internal pure returns (uint256) { // Get a reference to the amount of tokens that are unprocessed. uint256 _unprocessedTokenBalanceOf = _processedTokenTracker >= 0 ? _totalEligibleTokens - uint256(_processedTokenTracker) : _totalEligibleTokens + uint256(-_processedTokenTracker); // If there are no unprocessed tokens, return. if (_unprocessedTokenBalanceOf == 0) return 0; // If all tokens are reserved, return the full unprocessed amount. if (_reservedRate == JBConstants.MAX_RESERVED_RATE) return _unprocessedTokenBalanceOf; return PRBMath.mulDiv( _unprocessedTokenBalanceOf, JBConstants.MAX_RESERVED_RATE, JBConstants.MAX_RESERVED_RATE - _reservedRate ) - _unprocessedTokenBalanceOf; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: Unlicense pragma solidity >=0.8.4; import "prb-math/contracts/PRBMath.sol";
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../interfaces/IJBOperatable.sol'; /** @notice Modifiers to allow access to functions based on the message sender's operator status. @dev Adheres to - IJBOperatable: General interface for the methods in this contract that interact with the blockchain's state according to the protocol's rules. */ abstract contract JBOperatable is IJBOperatable { //*********************************************************************// // --------------------------- custom errors -------------------------- // //*********************************************************************// error UNAUTHORIZED(); //*********************************************************************// // ---------------------------- modifiers ---------------------------- // //*********************************************************************// /** @notice Only allows the speficied account or an operator of the account to proceed. @param _account The account to check for. @param _domain The domain namespace to look for an operator within. @param _permissionIndex The index of the permission to check for. */ modifier requirePermission( address _account, uint256 _domain, uint256 _permissionIndex ) { _requirePermission(_account, _domain, _permissionIndex); _; } /** @notice Only allows the speficied account, an operator of the account to proceed, or a truthy override flag. @param _account The account to check for. @param _domain The domain namespace to look for an operator within. @param _permissionIndex The index of the permission to check for. @param _override A condition to force allowance for. */ modifier requirePermissionAllowingOverride( address _account, uint256 _domain, uint256 _permissionIndex, bool _override ) { _requirePermissionAllowingOverride(_account, _domain, _permissionIndex, _override); _; } //*********************************************************************// // ---------------- public immutable stored properties --------------- // //*********************************************************************// /** @notice A contract storing operator assignments. */ IJBOperatorStore public immutable override operatorStore; //*********************************************************************// // -------------------------- constructor ---------------------------- // //*********************************************************************// /** @param _operatorStore A contract storing operator assignments. */ constructor(IJBOperatorStore _operatorStore) { operatorStore = _operatorStore; } //*********************************************************************// // -------------------------- internal views ------------------------- // //*********************************************************************// /** @notice Require the message sender is either the account or has the specified permission. @param _account The account to allow. @param _domain The domain namespace within which the permission index will be checked. @param _permissionIndex The permission index that an operator must have within the specified domain to be allowed. */ function _requirePermission( address _account, uint256 _domain, uint256 _permissionIndex ) internal view { if ( msg.sender != _account && !operatorStore.hasPermission(msg.sender, _account, _domain, _permissionIndex) && !operatorStore.hasPermission(msg.sender, _account, 0, _permissionIndex) ) revert UNAUTHORIZED(); } /** @notice Require the message sender is either the account, has the specified permission, or the override condition is true. @param _account The account to allow. @param _domain The domain namespace within which the permission index will be checked. @param _domain The permission index that an operator must have within the specified domain to be allowed. @param _override The override condition to allow. */ function _requirePermissionAllowingOverride( address _account, uint256 _domain, uint256 _permissionIndex, bool _override ) internal view { if ( !_override && msg.sender != _account && !operatorStore.hasPermission(msg.sender, _account, _domain, _permissionIndex) && !operatorStore.hasPermission(msg.sender, _account, 0, _permissionIndex) ) revert UNAUTHORIZED(); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; enum JBBallotState { Active, Approved, Failed }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import '@openzeppelin/contracts/utils/introspection/IERC165.sol'; import './../structs/JBFundAccessConstraints.sol'; import './../structs/JBFundingCycleData.sol'; import './../structs/JBFundingCycleMetadata.sol'; import './../structs/JBGroupedSplits.sol'; import './../structs/JBProjectMetadata.sol'; import './IJBDirectory.sol'; import './IJBFundingCycleStore.sol'; import './IJBMigratable.sol'; import './IJBPaymentTerminal.sol'; import './IJBSplitsStore.sol'; import './IJBToken.sol'; import './IJBTokenStore.sol'; interface IJBController is IERC165 { event LaunchProject(uint256 configuration, uint256 projectId, string memo, address caller); event LaunchFundingCycles(uint256 configuration, uint256 projectId, string memo, address caller); event ReconfigureFundingCycles( uint256 configuration, uint256 projectId, string memo, address caller ); event SetFundAccessConstraints( uint256 indexed fundingCycleConfiguration, uint256 indexed fundingCycleNumber, uint256 indexed projectId, JBFundAccessConstraints constraints, address caller ); event DistributeReservedTokens( uint256 indexed fundingCycleConfiguration, uint256 indexed fundingCycleNumber, uint256 indexed projectId, address beneficiary, uint256 tokenCount, uint256 beneficiaryTokenCount, string memo, address caller ); event DistributeToReservedTokenSplit( uint256 indexed projectId, uint256 indexed domain, uint256 indexed group, JBSplit split, uint256 tokenCount, address caller ); event MintTokens( address indexed beneficiary, uint256 indexed projectId, uint256 tokenCount, uint256 beneficiaryTokenCount, string memo, uint256 reservedRate, address caller ); event BurnTokens( address indexed holder, uint256 indexed projectId, uint256 tokenCount, string memo, address caller ); event Migrate(uint256 indexed projectId, IJBMigratable to, address caller); event PrepMigration(uint256 indexed projectId, address from, address caller); function projects() external view returns (IJBProjects); function fundingCycleStore() external view returns (IJBFundingCycleStore); function tokenStore() external view returns (IJBTokenStore); function splitsStore() external view returns (IJBSplitsStore); function directory() external view returns (IJBDirectory); function reservedTokenBalanceOf(uint256 _projectId, uint256 _reservedRate) external view returns (uint256); function distributionLimitOf( uint256 _projectId, uint256 _configuration, IJBPaymentTerminal _terminal, address _token ) external view returns (uint256 distributionLimit, uint256 distributionLimitCurrency); function overflowAllowanceOf( uint256 _projectId, uint256 _configuration, IJBPaymentTerminal _terminal, address _token ) external view returns (uint256 overflowAllowance, uint256 overflowAllowanceCurrency); function totalOutstandingTokensOf(uint256 _projectId, uint256 _reservedRate) external view returns (uint256); function getFundingCycleOf(uint256 _projectId, uint256 _configuration) external view returns (JBFundingCycle memory fundingCycle, JBFundingCycleMetadata memory metadata); function latestConfiguredFundingCycleOf(uint256 _projectId) external view returns ( JBFundingCycle memory, JBFundingCycleMetadata memory metadata, JBBallotState ); function currentFundingCycleOf(uint256 _projectId) external view returns (JBFundingCycle memory fundingCycle, JBFundingCycleMetadata memory metadata); function queuedFundingCycleOf(uint256 _projectId) external view returns (JBFundingCycle memory fundingCycle, JBFundingCycleMetadata memory metadata); function launchProjectFor( address _owner, JBProjectMetadata calldata _projectMetadata, JBFundingCycleData calldata _data, JBFundingCycleMetadata calldata _metadata, uint256 _mustStartAtOrAfter, JBGroupedSplits[] memory _groupedSplits, JBFundAccessConstraints[] memory _fundAccessConstraints, IJBPaymentTerminal[] memory _terminals, string calldata _memo ) external returns (uint256 projectId); function launchFundingCyclesFor( uint256 _projectId, JBFundingCycleData calldata _data, JBFundingCycleMetadata calldata _metadata, uint256 _mustStartAtOrAfter, JBGroupedSplits[] memory _groupedSplits, JBFundAccessConstraints[] memory _fundAccessConstraints, IJBPaymentTerminal[] memory _terminals, string calldata _memo ) external returns (uint256 configuration); function reconfigureFundingCyclesOf( uint256 _projectId, JBFundingCycleData calldata _data, JBFundingCycleMetadata calldata _metadata, uint256 _mustStartAtOrAfter, JBGroupedSplits[] memory _groupedSplits, JBFundAccessConstraints[] memory _fundAccessConstraints, string calldata _memo ) external returns (uint256); function issueTokenFor( uint256 _projectId, string calldata _name, string calldata _symbol ) external returns (IJBToken token); function changeTokenOf( uint256 _projectId, IJBToken _token, address _newOwner ) external; function mintTokensOf( uint256 _projectId, uint256 _tokenCount, address _beneficiary, string calldata _memo, bool _preferClaimedTokens, bool _useReservedRate ) external returns (uint256 beneficiaryTokenCount); function burnTokensOf( address _holder, uint256 _projectId, uint256 _tokenCount, string calldata _memo, bool _preferClaimedTokens ) external; function distributeReservedTokensOf(uint256 _projectId, string memory _memo) external returns (uint256); function migrate(uint256 _projectId, IJBMigratable _to) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './IJBFundingCycleStore.sol'; import './IJBPaymentTerminal.sol'; import './IJBProjects.sol'; interface IJBDirectory { event SetController(uint256 indexed projectId, address indexed controller, address caller); event AddTerminal(uint256 indexed projectId, IJBPaymentTerminal indexed terminal, address caller); event SetTerminals(uint256 indexed projectId, IJBPaymentTerminal[] terminals, address caller); event SetPrimaryTerminal( uint256 indexed projectId, address indexed token, IJBPaymentTerminal indexed terminal, address caller ); event SetIsAllowedToSetFirstController(address indexed addr, bool indexed flag, address caller); function projects() external view returns (IJBProjects); function fundingCycleStore() external view returns (IJBFundingCycleStore); function controllerOf(uint256 _projectId) external view returns (address); function isAllowedToSetFirstController(address _address) external view returns (bool); function terminalsOf(uint256 _projectId) external view returns (IJBPaymentTerminal[] memory); function isTerminalOf(uint256 _projectId, IJBPaymentTerminal _terminal) external view returns (bool); function primaryTerminalOf(uint256 _projectId, address _token) external view returns (IJBPaymentTerminal); function setControllerOf(uint256 _projectId, address _controller) external; function setTerminalsOf(uint256 _projectId, IJBPaymentTerminal[] calldata _terminals) external; function setPrimaryTerminalOf( uint256 _projectId, address _token, IJBPaymentTerminal _terminal ) external; function setIsAllowedToSetFirstController(address _address, bool _flag) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import '@openzeppelin/contracts/utils/introspection/IERC165.sol'; import './../enums/JBBallotState.sol'; import './IJBFundingCycleStore.sol'; interface IJBFundingCycleBallot is IERC165 { function duration() external view returns (uint256); function stateOf( uint256 _projectId, uint256 _configuration, uint256 _start ) external view returns (JBBallotState); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import '@openzeppelin/contracts/utils/introspection/IERC165.sol'; import './../structs/JBPayParamsData.sol'; import './../structs/JBRedeemParamsData.sol'; import './IJBFundingCycleStore.sol'; import './IJBPayDelegate.sol'; import './IJBRedemptionDelegate.sol'; interface IJBFundingCycleDataSource is IERC165 { function payParams(JBPayParamsData calldata _data) external returns ( uint256 weight, string memory memo, IJBPayDelegate delegate ); function redeemParams(JBRedeemParamsData calldata _data) external returns ( uint256 reclaimAmount, string memory memo, IJBRedemptionDelegate delegate ); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../enums/JBBallotState.sol'; import './../structs/JBFundingCycle.sol'; import './../structs/JBFundingCycleData.sol'; interface IJBFundingCycleStore { event Configure( uint256 indexed configuration, uint256 indexed projectId, JBFundingCycleData data, uint256 metadata, uint256 mustStartAtOrAfter, address caller ); event Init(uint256 indexed configuration, uint256 indexed projectId, uint256 indexed basedOn); function latestConfigurationOf(uint256 _projectId) external view returns (uint256); function get(uint256 _projectId, uint256 _configuration) external view returns (JBFundingCycle memory); function latestConfiguredOf(uint256 _projectId) external view returns (JBFundingCycle memory fundingCycle, JBBallotState ballotState); function queuedOf(uint256 _projectId) external view returns (JBFundingCycle memory fundingCycle); function currentOf(uint256 _projectId) external view returns (JBFundingCycle memory fundingCycle); function currentBallotStateOf(uint256 _projectId) external view returns (JBBallotState); function configureFor( uint256 _projectId, JBFundingCycleData calldata _data, uint256 _metadata, uint256 _mustStartAtOrAfter ) external returns (JBFundingCycle memory fundingCycle); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; interface IJBMigratable { function prepForMigrationOf(uint256 _projectId, address _from) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './IJBOperatorStore.sol'; interface IJBOperatable { function operatorStore() external view returns (IJBOperatorStore); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../structs/JBOperatorData.sol'; interface IJBOperatorStore { event SetOperator( address indexed operator, address indexed account, uint256 indexed domain, uint256[] permissionIndexes, uint256 packed ); function permissionsOf( address _operator, address _account, uint256 _domain ) external view returns (uint256); function hasPermission( address _operator, address _account, uint256 _domain, uint256 _permissionIndex ) external view returns (bool); function hasPermissions( address _operator, address _account, uint256 _domain, uint256[] calldata _permissionIndexes ) external view returns (bool); function setOperator(JBOperatorData calldata _operatorData) external; function setOperators(JBOperatorData[] calldata _operatorData) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import '@openzeppelin/contracts/utils/introspection/IERC165.sol'; import './../structs/JBDidPayData.sol'; interface IJBPayDelegate is IERC165 { function didPay(JBDidPayData calldata _data) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import '@openzeppelin/contracts/utils/introspection/IERC165.sol'; interface IJBPaymentTerminal is IERC165 { function acceptsToken(address _token, uint256 _projectId) external view returns (bool); function currencyForToken(address _token) external view returns (uint256); function decimalsForToken(address _token) external view returns (uint256); // Return value must be a fixed point number with 18 decimals. function currentEthOverflowOf(uint256 _projectId) external view returns (uint256); function pay( uint256 _projectId, uint256 _amount, address _token, address _beneficiary, uint256 _minReturnedTokens, bool _preferClaimedTokens, string calldata _memo, bytes calldata _metadata ) external payable returns (uint256 beneficiaryTokenCount); function addToBalanceOf( uint256 _projectId, uint256 _amount, address _token, string calldata _memo, bytes calldata _metadata ) external payable; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import './../structs/JBProjectMetadata.sol'; import './IJBTokenUriResolver.sol'; interface IJBProjects is IERC721 { event Create( uint256 indexed projectId, address indexed owner, JBProjectMetadata metadata, address caller ); event SetMetadata(uint256 indexed projectId, JBProjectMetadata metadata, address caller); event SetTokenUriResolver(IJBTokenUriResolver indexed resolver, address caller); function count() external view returns (uint256); function metadataContentOf(uint256 _projectId, uint256 _domain) external view returns (string memory); function tokenUriResolver() external view returns (IJBTokenUriResolver); function createFor(address _owner, JBProjectMetadata calldata _metadata) external returns (uint256 projectId); function setMetadataOf(uint256 _projectId, JBProjectMetadata calldata _metadata) external; function setTokenUriResolver(IJBTokenUriResolver _newResolver) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import '@openzeppelin/contracts/utils/introspection/IERC165.sol'; import './../structs/JBDidRedeemData.sol'; interface IJBRedemptionDelegate is IERC165 { function didRedeem(JBDidRedeemData calldata _data) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import '@openzeppelin/contracts/utils/introspection/IERC165.sol'; import '../structs/JBSplitAllocationData.sol'; interface IJBSplitAllocator is IERC165 { function allocate(JBSplitAllocationData calldata _data) external payable; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../structs/JBGroupedSplits.sol'; import './../structs/JBSplit.sol'; import './IJBDirectory.sol'; import './IJBProjects.sol'; interface IJBSplitsStore { event SetSplit( uint256 indexed projectId, uint256 indexed domain, uint256 indexed group, JBSplit split, address caller ); function projects() external view returns (IJBProjects); function directory() external view returns (IJBDirectory); function splitsOf( uint256 _projectId, uint256 _domain, uint256 _group ) external view returns (JBSplit[] memory); function set( uint256 _projectId, uint256 _domain, JBGroupedSplits[] memory _groupedSplits ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; interface IJBToken { function decimals() external view returns (uint8); function totalSupply(uint256 _projectId) external view returns (uint256); function balanceOf(address _account, uint256 _projectId) external view returns (uint256); function mint( uint256 _projectId, address _account, uint256 _amount ) external; function burn( uint256 _projectId, address _account, uint256 _amount ) external; function approve( uint256, address _spender, uint256 _amount ) external; function transfer( uint256 _projectId, address _to, uint256 _amount ) external; function transferFrom( uint256 _projectId, address _from, address _to, uint256 _amount ) external; function transferOwnership(uint256 _projectId, address _newOwner) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './IJBProjects.sol'; import './IJBToken.sol'; interface IJBTokenStore { event Issue( uint256 indexed projectId, IJBToken indexed token, string name, string symbol, address caller ); event Mint( address indexed holder, uint256 indexed projectId, uint256 amount, bool tokensWereClaimed, bool preferClaimedTokens, address caller ); event Burn( address indexed holder, uint256 indexed projectId, uint256 amount, uint256 initialUnclaimedBalance, uint256 initialClaimedBalance, bool preferClaimedTokens, address caller ); event Claim( address indexed holder, uint256 indexed projectId, uint256 initialUnclaimedBalance, uint256 amount, address caller ); event ShouldRequireClaim(uint256 indexed projectId, bool indexed flag, address caller); event Change( uint256 indexed projectId, IJBToken indexed newToken, IJBToken indexed oldToken, address owner, address caller ); event Transfer( address indexed holder, uint256 indexed projectId, address indexed recipient, uint256 amount, address caller ); function tokenOf(uint256 _projectId) external view returns (IJBToken); function projectOf(IJBToken _token) external view returns (uint256); function projects() external view returns (IJBProjects); function unclaimedBalanceOf(address _holder, uint256 _projectId) external view returns (uint256); function unclaimedTotalSupplyOf(uint256 _projectId) external view returns (uint256); function totalSupplyOf(uint256 _projectId) external view returns (uint256); function balanceOf(address _holder, uint256 _projectId) external view returns (uint256 _result); function requireClaimFor(uint256 _projectId) external view returns (bool); function issueFor( uint256 _projectId, string calldata _name, string calldata _symbol ) external returns (IJBToken token); function changeFor( uint256 _projectId, IJBToken _token, address _newOwner ) external returns (IJBToken oldToken); function burnFrom( address _holder, uint256 _projectId, uint256 _amount, bool _preferClaimedTokens ) external; function mintFor( address _holder, uint256 _projectId, uint256 _amount, bool _preferClaimedTokens ) external; function shouldRequireClaimingFor(uint256 _projectId, bool _flag) external; function claimFor( address _holder, uint256 _projectId, uint256 _amount ) external; function transferFrom( address _holder, uint256 _projectId, address _recipient, uint256 _amount ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; interface IJBTokenUriResolver { function getUri(uint256 _projectId) external view returns (string memory tokenUri); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; /** @notice Global constants used across Juicebox contracts. */ library JBConstants { uint256 public constant MAX_RESERVED_RATE = 10000; uint256 public constant MAX_REDEMPTION_RATE = 10000; uint256 public constant MAX_DISCOUNT_RATE = 1000000000; uint256 public constant SPLITS_TOTAL_PERCENT = 1000000000; uint256 public constant MAX_FEE = 1000000000; uint256 public constant MAX_FEE_DISCOUNT = 1000000000; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../interfaces/IJBFundingCycleDataSource.sol'; import './../structs/JBFundingCycleMetadata.sol'; import './../structs/JBGlobalFundingCycleMetadata.sol'; import './JBConstants.sol'; import './JBGlobalFundingCycleMetadataResolver.sol'; library JBFundingCycleMetadataResolver { function global(JBFundingCycle memory _fundingCycle) internal pure returns (JBGlobalFundingCycleMetadata memory metadata) { return JBGlobalFundingCycleMetadataResolver.expandMetadata(uint8(_fundingCycle.metadata >> 8)); } function reservedRate(JBFundingCycle memory _fundingCycle) internal pure returns (uint256) { return uint256(uint16(_fundingCycle.metadata >> 24)); } function redemptionRate(JBFundingCycle memory _fundingCycle) internal pure returns (uint256) { // Redemption rate is a number 0-10000. It's inverse was stored so the most common case of 100% results in no storage needs. return JBConstants.MAX_REDEMPTION_RATE - uint256(uint16(_fundingCycle.metadata >> 40)); } function ballotRedemptionRate(JBFundingCycle memory _fundingCycle) internal pure returns (uint256) { // Redemption rate is a number 0-10000. It's inverse was stored so the most common case of 100% results in no storage needs. return JBConstants.MAX_REDEMPTION_RATE - uint256(uint16(_fundingCycle.metadata >> 56)); } function payPaused(JBFundingCycle memory _fundingCycle) internal pure returns (bool) { return ((_fundingCycle.metadata >> 72) & 1) == 1; } function distributionsPaused(JBFundingCycle memory _fundingCycle) internal pure returns (bool) { return ((_fundingCycle.metadata >> 73) & 1) == 1; } function redeemPaused(JBFundingCycle memory _fundingCycle) internal pure returns (bool) { return ((_fundingCycle.metadata >> 74) & 1) == 1; } function burnPaused(JBFundingCycle memory _fundingCycle) internal pure returns (bool) { return ((_fundingCycle.metadata >> 75) & 1) == 1; } function mintingAllowed(JBFundingCycle memory _fundingCycle) internal pure returns (bool) { return ((_fundingCycle.metadata >> 76) & 1) == 1; } function changeTokenAllowed(JBFundingCycle memory _fundingCycle) internal pure returns (bool) { return ((_fundingCycle.metadata >> 77) & 1) == 1; } function terminalMigrationAllowed(JBFundingCycle memory _fundingCycle) internal pure returns (bool) { return ((_fundingCycle.metadata >> 78) & 1) == 1; } function controllerMigrationAllowed(JBFundingCycle memory _fundingCycle) internal pure returns (bool) { return ((_fundingCycle.metadata >> 79) & 1) == 1; } function shouldHoldFees(JBFundingCycle memory _fundingCycle) internal pure returns (bool) { return ((_fundingCycle.metadata >> 80) & 1) == 1; } function useTotalOverflowForRedemptions(JBFundingCycle memory _fundingCycle) internal pure returns (bool) { return ((_fundingCycle.metadata >> 81) & 1) == 1; } function useDataSourceForPay(JBFundingCycle memory _fundingCycle) internal pure returns (bool) { return (_fundingCycle.metadata >> 82) & 1 == 1; } function useDataSourceForRedeem(JBFundingCycle memory _fundingCycle) internal pure returns (bool) { return (_fundingCycle.metadata >> 83) & 1 == 1; } function dataSource(JBFundingCycle memory _fundingCycle) internal pure returns (address) { return address(uint160(_fundingCycle.metadata >> 84)); } /** @notice Pack the funding cycle metadata. @param _metadata The metadata to validate and pack. @return packed The packed uint256 of all metadata params. The first 8 bits specify the version. */ function packFundingCycleMetadata(JBFundingCycleMetadata memory _metadata) internal pure returns (uint256 packed) { // version 1 in the bits 0-7 (8 bits). packed = 1; // global metadta in bits 8-23 (16 bits). packed |= JBGlobalFundingCycleMetadataResolver.packFundingCycleGlobalMetadata(_metadata.global) << 8; // reserved rate in bits 24-39 (16 bits). packed |= _metadata.reservedRate << 24; // redemption rate in bits 40-55 (16 bits). // redemption rate is a number 0-10000. Store the reverse so the most common case of 100% results in no storage needs. packed |= (JBConstants.MAX_REDEMPTION_RATE - _metadata.redemptionRate) << 40; // ballot redemption rate rate in bits 56-71 (16 bits). // ballot redemption rate is a number 0-10000. Store the reverse so the most common case of 100% results in no storage needs. packed |= (JBConstants.MAX_REDEMPTION_RATE - _metadata.ballotRedemptionRate) << 56; // pause pay in bit 72. if (_metadata.pausePay) packed |= 1 << 72; // pause tap in bit 73. if (_metadata.pauseDistributions) packed |= 1 << 73; // pause redeem in bit 74. if (_metadata.pauseRedeem) packed |= 1 << 74; // pause burn in bit 75. if (_metadata.pauseBurn) packed |= 1 << 75; // allow minting in bit 76. if (_metadata.allowMinting) packed |= 1 << 76; // allow change token in bit 77. if (_metadata.allowChangeToken) packed |= 1 << 77; // allow terminal migration in bit 78. if (_metadata.allowTerminalMigration) packed |= 1 << 78; // allow controller migration in bit 79. if (_metadata.allowControllerMigration) packed |= 1 << 79; // hold fees in bit 80. if (_metadata.holdFees) packed |= 1 << 80; // useTotalOverflowForRedemptions in bit 81. if (_metadata.useTotalOverflowForRedemptions) packed |= 1 << 81; // use pay data source in bit 82. if (_metadata.useDataSourceForPay) packed |= 1 << 82; // use redeem data source in bit 83. if (_metadata.useDataSourceForRedeem) packed |= 1 << 83; // data source address in bits 84-243. packed |= uint256(uint160(address(_metadata.dataSource))) << 84; } /** @notice Expand the funding cycle metadata. @param _fundingCycle The funding cycle having its metadata expanded. @return metadata The metadata object. */ function expandMetadata(JBFundingCycle memory _fundingCycle) internal pure returns (JBFundingCycleMetadata memory metadata) { return JBFundingCycleMetadata( global(_fundingCycle), reservedRate(_fundingCycle), redemptionRate(_fundingCycle), ballotRedemptionRate(_fundingCycle), payPaused(_fundingCycle), distributionsPaused(_fundingCycle), redeemPaused(_fundingCycle), burnPaused(_fundingCycle), mintingAllowed(_fundingCycle), changeTokenAllowed(_fundingCycle), terminalMigrationAllowed(_fundingCycle), controllerMigrationAllowed(_fundingCycle), shouldHoldFees(_fundingCycle), useTotalOverflowForRedemptions(_fundingCycle), useDataSourceForPay(_fundingCycle), useDataSourceForRedeem(_fundingCycle), dataSource(_fundingCycle) ); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../interfaces/IJBFundingCycleDataSource.sol'; import './../structs/JBFundingCycleMetadata.sol'; import './JBConstants.sol'; library JBGlobalFundingCycleMetadataResolver { function setTerminalsAllowed(uint8 _data) internal pure returns (bool) { return (_data & 1) == 1; } function setControllerAllowed(uint8 _data) internal pure returns (bool) { return ((_data >> 1) & 1) == 1; } /** @notice Pack the global funding cycle metadata. @param _metadata The metadata to validate and pack. @return packed The packed uint256 of all global metadata params. The first 8 bits specify the version. */ function packFundingCycleGlobalMetadata(JBGlobalFundingCycleMetadata memory _metadata) internal pure returns (uint256 packed) { // allow set terminals in bit 0. if (_metadata.allowSetTerminals) packed |= 1; // allow set controller in bit 1. if (_metadata.allowSetController) packed |= 1 << 1; } /** @notice Expand the global funding cycle metadata. @param _packedMetadata The packed metadata to expand. @return metadata The global metadata object. */ function expandMetadata(uint8 _packedMetadata) internal pure returns (JBGlobalFundingCycleMetadata memory metadata) { return JBGlobalFundingCycleMetadata( setTerminalsAllowed(_packedMetadata), setControllerAllowed(_packedMetadata) ); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; library JBOperations { uint256 public constant RECONFIGURE = 1; uint256 public constant REDEEM = 2; uint256 public constant MIGRATE_CONTROLLER = 3; uint256 public constant MIGRATE_TERMINAL = 4; uint256 public constant PROCESS_FEES = 5; uint256 public constant SET_METADATA = 6; uint256 public constant ISSUE = 7; uint256 public constant CHANGE_TOKEN = 8; uint256 public constant MINT = 9; uint256 public constant BURN = 10; uint256 public constant CLAIM = 11; uint256 public constant TRANSFER = 12; uint256 public constant REQUIRE_CLAIM = 13; uint256 public constant SET_CONTROLLER = 14; uint256 public constant SET_TERMINALS = 15; uint256 public constant SET_PRIMARY_TERMINAL = 16; uint256 public constant USE_ALLOWANCE = 17; uint256 public constant SET_SPLITS = 18; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; library JBSplitsGroups { uint256 public constant ETH_PAYOUT = 1; uint256 public constant RESERVED_TOKENS = 2; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './JBTokenAmount.sol'; /** @member payer The address from which the payment originated. @member projectId The ID of the project for which the payment was made. @member currentFundingCycleConfiguration The configuration of the funding cycle during which the payment is being made. @member amount The amount of the payment. Includes the token being paid, the value, the number of decimals included, and the currency of the amount. @member projectTokenCount The number of project tokens minted for the beneficiary. @member beneficiary The address to which the tokens were minted. @member preferClaimedTokens A flag indicating whether the request prefered to mint project tokens into the beneficiaries wallet rather than leaving them unclaimed. This is only possible if the project has an attached token contract. @member memo The memo that is being emitted alongside the payment. @member metadata Extra data to send to the delegate. */ struct JBDidPayData { address payer; uint256 projectId; uint256 currentFundingCycleConfiguration; JBTokenAmount amount; uint256 projectTokenCount; address beneficiary; bool preferClaimedTokens; string memo; bytes metadata; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './JBTokenAmount.sol'; /** @member holder The holder of the tokens being redeemed. @member projectId The ID of the project with which the redeemed tokens are associated. @member currentFundingCycleConfiguration The configuration of the funding cycle during which the redemption is being made. @member projectTokenCount The number of project tokens being redeemed. @member reclaimedAmount The amount reclaimed from the treasury. Includes the token being reclaimed, the value, the number of decimals included, and the currency of the amount. @member beneficiary The address to which the reclaimed amount will be sent. @member memo The memo that is being emitted alongside the redemption. @member metadata Extra data to send to the delegate. */ struct JBDidRedeemData { address holder; uint256 projectId; uint256 currentFundingCycleConfiguration; uint256 projectTokenCount; JBTokenAmount reclaimedAmount; address payable beneficiary; string memo; bytes metadata; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../interfaces/IJBPaymentTerminal.sol'; /** @member terminal The terminal within which the distribution limit and the overflow allowance applies. @member token The token for which the fund access constraints apply. @member distributionLimit The amount of the distribution limit, as a fixed point number with the same number of decimals as the terminal within which the limit applies. @member distributionLimitCurrency The currency of the distribution limit. @member overflowAllowance The amount of the allowance, as a fixed point number with the same number of decimals as the terminal within which the allowance applies. @member overflowAllowanceCurrency The currency of the overflow allowance. */ struct JBFundAccessConstraints { IJBPaymentTerminal terminal; address token; uint256 distributionLimit; uint256 distributionLimitCurrency; uint256 overflowAllowance; uint256 overflowAllowanceCurrency; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../interfaces/IJBFundingCycleBallot.sol'; /** @member number The funding cycle number for the cycle's project. Each funding cycle has a number that is an increment of the cycle that directly preceded it. Each project's first funding cycle has a number of 1. @member configuration The timestamp when the parameters for this funding cycle were configured. This value will stay the same for subsequent funding cycles that roll over from an originally configured cycle. @member basedOn The `configuration` of the funding cycle that was active when this cycle was created. @member start The timestamp marking the moment from which the funding cycle is considered active. It is a unix timestamp measured in seconds. @member duration The number of seconds the funding cycle lasts for, after which a new funding cycle will start. A duration of 0 means that the funding cycle will stay active until the project owner explicitly issues a reconfiguration, at which point a new funding cycle will immediately start with the updated properties. If the duration is greater than 0, a project owner cannot make changes to a funding cycle's parameters while it is active – any proposed changes will apply to the subsequent cycle. If no changes are proposed, a funding cycle rolls over to another one with the same properties but new `start` timestamp and a discounted `weight`. @member weight A fixed point number with 18 decimals that contracts can use to base arbitrary calculations on. For example, payment terminals can use this to determine how many tokens should be minted when a payment is received. @member discountRate A percent by how much the `weight` of the subsequent funding cycle should be reduced, if the project owner hasn't configured the subsequent funding cycle with an explicit `weight`. If it's 0, each funding cycle will have equal weight. If the number is 90%, the next funding cycle will have a 10% smaller weight. This weight is out of `JBConstants.MAX_DISCOUNT_RATE`. @member ballot An address of a contract that says whether a proposed reconfiguration should be accepted or rejected. It can be used to create rules around how a project owner can change funding cycle parameters over time. @member metadata Extra data that can be associated with a funding cycle. */ struct JBFundingCycle { uint256 number; uint256 configuration; uint256 basedOn; uint256 start; uint256 duration; uint256 weight; uint256 discountRate; IJBFundingCycleBallot ballot; uint256 metadata; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../interfaces/IJBFundingCycleBallot.sol'; /** @member duration The number of seconds the funding cycle lasts for, after which a new funding cycle will start. A duration of 0 means that the funding cycle will stay active until the project owner explicitly issues a reconfiguration, at which point a new funding cycle will immediately start with the updated properties. If the duration is greater than 0, a project owner cannot make changes to a funding cycle's parameters while it is active – any proposed changes will apply to the subsequent cycle. If no changes are proposed, a funding cycle rolls over to another one with the same properties but new `start` timestamp and a discounted `weight`. @member weight A fixed point number with 18 decimals that contracts can use to base arbitrary calculations on. For example, payment terminals can use this to determine how many tokens should be minted when a payment is received. @member discountRate A percent by how much the `weight` of the subsequent funding cycle should be reduced, if the project owner hasn't configured the subsequent funding cycle with an explicit `weight`. If it's 0, each funding cycle will have equal weight. If the number is 90%, the next funding cycle will have a 10% smaller weight. This weight is out of `JBConstants.MAX_DISCOUNT_RATE`. @member ballot An address of a contract that says whether a proposed reconfiguration should be accepted or rejected. It can be used to create rules around how a project owner can change funding cycle parameters over time. */ struct JBFundingCycleData { uint256 duration; uint256 weight; uint256 discountRate; IJBFundingCycleBallot ballot; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './JBGlobalFundingCycleMetadata.sol'; import './../interfaces/IJBFundingCycleDataSource.sol'; /** @member global Data used globally in non-migratable ecosystem contracts. @member reservedRate The reserved rate of the funding cycle. This number is a percentage calculated out of `JBConstants.MAX_RESERVED_RATE`. @member redemptionRate The redemption rate of the funding cycle. This number is a percentage calculated out of `JBConstants.MAX_REDEMPTION_RATE`. @member ballotRedemptionRate The redemption rate to use during an active ballot of the funding cycle. This number is a percentage calculated out of `JBConstants.MAX_REDEMPTION_RATE`. @member pausePay A flag indicating if the pay functionality should be paused during the funding cycle. @member pauseDistributions A flag indicating if the distribute functionality should be paused during the funding cycle. @member pauseRedeem A flag indicating if the redeem functionality should be paused during the funding cycle. @member pauseBurn A flag indicating if the burn functionality should be paused during the funding cycle. @member allowMinting A flag indicating if the mint functionality should be allowed during the funding cycle. @member allowChangeToken A flag indicating if changing tokens should be allowed during this funding cycle. @member allowTerminalMigration A flag indicating if migrating terminals should be allowed during this funding cycle. @member allowControllerMigration A flag indicating if migrating controllers should be allowed during this funding cycle. @member holdFees A flag indicating if fees should be held during this funding cycle. @member useTotalOverflowForRedemptions A flag indicating if redemptions should use the project's balance held in all terminals instead of the project's local terminal balance from which the redemption is being fulfilled. @member useDataSourceForPay A flag indicating if the data source should be used for pay transactions during this funding cycle. @member useDataSourceForRedeem A flag indicating if the data source should be used for redeem transactions during this funding cycle. @member dataSource The data source to use during this funding cycle. */ struct JBFundingCycleMetadata { JBGlobalFundingCycleMetadata global; uint256 reservedRate; uint256 redemptionRate; uint256 ballotRedemptionRate; bool pausePay; bool pauseDistributions; bool pauseRedeem; bool pauseBurn; bool allowMinting; bool allowChangeToken; bool allowTerminalMigration; bool allowControllerMigration; bool holdFees; bool useTotalOverflowForRedemptions; bool useDataSourceForPay; bool useDataSourceForRedeem; address dataSource; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../interfaces/IJBFundingCycleDataSource.sol'; /** @member allowSetTerminals A flag indicating if setting terminals should be allowed during this funding cycle. @member allowSetController A flag indicating if setting a new controller should be allowed during this funding cycle. */ struct JBGlobalFundingCycleMetadata { bool allowSetTerminals; bool allowSetController; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './JBSplit.sol'; /** @member group The group indentifier. @member splits The splits to associate with the group. */ struct JBGroupedSplits { uint256 group; JBSplit[] splits; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; /** @member operator The address of the operator. @member domain The domain within which the operator is being given permissions. A domain of 0 is a wildcard domain, which gives an operator access to all domains. @member permissionIndexes The indexes of the permissions the operator is being given. */ struct JBOperatorData { address operator; uint256 domain; uint256[] permissionIndexes; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../interfaces/IJBPaymentTerminal.sol'; import './JBTokenAmount.sol'; /** @member terminal The terminal that is facilitating the payment. @member payer The address from which the payment originated. @member amount The amount of the payment. Includes the token being paid, the value, the number of decimals included, and the currency of the amount. @member projectId The ID of the project being paid. @member currentFundingCycleConfiguration The configuration of the funding cycle during which the payment is being made. @member beneficiary The specified address that should be the beneficiary of anything that results from the payment. @member weight The weight of the funding cycle during which the payment is being made. @member reservedRate The reserved rate of the funding cycle during which the payment is being made. @member memo The memo that was sent alongside the payment. @member metadata Extra data provided by the payer. */ struct JBPayParamsData { IJBPaymentTerminal terminal; address payer; JBTokenAmount amount; uint256 projectId; uint256 currentFundingCycleConfiguration; address beneficiary; uint256 weight; uint256 reservedRate; string memo; bytes metadata; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; /** @member content The metadata content. @member domain The domain within which the metadata applies. */ struct JBProjectMetadata { string content; uint256 domain; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../interfaces/IJBPaymentTerminal.sol'; import './JBTokenAmount.sol'; /** @member terminal The terminal that is facilitating the redemption. @member holder The holder of the tokens being redeemed. @member projectId The ID of the project whos tokens are being redeemed. @member currentFundingCycleConfiguration The configuration of the funding cycle during which the redemption is being made. @member tokenCount The proposed number of tokens being redeemed, as a fixed point number with 18 decimals. @member totalSupply The total supply of tokens used in the calculation, as a fixed point number with 18 decimals. @member overflow The amount of overflow used in the reclaim amount calculation. @member reclaimAmount The amount that should be reclaimed by the redeemer using the protocol's standard bonding curve redemption formula. Includes the token being reclaimed, the reclaim value, the number of decimals included, and the currency of the reclaim amount. @member useTotalOverflow If overflow across all of a project's terminals is being used when making redemptions. @member redemptionRate The redemption rate of the funding cycle during which the redemption is being made. @member ballotRedemptionRate The ballot redemption rate of the funding cycle during which the redemption is being made. @member memo The proposed memo that is being emitted alongside the redemption. @member metadata Extra data provided by the redeemer. */ struct JBRedeemParamsData { IJBPaymentTerminal terminal; address holder; uint256 projectId; uint256 currentFundingCycleConfiguration; uint256 tokenCount; uint256 totalSupply; uint256 overflow; JBTokenAmount reclaimAmount; bool useTotalOverflow; uint256 redemptionRate; uint256 ballotRedemptionRate; string memo; bytes metadata; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './../interfaces/IJBSplitAllocator.sol'; /** @member preferClaimed A flag that only has effect if a projectId is also specified, and the project has a token contract attached. If so, this flag indicates if the tokens that result from making a payment to the project should be delivered claimed into the beneficiary's wallet, or unclaimed to save gas. @member preferAddToBalance A flag indicating if a distribution to a project should prefer triggering it's addToBalance function instead of its pay function. @member percent The percent of the whole group that this split occupies. This number is out of `JBConstants.SPLITS_TOTAL_PERCENT`. @member projectId The ID of a project. If an allocator is not set but a projectId is set, funds will be sent to the protocol treasury belonging to the project who's ID is specified. Resulting tokens will be routed to the beneficiary with the claimed token preference respected. @member beneficiary An address. The role the of the beneficary depends on whether or not projectId is specified, and whether or not an allocator is specified. If allocator is set, the beneficiary will be forwarded to the allocator for it to use. If allocator is not set but projectId is set, the beneficiary is the address to which the project's tokens will be sent that result from a payment to it. If neither allocator or projectId are set, the beneficiary is where the funds from the split will be sent. @member lockedUntil Specifies if the split should be unchangeable until the specified time, with the exception of extending the locked period. @member allocator If an allocator is specified, funds will be sent to the allocator contract along with all properties of this split. */ struct JBSplit { bool preferClaimed; bool preferAddToBalance; uint256 percent; uint256 projectId; address payable beneficiary; uint256 lockedUntil; IJBSplitAllocator allocator; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; import './JBSplit.sol'; /** @member token The token being sent to the split allocator. @member amount The amount being sent to the split allocator, as a fixed point number. @member decimals The number of decimals in the amount. @member projectId The project to which the split belongs. @member group The group to which the split belongs. @member split The split that caused the allocation. */ struct JBSplitAllocationData { address token; uint256 amount; uint256 decimals; uint256 projectId; uint256 group; JBSplit split; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.6; /* @member token The token the payment was made in. @member value The amount of tokens that was paid, as a fixed point number. @member decimals The number of decimals included in the value fixed point number. @member currency The expected currency of the value. **/ struct JBTokenAmount { address token; uint256 value; uint256 decimals; uint256 currency; }
// SPDX-License-Identifier: Unlicense pragma solidity >=0.8.4; /// @notice Emitted when the result overflows uint256. error PRBMath__MulDivFixedPointOverflow(uint256 prod1); /// @notice Emitted when the result overflows uint256. error PRBMath__MulDivOverflow(uint256 prod1, uint256 denominator); /// @notice Emitted when one of the inputs is type(int256).min. error PRBMath__MulDivSignedInputTooSmall(); /// @notice Emitted when the intermediary absolute result overflows int256. error PRBMath__MulDivSignedOverflow(uint256 rAbs); /// @notice Emitted when the input is MIN_SD59x18. error PRBMathSD59x18__AbsInputTooSmall(); /// @notice Emitted when ceiling a number overflows SD59x18. error PRBMathSD59x18__CeilOverflow(int256 x); /// @notice Emitted when one of the inputs is MIN_SD59x18. error PRBMathSD59x18__DivInputTooSmall(); /// @notice Emitted when one of the intermediary unsigned results overflows SD59x18. error PRBMathSD59x18__DivOverflow(uint256 rAbs); /// @notice Emitted when the input is greater than 133.084258667509499441. error PRBMathSD59x18__ExpInputTooBig(int256 x); /// @notice Emitted when the input is greater than 192. error PRBMathSD59x18__Exp2InputTooBig(int256 x); /// @notice Emitted when flooring a number underflows SD59x18. error PRBMathSD59x18__FloorUnderflow(int256 x); /// @notice Emitted when converting a basic integer to the fixed-point format overflows SD59x18. error PRBMathSD59x18__FromIntOverflow(int256 x); /// @notice Emitted when converting a basic integer to the fixed-point format underflows SD59x18. error PRBMathSD59x18__FromIntUnderflow(int256 x); /// @notice Emitted when the product of the inputs is negative. error PRBMathSD59x18__GmNegativeProduct(int256 x, int256 y); /// @notice Emitted when multiplying the inputs overflows SD59x18. error PRBMathSD59x18__GmOverflow(int256 x, int256 y); /// @notice Emitted when the input is less than or equal to zero. error PRBMathSD59x18__LogInputTooSmall(int256 x); /// @notice Emitted when one of the inputs is MIN_SD59x18. error PRBMathSD59x18__MulInputTooSmall(); /// @notice Emitted when the intermediary absolute result overflows SD59x18. error PRBMathSD59x18__MulOverflow(uint256 rAbs); /// @notice Emitted when the intermediary absolute result overflows SD59x18. error PRBMathSD59x18__PowuOverflow(uint256 rAbs); /// @notice Emitted when the input is negative. error PRBMathSD59x18__SqrtNegativeInput(int256 x); /// @notice Emitted when the calculating the square root overflows SD59x18. error PRBMathSD59x18__SqrtOverflow(int256 x); /// @notice Emitted when addition overflows UD60x18. error PRBMathUD60x18__AddOverflow(uint256 x, uint256 y); /// @notice Emitted when ceiling a number overflows UD60x18. error PRBMathUD60x18__CeilOverflow(uint256 x); /// @notice Emitted when the input is greater than 133.084258667509499441. error PRBMathUD60x18__ExpInputTooBig(uint256 x); /// @notice Emitted when the input is greater than 192. error PRBMathUD60x18__Exp2InputTooBig(uint256 x); /// @notice Emitted when converting a basic integer to the fixed-point format format overflows UD60x18. error PRBMathUD60x18__FromUintOverflow(uint256 x); /// @notice Emitted when multiplying the inputs overflows UD60x18. error PRBMathUD60x18__GmOverflow(uint256 x, uint256 y); /// @notice Emitted when the input is less than 1. error PRBMathUD60x18__LogInputTooSmall(uint256 x); /// @notice Emitted when the calculating the square root overflows UD60x18. error PRBMathUD60x18__SqrtOverflow(uint256 x); /// @notice Emitted when subtraction underflows UD60x18. error PRBMathUD60x18__SubUnderflow(uint256 x, uint256 y); /// @dev Common mathematical functions used in both PRBMathSD59x18 and PRBMathUD60x18. Note that this shared library /// does not always assume the signed 59.18-decimal fixed-point or the unsigned 60.18-decimal fixed-point /// representation. When it does not, it is explicitly mentioned in the NatSpec documentation. library PRBMath { /// STRUCTS /// struct SD59x18 { int256 value; } struct UD60x18 { uint256 value; } /// STORAGE /// /// @dev How many trailing decimals can be represented. uint256 internal constant SCALE = 1e18; /// @dev Largest power of two divisor of SCALE. uint256 internal constant SCALE_LPOTD = 262144; /// @dev SCALE inverted mod 2^256. uint256 internal constant SCALE_INVERSE = 78156646155174841979727994598816262306175212592076161876661_508869554232690281; /// FUNCTIONS /// /// @notice Calculates the binary exponent of x using the binary fraction method. /// @dev Has to use 192.64-bit fixed-point numbers. /// See https://ethereum.stackexchange.com/a/96594/24693. /// @param x The exponent as an unsigned 192.64-bit fixed-point number. /// @return result The result as an unsigned 60.18-decimal fixed-point number. function exp2(uint256 x) internal pure returns (uint256 result) { unchecked { // Start from 0.5 in the 192.64-bit fixed-point format. result = 0x800000000000000000000000000000000000000000000000; // Multiply the result by root(2, 2^-i) when the bit at position i is 1. None of the intermediary results overflows // because the initial result is 2^191 and all magic factors are less than 2^65. if (x & 0x8000000000000000 > 0) { result = (result * 0x16A09E667F3BCC909) >> 64; } if (x & 0x4000000000000000 > 0) { result = (result * 0x1306FE0A31B7152DF) >> 64; } if (x & 0x2000000000000000 > 0) { result = (result * 0x1172B83C7D517ADCE) >> 64; } if (x & 0x1000000000000000 > 0) { result = (result * 0x10B5586CF9890F62A) >> 64; } if (x & 0x800000000000000 > 0) { result = (result * 0x1059B0D31585743AE) >> 64; } if (x & 0x400000000000000 > 0) { result = (result * 0x102C9A3E778060EE7) >> 64; } if (x & 0x200000000000000 > 0) { result = (result * 0x10163DA9FB33356D8) >> 64; } if (x & 0x100000000000000 > 0) { result = (result * 0x100B1AFA5ABCBED61) >> 64; } if (x & 0x80000000000000 > 0) { result = (result * 0x10058C86DA1C09EA2) >> 64; } if (x & 0x40000000000000 > 0) { result = (result * 0x1002C605E2E8CEC50) >> 64; } if (x & 0x20000000000000 > 0) { result = (result * 0x100162F3904051FA1) >> 64; } if (x & 0x10000000000000 > 0) { result = (result * 0x1000B175EFFDC76BA) >> 64; } if (x & 0x8000000000000 > 0) { result = (result * 0x100058BA01FB9F96D) >> 64; } if (x & 0x4000000000000 > 0) { result = (result * 0x10002C5CC37DA9492) >> 64; } if (x & 0x2000000000000 > 0) { result = (result * 0x1000162E525EE0547) >> 64; } if (x & 0x1000000000000 > 0) { result = (result * 0x10000B17255775C04) >> 64; } if (x & 0x800000000000 > 0) { result = (result * 0x1000058B91B5BC9AE) >> 64; } if (x & 0x400000000000 > 0) { result = (result * 0x100002C5C89D5EC6D) >> 64; } if (x & 0x200000000000 > 0) { result = (result * 0x10000162E43F4F831) >> 64; } if (x & 0x100000000000 > 0) { result = (result * 0x100000B1721BCFC9A) >> 64; } if (x & 0x80000000000 > 0) { result = (result * 0x10000058B90CF1E6E) >> 64; } if (x & 0x40000000000 > 0) { result = (result * 0x1000002C5C863B73F) >> 64; } if (x & 0x20000000000 > 0) { result = (result * 0x100000162E430E5A2) >> 64; } if (x & 0x10000000000 > 0) { result = (result * 0x1000000B172183551) >> 64; } if (x & 0x8000000000 > 0) { result = (result * 0x100000058B90C0B49) >> 64; } if (x & 0x4000000000 > 0) { result = (result * 0x10000002C5C8601CC) >> 64; } if (x & 0x2000000000 > 0) { result = (result * 0x1000000162E42FFF0) >> 64; } if (x & 0x1000000000 > 0) { result = (result * 0x10000000B17217FBB) >> 64; } if (x & 0x800000000 > 0) { result = (result * 0x1000000058B90BFCE) >> 64; } if (x & 0x400000000 > 0) { result = (result * 0x100000002C5C85FE3) >> 64; } if (x & 0x200000000 > 0) { result = (result * 0x10000000162E42FF1) >> 64; } if (x & 0x100000000 > 0) { result = (result * 0x100000000B17217F8) >> 64; } if (x & 0x80000000 > 0) { result = (result * 0x10000000058B90BFC) >> 64; } if (x & 0x40000000 > 0) { result = (result * 0x1000000002C5C85FE) >> 64; } if (x & 0x20000000 > 0) { result = (result * 0x100000000162E42FF) >> 64; } if (x & 0x10000000 > 0) { result = (result * 0x1000000000B17217F) >> 64; } if (x & 0x8000000 > 0) { result = (result * 0x100000000058B90C0) >> 64; } if (x & 0x4000000 > 0) { result = (result * 0x10000000002C5C860) >> 64; } if (x & 0x2000000 > 0) { result = (result * 0x1000000000162E430) >> 64; } if (x & 0x1000000 > 0) { result = (result * 0x10000000000B17218) >> 64; } if (x & 0x800000 > 0) { result = (result * 0x1000000000058B90C) >> 64; } if (x & 0x400000 > 0) { result = (result * 0x100000000002C5C86) >> 64; } if (x & 0x200000 > 0) { result = (result * 0x10000000000162E43) >> 64; } if (x & 0x100000 > 0) { result = (result * 0x100000000000B1721) >> 64; } if (x & 0x80000 > 0) { result = (result * 0x10000000000058B91) >> 64; } if (x & 0x40000 > 0) { result = (result * 0x1000000000002C5C8) >> 64; } if (x & 0x20000 > 0) { result = (result * 0x100000000000162E4) >> 64; } if (x & 0x10000 > 0) { result = (result * 0x1000000000000B172) >> 64; } if (x & 0x8000 > 0) { result = (result * 0x100000000000058B9) >> 64; } if (x & 0x4000 > 0) { result = (result * 0x10000000000002C5D) >> 64; } if (x & 0x2000 > 0) { result = (result * 0x1000000000000162E) >> 64; } if (x & 0x1000 > 0) { result = (result * 0x10000000000000B17) >> 64; } if (x & 0x800 > 0) { result = (result * 0x1000000000000058C) >> 64; } if (x & 0x400 > 0) { result = (result * 0x100000000000002C6) >> 64; } if (x & 0x200 > 0) { result = (result * 0x10000000000000163) >> 64; } if (x & 0x100 > 0) { result = (result * 0x100000000000000B1) >> 64; } if (x & 0x80 > 0) { result = (result * 0x10000000000000059) >> 64; } if (x & 0x40 > 0) { result = (result * 0x1000000000000002C) >> 64; } if (x & 0x20 > 0) { result = (result * 0x10000000000000016) >> 64; } if (x & 0x10 > 0) { result = (result * 0x1000000000000000B) >> 64; } if (x & 0x8 > 0) { result = (result * 0x10000000000000006) >> 64; } if (x & 0x4 > 0) { result = (result * 0x10000000000000003) >> 64; } if (x & 0x2 > 0) { result = (result * 0x10000000000000001) >> 64; } if (x & 0x1 > 0) { result = (result * 0x10000000000000001) >> 64; } // We're doing two things at the same time: // // 1. Multiply the result by 2^n + 1, where "2^n" is the integer part and the one is added to account for // the fact that we initially set the result to 0.5. This is accomplished by subtracting from 191 // rather than 192. // 2. Convert the result to the unsigned 60.18-decimal fixed-point format. // // This works because 2^(191-ip) = 2^ip / 2^191, where "ip" is the integer part "2^n". result *= SCALE; result >>= (191 - (x >> 64)); } } /// @notice Finds the zero-based index of the first one in the binary representation of x. /// @dev See the note on msb in the "Find First Set" Wikipedia article https://en.wikipedia.org/wiki/Find_first_set /// @param x The uint256 number for which to find the index of the most significant bit. /// @return msb The index of the most significant bit as an uint256. function mostSignificantBit(uint256 x) internal pure returns (uint256 msb) { if (x >= 2**128) { x >>= 128; msb += 128; } if (x >= 2**64) { x >>= 64; msb += 64; } if (x >= 2**32) { x >>= 32; msb += 32; } if (x >= 2**16) { x >>= 16; msb += 16; } if (x >= 2**8) { x >>= 8; msb += 8; } if (x >= 2**4) { x >>= 4; msb += 4; } if (x >= 2**2) { x >>= 2; msb += 2; } if (x >= 2**1) { // No need to shift x any more. msb += 1; } } /// @notice Calculates floor(x*y÷denominator) with full precision. /// /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv. /// /// Requirements: /// - The denominator cannot be zero. /// - The result must fit within uint256. /// /// Caveats: /// - This function does not work with fixed-point numbers. /// /// @param x The multiplicand as an uint256. /// @param y The multiplier as an uint256. /// @param denominator The divisor as an uint256. /// @return result The result as an uint256. function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { unchecked { result = prod0 / denominator; } return result; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (prod1 >= denominator) { revert PRBMath__MulDivOverflow(prod1, denominator); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. unchecked { // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 lpotdod = denominator & (~denominator + 1); assembly { // Divide denominator by lpotdod. denominator := div(denominator, lpotdod) // Divide [prod1 prod0] by lpotdod. prod0 := div(prod0, lpotdod) // Flip lpotdod such that it is 2^256 / lpotdod. If lpotdod is zero, then it becomes one. lpotdod := add(div(sub(0, lpotdod), lpotdod), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * lpotdod; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /// @notice Calculates floor(x*y÷1e18) with full precision. /// /// @dev Variant of "mulDiv" with constant folding, i.e. in which the denominator is always 1e18. Before returning the /// final result, we add 1 if (x * y) % SCALE >= HALF_SCALE. Without this, 6.6e-19 would be truncated to 0 instead of /// being rounded to 1e-18. See "Listing 6" and text above it at https://accu.org/index.php/journals/1717. /// /// Requirements: /// - The result must fit within uint256. /// /// Caveats: /// - The body is purposely left uncommented; see the NatSpec comments in "PRBMath.mulDiv" to understand how this works. /// - It is assumed that the result can never be type(uint256).max when x and y solve the following two equations: /// 1. x * y = type(uint256).max * SCALE /// 2. (x * y) % SCALE >= SCALE / 2 /// /// @param x The multiplicand as an unsigned 60.18-decimal fixed-point number. /// @param y The multiplier as an unsigned 60.18-decimal fixed-point number. /// @return result The result as an unsigned 60.18-decimal fixed-point number. function mulDivFixedPoint(uint256 x, uint256 y) internal pure returns (uint256 result) { uint256 prod0; uint256 prod1; assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } if (prod1 >= SCALE) { revert PRBMath__MulDivFixedPointOverflow(prod1); } uint256 remainder; uint256 roundUpUnit; assembly { remainder := mulmod(x, y, SCALE) roundUpUnit := gt(remainder, 499999999999999999) } if (prod1 == 0) { unchecked { result = (prod0 / SCALE) + roundUpUnit; return result; } } assembly { result := add( mul( or( div(sub(prod0, remainder), SCALE_LPOTD), mul(sub(prod1, gt(remainder, prod0)), add(div(sub(0, SCALE_LPOTD), SCALE_LPOTD), 1)) ), SCALE_INVERSE ), roundUpUnit ) } } /// @notice Calculates floor(x*y÷denominator) with full precision. /// /// @dev An extension of "mulDiv" for signed numbers. Works by computing the signs and the absolute values separately. /// /// Requirements: /// - None of the inputs can be type(int256).min. /// - The result must fit within int256. /// /// @param x The multiplicand as an int256. /// @param y The multiplier as an int256. /// @param denominator The divisor as an int256. /// @return result The result as an int256. function mulDivSigned( int256 x, int256 y, int256 denominator ) internal pure returns (int256 result) { if (x == type(int256).min || y == type(int256).min || denominator == type(int256).min) { revert PRBMath__MulDivSignedInputTooSmall(); } // Get hold of the absolute values of x, y and the denominator. uint256 ax; uint256 ay; uint256 ad; unchecked { ax = x < 0 ? uint256(-x) : uint256(x); ay = y < 0 ? uint256(-y) : uint256(y); ad = denominator < 0 ? uint256(-denominator) : uint256(denominator); } // Compute the absolute value of (x*y)÷denominator. The result must fit within int256. uint256 rAbs = mulDiv(ax, ay, ad); if (rAbs > uint256(type(int256).max)) { revert PRBMath__MulDivSignedOverflow(rAbs); } // Get the signs of x, y and the denominator. uint256 sx; uint256 sy; uint256 sd; assembly { sx := sgt(x, sub(0, 1)) sy := sgt(y, sub(0, 1)) sd := sgt(denominator, sub(0, 1)) } // XOR over sx, sy and sd. This is checking whether there are one or three negative signs in the inputs. // If yes, the result should be negative. result = sx ^ sy ^ sd == 0 ? -int256(rAbs) : int256(rAbs); } /// @notice Calculates the square root of x, rounding down. /// @dev Uses the Babylonian method https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method. /// /// Caveats: /// - This function does not work with fixed-point numbers. /// /// @param x The uint256 number for which to calculate the square root. /// @return result The result as an uint256. function sqrt(uint256 x) internal pure returns (uint256 result) { if (x == 0) { return 0; } // Set the initial guess to the closest power of two that is higher than x. uint256 xAux = uint256(x); result = 1; if (xAux >= 0x100000000000000000000000000000000) { xAux >>= 128; result <<= 64; } if (xAux >= 0x10000000000000000) { xAux >>= 64; result <<= 32; } if (xAux >= 0x100000000) { xAux >>= 32; result <<= 16; } if (xAux >= 0x10000) { xAux >>= 16; result <<= 8; } if (xAux >= 0x100) { xAux >>= 8; result <<= 4; } if (xAux >= 0x10) { xAux >>= 4; result <<= 2; } if (xAux >= 0x8) { result <<= 1; } // The operations can never overflow because the result is max 2^127 when it enters this block. unchecked { result = (result + x / result) >> 1; result = (result + x / result) >> 1; result = (result + x / result) >> 1; result = (result + x / result) >> 1; result = (result + x / result) >> 1; result = (result + x / result) >> 1; result = (result + x / result) >> 1; // Seven iterations should be enough uint256 roundedDownResult = x / result; return result >= roundedDownResult ? roundedDownResult : result; } } }
{ "evmVersion": "berlin", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 10000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IJBOperatorStore","name":"_operatorStore","type":"address"},{"internalType":"contract IJBProjects","name":"_projects","type":"address"},{"internalType":"contract IJBDirectory","name":"_directory","type":"address"},{"internalType":"contract IJBFundingCycleStore","name":"_fundingCycleStore","type":"address"},{"internalType":"contract IJBTokenStore","name":"_tokenStore","type":"address"},{"internalType":"contract IJBSplitsStore","name":"_splitsStore","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BURN_PAUSED_AND_SENDER_NOT_VALID_TERMINAL_DELEGATE","type":"error"},{"inputs":[],"name":"CANT_MIGRATE_TO_CURRENT_CONTROLLER","type":"error"},{"inputs":[],"name":"CHANGE_TOKEN_NOT_ALLOWED","type":"error"},{"inputs":[],"name":"FUNDING_CYCLE_ALREADY_LAUNCHED","type":"error"},{"inputs":[],"name":"INVALID_BALLOT_REDEMPTION_RATE","type":"error"},{"inputs":[],"name":"INVALID_DISTRIBUTION_LIMIT","type":"error"},{"inputs":[],"name":"INVALID_DISTRIBUTION_LIMIT_CURRENCY","type":"error"},{"inputs":[],"name":"INVALID_OVERFLOW_ALLOWANCE","type":"error"},{"inputs":[],"name":"INVALID_OVERFLOW_ALLOWANCE_CURRENCY","type":"error"},{"inputs":[],"name":"INVALID_REDEMPTION_RATE","type":"error"},{"inputs":[],"name":"INVALID_RESERVED_RATE","type":"error"},{"inputs":[],"name":"MIGRATION_NOT_ALLOWED","type":"error"},{"inputs":[],"name":"MINT_NOT_ALLOWED_AND_NOT_TERMINAL_DELEGATE","type":"error"},{"inputs":[],"name":"NOT_CURRENT_CONTROLLER","type":"error"},{"inputs":[],"name":"NO_BURNABLE_TOKENS","type":"error"},{"inputs":[{"internalType":"uint256","name":"prod1","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"PRBMath__MulDivOverflow","type":"error"},{"inputs":[],"name":"UNAUTHORIZED","type":"error"},{"inputs":[],"name":"ZERO_TOKENS_TO_MINT","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"holder","type":"address"},{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenCount","type":"uint256"},{"indexed":false,"internalType":"string","name":"memo","type":"string"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"BurnTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fundingCycleConfiguration","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"fundingCycleNumber","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":false,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenCount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"beneficiaryTokenCount","type":"uint256"},{"indexed":false,"internalType":"string","name":"memo","type":"string"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"DistributeReservedTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"domain","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"group","type":"uint256"},{"components":[{"internalType":"bool","name":"preferClaimed","type":"bool"},{"internalType":"bool","name":"preferAddToBalance","type":"bool"},{"internalType":"uint256","name":"percent","type":"uint256"},{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"address payable","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"lockedUntil","type":"uint256"},{"internalType":"contract IJBSplitAllocator","name":"allocator","type":"address"}],"indexed":false,"internalType":"struct JBSplit","name":"split","type":"tuple"},{"indexed":false,"internalType":"uint256","name":"tokenCount","type":"uint256"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"DistributeToReservedTokenSplit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"configuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":false,"internalType":"string","name":"memo","type":"string"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"LaunchFundingCycles","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"configuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":false,"internalType":"string","name":"memo","type":"string"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"LaunchProject","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":false,"internalType":"contract IJBMigratable","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"Migrate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenCount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"beneficiaryTokenCount","type":"uint256"},{"indexed":false,"internalType":"string","name":"memo","type":"string"},{"indexed":false,"internalType":"uint256","name":"reservedRate","type":"uint256"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"MintTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"PrepMigration","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"configuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":false,"internalType":"string","name":"memo","type":"string"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"ReconfigureFundingCycles","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fundingCycleConfiguration","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"fundingCycleNumber","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"components":[{"internalType":"contract IJBPaymentTerminal","name":"terminal","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"distributionLimit","type":"uint256"},{"internalType":"uint256","name":"distributionLimitCurrency","type":"uint256"},{"internalType":"uint256","name":"overflowAllowance","type":"uint256"},{"internalType":"uint256","name":"overflowAllowanceCurrency","type":"uint256"}],"indexed":false,"internalType":"struct JBFundAccessConstraints","name":"constraints","type":"tuple"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"SetFundAccessConstraints","type":"event"},{"inputs":[{"internalType":"address","name":"_holder","type":"address"},{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_tokenCount","type":"uint256"},{"internalType":"string","name":"_memo","type":"string"},{"internalType":"bool","name":"_preferClaimedTokens","type":"bool"}],"name":"burnTokensOf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"contract IJBToken","name":"_token","type":"address"},{"internalType":"address","name":"_newOwner","type":"address"}],"name":"changeTokenOf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"currentFundingCycleOf","outputs":[{"components":[{"internalType":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"configuration","type":"uint256"},{"internalType":"uint256","name":"basedOn","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"uint256","name":"discountRate","type":"uint256"},{"internalType":"contract IJBFundingCycleBallot","name":"ballot","type":"address"},{"internalType":"uint256","name":"metadata","type":"uint256"}],"internalType":"struct JBFundingCycle","name":"fundingCycle","type":"tuple"},{"components":[{"components":[{"internalType":"bool","name":"allowSetTerminals","type":"bool"},{"internalType":"bool","name":"allowSetController","type":"bool"}],"internalType":"struct JBGlobalFundingCycleMetadata","name":"global","type":"tuple"},{"internalType":"uint256","name":"reservedRate","type":"uint256"},{"internalType":"uint256","name":"redemptionRate","type":"uint256"},{"internalType":"uint256","name":"ballotRedemptionRate","type":"uint256"},{"internalType":"bool","name":"pausePay","type":"bool"},{"internalType":"bool","name":"pauseDistributions","type":"bool"},{"internalType":"bool","name":"pauseRedeem","type":"bool"},{"internalType":"bool","name":"pauseBurn","type":"bool"},{"internalType":"bool","name":"allowMinting","type":"bool"},{"internalType":"bool","name":"allowChangeToken","type":"bool"},{"internalType":"bool","name":"allowTerminalMigration","type":"bool"},{"internalType":"bool","name":"allowControllerMigration","type":"bool"},{"internalType":"bool","name":"holdFees","type":"bool"},{"internalType":"bool","name":"useTotalOverflowForRedemptions","type":"bool"},{"internalType":"bool","name":"useDataSourceForPay","type":"bool"},{"internalType":"bool","name":"useDataSourceForRedeem","type":"bool"},{"internalType":"address","name":"dataSource","type":"address"}],"internalType":"struct JBFundingCycleMetadata","name":"metadata","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"directory","outputs":[{"internalType":"contract IJBDirectory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_memo","type":"string"}],"name":"distributeReservedTokensOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_configuration","type":"uint256"},{"internalType":"contract IJBPaymentTerminal","name":"_terminal","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"distributionLimitOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundingCycleStore","outputs":[{"internalType":"contract IJBFundingCycleStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_configuration","type":"uint256"}],"name":"getFundingCycleOf","outputs":[{"components":[{"internalType":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"configuration","type":"uint256"},{"internalType":"uint256","name":"basedOn","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"uint256","name":"discountRate","type":"uint256"},{"internalType":"contract IJBFundingCycleBallot","name":"ballot","type":"address"},{"internalType":"uint256","name":"metadata","type":"uint256"}],"internalType":"struct JBFundingCycle","name":"fundingCycle","type":"tuple"},{"components":[{"components":[{"internalType":"bool","name":"allowSetTerminals","type":"bool"},{"internalType":"bool","name":"allowSetController","type":"bool"}],"internalType":"struct JBGlobalFundingCycleMetadata","name":"global","type":"tuple"},{"internalType":"uint256","name":"reservedRate","type":"uint256"},{"internalType":"uint256","name":"redemptionRate","type":"uint256"},{"internalType":"uint256","name":"ballotRedemptionRate","type":"uint256"},{"internalType":"bool","name":"pausePay","type":"bool"},{"internalType":"bool","name":"pauseDistributions","type":"bool"},{"internalType":"bool","name":"pauseRedeem","type":"bool"},{"internalType":"bool","name":"pauseBurn","type":"bool"},{"internalType":"bool","name":"allowMinting","type":"bool"},{"internalType":"bool","name":"allowChangeToken","type":"bool"},{"internalType":"bool","name":"allowTerminalMigration","type":"bool"},{"internalType":"bool","name":"allowControllerMigration","type":"bool"},{"internalType":"bool","name":"holdFees","type":"bool"},{"internalType":"bool","name":"useTotalOverflowForRedemptions","type":"bool"},{"internalType":"bool","name":"useDataSourceForPay","type":"bool"},{"internalType":"bool","name":"useDataSourceForRedeem","type":"bool"},{"internalType":"address","name":"dataSource","type":"address"}],"internalType":"struct JBFundingCycleMetadata","name":"metadata","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"issueTokenFor","outputs":[{"internalType":"contract IJBToken","name":"token","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"latestConfiguredFundingCycleOf","outputs":[{"components":[{"internalType":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"configuration","type":"uint256"},{"internalType":"uint256","name":"basedOn","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"uint256","name":"discountRate","type":"uint256"},{"internalType":"contract IJBFundingCycleBallot","name":"ballot","type":"address"},{"internalType":"uint256","name":"metadata","type":"uint256"}],"internalType":"struct JBFundingCycle","name":"fundingCycle","type":"tuple"},{"components":[{"components":[{"internalType":"bool","name":"allowSetTerminals","type":"bool"},{"internalType":"bool","name":"allowSetController","type":"bool"}],"internalType":"struct JBGlobalFundingCycleMetadata","name":"global","type":"tuple"},{"internalType":"uint256","name":"reservedRate","type":"uint256"},{"internalType":"uint256","name":"redemptionRate","type":"uint256"},{"internalType":"uint256","name":"ballotRedemptionRate","type":"uint256"},{"internalType":"bool","name":"pausePay","type":"bool"},{"internalType":"bool","name":"pauseDistributions","type":"bool"},{"internalType":"bool","name":"pauseRedeem","type":"bool"},{"internalType":"bool","name":"pauseBurn","type":"bool"},{"internalType":"bool","name":"allowMinting","type":"bool"},{"internalType":"bool","name":"allowChangeToken","type":"bool"},{"internalType":"bool","name":"allowTerminalMigration","type":"bool"},{"internalType":"bool","name":"allowControllerMigration","type":"bool"},{"internalType":"bool","name":"holdFees","type":"bool"},{"internalType":"bool","name":"useTotalOverflowForRedemptions","type":"bool"},{"internalType":"bool","name":"useDataSourceForPay","type":"bool"},{"internalType":"bool","name":"useDataSourceForRedeem","type":"bool"},{"internalType":"address","name":"dataSource","type":"address"}],"internalType":"struct JBFundingCycleMetadata","name":"metadata","type":"tuple"},{"internalType":"enum JBBallotState","name":"ballotState","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"components":[{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"uint256","name":"discountRate","type":"uint256"},{"internalType":"contract IJBFundingCycleBallot","name":"ballot","type":"address"}],"internalType":"struct JBFundingCycleData","name":"_data","type":"tuple"},{"components":[{"components":[{"internalType":"bool","name":"allowSetTerminals","type":"bool"},{"internalType":"bool","name":"allowSetController","type":"bool"}],"internalType":"struct JBGlobalFundingCycleMetadata","name":"global","type":"tuple"},{"internalType":"uint256","name":"reservedRate","type":"uint256"},{"internalType":"uint256","name":"redemptionRate","type":"uint256"},{"internalType":"uint256","name":"ballotRedemptionRate","type":"uint256"},{"internalType":"bool","name":"pausePay","type":"bool"},{"internalType":"bool","name":"pauseDistributions","type":"bool"},{"internalType":"bool","name":"pauseRedeem","type":"bool"},{"internalType":"bool","name":"pauseBurn","type":"bool"},{"internalType":"bool","name":"allowMinting","type":"bool"},{"internalType":"bool","name":"allowChangeToken","type":"bool"},{"internalType":"bool","name":"allowTerminalMigration","type":"bool"},{"internalType":"bool","name":"allowControllerMigration","type":"bool"},{"internalType":"bool","name":"holdFees","type":"bool"},{"internalType":"bool","name":"useTotalOverflowForRedemptions","type":"bool"},{"internalType":"bool","name":"useDataSourceForPay","type":"bool"},{"internalType":"bool","name":"useDataSourceForRedeem","type":"bool"},{"internalType":"address","name":"dataSource","type":"address"}],"internalType":"struct JBFundingCycleMetadata","name":"_metadata","type":"tuple"},{"internalType":"uint256","name":"_mustStartAtOrAfter","type":"uint256"},{"components":[{"internalType":"uint256","name":"group","type":"uint256"},{"components":[{"internalType":"bool","name":"preferClaimed","type":"bool"},{"internalType":"bool","name":"preferAddToBalance","type":"bool"},{"internalType":"uint256","name":"percent","type":"uint256"},{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"address payable","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"lockedUntil","type":"uint256"},{"internalType":"contract IJBSplitAllocator","name":"allocator","type":"address"}],"internalType":"struct JBSplit[]","name":"splits","type":"tuple[]"}],"internalType":"struct JBGroupedSplits[]","name":"_groupedSplits","type":"tuple[]"},{"components":[{"internalType":"contract IJBPaymentTerminal","name":"terminal","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"distributionLimit","type":"uint256"},{"internalType":"uint256","name":"distributionLimitCurrency","type":"uint256"},{"internalType":"uint256","name":"overflowAllowance","type":"uint256"},{"internalType":"uint256","name":"overflowAllowanceCurrency","type":"uint256"}],"internalType":"struct JBFundAccessConstraints[]","name":"_fundAccessConstraints","type":"tuple[]"},{"internalType":"contract IJBPaymentTerminal[]","name":"_terminals","type":"address[]"},{"internalType":"string","name":"_memo","type":"string"}],"name":"launchFundingCyclesFor","outputs":[{"internalType":"uint256","name":"configuration","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"components":[{"internalType":"string","name":"content","type":"string"},{"internalType":"uint256","name":"domain","type":"uint256"}],"internalType":"struct JBProjectMetadata","name":"_projectMetadata","type":"tuple"},{"components":[{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"uint256","name":"discountRate","type":"uint256"},{"internalType":"contract IJBFundingCycleBallot","name":"ballot","type":"address"}],"internalType":"struct JBFundingCycleData","name":"_data","type":"tuple"},{"components":[{"components":[{"internalType":"bool","name":"allowSetTerminals","type":"bool"},{"internalType":"bool","name":"allowSetController","type":"bool"}],"internalType":"struct JBGlobalFundingCycleMetadata","name":"global","type":"tuple"},{"internalType":"uint256","name":"reservedRate","type":"uint256"},{"internalType":"uint256","name":"redemptionRate","type":"uint256"},{"internalType":"uint256","name":"ballotRedemptionRate","type":"uint256"},{"internalType":"bool","name":"pausePay","type":"bool"},{"internalType":"bool","name":"pauseDistributions","type":"bool"},{"internalType":"bool","name":"pauseRedeem","type":"bool"},{"internalType":"bool","name":"pauseBurn","type":"bool"},{"internalType":"bool","name":"allowMinting","type":"bool"},{"internalType":"bool","name":"allowChangeToken","type":"bool"},{"internalType":"bool","name":"allowTerminalMigration","type":"bool"},{"internalType":"bool","name":"allowControllerMigration","type":"bool"},{"internalType":"bool","name":"holdFees","type":"bool"},{"internalType":"bool","name":"useTotalOverflowForRedemptions","type":"bool"},{"internalType":"bool","name":"useDataSourceForPay","type":"bool"},{"internalType":"bool","name":"useDataSourceForRedeem","type":"bool"},{"internalType":"address","name":"dataSource","type":"address"}],"internalType":"struct JBFundingCycleMetadata","name":"_metadata","type":"tuple"},{"internalType":"uint256","name":"_mustStartAtOrAfter","type":"uint256"},{"components":[{"internalType":"uint256","name":"group","type":"uint256"},{"components":[{"internalType":"bool","name":"preferClaimed","type":"bool"},{"internalType":"bool","name":"preferAddToBalance","type":"bool"},{"internalType":"uint256","name":"percent","type":"uint256"},{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"address payable","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"lockedUntil","type":"uint256"},{"internalType":"contract IJBSplitAllocator","name":"allocator","type":"address"}],"internalType":"struct JBSplit[]","name":"splits","type":"tuple[]"}],"internalType":"struct JBGroupedSplits[]","name":"_groupedSplits","type":"tuple[]"},{"components":[{"internalType":"contract IJBPaymentTerminal","name":"terminal","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"distributionLimit","type":"uint256"},{"internalType":"uint256","name":"distributionLimitCurrency","type":"uint256"},{"internalType":"uint256","name":"overflowAllowance","type":"uint256"},{"internalType":"uint256","name":"overflowAllowanceCurrency","type":"uint256"}],"internalType":"struct JBFundAccessConstraints[]","name":"_fundAccessConstraints","type":"tuple[]"},{"internalType":"contract IJBPaymentTerminal[]","name":"_terminals","type":"address[]"},{"internalType":"string","name":"_memo","type":"string"}],"name":"launchProjectFor","outputs":[{"internalType":"uint256","name":"projectId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"contract IJBMigratable","name":"_to","type":"address"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_tokenCount","type":"uint256"},{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"string","name":"_memo","type":"string"},{"internalType":"bool","name":"_preferClaimedTokens","type":"bool"},{"internalType":"bool","name":"_useReservedRate","type":"bool"}],"name":"mintTokensOf","outputs":[{"internalType":"uint256","name":"beneficiaryTokenCount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operatorStore","outputs":[{"internalType":"contract IJBOperatorStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_configuration","type":"uint256"},{"internalType":"contract IJBPaymentTerminal","name":"_terminal","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"overflowAllowanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address","name":"_from","type":"address"}],"name":"prepForMigrationOf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"projects","outputs":[{"internalType":"contract IJBProjects","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"queuedFundingCycleOf","outputs":[{"components":[{"internalType":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"configuration","type":"uint256"},{"internalType":"uint256","name":"basedOn","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"uint256","name":"discountRate","type":"uint256"},{"internalType":"contract IJBFundingCycleBallot","name":"ballot","type":"address"},{"internalType":"uint256","name":"metadata","type":"uint256"}],"internalType":"struct JBFundingCycle","name":"fundingCycle","type":"tuple"},{"components":[{"components":[{"internalType":"bool","name":"allowSetTerminals","type":"bool"},{"internalType":"bool","name":"allowSetController","type":"bool"}],"internalType":"struct JBGlobalFundingCycleMetadata","name":"global","type":"tuple"},{"internalType":"uint256","name":"reservedRate","type":"uint256"},{"internalType":"uint256","name":"redemptionRate","type":"uint256"},{"internalType":"uint256","name":"ballotRedemptionRate","type":"uint256"},{"internalType":"bool","name":"pausePay","type":"bool"},{"internalType":"bool","name":"pauseDistributions","type":"bool"},{"internalType":"bool","name":"pauseRedeem","type":"bool"},{"internalType":"bool","name":"pauseBurn","type":"bool"},{"internalType":"bool","name":"allowMinting","type":"bool"},{"internalType":"bool","name":"allowChangeToken","type":"bool"},{"internalType":"bool","name":"allowTerminalMigration","type":"bool"},{"internalType":"bool","name":"allowControllerMigration","type":"bool"},{"internalType":"bool","name":"holdFees","type":"bool"},{"internalType":"bool","name":"useTotalOverflowForRedemptions","type":"bool"},{"internalType":"bool","name":"useDataSourceForPay","type":"bool"},{"internalType":"bool","name":"useDataSourceForRedeem","type":"bool"},{"internalType":"address","name":"dataSource","type":"address"}],"internalType":"struct JBFundingCycleMetadata","name":"metadata","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"components":[{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"uint256","name":"discountRate","type":"uint256"},{"internalType":"contract IJBFundingCycleBallot","name":"ballot","type":"address"}],"internalType":"struct JBFundingCycleData","name":"_data","type":"tuple"},{"components":[{"components":[{"internalType":"bool","name":"allowSetTerminals","type":"bool"},{"internalType":"bool","name":"allowSetController","type":"bool"}],"internalType":"struct JBGlobalFundingCycleMetadata","name":"global","type":"tuple"},{"internalType":"uint256","name":"reservedRate","type":"uint256"},{"internalType":"uint256","name":"redemptionRate","type":"uint256"},{"internalType":"uint256","name":"ballotRedemptionRate","type":"uint256"},{"internalType":"bool","name":"pausePay","type":"bool"},{"internalType":"bool","name":"pauseDistributions","type":"bool"},{"internalType":"bool","name":"pauseRedeem","type":"bool"},{"internalType":"bool","name":"pauseBurn","type":"bool"},{"internalType":"bool","name":"allowMinting","type":"bool"},{"internalType":"bool","name":"allowChangeToken","type":"bool"},{"internalType":"bool","name":"allowTerminalMigration","type":"bool"},{"internalType":"bool","name":"allowControllerMigration","type":"bool"},{"internalType":"bool","name":"holdFees","type":"bool"},{"internalType":"bool","name":"useTotalOverflowForRedemptions","type":"bool"},{"internalType":"bool","name":"useDataSourceForPay","type":"bool"},{"internalType":"bool","name":"useDataSourceForRedeem","type":"bool"},{"internalType":"address","name":"dataSource","type":"address"}],"internalType":"struct JBFundingCycleMetadata","name":"_metadata","type":"tuple"},{"internalType":"uint256","name":"_mustStartAtOrAfter","type":"uint256"},{"components":[{"internalType":"uint256","name":"group","type":"uint256"},{"components":[{"internalType":"bool","name":"preferClaimed","type":"bool"},{"internalType":"bool","name":"preferAddToBalance","type":"bool"},{"internalType":"uint256","name":"percent","type":"uint256"},{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"address payable","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"lockedUntil","type":"uint256"},{"internalType":"contract IJBSplitAllocator","name":"allocator","type":"address"}],"internalType":"struct JBSplit[]","name":"splits","type":"tuple[]"}],"internalType":"struct JBGroupedSplits[]","name":"_groupedSplits","type":"tuple[]"},{"components":[{"internalType":"contract IJBPaymentTerminal","name":"terminal","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"distributionLimit","type":"uint256"},{"internalType":"uint256","name":"distributionLimitCurrency","type":"uint256"},{"internalType":"uint256","name":"overflowAllowance","type":"uint256"},{"internalType":"uint256","name":"overflowAllowanceCurrency","type":"uint256"}],"internalType":"struct JBFundAccessConstraints[]","name":"_fundAccessConstraints","type":"tuple[]"},{"internalType":"string","name":"_memo","type":"string"}],"name":"reconfigureFundingCyclesOf","outputs":[{"internalType":"uint256","name":"configuration","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_reservedRate","type":"uint256"}],"name":"reservedTokenBalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"splitsStore","outputs":[{"internalType":"contract IJBSplitsStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenStore","outputs":[{"internalType":"contract IJBTokenStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_reservedRate","type":"uint256"}],"name":"totalOutstandingTokensOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6101406040523480156200001257600080fd5b5060405162005eb138038062005eb1833981016040819052620000359162000076565b6001600160601b0319606096871b811660805294861b851660a05292851b84166101205290841b831660c052831b821660e05290911b166101005262000123565b60008060008060008060c087890312156200009057600080fd5b86516200009d816200010a565b6020880151909650620000b0816200010a565b6040880151909550620000c3816200010a565b6060880151909450620000d6816200010a565b6080880151909350620000e9816200010a565b60a0880151909250620000fc816200010a565b809150509295509295509295565b6001600160a01b03811681146200012057600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160601c615bd5620002dc600039600081816104580152818161084801528181610a080152818161106c0152818161132b015281816116780152818161190c0152818161198e01528181611b4e01528181611c5a0152818161204d015261213c0152600081816102400152818161360a0152613b860152600081816102cc01528181610b3d01528181610fad0152818161115601528181611511015281816123090152818161272d015281816128cc015281816129f9015281816131b8015281816133a201528181613c820152613e570152600081816102a5015281816107760152818161093701528181610d1001528181610e9b015281816114170152818161181d01528181611e3401528181611ed80152818161265a0152818161310001526135210152600081816103d101528181610dd9015281816112620152818161175301528181611a8d01528181611f91015281816123f00152818161280c015281816132a80152613d0f01526000818161041e01528181612d5501528181612e2401528181612f3d015261300c0152615bd56000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c80637fc19af5116100ee578063ad007d6311610097578063d101307311610071578063d10130731461047a578063e867c59c1461048d578063e8db2130146104a0578063f033b3b41461050f57600080fd5b8063ad007d6314610419578063b5f1e34d14610440578063c41c2f241461045357600080fd5b80638b79543c116100c85780638b79543c146103cc57806394b63795146103f3578063a40bb9c71461040657600080fd5b80637fc19af5146103935780638776c499146103a65780638ae9c07b146103b957600080fd5b80633e8c615b11610150578063619306301161012a57806361930630146102c75780636d4bae6b146102ee5780637a81b5621461030f57600080fd5b80633e8c615b1461027a578063405b84fa1461028d578063557e7155146102a057600080fd5b80631f510453116101815780631f51045314610206578063229bb824146102285780632bdfe0041461023b57600080fd5b806301ffc9a7146101a857806312b37b14146101d05780631665bc0f146101f1575b600080fd5b6101bb6101b6366004614918565b610522565b60405190151581526020015b60405180910390f35b6101e36101de366004614b0c565b610653565b6040516101c7929190615201565b6102046101ff366004614770565b610804565b005b610219610214366004614b0c565b610bee565b6040516101c79392919061527c565b610204610236366004614b63565b610daa565b6102627f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101c7565b610204610288366004614b3e565b611033565b61020461029b366004614b3e565b611233565b6102627f000000000000000000000000000000000000000000000000000000000000000081565b6102627f000000000000000000000000000000000000000000000000000000000000000081565b6103016102fc366004614d43565b611721565b6040519081526020016101c7565b61037e61031d366004614ee3565b60009384526002602090815260408086209486529381528385206001600160a01b039384168652815283852091909216845290529020547cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81169160e89190911c90565b604080519283526020830191909152016101c7565b6103016103a1366004614646565b611a5a565b6101e36103b4366004614b0c565b611d11565b6103016103c7366004614e53565b611e63565b6102627f000000000000000000000000000000000000000000000000000000000000000081565b610301610401366004614c6b565b6123be565b6101e3610414366004614e31565b612534565b6102627f000000000000000000000000000000000000000000000000000000000000000081565b61030161044e366004614e31565b6126f1565b6102627f000000000000000000000000000000000000000000000000000000000000000081565b610262610488366004614bf1565b6127da565b61030161049b366004614ba5565b612968565b61037e6104ae366004614ee3565b60009384526001602090815260408086209486529381528385206001600160a01b039384168652815283852091909216845290529020547cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81169160e89190911c90565b61030161051d366004614e31565b6129b4565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fe8469c850000000000000000000000000000000000000000000000000000000014806105b557507fffffffff0000000000000000000000000000000000000000000000000000000082167f3e8c615b00000000000000000000000000000000000000000000000000000000145b8061060157507fffffffff0000000000000000000000000000000000000000000000000000000082167fad007d6300000000000000000000000000000000000000000000000000000000145b8061064d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6106ab6040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6040805161026081018252600061022082018181526102408301829052825260208201819052818301819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101408201819052610160820181905261018082018190526101a082018190526101c082018190526101e0820181905261020082015290517f5c550078000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635c550078906024015b6101206040518083038186803b1580156107ba57600080fd5b505afa1580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190614ab1565b91506107fd82612a80565b9050915091565b6040517f6e49181f0000000000000000000000000000000000000000000000000000000081526004810186905233602482015286908690600a906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636e49181f9060440160206040518083038186803b15801561088a57600080fd5b505afa15801561089e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c291906148fb565b6108ce84848484612ceb565b87610905576040517f7b38547b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f43a266c2000000000000000000000000000000000000000000000000000000008152600481018a90526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906343a266c2906024016101206040518083038186803b15801561098257600080fd5b505afa158015610996573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ba9190614ab1565b610100810151909150604b1c6001908116148015610a8c57506040517f6e49181f000000000000000000000000000000000000000000000000000000008152600481018b90523360248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636e49181f9060440160206040518083038186803b158015610a5257600080fd5b505afa158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a91906148fb565b155b15610ac3576040517f78a4871800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008a815260208190526040902054610add908a90615839565b60008b8152602081905260409081902091909155517f906ebd0f0000000000000000000000000000000000000000000000000000000081526001600160a01b038c81166004830152602482018c9052604482018b905287151560648301527f0000000000000000000000000000000000000000000000000000000000000000169063906ebd0f90608401600060405180830381600087803b158015610b8157600080fd5b505af1158015610b95573d6000803e3d6000fd5b50505050898b6001600160a01b03167fdf04e13ee4fcd48a81ab2fd114757093740a3efa9b6475d86e05878b4c59d0798b8b8b33604051610bd99493929190615406565b60405180910390a35050505050505050505050565b610c466040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6040805161026081018252600061022082018181526102408301829052825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290526101e081018290526102008101919091526040517febc8ca1f000000000000000000000000000000000000000000000000000000008152600481018490526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ebc8ca1f906024016101406040518083038186803b158015610d5b57600080fd5b505afa158015610d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d939190614ace565b9093509050610da183612a80565b91509193909250565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e9060240160206040518083038186803b158015610e2357600080fd5b505afa158015610e37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5b9190614629565b836008610e69838383612edd565b6040517f43a266c2000000000000000000000000000000000000000000000000000000008152600481018790526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906343a266c2906024016101206040518083038186803b158015610ee657600080fd5b505afa158015610efa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1e9190614ab1565b610100810151909150604d1c600190811614610f66576040517f2ebc601300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f57e4c778000000000000000000000000000000000000000000000000000000008152600481018890526001600160a01b03878116602483015286811660448301527f000000000000000000000000000000000000000000000000000000000000000016906357e4c77890606401602060405180830381600087803b158015610ff157600080fd5b505af1158015611005573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110299190614629565b5050505050505050565b6040517f5dd8f6aa0000000000000000000000000000000000000000000000000000000081526004810183905230906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635dd8f6aa9060240160206040518083038186803b1580156110ae57600080fd5b505afa1580156110c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e69190614629565b6001600160a01b03161415611127576040517ffc2ce25a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f75b0d9cd000000000000000000000000000000000000000000000000000000008152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906375b0d9cd9060240160206040518083038186803b1580156111a057600080fd5b505afa1580156111b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d89190614b25565b600083815260208181526040918290209290925580516001600160a01b0384168152339281019290925283917ff389f4f5d01fe4903d6a7a63b8790b7bf80d374b6afed808c03795c3b323d4d3910160405180910390a25050565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e9060240160206040518083038186803b1580156112ac57600080fd5b505afa1580156112c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e49190614629565b8260036112f2838383612edd565b6040517f5dd8f6aa0000000000000000000000000000000000000000000000000000000081526004810186905230906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635dd8f6aa9060240160206040518083038186803b15801561136d57600080fd5b505afa158015611381573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a59190614629565b6001600160a01b0316146113e5576040517fe0a0a87d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f43a266c2000000000000000000000000000000000000000000000000000000008152600481018690526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906343a266c2906024016101206040518083038186803b15801561146257600080fd5b505afa158015611476573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149a9190614ab1565b610100810151909150604f1c6001908116146114e2576040517f46ace3f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f75b0d9cd000000000000000000000000000000000000000000000000000000008152600481018790527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906375b0d9cd9060240160206040518083038186803b15801561155b57600080fd5b505afa15801561156f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115939190614b25565b600087815260208190526040902054146115c2576115c086604051806020016040528060008152506130c4565b505b6040517f3e8c615b000000000000000000000000000000000000000000000000000000008152600481018790523060248201526001600160a01b03861690633e8c615b90604401600060405180830381600087803b15801561162357600080fd5b505af1158015611637573d6000803e3d6000fd5b50506040517f714e7f32000000000000000000000000000000000000000000000000000000008152600481018990526001600160a01b0388811660248301527f000000000000000000000000000000000000000000000000000000000000000016925063714e7f329150604401600060405180830381600087803b1580156116be57600080fd5b505af11580156116d2573d6000803e3d6000fd5b5050604080516001600160a01b03891681523360208201528993507f01f954abace731a88ab86e71186040cc2be49fe517ea06bc0d24f25b82b8345692500160405180910390a2505050505050565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018a90526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e9060240160206040518083038186803b15801561179d57600080fd5b505afa1580156117b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d59190614629565b8a60016117e3838383612edd565b6040517f2cee6deb000000000000000000000000000000000000000000000000000000008152600481018e90526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632cee6deb9060240160206040518083038186803b15801561185f57600080fd5b505afa158015611873573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118979190614b25565b11156118cf576040517fffd0bc1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f714e7f32000000000000000000000000000000000000000000000000000000008152600481018e90523060248201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063714e7f3290604401600060405180830381600087803b15801561195057600080fd5b505af1158015611964573d6000803e3d6000fd5b505050506119828d8d8d8d8d8d9061197c91906158c4565b8c613453565b865190945015611a0d577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663821b9fd88e886040518363ffffffff1660e01b81526004016119da9291906153bc565b600060405180830381600087803b1580156119f457600080fd5b505af1158015611a08573d6000803e3d6000fd5b505050505b7f8621c3692c18d8ddd4cd26457d6a3e1d916e7001c4243a6c8dfa862a7e10a823848e8733604051611a42949392919061566d565b60405180910390a15050509998505050505050505050565b6040517f666d87a00000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063666d87a090611ac4908f908f9060040161511f565b602060405180830381600087803b158015611ade57600080fd5b505af1158015611af2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b169190614b25565b6040517f714e7f32000000000000000000000000000000000000000000000000000000008152600481018290523060248201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063714e7f3290604401600060405180830381600087803b158015611b9a57600080fd5b505af1158015611bae573d6000803e3d6000fd5b505050506000611c20828c8c8c8c8c90611bc891906158c4565b8b8b808060200260200160405190810160405280939291908181526020016000905b82821015611c1657611c0760c0830286013681900381019061495a565b81526020019060010190611bea565b5050505050613453565b845190915015611cc4576040517f821b9fd80000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063821b9fd890611c9190859088906004016153bc565b600060405180830381600087803b158015611cab57600080fd5b505af1158015611cbf573d6000803e3d6000fd5b505050505b7ff3e6948ba8b32d557363ea08470121c47c0127659aed09320812174d373afef281838533604051611cf9949392919061566d565b60405180910390a1509b9a5050505050505050505050565b611d696040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6040805161026081018252600061022082018181526102408301829052825260208201819052818301819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101408201819052610160820181905261018082018190526101a082018190526101c082018190526101e0820181905261020082015290517f43a266c2000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906343a266c2906024016107a1565b600086611e9c576040517f9fd13e5400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f43a266c20000000000000000000000000000000000000000000000000000000081526004810189905260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906343a266c2906024016101206040518083038186803b158015611f1b57600080fd5b505afa158015611f2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f539190614ab1565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018c90529091506120f0906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636352211e9060240160206040518083038186803b158015611fd357600080fd5b505afa158015611fe7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200b9190614629565b6040517f6e49181f000000000000000000000000000000000000000000000000000000008152600481018d90523360248201528c906009906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690636e49181f9060440160206040518083038186803b15801561208f57600080fd5b505afa1580156120a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c791906148fb565b806120eb575061010085015160541c6001600160a01b0316336001600160a01b0316145b612ceb565b610100810151604c1c6001908116141580156121c057506040517f6e49181f000000000000000000000000000000000000000000000000000000008152600481018b90523360248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636e49181f9060440160206040518083038186803b15801561218657600080fd5b505afa15801561219a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121be91906148fb565b155b80156121e6575061010081015160541c6001600160a01b0316336001600160a01b031614155b1561221d576040517f9d0ca8fd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83612229576000612237565b61010081015160181c61ffff165b9150506127108114156122725760008981526020819052604090205461225e908990615839565b60008a815260208190526040902055612366565b61228a88612282836127106158ad565b612710613938565b9150806122bb576000898152602081905260409020546122ab9083906157ad565b60008a8152602081905260409020555b6040517fceddd3e40000000000000000000000000000000000000000000000000000000081526001600160a01b038881166004830152602482018b90526044820184905285151560648301527f0000000000000000000000000000000000000000000000000000000000000000169063ceddd3e490608401600060405180830381600087803b15801561234d57600080fd5b505af1158015612361573d6000803e3d6000fd5b505050505b88876001600160a01b03167fe6fee9c572244c0c2238c3112ac12d411750a7ee00eeebd32521c3e5a666c14b8a858a8a87336040516123aa9695949392919061562b565b60405180910390a350979650505050505050565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018b90526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e9060240160206040518083038186803b15801561243a57600080fd5b505afa15801561244e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124729190614629565b8b6001612480838383612edd565b6124e28e8e8e8e8e8e9061249491906158c4565b8d8d808060200260200160405190810160405280939291908181526020016000905b82821015611c16576124d360c0830286013681900381019061495a565b815260200190600101906124b6565b93507f1a08ad37c93969a586fd0605d240c17113b20a9c9ac3847595d0ab425225f6af848f88883360405161251b9594939291906155f0565b60405180910390a15050509a9950505050505050505050565b61258c6040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6040805161026081018252600061022082018181526102408301829052825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290526101e081018290526102008101919091526040517f669e48aa00000000000000000000000000000000000000000000000000000000815260048101859052602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063669e48aa906044016101206040518083038186803b1580156126a557600080fd5b505afa1580156126b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126dd9190614ab1565b91506126e882612a80565b90509250929050565b6040517f75b0d9cd0000000000000000000000000000000000000000000000000000000081526004810183905260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906375b0d9cd9060240160206040518083038186803b15801561276f57600080fd5b505afa158015612783573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127a79190614b25565b600085815260208190526040812054919250906127c5908584613a41565b90506127d18183615821565b95945050505050565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018690526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e9060240160206040518083038186803b15801561285657600080fd5b505afa15801561286a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288e9190614629565b86600761289c838383612edd565b6040517fa7f2a70b0000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a7f2a70b90612909908c908c908c908c908c9060040161543a565b602060405180830381600087803b15801561292357600080fd5b505af1158015612937573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061295b9190614629565b9998505050505050505050565b60006129aa8484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506130c492505050565b90505b9392505050565b6000828152602081905260408082205490517f75b0d9cd000000000000000000000000000000000000000000000000000000008152600481018590526129ad919084907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906375b0d9cd9060240160206040518083038186803b158015612a4357600080fd5b505afa158015612a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7b9190614b25565b613a41565b6040805161026081018252600061022082018181526102408301829052825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290526101e08101829052610200810191909152604051806102200160405280612b2d84613ab2565b815261010084015160209091019060181c61ffff168152602001612b5084613b0a565b8152602001612b5e84613b27565b8152602001612b7a846101000151600160489190911c81161490565b15158152602001612b98846101000151600160499190911c81161490565b15158152602001612bb68461010001516001604a9190911c81161490565b15158152602001612bd48461010001516001604b9190911c81161490565b15158152602001612bf28461010001516001604c9190911c81161490565b15158152602001612c108461010001516001604d9190911c81161490565b15158152602001612c2e8461010001516001604e9190911c81161490565b15158152602001612c4c8461010001516001604f9190911c81161490565b15158152602001612c6a846101000151600160509190911c81161490565b15158152602001612c88846101000151600160519190911c81161490565b15158152602001612ca6846101000151600160529190911c81161490565b15158152602001612cc4846101000151600160539190911c81161490565b15158152602001612cda84610100015160541c90565b6001600160a01b0316905292915050565b80158015612d025750336001600160a01b03851614155b8015612dd157506040517fc161c93f0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03858116602483015260448201859052606482018490527f0000000000000000000000000000000000000000000000000000000000000000169063c161c93f9060840160206040518083038186803b158015612d9757600080fd5b505afa158015612dab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dcf91906148fb565b155b8015612ea057506040517fc161c93f0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03858116602483015260006044830152606482018490527f0000000000000000000000000000000000000000000000000000000000000000169063c161c93f9060840160206040518083038186803b158015612e6657600080fd5b505afa158015612e7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e9e91906148fb565b155b15612ed7576040517f075fd2b100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b336001600160a01b03841614801590612fb957506040517fc161c93f0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03848116602483015260448201849052606482018390527f0000000000000000000000000000000000000000000000000000000000000000169063c161c93f9060840160206040518083038186803b158015612f7f57600080fd5b505afa158015612f93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fb791906148fb565b155b801561308857506040517fc161c93f0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03848116602483015260006044830152606482018390527f0000000000000000000000000000000000000000000000000000000000000000169063c161c93f9060840160206040518083038186803b15801561304e57600080fd5b505afa158015613062573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061308691906148fb565b155b156130bf576040517f075fd2b100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6040517f43a266c20000000000000000000000000000000000000000000000000000000081526004810183905260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906343a266c2906024016101206040518083038186803b15801561314357600080fd5b505afa158015613157573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061317b9190614ab1565b6040517f75b0d9cd000000000000000000000000000000000000000000000000000000008152600481018690529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906375b0d9cd9060240160206040518083038186803b1580156131fa57600080fd5b505afa15801561320e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132329190614b25565b60008681526020819052604090205461010084015191925061325b9160181c61ffff1683613a41565b92506132678382615821565b6000868152602081905260408082209290925590517f6352211e000000000000000000000000000000000000000000000000000000008152600481018790527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e9060240160206040518083038186803b1580156132f257600080fd5b505afa158015613306573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061332a9190614629565b90506000841561334a57613345878560200151600288613b44565b61334d565b60005b905080156133ff576040517fceddd3e40000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820189905260448201839052600060648301527f0000000000000000000000000000000000000000000000000000000000000000169063ceddd3e490608401600060405180830381600087803b1580156133e657600080fd5b505af11580156133fa573d6000803e3d6000fd5b505050505b86846000015185602001517fb12d7a78048433f69fe6d30145bf08aad8e82985b96e4db6d5c6a7e94d57086e8589868c336040516134419594939291906151bd565b60405180910390a45050505092915050565b600061271085604001351115613495576040517f5623289500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612710856060013511156134d5576040517f9db9ee9300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61271085608001351115613515576040517fddbf1bc600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a249d425898961355f61355a368c90038c018c614976565b614063565b896040518563ffffffff1660e01b815260040161357f9493929190615473565b61012060405180830381600087803b15801561359a57600080fd5b505af11580156135ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135d29190614ab1565b60208101516040517ff2da44b60000000000000000000000000000000000000000000000000000000081529192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163f2da44b691613642918c919089906004016154c7565b600060405180830381600087803b15801561365c57600080fd5b505af1158015613670573d6000803e3d6000fd5b5050505060005b835181101561392857600084828151811061369457613694615b1b565b602002602001015190507cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8016816040015111156136fb576040517fa9b8fbcf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081015162ffffff101561373c576040517f9583faed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60808101517cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1015613797576040517f5730278300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60a081015162ffffff10156137d8576040517fd9b93c2500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408101511561383557606081015160408083015160008d815260016020908152838220888201518352815283822086516001600160a01b03908116845290825284832082880151909116835290529190912060e89290921b1790555b6080810151156138925760a0810151608082015160008c8152600260209081526040808320888301518452825280832086516001600160a01b039081168552908352818420838801519091168452909152902060e89290921b1790555b82516020808501516040805185516001600160a01b0390811682528685015116938101939093528085015190830152606080850151908301526080808501519083015260a080850151908301523360c08301528c92917f8a1c80ab9ab05d6bf02096dd94aa2fa05a9de212e793835a50dd5ffe8d8cbab89060e00160405180910390a4508061392081615a4b565b915050613677565b5060200151979650505050505050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870985870292508281108382030391505080600014156139915783828161398757613987615aec565b04925050506129ad565b8381106139d8576040517f773cc18c000000000000000000000000000000000000000000000000000000008152600481018290526024810185905260440160405180910390fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6000806000851215613a6557613a5685615a84565b613a609084615821565b613a6f565b613a6f85846158ad565b905080613a805760009150506129ad565b612710841415613a915790506129ad565b80613aa881612710613aa388826158ad565b613938565b6127d191906158ad565b604080518082019091526000808252602082015261064d6008836101000151901c6040805180820182526000808252602091820152815180830190925260018381168114835292831c83169092149181019190915290565b60006028826101000151901c61ffff1661271061064d91906158ad565b60006038826101000151901c61ffff1661271061064d91906158ad565b6040517f69e11cc500000000000000000000000000000000000000000000000000000000815260048101859052602481018490526044810183905281906000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906369e11cc59060640160006040518083038186803b158015613bd057600080fd5b505afa158015613be4573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052613c2a91908101906147ec565b905060005b8151811015614059576000828281518110613c4c57613c4c615b1b565b602002602001015190506000613c6b868360400151633b9aca00613938565b905080156140065760c08201516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169163ceddd3e49116613d96576060840151613cda5760808401516001600160a01b0316613cd05733613d9c565b8360800151613d9c565b60608401516040517f6352211e00000000000000000000000000000000000000000000000000000000815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e9060240160206040518083038186803b158015613d5957600080fd5b505afa158015613d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d919190614629565b613d9c565b8360c001515b845160405160e084901b7fffffffff000000000000000000000000000000000000000000000000000000001681526001600160a01b039092166004830152602482018d90526044820185905215156064820152608401600060405180830381600087803b158015613e0c57600080fd5b505af1158015613e20573d6000803e3d6000fd5b5050505060c08201516001600160a01b031615613ff9578160c001516001600160a01b0316639d740bfa6040518060c001604052807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ea78803f8e6040518263ffffffff1660e01b8152600401613ea391815260200190565b60206040518083038186803b158015613ebb57600080fd5b505afa158015613ecf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ef39190614629565b6001600160a01b03168152602001848152602001601281526020018c81526020018a8152602001858152506040518263ffffffff1660e01b8152600401613fc6919081516001600160a01b0390811682526020808401518184015260408085015181850152606080860151818601526080808701518187015260a096870151805115158888015293840151151560c0808801919091529284015160e08701529083015161010086015282015183166101208501529381015161014084015292909201519091166101608201526101800190565b600060405180830381600087803b158015613fe057600080fd5b505af1158015613ff4573d6000803e3d6000fd5b505050505b61400381866158ad565b94505b86888a7f990c1da5d280602f972ae3c429b6dc66a66569875205cc6e67f14e0b3fc4d2ac85853360405161403c9392919061533d565b60405180910390a45050808061405190615a4b565b915050613c2f565b5050949350505050565b80516001906008906140749061420b565b901b8117905060188260200151901b811790506028826040015161271061409b91906158ad565b901b81179050603882606001516127106140b591906158ad565b901b811790508160800151156140d2576901000000000000000000175b8160a00151156140e9576902000000000000000000175b8160c0015115614100576904000000000000000000175b8160e0015115614117576908000000000000000000175b8161010001511561412f576910000000000000000000175b81610120015115614147576920000000000000000000175b8161014001511561415f576940000000000000000000175b81610160015115614177576980000000000000000000175b81610180015115614190576a0100000000000000000000175b816101a00151156141a9576a0200000000000000000000175b816101c00151156141c2576a0400000000000000000000175b816101e00151156141db576a0800000000000000000000175b610200919091015160541b7e0ffffffffffffffffffffffffffffffffffffffff000000000000000000000161790565b805160009015614219576001175b816020015115614227576002175b919050565b803561422781615b79565b600082601f83011261424857600080fd5b8135602061425d61425883615789565b61573a565b80838252828201915082860187848660051b890101111561427d57600080fd5b60005b858110156142a557813561429381615b79565b84529284019290840190600101614280565b5090979650505050505050565b60008083601f8401126142c457600080fd5b50813567ffffffffffffffff8111156142dc57600080fd5b60208301915083602060c0830285010111156142f757600080fd5b9250929050565b600082601f83011261430f57600080fd5b8135602061431f61425883615789565b8281528181019085830160c08086028801850189101561433e57600080fd5b60005b86811015614365576143538a8461449e565b85529385019391810191600101614341565b509198975050505050505050565b60008083601f84011261438557600080fd5b50813567ffffffffffffffff81111561439d57600080fd5b6020830191508360208260051b85010111156142f757600080fd5b803561422781615b91565b805161422781615b79565b60008083601f8401126143e057600080fd5b50813567ffffffffffffffff8111156143f857600080fd5b6020830191508360208285010111156142f757600080fd5b600082601f83011261442157600080fd5b813567ffffffffffffffff81111561443b5761443b615b4a565b61446c60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161573a565b81815284602083860101111561448157600080fd5b816020850160208301376000918101602001919091529392505050565b600060c082840312156144b057600080fd5b60405160c0810181811067ffffffffffffffff821117156144d3576144d3615b4a565b60405290508082356144e481615b79565b815260208301356144f481615b79565b8060208301525060408301356040820152606083013560608201526080830135608082015260a083013560a08201525092915050565b60006080828403121561453c57600080fd5b50919050565b6000610240828403121561453c57600080fd5b6000610120828403121561456857600080fd5b6145706156a6565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151608082015260a082015160a082015260c082015160c08201526145be60e083016143c3565b60e082015261010080830151818301525092915050565b6000604082840312156145e757600080fd5b6145ef6156d0565b905081356145fc81615b91565b8152602082013561460c81615b91565b602082015292915050565b60006040828403121561453c57600080fd5b60006020828403121561463b57600080fd5b81516129ad81615b79565b60008060008060008060008060008060006103a08c8e03121561466857600080fd5b6146718c61422c565b9a5067ffffffffffffffff8060208e0135111561468d57600080fd5b61469d8e60208f01358f01614617565b9a506146ac8e60408f0161452a565b99506146bb8e60c08f01614542565b98506103008d01359750806103208e013511156146d757600080fd5b6146e88e6103208f01358f01614373565b90975095506103408d01358110156146ff57600080fd5b6147108e6103408f01358f016142b2565b90955093506103608d013581101561472757600080fd5b6147388e6103608f01358f01614237565b9250806103808e0135111561474c57600080fd5b5061475e8d6103808e01358e01614410565b90509295989b509295989b9093969950565b60008060008060008060a0878903121561478957600080fd5b863561479481615b79565b95506020870135945060408701359350606087013567ffffffffffffffff8111156147be57600080fd5b6147ca89828a016143ce565b90945092505060808701356147de81615b91565b809150509295509295509295565b600060208083850312156147ff57600080fd5b825167ffffffffffffffff81111561481657600080fd5b8301601f8101851361482757600080fd5b805161483561425882615789565b8181528381019083850160e0808502860187018a101561485457600080fd5b60009550855b858110156148ec5781838c031215614870578687fd5b6148786156f3565b835161488381615b91565b81528389015161489281615b91565b818a015260408481015190820152606080850151908201526080808501516148b981615b79565b9082015260a0848101519082015260c0808501516148d681615b79565b908201528552938701939181019160010161485a565b50919998505050505050505050565b60006020828403121561490d57600080fd5b81516129ad81615b91565b60006020828403121561492a57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146129ad57600080fd5b600060c0828403121561496c57600080fd5b6129ad838361449e565b6000610240828403121561498957600080fd5b614991615716565b61499b84846145d5565b81526040830135602082015260608301356040820152608083013560608201526149c760a084016143b8565b60808201526149d860c084016143b8565b60a08201526149e960e084016143b8565b60c08201526101006149fc8185016143b8565b60e0830152610120614a0f8186016143b8565b828401526101409150614a238286016143b8565b90830152610160614a358582016143b8565b828401526101809150614a498286016143b8565b908301526101a0614a5b8582016143b8565b828401526101c09150614a6f8286016143b8565b908301526101e0614a818582016143b8565b828401526102009150614a958286016143b8565b90830152614aa6610220850161422c565b908201529392505050565b60006101208284031215614ac457600080fd5b6129ad8383614555565b6000806101408385031215614ae257600080fd5b614aec8484614555565b915061012083015160038110614b0157600080fd5b809150509250929050565b600060208284031215614b1e57600080fd5b5035919050565b600060208284031215614b3757600080fd5b5051919050565b60008060408385031215614b5157600080fd5b823591506020830135614b0181615b79565b600080600060608486031215614b7857600080fd5b833592506020840135614b8a81615b79565b91506040840135614b9a81615b79565b809150509250925092565b600080600060408486031215614bba57600080fd5b83359250602084013567ffffffffffffffff811115614bd857600080fd5b614be4868287016143ce565b9497909650939450505050565b600080600080600060608688031215614c0957600080fd5b85359450602086013567ffffffffffffffff80821115614c2857600080fd5b614c3489838a016143ce565b90965094506040880135915080821115614c4d57600080fd5b50614c5a888289016143ce565b969995985093965092949392505050565b6000806000806000806000806000806103608b8d031215614c8b57600080fd5b8a359950614c9c8c60208d0161452a565b9850614cab8c60a08d01614542565b97506102e08b013596506103008b013567ffffffffffffffff80821115614cd157600080fd5b614cdd8e838f01614373565b90985096506103208d0135915080821115614cf757600080fd5b614d038e838f016142b2565b90965094506103408d0135915080821115614d1d57600080fd5b50614d2a8d828e016143ce565b915080935050809150509295989b9194979a5092959850565b60008060008060008060008060006103808a8c031215614d6257600080fd5b89359850614d738b60208c0161452a565b9750614d828b60a08c01614542565b96506102e08a013595506103008a013567ffffffffffffffff80821115614da857600080fd5b614db48d838e01614373565b90975095506103208c0135915080821115614dce57600080fd5b614dda8d838e016142fe565b94506103408c0135915080821115614df157600080fd5b614dfd8d838e01614237565b93506103608c0135915080821115614e1457600080fd5b50614e218c828d01614410565b9150509295985092959850929598565b60008060408385031215614e4457600080fd5b50508035926020909101359150565b600080600080600080600060c0888a031215614e6e57600080fd5b87359650602088013595506040880135614e8781615b79565b9450606088013567ffffffffffffffff811115614ea357600080fd5b614eaf8a828b016143ce565b9095509350506080880135614ec381615b91565b915060a0880135614ed381615b91565b8091505092959891949750929550565b60008060008060808587031215614ef957600080fd5b84359350602085013592506040850135614f1281615b79565b91506060850135614f2281615b79565b939692955090935050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6000815180845260005b81811015614f9c57602081850181015186830182015201614f80565b81811115614fae576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b614ffa8282518051151582526020908101511515910152565b602081015160408301526040810151606083015260608101516080830152608081015161502b60a084018215159052565b5060a081015180151560c08401525060c081015180151560e08401525060e081015161010061505d8185018315159052565b82015190506101206150728482018315159052565b82015190506101406150878482018315159052565b820151905061016061509c8482018315159052565b82015190506101806150b18482018315159052565b82015190506101a06150c68482018315159052565b82015190506101c06150db8482018315159052565b82015190506101e06150f08482018315159052565b82015190506102006151058482018315159052565b8201516001600160a01b0381166102208501529050505050565b6001600160a01b038316815260406020820152600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261516657600080fd5b8301803567ffffffffffffffff81111561517f57600080fd5b80360385131561518e57600080fd5b6040808501526151a5608085018260208501614f2d565b91505060208401356060840152809150509392505050565b60006001600160a01b03808816835286602084015285604084015260a060608401526151ec60a0840186614f76565b91508084166080840152509695505050505050565b610360810161526e8285805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c08301526001600160a01b0360e08201511660e08301526101008082015181840152505050565b6129ad610120830184614fe1565b61038081016152e98286805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c08301526001600160a01b0360e08201511660e08301526101008082015181840152505050565b6152f7610120830185614fe1565b6003831061532e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82610360830152949350505050565b610120810161539e8286805115158252602081015115156020830152604081015160408301526060810151606083015260808101516001600160a01b03808216608085015260a083015160a08501528060c08401511660c085015250505050565b8360e08301526001600160a01b038316610100830152949350505050565b6000604082018483526020604081850152818551808452606086019150828701935060005b818110156142a55784516001600160a01b0316835293830193918301916001016153e1565b848152606060208201526000615420606083018587614f2d565b90506001600160a01b038316604083015295945050505050565b858152606060208201526000615454606083018688614f2d565b8281036040840152615467818587614f2d565b98975050505050505050565b600060e08201905085825284356020830152602085013560408301526040850135606083015260608501356154a781615b79565b6001600160a01b0316608083015260a082019390935260c0015292915050565b60006060808301868452602086818601526040838187015282875180855260808801915060808160051b89010194508389016000805b838110156155de578a88037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff800185528251805189528701518789018790528051878a018190529088019083908b8b01905b808310156155c9576155b3828551805115158252602081015115156020830152604081015160408301526060810151606083015260808101516001600160a01b03808216608085015260a083015160a08501528060c08401511660c085015250505050565b60e0820191508a8401935060018301925061554e565b509950505093860193918601916001016154fd565b50959c9b505050505050505050505050565b858152846020820152608060408201526000615610608083018587614f2d565b90506001600160a01b03831660608301529695505050505050565b86815285602082015260a06040820152600061564b60a083018688614f2d565b90508360608301526001600160a01b0383166080830152979650505050505050565b84815283602082015260806040820152600061568c6080830185614f76565b90506001600160a01b038316606083015295945050505050565b604051610120810167ffffffffffffffff811182821017156156ca576156ca615b4a565b60405290565b6040805190810167ffffffffffffffff811182821017156156ca576156ca615b4a565b60405160e0810167ffffffffffffffff811182821017156156ca576156ca615b4a565b604051610220810167ffffffffffffffff811182821017156156ca576156ca615b4a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561578157615781615b4a565b604052919050565b600067ffffffffffffffff8211156157a3576157a3615b4a565b5060051b60200190565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156157e7576157e7615abd565b827f800000000000000000000000000000000000000000000000000000000000000003841281161561581b5761581b615abd565b50500190565b6000821982111561583457615834615abd565b500190565b6000808312837f80000000000000000000000000000000000000000000000000000000000000000183128115161561587357615873615abd565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156158a7576158a7615abd565b50500390565b6000828210156158bf576158bf615abd565b500390565b60006158d261425884615789565b808482526020808301925084368760051b870111156158f057600080fd5b60005b87811015615a3f57813567ffffffffffffffff8082111561591357600080fd5b8189019150604080833603121561592957600080fd5b6159316156d0565b83358152868401358381111561594657600080fd5b939093019236601f85011261595a57600080fd5b8335925061596a61425884615789565b8381528781019085890160e03681880289018c01111561598957600080fd5b600097505b86881015615a23578082360312156159a557600080fd5b6159ad6156f3565b82356159b881615b91565b8152828c01356159c781615b91565b818d01528287013587820152606080840135908201526080808401356159ec81615b79565b9082015260a0838101359082015260c080840135615a0981615b79565b90820152845260019790970196928a01929081019061598e565b50508289015250885250505093820193908201906001016158f3565b50919695505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615a7d57615a7d615abd565b5060010190565b60007f8000000000000000000000000000000000000000000000000000000000000000821415615ab657615ab6615abd565b5060000390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6001600160a01b0381168114615b8e57600080fd5b50565b8015158114615b8e57600080fdfea2646970667358221220fa982fde3e93747d9cb8438464eac3961e9d1cb9ed1fe4bed3f1802a7fbccb9064736f6c634300080600330000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d3000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d12000000000000000000000000cbb8e16d998161adb20465830107ca298995f371000000000000000000000000fbe1075826b7ffd898cf8d944885ba6a8d714a7f
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101a35760003560e01c80637fc19af5116100ee578063ad007d6311610097578063d101307311610071578063d10130731461047a578063e867c59c1461048d578063e8db2130146104a0578063f033b3b41461050f57600080fd5b8063ad007d6314610419578063b5f1e34d14610440578063c41c2f241461045357600080fd5b80638b79543c116100c85780638b79543c146103cc57806394b63795146103f3578063a40bb9c71461040657600080fd5b80637fc19af5146103935780638776c499146103a65780638ae9c07b146103b957600080fd5b80633e8c615b11610150578063619306301161012a57806361930630146102c75780636d4bae6b146102ee5780637a81b5621461030f57600080fd5b80633e8c615b1461027a578063405b84fa1461028d578063557e7155146102a057600080fd5b80631f510453116101815780631f51045314610206578063229bb824146102285780632bdfe0041461023b57600080fd5b806301ffc9a7146101a857806312b37b14146101d05780631665bc0f146101f1575b600080fd5b6101bb6101b6366004614918565b610522565b60405190151581526020015b60405180910390f35b6101e36101de366004614b0c565b610653565b6040516101c7929190615201565b6102046101ff366004614770565b610804565b005b610219610214366004614b0c565b610bee565b6040516101c79392919061527c565b610204610236366004614b63565b610daa565b6102627f000000000000000000000000fbe1075826b7ffd898cf8d944885ba6a8d714a7f81565b6040516001600160a01b0390911681526020016101c7565b610204610288366004614b3e565b611033565b61020461029b366004614b3e565b611233565b6102627f0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d1281565b6102627f000000000000000000000000cbb8e16d998161adb20465830107ca298995f37181565b6103016102fc366004614d43565b611721565b6040519081526020016101c7565b61037e61031d366004614ee3565b60009384526002602090815260408086209486529381528385206001600160a01b039384168652815283852091909216845290529020547cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81169160e89190911c90565b604080519283526020830191909152016101c7565b6103016103a1366004614646565b611a5a565b6101e36103b4366004614b0c565b611d11565b6103016103c7366004614e53565b611e63565b6102627f000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d381565b610301610401366004614c6b565b6123be565b6101e3610414366004614e31565b612534565b6102627f0000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb81565b61030161044e366004614e31565b6126f1565b6102627f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c81565b610262610488366004614bf1565b6127da565b61030161049b366004614ba5565b612968565b61037e6104ae366004614ee3565b60009384526001602090815260408086209486529381528385206001600160a01b039384168652815283852091909216845290529020547cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81169160e89190911c90565b61030161051d366004614e31565b6129b4565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fe8469c850000000000000000000000000000000000000000000000000000000014806105b557507fffffffff0000000000000000000000000000000000000000000000000000000082167f3e8c615b00000000000000000000000000000000000000000000000000000000145b8061060157507fffffffff0000000000000000000000000000000000000000000000000000000082167fad007d6300000000000000000000000000000000000000000000000000000000145b8061064d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6106ab6040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6040805161026081018252600061022082018181526102408301829052825260208201819052818301819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101408201819052610160820181905261018082018190526101a082018190526101c082018190526101e0820181905261020082015290517f5c550078000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b037f0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d121690635c550078906024015b6101206040518083038186803b1580156107ba57600080fd5b505afa1580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190614ab1565b91506107fd82612a80565b9050915091565b6040517f6e49181f0000000000000000000000000000000000000000000000000000000081526004810186905233602482015286908690600a906001600160a01b037f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c1690636e49181f9060440160206040518083038186803b15801561088a57600080fd5b505afa15801561089e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c291906148fb565b6108ce84848484612ceb565b87610905576040517f7b38547b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f43a266c2000000000000000000000000000000000000000000000000000000008152600481018a90526000907f0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d126001600160a01b0316906343a266c2906024016101206040518083038186803b15801561098257600080fd5b505afa158015610996573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ba9190614ab1565b610100810151909150604b1c6001908116148015610a8c57506040517f6e49181f000000000000000000000000000000000000000000000000000000008152600481018b90523360248201527f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c6001600160a01b031690636e49181f9060440160206040518083038186803b158015610a5257600080fd5b505afa158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a91906148fb565b155b15610ac3576040517f78a4871800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008a815260208190526040902054610add908a90615839565b60008b8152602081905260409081902091909155517f906ebd0f0000000000000000000000000000000000000000000000000000000081526001600160a01b038c81166004830152602482018c9052604482018b905287151560648301527f000000000000000000000000cbb8e16d998161adb20465830107ca298995f371169063906ebd0f90608401600060405180830381600087803b158015610b8157600080fd5b505af1158015610b95573d6000803e3d6000fd5b50505050898b6001600160a01b03167fdf04e13ee4fcd48a81ab2fd114757093740a3efa9b6475d86e05878b4c59d0798b8b8b33604051610bd99493929190615406565b60405180910390a35050505050505050505050565b610c466040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6040805161026081018252600061022082018181526102408301829052825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290526101e081018290526102008101919091526040517febc8ca1f000000000000000000000000000000000000000000000000000000008152600481018490526000907f0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d126001600160a01b03169063ebc8ca1f906024016101406040518083038186803b158015610d5b57600080fd5b505afa158015610d6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d939190614ace565b9093509050610da183612a80565b91509193909250565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d36001600160a01b031690636352211e9060240160206040518083038186803b158015610e2357600080fd5b505afa158015610e37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5b9190614629565b836008610e69838383612edd565b6040517f43a266c2000000000000000000000000000000000000000000000000000000008152600481018790526000907f0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d126001600160a01b0316906343a266c2906024016101206040518083038186803b158015610ee657600080fd5b505afa158015610efa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1e9190614ab1565b610100810151909150604d1c600190811614610f66576040517f2ebc601300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f57e4c778000000000000000000000000000000000000000000000000000000008152600481018890526001600160a01b03878116602483015286811660448301527f000000000000000000000000cbb8e16d998161adb20465830107ca298995f37116906357e4c77890606401602060405180830381600087803b158015610ff157600080fd5b505af1158015611005573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110299190614629565b5050505050505050565b6040517f5dd8f6aa0000000000000000000000000000000000000000000000000000000081526004810183905230906001600160a01b037f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c1690635dd8f6aa9060240160206040518083038186803b1580156110ae57600080fd5b505afa1580156110c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e69190614629565b6001600160a01b03161415611127576040517ffc2ce25a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f75b0d9cd000000000000000000000000000000000000000000000000000000008152600481018390527f000000000000000000000000cbb8e16d998161adb20465830107ca298995f3716001600160a01b0316906375b0d9cd9060240160206040518083038186803b1580156111a057600080fd5b505afa1580156111b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d89190614b25565b600083815260208181526040918290209290925580516001600160a01b0384168152339281019290925283917ff389f4f5d01fe4903d6a7a63b8790b7bf80d374b6afed808c03795c3b323d4d3910160405180910390a25050565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018390527f000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d36001600160a01b031690636352211e9060240160206040518083038186803b1580156112ac57600080fd5b505afa1580156112c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e49190614629565b8260036112f2838383612edd565b6040517f5dd8f6aa0000000000000000000000000000000000000000000000000000000081526004810186905230906001600160a01b037f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c1690635dd8f6aa9060240160206040518083038186803b15801561136d57600080fd5b505afa158015611381573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a59190614629565b6001600160a01b0316146113e5576040517fe0a0a87d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f43a266c2000000000000000000000000000000000000000000000000000000008152600481018690526000907f0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d126001600160a01b0316906343a266c2906024016101206040518083038186803b15801561146257600080fd5b505afa158015611476573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149a9190614ab1565b610100810151909150604f1c6001908116146114e2576040517f46ace3f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f75b0d9cd000000000000000000000000000000000000000000000000000000008152600481018790527f000000000000000000000000cbb8e16d998161adb20465830107ca298995f3716001600160a01b0316906375b0d9cd9060240160206040518083038186803b15801561155b57600080fd5b505afa15801561156f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115939190614b25565b600087815260208190526040902054146115c2576115c086604051806020016040528060008152506130c4565b505b6040517f3e8c615b000000000000000000000000000000000000000000000000000000008152600481018790523060248201526001600160a01b03861690633e8c615b90604401600060405180830381600087803b15801561162357600080fd5b505af1158015611637573d6000803e3d6000fd5b50506040517f714e7f32000000000000000000000000000000000000000000000000000000008152600481018990526001600160a01b0388811660248301527f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c16925063714e7f329150604401600060405180830381600087803b1580156116be57600080fd5b505af11580156116d2573d6000803e3d6000fd5b5050604080516001600160a01b03891681523360208201528993507f01f954abace731a88ab86e71186040cc2be49fe517ea06bc0d24f25b82b8345692500160405180910390a2505050505050565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018a90526000907f000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d36001600160a01b031690636352211e9060240160206040518083038186803b15801561179d57600080fd5b505afa1580156117b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117d59190614629565b8a60016117e3838383612edd565b6040517f2cee6deb000000000000000000000000000000000000000000000000000000008152600481018e90526000906001600160a01b037f0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d121690632cee6deb9060240160206040518083038186803b15801561185f57600080fd5b505afa158015611873573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118979190614b25565b11156118cf576040517fffd0bc1200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f714e7f32000000000000000000000000000000000000000000000000000000008152600481018e90523060248201526001600160a01b037f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c169063714e7f3290604401600060405180830381600087803b15801561195057600080fd5b505af1158015611964573d6000803e3d6000fd5b505050506119828d8d8d8d8d8d9061197c91906158c4565b8c613453565b865190945015611a0d577f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c6001600160a01b031663821b9fd88e886040518363ffffffff1660e01b81526004016119da9291906153bc565b600060405180830381600087803b1580156119f457600080fd5b505af1158015611a08573d6000803e3d6000fd5b505050505b7f8621c3692c18d8ddd4cd26457d6a3e1d916e7001c4243a6c8dfa862a7e10a823848e8733604051611a42949392919061566d565b60405180910390a15050509998505050505050505050565b6040517f666d87a00000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d3169063666d87a090611ac4908f908f9060040161511f565b602060405180830381600087803b158015611ade57600080fd5b505af1158015611af2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b169190614b25565b6040517f714e7f32000000000000000000000000000000000000000000000000000000008152600481018290523060248201529091507f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c6001600160a01b03169063714e7f3290604401600060405180830381600087803b158015611b9a57600080fd5b505af1158015611bae573d6000803e3d6000fd5b505050506000611c20828c8c8c8c8c90611bc891906158c4565b8b8b808060200260200160405190810160405280939291908181526020016000905b82821015611c1657611c0760c0830286013681900381019061495a565b81526020019060010190611bea565b5050505050613453565b845190915015611cc4576040517f821b9fd80000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c169063821b9fd890611c9190859088906004016153bc565b600060405180830381600087803b158015611cab57600080fd5b505af1158015611cbf573d6000803e3d6000fd5b505050505b7ff3e6948ba8b32d557363ea08470121c47c0127659aed09320812174d373afef281838533604051611cf9949392919061566d565b60405180910390a1509b9a5050505050505050505050565b611d696040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6040805161026081018252600061022082018181526102408301829052825260208201819052818301819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082018190526101408201819052610160820181905261018082018190526101a082018190526101c082018190526101e0820181905261020082015290517f43a266c2000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b037f0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d1216906343a266c2906024016107a1565b600086611e9c576040517f9fd13e5400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f43a266c20000000000000000000000000000000000000000000000000000000081526004810189905260009081906001600160a01b037f0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d1216906343a266c2906024016101206040518083038186803b158015611f1b57600080fd5b505afa158015611f2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f539190614ab1565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018c90529091506120f0906001600160a01b037f000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d31690636352211e9060240160206040518083038186803b158015611fd357600080fd5b505afa158015611fe7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200b9190614629565b6040517f6e49181f000000000000000000000000000000000000000000000000000000008152600481018d90523360248201528c906009906001600160a01b037f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c1690636e49181f9060440160206040518083038186803b15801561208f57600080fd5b505afa1580156120a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120c791906148fb565b806120eb575061010085015160541c6001600160a01b0316336001600160a01b0316145b612ceb565b610100810151604c1c6001908116141580156121c057506040517f6e49181f000000000000000000000000000000000000000000000000000000008152600481018b90523360248201527f000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c6001600160a01b031690636e49181f9060440160206040518083038186803b15801561218657600080fd5b505afa15801561219a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121be91906148fb565b155b80156121e6575061010081015160541c6001600160a01b0316336001600160a01b031614155b1561221d576040517f9d0ca8fd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83612229576000612237565b61010081015160181c61ffff165b9150506127108114156122725760008981526020819052604090205461225e908990615839565b60008a815260208190526040902055612366565b61228a88612282836127106158ad565b612710613938565b9150806122bb576000898152602081905260409020546122ab9083906157ad565b60008a8152602081905260409020555b6040517fceddd3e40000000000000000000000000000000000000000000000000000000081526001600160a01b038881166004830152602482018b90526044820184905285151560648301527f000000000000000000000000cbb8e16d998161adb20465830107ca298995f371169063ceddd3e490608401600060405180830381600087803b15801561234d57600080fd5b505af1158015612361573d6000803e3d6000fd5b505050505b88876001600160a01b03167fe6fee9c572244c0c2238c3112ac12d411750a7ee00eeebd32521c3e5a666c14b8a858a8a87336040516123aa9695949392919061562b565b60405180910390a350979650505050505050565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018b90526000907f000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d36001600160a01b031690636352211e9060240160206040518083038186803b15801561243a57600080fd5b505afa15801561244e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124729190614629565b8b6001612480838383612edd565b6124e28e8e8e8e8e8e9061249491906158c4565b8d8d808060200260200160405190810160405280939291908181526020016000905b82821015611c16576124d360c0830286013681900381019061495a565b815260200190600101906124b6565b93507f1a08ad37c93969a586fd0605d240c17113b20a9c9ac3847595d0ab425225f6af848f88883360405161251b9594939291906155f0565b60405180910390a15050509a9950505050505050505050565b61258c6040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b03168152602001600081525090565b6040805161026081018252600061022082018181526102408301829052825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290526101e081018290526102008101919091526040517f669e48aa00000000000000000000000000000000000000000000000000000000815260048101859052602481018490527f0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d126001600160a01b03169063669e48aa906044016101206040518083038186803b1580156126a557600080fd5b505afa1580156126b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126dd9190614ab1565b91506126e882612a80565b90509250929050565b6040517f75b0d9cd0000000000000000000000000000000000000000000000000000000081526004810183905260009081906001600160a01b037f000000000000000000000000cbb8e16d998161adb20465830107ca298995f37116906375b0d9cd9060240160206040518083038186803b15801561276f57600080fd5b505afa158015612783573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127a79190614b25565b600085815260208190526040812054919250906127c5908584613a41565b90506127d18183615821565b95945050505050565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018690526000907f000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d36001600160a01b031690636352211e9060240160206040518083038186803b15801561285657600080fd5b505afa15801561286a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288e9190614629565b86600761289c838383612edd565b6040517fa7f2a70b0000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000cbb8e16d998161adb20465830107ca298995f371169063a7f2a70b90612909908c908c908c908c908c9060040161543a565b602060405180830381600087803b15801561292357600080fd5b505af1158015612937573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061295b9190614629565b9998505050505050505050565b60006129aa8484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506130c492505050565b90505b9392505050565b6000828152602081905260408082205490517f75b0d9cd000000000000000000000000000000000000000000000000000000008152600481018590526129ad919084907f000000000000000000000000cbb8e16d998161adb20465830107ca298995f3716001600160a01b0316906375b0d9cd9060240160206040518083038186803b158015612a4357600080fd5b505afa158015612a57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a7b9190614b25565b613a41565b6040805161026081018252600061022082018181526102408301829052825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290526101e08101829052610200810191909152604051806102200160405280612b2d84613ab2565b815261010084015160209091019060181c61ffff168152602001612b5084613b0a565b8152602001612b5e84613b27565b8152602001612b7a846101000151600160489190911c81161490565b15158152602001612b98846101000151600160499190911c81161490565b15158152602001612bb68461010001516001604a9190911c81161490565b15158152602001612bd48461010001516001604b9190911c81161490565b15158152602001612bf28461010001516001604c9190911c81161490565b15158152602001612c108461010001516001604d9190911c81161490565b15158152602001612c2e8461010001516001604e9190911c81161490565b15158152602001612c4c8461010001516001604f9190911c81161490565b15158152602001612c6a846101000151600160509190911c81161490565b15158152602001612c88846101000151600160519190911c81161490565b15158152602001612ca6846101000151600160529190911c81161490565b15158152602001612cc4846101000151600160539190911c81161490565b15158152602001612cda84610100015160541c90565b6001600160a01b0316905292915050565b80158015612d025750336001600160a01b03851614155b8015612dd157506040517fc161c93f0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03858116602483015260448201859052606482018490527f0000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb169063c161c93f9060840160206040518083038186803b158015612d9757600080fd5b505afa158015612dab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dcf91906148fb565b155b8015612ea057506040517fc161c93f0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03858116602483015260006044830152606482018490527f0000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb169063c161c93f9060840160206040518083038186803b158015612e6657600080fd5b505afa158015612e7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e9e91906148fb565b155b15612ed7576040517f075fd2b100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b336001600160a01b03841614801590612fb957506040517fc161c93f0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03848116602483015260448201849052606482018390527f0000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb169063c161c93f9060840160206040518083038186803b158015612f7f57600080fd5b505afa158015612f93573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fb791906148fb565b155b801561308857506040517fc161c93f0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03848116602483015260006044830152606482018390527f0000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb169063c161c93f9060840160206040518083038186803b15801561304e57600080fd5b505afa158015613062573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061308691906148fb565b155b156130bf576040517f075fd2b100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6040517f43a266c20000000000000000000000000000000000000000000000000000000081526004810183905260009081906001600160a01b037f0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d1216906343a266c2906024016101206040518083038186803b15801561314357600080fd5b505afa158015613157573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061317b9190614ab1565b6040517f75b0d9cd000000000000000000000000000000000000000000000000000000008152600481018690529091506000906001600160a01b037f000000000000000000000000cbb8e16d998161adb20465830107ca298995f37116906375b0d9cd9060240160206040518083038186803b1580156131fa57600080fd5b505afa15801561320e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132329190614b25565b60008681526020819052604090205461010084015191925061325b9160181c61ffff1683613a41565b92506132678382615821565b6000868152602081905260408082209290925590517f6352211e000000000000000000000000000000000000000000000000000000008152600481018790527f000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d36001600160a01b031690636352211e9060240160206040518083038186803b1580156132f257600080fd5b505afa158015613306573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061332a9190614629565b90506000841561334a57613345878560200151600288613b44565b61334d565b60005b905080156133ff576040517fceddd3e40000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301526024820189905260448201839052600060648301527f000000000000000000000000cbb8e16d998161adb20465830107ca298995f371169063ceddd3e490608401600060405180830381600087803b1580156133e657600080fd5b505af11580156133fa573d6000803e3d6000fd5b505050505b86846000015185602001517fb12d7a78048433f69fe6d30145bf08aad8e82985b96e4db6d5c6a7e94d57086e8589868c336040516134419594939291906151bd565b60405180910390a45050505092915050565b600061271085604001351115613495576040517f5623289500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612710856060013511156134d5576040517f9db9ee9300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61271085608001351115613515576040517fddbf1bc600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160a01b037f0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d121663a249d425898961355f61355a368c90038c018c614976565b614063565b896040518563ffffffff1660e01b815260040161357f9493929190615473565b61012060405180830381600087803b15801561359a57600080fd5b505af11580156135ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135d29190614ab1565b60208101516040517ff2da44b60000000000000000000000000000000000000000000000000000000081529192506001600160a01b037f000000000000000000000000fbe1075826b7ffd898cf8d944885ba6a8d714a7f169163f2da44b691613642918c919089906004016154c7565b600060405180830381600087803b15801561365c57600080fd5b505af1158015613670573d6000803e3d6000fd5b5050505060005b835181101561392857600084828151811061369457613694615b1b565b602002602001015190507cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8016816040015111156136fb576040517fa9b8fbcf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081015162ffffff101561373c576040517f9583faed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60808101517cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1015613797576040517f5730278300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60a081015162ffffff10156137d8576040517fd9b93c2500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408101511561383557606081015160408083015160008d815260016020908152838220888201518352815283822086516001600160a01b03908116845290825284832082880151909116835290529190912060e89290921b1790555b6080810151156138925760a0810151608082015160008c8152600260209081526040808320888301518452825280832086516001600160a01b039081168552908352818420838801519091168452909152902060e89290921b1790555b82516020808501516040805185516001600160a01b0390811682528685015116938101939093528085015190830152606080850151908301526080808501519083015260a080850151908301523360c08301528c92917f8a1c80ab9ab05d6bf02096dd94aa2fa05a9de212e793835a50dd5ffe8d8cbab89060e00160405180910390a4508061392081615a4b565b915050613677565b5060200151979650505050505050565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870985870292508281108382030391505080600014156139915783828161398757613987615aec565b04925050506129ad565b8381106139d8576040517f773cc18c000000000000000000000000000000000000000000000000000000008152600481018290526024810185905260440160405180910390fd5b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6000806000851215613a6557613a5685615a84565b613a609084615821565b613a6f565b613a6f85846158ad565b905080613a805760009150506129ad565b612710841415613a915790506129ad565b80613aa881612710613aa388826158ad565b613938565b6127d191906158ad565b604080518082019091526000808252602082015261064d6008836101000151901c6040805180820182526000808252602091820152815180830190925260018381168114835292831c83169092149181019190915290565b60006028826101000151901c61ffff1661271061064d91906158ad565b60006038826101000151901c61ffff1661271061064d91906158ad565b6040517f69e11cc500000000000000000000000000000000000000000000000000000000815260048101859052602481018490526044810183905281906000907f000000000000000000000000fbe1075826b7ffd898cf8d944885ba6a8d714a7f6001600160a01b0316906369e11cc59060640160006040518083038186803b158015613bd057600080fd5b505afa158015613be4573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052613c2a91908101906147ec565b905060005b8151811015614059576000828281518110613c4c57613c4c615b1b565b602002602001015190506000613c6b868360400151633b9aca00613938565b905080156140065760c08201516001600160a01b037f000000000000000000000000cbb8e16d998161adb20465830107ca298995f37181169163ceddd3e49116613d96576060840151613cda5760808401516001600160a01b0316613cd05733613d9c565b8360800151613d9c565b60608401516040517f6352211e00000000000000000000000000000000000000000000000000000000815260048101919091527f000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d36001600160a01b031690636352211e9060240160206040518083038186803b158015613d5957600080fd5b505afa158015613d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d919190614629565b613d9c565b8360c001515b845160405160e084901b7fffffffff000000000000000000000000000000000000000000000000000000001681526001600160a01b039092166004830152602482018d90526044820185905215156064820152608401600060405180830381600087803b158015613e0c57600080fd5b505af1158015613e20573d6000803e3d6000fd5b5050505060c08201516001600160a01b031615613ff9578160c001516001600160a01b0316639d740bfa6040518060c001604052807f000000000000000000000000cbb8e16d998161adb20465830107ca298995f3716001600160a01b031663ea78803f8e6040518263ffffffff1660e01b8152600401613ea391815260200190565b60206040518083038186803b158015613ebb57600080fd5b505afa158015613ecf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ef39190614629565b6001600160a01b03168152602001848152602001601281526020018c81526020018a8152602001858152506040518263ffffffff1660e01b8152600401613fc6919081516001600160a01b0390811682526020808401518184015260408085015181850152606080860151818601526080808701518187015260a096870151805115158888015293840151151560c0808801919091529284015160e08701529083015161010086015282015183166101208501529381015161014084015292909201519091166101608201526101800190565b600060405180830381600087803b158015613fe057600080fd5b505af1158015613ff4573d6000803e3d6000fd5b505050505b61400381866158ad565b94505b86888a7f990c1da5d280602f972ae3c429b6dc66a66569875205cc6e67f14e0b3fc4d2ac85853360405161403c9392919061533d565b60405180910390a45050808061405190615a4b565b915050613c2f565b5050949350505050565b80516001906008906140749061420b565b901b8117905060188260200151901b811790506028826040015161271061409b91906158ad565b901b81179050603882606001516127106140b591906158ad565b901b811790508160800151156140d2576901000000000000000000175b8160a00151156140e9576902000000000000000000175b8160c0015115614100576904000000000000000000175b8160e0015115614117576908000000000000000000175b8161010001511561412f576910000000000000000000175b81610120015115614147576920000000000000000000175b8161014001511561415f576940000000000000000000175b81610160015115614177576980000000000000000000175b81610180015115614190576a0100000000000000000000175b816101a00151156141a9576a0200000000000000000000175b816101c00151156141c2576a0400000000000000000000175b816101e00151156141db576a0800000000000000000000175b610200919091015160541b7e0ffffffffffffffffffffffffffffffffffffffff000000000000000000000161790565b805160009015614219576001175b816020015115614227576002175b919050565b803561422781615b79565b600082601f83011261424857600080fd5b8135602061425d61425883615789565b61573a565b80838252828201915082860187848660051b890101111561427d57600080fd5b60005b858110156142a557813561429381615b79565b84529284019290840190600101614280565b5090979650505050505050565b60008083601f8401126142c457600080fd5b50813567ffffffffffffffff8111156142dc57600080fd5b60208301915083602060c0830285010111156142f757600080fd5b9250929050565b600082601f83011261430f57600080fd5b8135602061431f61425883615789565b8281528181019085830160c08086028801850189101561433e57600080fd5b60005b86811015614365576143538a8461449e565b85529385019391810191600101614341565b509198975050505050505050565b60008083601f84011261438557600080fd5b50813567ffffffffffffffff81111561439d57600080fd5b6020830191508360208260051b85010111156142f757600080fd5b803561422781615b91565b805161422781615b79565b60008083601f8401126143e057600080fd5b50813567ffffffffffffffff8111156143f857600080fd5b6020830191508360208285010111156142f757600080fd5b600082601f83011261442157600080fd5b813567ffffffffffffffff81111561443b5761443b615b4a565b61446c60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161573a565b81815284602083860101111561448157600080fd5b816020850160208301376000918101602001919091529392505050565b600060c082840312156144b057600080fd5b60405160c0810181811067ffffffffffffffff821117156144d3576144d3615b4a565b60405290508082356144e481615b79565b815260208301356144f481615b79565b8060208301525060408301356040820152606083013560608201526080830135608082015260a083013560a08201525092915050565b60006080828403121561453c57600080fd5b50919050565b6000610240828403121561453c57600080fd5b6000610120828403121561456857600080fd5b6145706156a6565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151608082015260a082015160a082015260c082015160c08201526145be60e083016143c3565b60e082015261010080830151818301525092915050565b6000604082840312156145e757600080fd5b6145ef6156d0565b905081356145fc81615b91565b8152602082013561460c81615b91565b602082015292915050565b60006040828403121561453c57600080fd5b60006020828403121561463b57600080fd5b81516129ad81615b79565b60008060008060008060008060008060006103a08c8e03121561466857600080fd5b6146718c61422c565b9a5067ffffffffffffffff8060208e0135111561468d57600080fd5b61469d8e60208f01358f01614617565b9a506146ac8e60408f0161452a565b99506146bb8e60c08f01614542565b98506103008d01359750806103208e013511156146d757600080fd5b6146e88e6103208f01358f01614373565b90975095506103408d01358110156146ff57600080fd5b6147108e6103408f01358f016142b2565b90955093506103608d013581101561472757600080fd5b6147388e6103608f01358f01614237565b9250806103808e0135111561474c57600080fd5b5061475e8d6103808e01358e01614410565b90509295989b509295989b9093969950565b60008060008060008060a0878903121561478957600080fd5b863561479481615b79565b95506020870135945060408701359350606087013567ffffffffffffffff8111156147be57600080fd5b6147ca89828a016143ce565b90945092505060808701356147de81615b91565b809150509295509295509295565b600060208083850312156147ff57600080fd5b825167ffffffffffffffff81111561481657600080fd5b8301601f8101851361482757600080fd5b805161483561425882615789565b8181528381019083850160e0808502860187018a101561485457600080fd5b60009550855b858110156148ec5781838c031215614870578687fd5b6148786156f3565b835161488381615b91565b81528389015161489281615b91565b818a015260408481015190820152606080850151908201526080808501516148b981615b79565b9082015260a0848101519082015260c0808501516148d681615b79565b908201528552938701939181019160010161485a565b50919998505050505050505050565b60006020828403121561490d57600080fd5b81516129ad81615b91565b60006020828403121561492a57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146129ad57600080fd5b600060c0828403121561496c57600080fd5b6129ad838361449e565b6000610240828403121561498957600080fd5b614991615716565b61499b84846145d5565b81526040830135602082015260608301356040820152608083013560608201526149c760a084016143b8565b60808201526149d860c084016143b8565b60a08201526149e960e084016143b8565b60c08201526101006149fc8185016143b8565b60e0830152610120614a0f8186016143b8565b828401526101409150614a238286016143b8565b90830152610160614a358582016143b8565b828401526101809150614a498286016143b8565b908301526101a0614a5b8582016143b8565b828401526101c09150614a6f8286016143b8565b908301526101e0614a818582016143b8565b828401526102009150614a958286016143b8565b90830152614aa6610220850161422c565b908201529392505050565b60006101208284031215614ac457600080fd5b6129ad8383614555565b6000806101408385031215614ae257600080fd5b614aec8484614555565b915061012083015160038110614b0157600080fd5b809150509250929050565b600060208284031215614b1e57600080fd5b5035919050565b600060208284031215614b3757600080fd5b5051919050565b60008060408385031215614b5157600080fd5b823591506020830135614b0181615b79565b600080600060608486031215614b7857600080fd5b833592506020840135614b8a81615b79565b91506040840135614b9a81615b79565b809150509250925092565b600080600060408486031215614bba57600080fd5b83359250602084013567ffffffffffffffff811115614bd857600080fd5b614be4868287016143ce565b9497909650939450505050565b600080600080600060608688031215614c0957600080fd5b85359450602086013567ffffffffffffffff80821115614c2857600080fd5b614c3489838a016143ce565b90965094506040880135915080821115614c4d57600080fd5b50614c5a888289016143ce565b969995985093965092949392505050565b6000806000806000806000806000806103608b8d031215614c8b57600080fd5b8a359950614c9c8c60208d0161452a565b9850614cab8c60a08d01614542565b97506102e08b013596506103008b013567ffffffffffffffff80821115614cd157600080fd5b614cdd8e838f01614373565b90985096506103208d0135915080821115614cf757600080fd5b614d038e838f016142b2565b90965094506103408d0135915080821115614d1d57600080fd5b50614d2a8d828e016143ce565b915080935050809150509295989b9194979a5092959850565b60008060008060008060008060006103808a8c031215614d6257600080fd5b89359850614d738b60208c0161452a565b9750614d828b60a08c01614542565b96506102e08a013595506103008a013567ffffffffffffffff80821115614da857600080fd5b614db48d838e01614373565b90975095506103208c0135915080821115614dce57600080fd5b614dda8d838e016142fe565b94506103408c0135915080821115614df157600080fd5b614dfd8d838e01614237565b93506103608c0135915080821115614e1457600080fd5b50614e218c828d01614410565b9150509295985092959850929598565b60008060408385031215614e4457600080fd5b50508035926020909101359150565b600080600080600080600060c0888a031215614e6e57600080fd5b87359650602088013595506040880135614e8781615b79565b9450606088013567ffffffffffffffff811115614ea357600080fd5b614eaf8a828b016143ce565b9095509350506080880135614ec381615b91565b915060a0880135614ed381615b91565b8091505092959891949750929550565b60008060008060808587031215614ef957600080fd5b84359350602085013592506040850135614f1281615b79565b91506060850135614f2281615b79565b939692955090935050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6000815180845260005b81811015614f9c57602081850181015186830182015201614f80565b81811115614fae576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b614ffa8282518051151582526020908101511515910152565b602081015160408301526040810151606083015260608101516080830152608081015161502b60a084018215159052565b5060a081015180151560c08401525060c081015180151560e08401525060e081015161010061505d8185018315159052565b82015190506101206150728482018315159052565b82015190506101406150878482018315159052565b820151905061016061509c8482018315159052565b82015190506101806150b18482018315159052565b82015190506101a06150c68482018315159052565b82015190506101c06150db8482018315159052565b82015190506101e06150f08482018315159052565b82015190506102006151058482018315159052565b8201516001600160a01b0381166102208501529050505050565b6001600160a01b038316815260406020820152600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261516657600080fd5b8301803567ffffffffffffffff81111561517f57600080fd5b80360385131561518e57600080fd5b6040808501526151a5608085018260208501614f2d565b91505060208401356060840152809150509392505050565b60006001600160a01b03808816835286602084015285604084015260a060608401526151ec60a0840186614f76565b91508084166080840152509695505050505050565b610360810161526e8285805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c08301526001600160a01b0360e08201511660e08301526101008082015181840152505050565b6129ad610120830184614fe1565b61038081016152e98286805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c08301526001600160a01b0360e08201511660e08301526101008082015181840152505050565b6152f7610120830185614fe1565b6003831061532e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82610360830152949350505050565b610120810161539e8286805115158252602081015115156020830152604081015160408301526060810151606083015260808101516001600160a01b03808216608085015260a083015160a08501528060c08401511660c085015250505050565b8360e08301526001600160a01b038316610100830152949350505050565b6000604082018483526020604081850152818551808452606086019150828701935060005b818110156142a55784516001600160a01b0316835293830193918301916001016153e1565b848152606060208201526000615420606083018587614f2d565b90506001600160a01b038316604083015295945050505050565b858152606060208201526000615454606083018688614f2d565b8281036040840152615467818587614f2d565b98975050505050505050565b600060e08201905085825284356020830152602085013560408301526040850135606083015260608501356154a781615b79565b6001600160a01b0316608083015260a082019390935260c0015292915050565b60006060808301868452602086818601526040838187015282875180855260808801915060808160051b89010194508389016000805b838110156155de578a88037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff800185528251805189528701518789018790528051878a018190529088019083908b8b01905b808310156155c9576155b3828551805115158252602081015115156020830152604081015160408301526060810151606083015260808101516001600160a01b03808216608085015260a083015160a08501528060c08401511660c085015250505050565b60e0820191508a8401935060018301925061554e565b509950505093860193918601916001016154fd565b50959c9b505050505050505050505050565b858152846020820152608060408201526000615610608083018587614f2d565b90506001600160a01b03831660608301529695505050505050565b86815285602082015260a06040820152600061564b60a083018688614f2d565b90508360608301526001600160a01b0383166080830152979650505050505050565b84815283602082015260806040820152600061568c6080830185614f76565b90506001600160a01b038316606083015295945050505050565b604051610120810167ffffffffffffffff811182821017156156ca576156ca615b4a565b60405290565b6040805190810167ffffffffffffffff811182821017156156ca576156ca615b4a565b60405160e0810167ffffffffffffffff811182821017156156ca576156ca615b4a565b604051610220810167ffffffffffffffff811182821017156156ca576156ca615b4a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561578157615781615b4a565b604052919050565b600067ffffffffffffffff8211156157a3576157a3615b4a565b5060051b60200190565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156157e7576157e7615abd565b827f800000000000000000000000000000000000000000000000000000000000000003841281161561581b5761581b615abd565b50500190565b6000821982111561583457615834615abd565b500190565b6000808312837f80000000000000000000000000000000000000000000000000000000000000000183128115161561587357615873615abd565b837f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0183138116156158a7576158a7615abd565b50500390565b6000828210156158bf576158bf615abd565b500390565b60006158d261425884615789565b808482526020808301925084368760051b870111156158f057600080fd5b60005b87811015615a3f57813567ffffffffffffffff8082111561591357600080fd5b8189019150604080833603121561592957600080fd5b6159316156d0565b83358152868401358381111561594657600080fd5b939093019236601f85011261595a57600080fd5b8335925061596a61425884615789565b8381528781019085890160e03681880289018c01111561598957600080fd5b600097505b86881015615a23578082360312156159a557600080fd5b6159ad6156f3565b82356159b881615b91565b8152828c01356159c781615b91565b818d01528287013587820152606080840135908201526080808401356159ec81615b79565b9082015260a0838101359082015260c080840135615a0981615b79565b90820152845260019790970196928a01929081019061598e565b50508289015250885250505093820193908201906001016158f3565b50919695505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615a7d57615a7d615abd565b5060010190565b60007f8000000000000000000000000000000000000000000000000000000000000000821415615ab657615ab6615abd565b5060000390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6001600160a01b0381168114615b8e57600080fd5b50565b8015158114615b8e57600080fdfea2646970667358221220fa982fde3e93747d9cb8438464eac3961e9d1cb9ed1fe4bed3f1802a7fbccb9064736f6c63430008060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d3000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d12000000000000000000000000cbb8e16d998161adb20465830107ca298995f371000000000000000000000000fbe1075826b7ffd898cf8d944885ba6a8d714a7f
-----Decoded View---------------
Arg [0] : _operatorStore (address): 0x6F3C5afCa0c9eDf3926eF2dDF17c8ae6391afEfb
Arg [1] : _projects (address): 0xD8B4359143eda5B2d763E127Ed27c77addBc47d3
Arg [2] : _directory (address): 0xCc8f7a89d89c2AB3559f484E0C656423E979ac9C
Arg [3] : _fundingCycleStore (address): 0x6B8e01DAA8A61b544F96d2738893E05D04BF1D12
Arg [4] : _tokenStore (address): 0xCBB8e16d998161AdB20465830107ca298995f371
Arg [5] : _splitsStore (address): 0xFBE1075826B7FFd898cf8D944885ba6a8D714A7F
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb
Arg [1] : 000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d3
Arg [2] : 000000000000000000000000cc8f7a89d89c2ab3559f484e0c656423e979ac9c
Arg [3] : 0000000000000000000000006b8e01daa8a61b544f96d2738893e05d04bf1d12
Arg [4] : 000000000000000000000000cbb8e16d998161adb20465830107ca298995f371
Arg [5] : 000000000000000000000000fbe1075826b7ffd898cf8d944885ba6a8d714a7f
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.