Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60e03462 | 18921431 | 204 days ago | IN | Create: Party | 0 ETH | 0.12090883 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Party
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 0 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; import "../tokens/IERC721.sol"; import "./PartyGovernanceNFT.sol"; import "./PartyGovernance.sol"; /// @notice The governance contract that also custodies the precious NFTs. This /// is also the Governance NFT 721 contract. contract Party is PartyGovernanceNFT { // Arguments used to initialize the party. struct PartyOptions { PartyGovernance.GovernanceOpts governance; ProposalStorage.ProposalEngineOpts proposalEngine; string name; string symbol; uint256 customizationPresetId; } // Arguments used to initialize the `PartyGovernanceNFT`. struct PartyInitData { PartyOptions options; IERC721[] preciousTokens; uint256[] preciousTokenIds; address[] authorities; uint40 rageQuitTimestamp; } /// @notice Version ID of the party implementation contract. uint16 public constant VERSION_ID = 2; // Set the `Globals` contract. constructor(IGlobals globals) PartyGovernanceNFT(globals) {} /// @notice Initializer to be called prior to using the contract. /// @param initData Options used to initialize the party governance. function initialize(PartyInitData memory initData) external onlyInitialize { PartyGovernanceNFT._initialize( initData.options.name, initData.options.symbol, initData.options.customizationPresetId, initData.options.governance, initData.options.proposalEngine, initData.preciousTokens, initData.preciousTokenIds, initData.authorities, initData.rageQuitTimestamp ); } receive() external payable {} }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8; // Minimal ERC721 interface. interface IERC721 { event Transfer(address indexed owner, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed operator, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function transferFrom(address from, address to, uint256 tokenId) external; function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; function safeTransferFrom(address from, address to, uint256 tokenId) external; function approve(address operator, uint256 tokenId) external; function setApprovalForAll(address operator, bool isApproved) external; function name() external view returns (string memory); function symbol() external view returns (string memory); function getApproved(uint256 tokenId) external view returns (address); function isApprovedForAll(address owner, address operator) external view returns (bool); function ownerOf(uint256 tokenId) external view returns (address); function balanceOf(address owner) external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; import "../utils/LibSafeCast.sol"; import "../utils/LibAddress.sol"; import "openzeppelin/contracts/interfaces/IERC2981.sol"; import "../globals/IGlobals.sol"; import "../tokens/IERC721.sol"; import "../vendor/solmate/ERC721.sol"; import "./PartyGovernance.sol"; import "../renderers/RendererStorage.sol"; /// @notice ERC721 functionality built on top of `PartyGovernance`. abstract contract PartyGovernanceNFT is PartyGovernance, ERC721, IERC2981 { using LibSafeCast for uint256; using LibSafeCast for uint96; using LibERC20Compat for IERC20; using LibAddress for address payable; error FixedRageQuitTimestampError(uint40 rageQuitTimestamp); error CannotRageQuitError(uint40 rageQuitTimestamp); error CannotDisableRageQuitAfterInitializationError(); error CannotEnableRageQuitIfNotDistributionsRequireVoteError(); error InvalidTokenOrderError(); error BelowMinWithdrawAmountError(uint256 amount, uint256 minAmount); error NothingToBurnError(); event AuthorityAdded(address indexed authority); event AuthorityRemoved(address indexed authority); event RageQuitSet(uint40 oldRageQuitTimestamp, uint40 newRageQuitTimestamp); event Burn(address caller, uint256 tokenId, uint256 votingPower); event RageQuit(address caller, uint256[] tokenIds, IERC20[] withdrawTokens, address receiver); event PartyCardIntrinsicVotingPowerSet(uint256 indexed tokenId, uint256 intrinsicVotingPower); uint40 private constant ENABLE_RAGEQUIT_PERMANENTLY = 0x6b5b567bfe; // uint40(uint256(keccak256("ENABLE_RAGEQUIT_PERMANENTLY"))) uint40 private constant DISABLE_RAGEQUIT_PERMANENTLY = 0xab2cb21860; // uint40(uint256(keccak256("DISABLE_RAGEQUIT_PERMANENTLY"))) // Token address used to indicate ETH. address private constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; // The `Globals` contract storing global configuration values. This contract // is immutable and its address will never change. IGlobals private immutable _GLOBALS; /// @notice The number of tokens that have been minted. uint96 public tokenCount; /// @notice The total minted voting power. /// Capped to `_governanceValues.totalVotingPower` unless minting /// party cards for initial crowdfund. uint96 public mintedVotingPower; /// @notice The timestamp until which ragequit is enabled. Can be set to the /// `ENABLE_RAGEQUIT_PERMANENTLY`/`DISABLE_RAGEQUIT_PERMANENTLY` /// values to enable/disable ragequit permanently. /// `DISABLE_RAGEQUIT_PERMANENTLY` can only be set during /// initialization. uint40 public rageQuitTimestamp; /// @notice The voting power of `tokenId`. mapping(uint256 => uint256) public votingPowerByTokenId; /// @notice Address with authority to mint cards and update voting power for the party. mapping(address => bool) public isAuthority; function _assertAuthority() internal view { if (!isAuthority[msg.sender]) { revert NotAuthorized(); } } modifier onlySelf() { if (msg.sender != address(this)) { revert NotAuthorized(); } _; } // Set the `Globals` contract. The name or symbol of ERC721 does not matter; // it will be set in `_initialize()`. constructor(IGlobals globals) payable PartyGovernance(globals) ERC721("", "") { _GLOBALS = globals; } // Initialize storage for proxy contracts. function _initialize( string memory name_, string memory symbol_, uint256 customizationPresetId, PartyGovernance.GovernanceOpts memory governanceOpts, ProposalStorage.ProposalEngineOpts memory proposalEngineOpts, IERC721[] memory preciousTokens, uint256[] memory preciousTokenIds, address[] memory authorities, uint40 rageQuitTimestamp_ ) internal { PartyGovernance._initialize( governanceOpts, proposalEngineOpts, preciousTokens, preciousTokenIds ); name = name_; symbol = symbol_; if (rageQuitTimestamp_ != 0) { if (!proposalEngineOpts.distributionsRequireVote) { revert CannotEnableRageQuitIfNotDistributionsRequireVoteError(); } rageQuitTimestamp = rageQuitTimestamp_; } unchecked { for (uint256 i; i < authorities.length; ++i) { isAuthority[authorities[i]] = true; } } if (customizationPresetId != 0) { RendererStorage(_GLOBALS.getAddress(LibGlobals.GLOBAL_RENDERER_STORAGE)) .useCustomizationPreset(customizationPresetId); } } /// @inheritdoc EIP165 function supportsInterface( bytes4 interfaceId ) public pure override(PartyGovernance, ERC721, IERC165) returns (bool) { return PartyGovernance.supportsInterface(interfaceId) || ERC721.supportsInterface(interfaceId) || interfaceId == type(IERC2981).interfaceId; } /// @inheritdoc ERC721 function tokenURI(uint256) public view override returns (string memory) { _delegateToRenderer(); return ""; // Just to make the compiler happy. } /// @notice Returns a URI for the storefront-level metadata for your contract. function contractURI() external view returns (string memory) { _delegateToRenderer(); return ""; // Just to make the compiler happy. } /// @notice Called with the sale price to determine how much royalty // is owed and to whom. function royaltyInfo(uint256, uint256) external view returns (address, uint256) { _delegateToRenderer(); return (address(0), 0); // Just to make the compiler happy. } /// @notice Return the distribution share amount of a token. Included as an alias /// for `votePowerByTokenId` for backwards compatibility with old /// `TokenDistributor` implementations. /// @param tokenId The token ID to query. /// @return share The distribution shares of `tokenId`. function getDistributionShareOf(uint256 tokenId) external view returns (uint256) { return votingPowerByTokenId[tokenId]; } /// @notice Return the voting power share of a token. Denominated /// fractions of 1e18. I.e., 1e18 = 100%. /// @param tokenId The token ID to query. /// @return share The voting power percentage of `tokenId`. function getVotingPowerShareOf(uint256 tokenId) public view returns (uint256) { uint256 totalVotingPower = _getSharedProposalStorage().governanceValues.totalVotingPower; return totalVotingPower == 0 ? 0 : (votingPowerByTokenId[tokenId] * 1e18) / totalVotingPower; } /// @notice Mint a governance NFT for `owner` with `votingPower` and /// immediately delegate voting power to `delegate.` Only callable /// by an authority. /// @param owner The owner of the NFT. /// @param votingPower The voting power of the NFT. /// @param delegate The address to delegate voting power to. function mint( address owner, uint256 votingPower, address delegate ) external returns (uint256 tokenId) { _assertAuthority(); uint96 mintedVotingPower_ = mintedVotingPower; uint96 totalVotingPower = _getSharedProposalStorage().governanceValues.totalVotingPower; // Cap voting power to remaining unminted voting power supply. uint96 votingPower_ = votingPower.safeCastUint256ToUint96(); // Allow minting past total voting power if minting party cards for // initial crowdfund when there is no total voting power. if (totalVotingPower != 0 && totalVotingPower - mintedVotingPower_ < votingPower_) { unchecked { votingPower_ = totalVotingPower - mintedVotingPower_; } } // Update state. unchecked { tokenId = ++tokenCount; } mintedVotingPower += votingPower_; votingPowerByTokenId[tokenId] = votingPower_; emit PartyCardIntrinsicVotingPowerSet(tokenId, votingPower_); // Use delegate from party over the one set during crowdfund. address delegate_ = delegationsByVoter[owner]; if (delegate_ != address(0)) { delegate = delegate_; } _adjustVotingPower(owner, votingPower_.safeCastUint96ToInt192(), delegate); _safeMint(owner, tokenId); } /// @notice Add voting power to an existing NFT. Only callable by an /// authority. /// @param tokenId The ID of the NFT to add voting power to. /// @param votingPower The amount of voting power to add. function increaseVotingPower(uint256 tokenId, uint96 votingPower) external { _assertAuthority(); uint96 mintedVotingPower_ = mintedVotingPower; uint96 totalVotingPower = _getSharedProposalStorage().governanceValues.totalVotingPower; // Cap voting power to remaining unminted voting power supply. Allow // minting past total voting power if minting party cards for initial // crowdfund when there is no total voting power. if (totalVotingPower != 0 && totalVotingPower - mintedVotingPower_ < votingPower) { unchecked { votingPower = totalVotingPower - mintedVotingPower_; } } // Update state. mintedVotingPower += votingPower; uint256 newIntrinsicVotingPower = votingPowerByTokenId[tokenId] + votingPower; votingPowerByTokenId[tokenId] = newIntrinsicVotingPower; emit PartyCardIntrinsicVotingPowerSet(tokenId, newIntrinsicVotingPower); _adjustVotingPower(ownerOf(tokenId), votingPower.safeCastUint96ToInt192(), address(0)); // Notify third-party platforms that the party NFT metadata has updated. emit MetadataUpdate(tokenId); } /// @notice Remove voting power from an existing NFT. Only callable by an /// authority. /// @param tokenId The ID of the NFT to remove voting power from. /// @param votingPower The amount of voting power to remove. function decreaseVotingPower(uint256 tokenId, uint96 votingPower) external { _assertAuthority(); mintedVotingPower -= votingPower; votingPowerByTokenId[tokenId] -= votingPower; _adjustVotingPower(ownerOf(tokenId), -votingPower.safeCastUint96ToInt192(), address(0)); // Notify third-party platforms that the party NFT metadata has updated. emit MetadataUpdate(tokenId); } /// @notice Increase the total voting power of the party. Only callable by /// an authority. /// @param votingPower The new total voting power to add. function increaseTotalVotingPower(uint96 votingPower) external { _assertAuthority(); _getSharedProposalStorage().governanceValues.totalVotingPower += votingPower; lastTotalVotingPowerChangeTimestamp == uint40(block.timestamp); // Notify third-party platforms that the party NFT metadata has updated // for all tokens. emit BatchMetadataUpdate(0, type(uint256).max); } /// @notice Decrease the total voting power of the party. Only callable by /// an authority. /// @param votingPower The new total voting power to add. function decreaseTotalVotingPower(uint96 votingPower) external { _assertAuthority(); _getSharedProposalStorage().governanceValues.totalVotingPower -= votingPower; lastTotalVotingPowerChangeTimestamp == uint40(block.timestamp); // Notify third-party platforms that the party NFT metadata has updated // for all tokens. emit BatchMetadataUpdate(0, type(uint256).max); } /// @notice Burn governance NFTs and remove their voting power. /// @param tokenIds The IDs of the governance NFTs to burn. function burn(uint256[] memory tokenIds) public { _assertAuthority(); _burnAndUpdateVotingPower(tokenIds, false); } function _burnAndUpdateVotingPower( uint256[] memory tokenIds, bool checkIfAuthorizedToBurn ) private returns (uint96 totalVotingPowerBurned) { for (uint256 i; i < tokenIds.length; ++i) { uint256 tokenId = tokenIds[i]; address owner = ownerOf(tokenId); // Check if caller is authorized to burn the token. if (checkIfAuthorizedToBurn) { if ( msg.sender != owner && getApproved[tokenId] != msg.sender && !isApprovedForAll[owner][msg.sender] ) { revert NotAuthorized(); } } // Must be retrieved before updating voting power for token to be burned. uint96 votingPower = votingPowerByTokenId[tokenId].safeCastUint256ToUint96(); totalVotingPowerBurned += votingPower; // Update voting power for token to be burned. delete votingPowerByTokenId[tokenId]; emit PartyCardIntrinsicVotingPowerSet(tokenId, 0); _adjustVotingPower(owner, -votingPower.safeCastUint96ToInt192(), address(0)); // Burn token. _burn(tokenId); emit Burn(msg.sender, tokenId, votingPower); } // Update minted voting power. mintedVotingPower -= totalVotingPowerBurned; emit BatchMetadataUpdate(0, type(uint256).max); } /// @notice Burn governance NFT and remove its voting power. /// @param tokenId The ID of the governance NFTs to burn. function burn(uint256 tokenId) external { uint256[] memory tokenIds = new uint256[](1); tokenIds[0] = tokenId; burn(tokenIds); } /// @notice Set the timestamp until which ragequit is enabled. /// @param newRageQuitTimestamp The new ragequit timestamp. function setRageQuit(uint40 newRageQuitTimestamp) external { _assertHost(); // Prevent disabling ragequit after initialization. if (newRageQuitTimestamp == DISABLE_RAGEQUIT_PERMANENTLY) { revert CannotDisableRageQuitAfterInitializationError(); } // Prevent enabling ragequit if distributions can be created without a vote. if (!_getSharedProposalStorage().opts.distributionsRequireVote) revert CannotEnableRageQuitIfNotDistributionsRequireVoteError(); uint40 oldRageQuitTimestamp = rageQuitTimestamp; // Prevent setting timestamp if it is permanently enabled/disabled. if ( oldRageQuitTimestamp == ENABLE_RAGEQUIT_PERMANENTLY || oldRageQuitTimestamp == DISABLE_RAGEQUIT_PERMANENTLY ) { revert FixedRageQuitTimestampError(oldRageQuitTimestamp); } rageQuitTimestamp = newRageQuitTimestamp; emit RageQuitSet(oldRageQuitTimestamp, newRageQuitTimestamp); } /// @notice Burn a governance NFT and withdraw a fair share of fungible tokens from the party. /// @param tokenIds The IDs of the governance NFTs to burn. /// @param withdrawTokens The fungible tokens to withdraw. Specify the /// `ETH_ADDRESS` value to withdraw ETH. /// @param minWithdrawAmounts The minimum amount of to withdraw for each token. /// @param receiver The address to receive the withdrawn tokens. function rageQuit( uint256[] calldata tokenIds, IERC20[] calldata withdrawTokens, uint256[] calldata minWithdrawAmounts, address receiver ) external { if (tokenIds.length == 0) revert NothingToBurnError(); // Check if called by an authority. bool isAuthority_ = isAuthority[msg.sender]; // Check if ragequit is allowed. uint40 currentRageQuitTimestamp = rageQuitTimestamp; if (!isAuthority_) { if (currentRageQuitTimestamp != ENABLE_RAGEQUIT_PERMANENTLY) { if ( currentRageQuitTimestamp == DISABLE_RAGEQUIT_PERMANENTLY || currentRageQuitTimestamp < block.timestamp ) { revert CannotRageQuitError(currentRageQuitTimestamp); } } } // Used as a reentrancy guard. Will be updated back after ragequit. rageQuitTimestamp = DISABLE_RAGEQUIT_PERMANENTLY; lastTotalVotingPowerChangeTimestamp = uint40(block.timestamp); // Sum up total amount of each token to withdraw. uint256[] memory withdrawAmounts = new uint256[](withdrawTokens.length); { IERC20 prevToken; for (uint256 i; i < withdrawTokens.length; ++i) { // Check if order of tokens to transfer is valid. // Prevent null and duplicate transfers. if (prevToken >= withdrawTokens[i]) revert InvalidTokenOrderError(); prevToken = withdrawTokens[i]; // Check token's balance. uint256 balance = address(withdrawTokens[i]) == ETH_ADDRESS ? address(this).balance : withdrawTokens[i].balanceOf(address(this)); // Add fair share of tokens from the party to total. for (uint256 j; j < tokenIds.length; ++j) { // Must be retrieved before burning the token. withdrawAmounts[i] += (balance * getVotingPowerShareOf(tokenIds[j])) / 1e18; } } } { // Burn caller's party cards. This will revert if caller is not the // the owner or approved for any of the card they are attempting to // burn, not an authority, or if there are duplicate token IDs. uint96 totalVotingPowerBurned = _burnAndUpdateVotingPower(tokenIds, !isAuthority_); // Update total voting power of party. _getSharedProposalStorage().governanceValues.totalVotingPower -= totalVotingPowerBurned; } { uint16 feeBps_ = feeBps; for (uint256 i; i < withdrawTokens.length; ++i) { IERC20 token = withdrawTokens[i]; uint256 amount = withdrawAmounts[i]; // Take fee from amount. uint256 fee = (amount * feeBps_) / 1e4; if (fee > 0) { amount -= fee; // Transfer fee to fee recipient. if (address(token) == ETH_ADDRESS) { payable(feeRecipient).transferEth(fee); } else { token.compatTransfer(feeRecipient, fee); } } // Check amount is at least minimum. uint256 minAmount = minWithdrawAmounts[i]; if (amount < minAmount) { revert BelowMinWithdrawAmountError(amount, minAmount); } if (amount > 0) { // Transfer token from party to recipient. if (address(token) == ETH_ADDRESS) { payable(receiver).transferEth(amount); } else { token.compatTransfer(receiver, amount); } } } } // Update ragequit timestamp back to before. rageQuitTimestamp = currentRageQuitTimestamp; emit RageQuit(msg.sender, tokenIds, withdrawTokens, receiver); } /// @inheritdoc ERC721 function transferFrom(address owner, address to, uint256 tokenId) public override { // Transfer voting along with token. _transferVotingPower(owner, to, votingPowerByTokenId[tokenId]); super.transferFrom(owner, to, tokenId); } /// @inheritdoc ERC721 function safeTransferFrom(address owner, address to, uint256 tokenId) public override { // super.safeTransferFrom() will call transferFrom() first which will // transfer voting power. super.safeTransferFrom(owner, to, tokenId); } /// @inheritdoc ERC721 function safeTransferFrom( address owner, address to, uint256 tokenId, bytes calldata data ) public override { // super.safeTransferFrom() will call transferFrom() first which will // transfer voting power. super.safeTransferFrom(owner, to, tokenId, data); } /// @notice Add a new authority. /// @dev Used in `AddAuthorityProposal`. Only the party itself can add /// authorities to prevent it from being used anywhere else. function addAuthority(address authority) external onlySelf { isAuthority[authority] = true; emit AuthorityAdded(authority); } /// @notice Relinquish the authority role. function abdicateAuthority() external { _assertAuthority(); delete isAuthority[msg.sender]; emit AuthorityRemoved(msg.sender); } function _delegateToRenderer() private view { _readOnlyDelegateCall( // Instance of IERC721Renderer. _GLOBALS.getAddress(LibGlobals.GLOBAL_GOVERNANCE_NFT_RENDER_IMPL), msg.data ); assert(false); // Will not be reached. } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; import { ITokenDistributor } from "../distribution/ITokenDistributor.sol"; import { ReadOnlyDelegateCall } from "../utils/ReadOnlyDelegateCall.sol"; import { IERC721 } from "../tokens/IERC721.sol"; import { IERC20 } from "../tokens/IERC20.sol"; import { IERC721Receiver } from "../tokens/IERC721Receiver.sol"; import { ERC1155TokenReceiverBase } from "../vendor/solmate/ERC1155.sol"; import { LibERC20Compat } from "../utils/LibERC20Compat.sol"; import { LibRawResult } from "../utils/LibRawResult.sol"; import { LibSafeCast } from "../utils/LibSafeCast.sol"; import { IERC4906 } from "../utils/IERC4906.sol"; import { IGlobals } from "../globals/IGlobals.sol"; import { LibGlobals } from "../globals/LibGlobals.sol"; import { IProposalExecutionEngine } from "../proposals/IProposalExecutionEngine.sol"; import { LibProposal } from "../proposals/LibProposal.sol"; import { ProposalStorage } from "../proposals/ProposalStorage.sol"; import { Implementation } from "../utils/Implementation.sol"; import { Party } from "./Party.sol"; /// @notice Base contract for a Party encapsulating all governance functionality. /// @dev This contract uses IERC4906 however does not comply with the standard /// since it does emit metadata events when distributions are claimed or /// when a MetadaProvider changes its URI. This decision was made /// intentionally which is why ERC4906 is not included in `supportsInterface`. abstract contract PartyGovernance is ProposalStorage, Implementation, IERC4906, ReadOnlyDelegateCall { using LibERC20Compat for IERC20; using LibRawResult for bytes; using LibSafeCast for uint256; using LibSafeCast for int192; using LibSafeCast for uint96; // States a proposal can be in. enum ProposalStatus { // The proposal does not exist. Invalid, // The proposal has been proposed (via `propose()`), has not been vetoed // by a party host, and is within the voting window. Members can vote on // the proposal and party hosts can veto the proposal. Voting, // The proposal has either exceeded its voting window without reaching // `passThresholdBps` of votes or was vetoed by a party host. Defeated, // The proposal reached at least `passThresholdBps` of votes but is still // waiting for `executionDelay` to pass before it can be executed. Members // can continue to vote on the proposal and party hosts can veto at this time. Passed, // Same as `Passed` but now `executionDelay` has been satisfied. Any member // may execute the proposal via `execute()`, unless `maxExecutableTime` // has arrived. Ready, // The proposal has been executed at least once but has further steps to // complete so it needs to be executed again. No other proposals may be // executed while a proposal is in the `InProgress` state. No voting or // vetoing of the proposal is allowed, however it may be forcibly cancelled // via `cancel()` if the `cancelDelay` has passed since being first executed. InProgress, // The proposal was executed and completed all its steps. No voting or // vetoing can occur and it cannot be cancelled nor executed again. Complete, // The proposal was executed at least once but did not complete before // `cancelDelay` seconds passed since the first execute and was forcibly cancelled. Cancelled } struct GovernanceOpts { // Address of initial party hosts. address[] hosts; // How long people can vote on a proposal. uint40 voteDuration; // How long to wait after a proposal passes before it can be // executed. uint40 executionDelay; // Minimum ratio of accept votes to consider a proposal passed, // in bps, where 10,000 == 100%. uint16 passThresholdBps; // Total voting power of governance NFTs. uint96 totalVotingPower; // Fee bps for distributions. uint16 feeBps; // Fee recipient for distributions. address payable feeRecipient; } // A snapshot of voting power for a member. struct VotingPowerSnapshot { // The timestamp when the snapshot was taken. uint40 timestamp; // Voting power that was delegated to this user by others. uint96 delegatedVotingPower; // The intrinsic (not delegated from someone else) voting power of this user. uint96 intrinsicVotingPower; // Whether the user was delegated to another at this snapshot. bool isDelegated; } // Proposal details chosen by proposer. struct Proposal { // Time beyond which the proposal can no longer be executed. // If the proposal has already been executed, and is still InProgress, // this value is ignored. uint40 maxExecutableTime; // The minimum seconds this proposal can remain in the InProgress status // before it can be cancelled. uint40 cancelDelay; // Encoded proposal data. The first 4 bytes are the proposal type, followed // by encoded proposal args specific to the proposal type. See // ProposalExecutionEngine for details. bytes proposalData; } // Accounting and state tracking values for a proposal. struct ProposalStateValues { // When the proposal was proposed. uint40 proposedTime; // When the proposal passed the vote. uint40 passedTime; // When the proposal was first executed. uint40 executedTime; // When the proposal completed. uint40 completedTime; // Number of accept votes. uint96 votes; // -1 == vetoed // Number of total voting power at time proposal created. uint96 totalVotingPower; // Number of hosts at time proposal created uint8 numHosts; // Number of hosts that accepted proposal uint8 numHostsAccepted; // Cached vote duration from proposal creation. uint40 voteDuration; // Cached execution delay from proposal creation. uint40 executionDelay; // Cached pass threshold bps from proposal creation. uint16 passThresholdBps; } // Storage states for a proposal. struct ProposalState { // Accounting and state tracking values. ProposalStateValues values; // Hash of the proposal. bytes32 hash; // Whether a member has voted for (accepted) this proposal already. mapping(address => bool) hasVoted; } event Proposed(uint256 proposalId, address proposer, Proposal proposal); event ProposalAccepted(uint256 proposalId, address voter, uint256 weight); event EmergencyExecute(address target, bytes data, uint256 amountEth); event ProposalPassed(uint256 indexed proposalId); event ProposalVetoed(uint256 indexed proposalId, address host); event ProposalExecuted(uint256 indexed proposalId, address executor, bytes nextProgressData); event ProposalCancelled(uint256 indexed proposalId); event DistributionCreated( ITokenDistributor.TokenType tokenType, address token, uint256 tokenId ); event PartyDelegateUpdated(address indexed owner, address indexed delegate); event HostStatusTransferred(address oldHost, address newHost); event EmergencyExecuteDisabled(); event PartyVotingSnapshotCreated( address indexed voter, uint40 timestamp, uint96 delegatedVotingPower, uint96 intrinsicVotingPower, bool isDelegated ); error MismatchedPreciousListLengths(); error BadProposalStatusError(ProposalStatus status); error BadProposalHashError(bytes32 proposalHash, bytes32 actualHash); error ExecutionTimeExceededError(uint40 maxExecutableTime, uint40 timestamp); error NotAuthorized(); error InvalidDelegateError(); error BadPreciousListError(); error OnlyWhenEmergencyActionsAllowedError(); error OnlyWhenEnabledError(); error AlreadyVotedError(address voter); error InvalidNewHostError(); error ProposalCannotBeCancelledYetError(uint40 currentTime, uint40 cancelTime); error InvalidBpsError(uint16 bps); error InvalidGovernanceParameter(uint256 value); error DistributionsRequireVoteError(); error PartyNotStartedError(); error CannotModifyTotalVotingPowerAndAcceptError(); error TooManyHosts(); uint256 private constant UINT40_HIGH_BIT = 1 << 39; uint96 private constant VETO_VALUE = type(uint96).max; // The `Globals` contract storing global configuration values. This contract // is immutable and it’s address will never change. IGlobals private immutable _GLOBALS; /// @notice Whether the DAO has emergency powers for this party. bool public emergencyExecuteDisabled; /// @notice Distribution fee bps. uint16 public feeBps; /// @notice Distribution fee recipient. address payable public feeRecipient; /// @notice The timestamp of the last time total voting power changed in the party. uint40 public lastTotalVotingPowerChangeTimestamp; /// @notice The hash of the list of precious NFTs guarded by the party. bytes32 public preciousListHash; /// @notice The last proposal ID that was used. 0 means no proposals have been made. uint256 public lastProposalId; /// @notice Whether an address is a party host. mapping(address => bool) public isHost; /// @notice The last person a voter delegated its voting power to. mapping(address => address) public delegationsByVoter; /// @notice Number of hosts for this party uint8 public numHosts; /// @notice ProposalState by proposal ID. mapping(uint256 => ProposalState) private _proposalStateByProposalId; /// @notice Snapshots of voting power per user, each sorted by increasing time. mapping(address => VotingPowerSnapshot[]) private _votingPowerSnapshotsByVoter; function _assertHost() internal view { if (!isHost[msg.sender]) { revert NotAuthorized(); } } function _assertActiveMember() internal view { VotingPowerSnapshot memory snap = _getLastVotingPowerSnapshotForVoter(msg.sender); // Must have either delegated voting power or intrinsic voting power. if (snap.intrinsicVotingPower == 0 && snap.delegatedVotingPower == 0) { revert NotAuthorized(); } } // Only the party DAO multisig can call. modifier onlyPartyDao() { { address partyDao = _GLOBALS.getAddress(LibGlobals.GLOBAL_DAO_WALLET); if (msg.sender != partyDao) { revert NotAuthorized(); } } _; } // Only the party DAO multisig or a party host can call. modifier onlyPartyDaoOrHost() { address partyDao = _GLOBALS.getAddress(LibGlobals.GLOBAL_DAO_WALLET); if (msg.sender != partyDao && !isHost[msg.sender]) { revert NotAuthorized(); } _; } // Only if `emergencyExecuteDisabled` is not true. modifier onlyWhenEmergencyExecuteAllowed() { if (emergencyExecuteDisabled) { revert OnlyWhenEmergencyActionsAllowedError(); } _; } function _assertNotGloballyDisabled() internal view { if (_GLOBALS.getBool(LibGlobals.GLOBAL_DISABLE_PARTY_ACTIONS)) { revert OnlyWhenEnabledError(); } } // Set the `Globals` contract. constructor(IGlobals globals) { _GLOBALS = globals; } // Initialize storage for proxy contracts and initialize the proposal execution engine. function _initialize( GovernanceOpts memory govOpts, ProposalStorage.ProposalEngineOpts memory proposalEngineOpts, IERC721[] memory preciousTokens, uint256[] memory preciousTokenIds ) internal virtual { // Check BPS are valid. if (govOpts.feeBps > 1e4) { revert InvalidBpsError(govOpts.feeBps); } if (govOpts.voteDuration < 1 hours) { revert InvalidGovernanceParameter(govOpts.voteDuration); } if (govOpts.passThresholdBps == 0 || govOpts.passThresholdBps > 1e4) { revert InvalidBpsError(govOpts.passThresholdBps); } if (govOpts.executionDelay == 0 || govOpts.executionDelay > 30 days) { revert InvalidGovernanceParameter(govOpts.executionDelay); } // Initialize the proposal execution engine. _initProposalImpl( IProposalExecutionEngine(_GLOBALS.getAddress(LibGlobals.GLOBAL_PROPOSAL_ENGINE_IMPL)), abi.encode(proposalEngineOpts) ); // Set the governance parameters. _getSharedProposalStorage().governanceValues = GovernanceValues({ voteDuration: govOpts.voteDuration, executionDelay: govOpts.executionDelay, passThresholdBps: govOpts.passThresholdBps, totalVotingPower: govOpts.totalVotingPower }); numHosts = uint8(govOpts.hosts.length); // Set fees. feeBps = govOpts.feeBps; feeRecipient = govOpts.feeRecipient; // Set the precious list. _setPreciousList(preciousTokens, preciousTokenIds); // Set the party hosts. if (govOpts.hosts.length > type(uint8).max) { revert TooManyHosts(); } for (uint256 i = 0; i < govOpts.hosts.length; ++i) { isHost[govOpts.hosts[i]] = true; } } /// @dev Forward all unknown read-only calls to the proposal execution engine. /// Initial use case is to facilitate eip-1271 signatures. fallback() external { bytes4 functionSelector = bytes4(msg.data[0:4]); if ( functionSelector == ERC1155TokenReceiverBase.onERC1155BatchReceived.selector || functionSelector == ERC1155TokenReceiverBase.onERC1155Received.selector || functionSelector == IERC721Receiver.onERC721Received.selector ) { assembly { let freeMem := mload(0x40) mstore(freeMem, functionSelector) mstore(0x40, add(freeMem, 0x20)) return(freeMem, 0x20) } } _readOnlyDelegateCall(address(_getSharedProposalStorage().engineImpl), msg.data); } /// @notice Query if a contract implements an interface. /// @param interfaceId The interface identifier, as specified in ERC-165 /// @return `true` if the contract implements `interfaceId` and /// `interfaceId` is not 0xffffffff, `false` otherwise function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) { return interfaceId == type(IERC721Receiver).interfaceId || interfaceId == type(ERC1155TokenReceiverBase).interfaceId; } /// @notice Get the current `ProposalExecutionEngine` instance. function getProposalExecutionEngine() external view returns (IProposalExecutionEngine) { return _getSharedProposalStorage().engineImpl; } /// @notice Get the current `ProposalEngineOpts` options. function getProposalEngineOpts() external view returns (ProposalEngineOpts memory) { return _getSharedProposalStorage().opts; } /// @notice Get the total voting power of `voter` at a snapshot `snapIndex`, with checks to /// make sure it is the latest voting snapshot =< `timestamp`. /// @param voter The address of the voter. /// @param timestamp The timestamp to get the voting power at. /// @param snapIndex The index of the snapshot to get the voting power at. /// @return votingPower The total voting power of `voter` at `timestamp`. function getVotingPowerAt( address voter, uint40 timestamp, uint256 snapIndex ) public view returns (uint96 votingPower) { VotingPowerSnapshot memory snap = _getVotingPowerSnapshotAt(voter, timestamp, snapIndex); return (snap.isDelegated ? 0 : snap.intrinsicVotingPower) + snap.delegatedVotingPower; } /// @notice Get the state of a proposal. /// @param proposalId The ID of the proposal. /// @return status The status of the proposal. /// @return values The state of the proposal. function getProposalStateInfo( uint256 proposalId ) external view returns (ProposalStatus status, ProposalStateValues memory values) { values = _proposalStateByProposalId[proposalId].values; status = _getProposalStatus(values); } /// @notice Retrieve fixed governance parameters. /// @return gv The governance parameters of this party. function getGovernanceValues() external view returns (GovernanceValues memory) { return _getSharedProposalStorage().governanceValues; } /// @notice Get the hash of a proposal. /// @dev Proposal details are not stored on-chain so the hash is used to enforce /// consistency between calls. /// @param proposal The proposal to hash. /// @return proposalHash The hash of the proposal. function getProposalHash(Proposal memory proposal) public pure returns (bytes32 proposalHash) { // Hash the proposal in-place. Equivalent to: // keccak256(abi.encode( // proposal.maxExecutableTime, // proposal.cancelDelay, // keccak256(proposal.proposalData) // )) bytes32 dataHash = keccak256(proposal.proposalData); assembly { // Overwrite the data field with the hash of its contents and then // hash the struct. let dataPos := add(proposal, 0x40) let t := mload(dataPos) mstore(dataPos, dataHash) proposalHash := keccak256(proposal, 0x60) // Restore the data field. mstore(dataPos, t) } } /// @notice Get the index of the most recent voting power snapshot <= `timestamp`. /// @param voter The address of the voter. /// @param timestamp The timestamp to get the snapshot index at. /// @return index The index of the snapshot. function findVotingPowerSnapshotIndex( address voter, uint40 timestamp ) public view returns (uint256 index) { VotingPowerSnapshot[] storage snaps = _votingPowerSnapshotsByVoter[voter]; // Derived from Open Zeppelin binary search // ref: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Checkpoints.sol#L39 uint256 high = snaps.length; uint256 low = 0; while (low < high) { uint256 mid = (low + high) / 2; if (snaps[mid].timestamp > timestamp) { // Entry is too recent. high = mid; } else { // Entry is older. This is our best guess for now. low = mid + 1; } } // Return `type(uint256).max` if no valid voting snapshots found. return high == 0 ? type(uint256).max : high - 1; } /// @notice Pledge your intrinsic voting power to a new delegate, removing it from /// the old one (if any). /// @param delegate The address to delegating voting power to. function delegateVotingPower(address delegate) external { _adjustVotingPower(msg.sender, 0, delegate); } /// @notice Transfer party host status to another. /// @param newPartyHost The address of the new host. function abdicateHost(address newPartyHost) external { _assertHost(); // 0 is a special case burn address. if (newPartyHost != address(0)) { // Can only abdicate host revert InvalidNewHostError(); } else { // Burned the host status --numHosts; } isHost[msg.sender] = false; emit HostStatusTransferred(msg.sender, newPartyHost); } /// @notice Create a token distribution by moving the party's entire balance /// to the `TokenDistributor` contract and immediately creating a /// distribution governed by this party. /// @dev The `feeBps` and `feeRecipient` this party was created with will be /// propagated to the distribution. Party members are entitled to a /// share of the distribution's tokens proportionate to their relative /// voting power in this party (less the fee). /// @dev Allow this to be called by the party itself for `FractionalizeProposal`. /// @param tokenType The type of token to distribute. /// @param token The address of the token to distribute. /// @param tokenId The ID of the token to distribute. Currently unused but /// may be used in the future to support other distribution types. /// @return distInfo The information about the created distribution. function distribute( uint256 amount, ITokenDistributor.TokenType tokenType, address token, uint256 tokenId ) external returns (ITokenDistributor.DistributionInfo memory distInfo) { _assertNotGloballyDisabled(); // Ignore if the party is calling functions on itself, like with // `FractionalizeProposal` and `DistributionProposal`. if (msg.sender != address(this)) { // Must not require a vote to create a distribution, otherwise // distributions can only be created through a distribution // proposal. if (_getSharedProposalStorage().opts.distributionsRequireVote) { revert DistributionsRequireVoteError(); } // Must be an active member. VotingPowerSnapshot memory snap = _getLastVotingPowerSnapshotForVoter(msg.sender); if (snap.intrinsicVotingPower == 0 && snap.delegatedVotingPower == 0) { revert NotAuthorized(); } } // Prevent creating a distribution if the party has not started. if (_getSharedProposalStorage().governanceValues.totalVotingPower == 0) { revert PartyNotStartedError(); } // Get the address of the token distributor. ITokenDistributor distributor = ITokenDistributor( _GLOBALS.getAddress(LibGlobals.GLOBAL_TOKEN_DISTRIBUTOR) ); emit DistributionCreated(tokenType, token, tokenId); _emitMetadataUpdateEvent(); // Create a native token distribution. address payable feeRecipient_ = feeRecipient; uint16 feeBps_ = feeBps; if (tokenType == ITokenDistributor.TokenType.Native) { return distributor.createNativeDistribution{ value: amount }( Party(payable(address(this))), feeRecipient_, feeBps_ ); } // Otherwise must be an ERC20 token distribution. assert(tokenType == ITokenDistributor.TokenType.Erc20); IERC20(token).compatTransfer(address(distributor), amount); return distributor.createErc20Distribution( IERC20(token), Party(payable(address(this))), feeRecipient_, feeBps_ ); } /// @notice Make a proposal for members to vote on and cast a vote to accept it /// as well. /// @dev Only an active member (has voting power) can call this. /// Afterwards, members can vote to support it with `accept()` or a party /// host can unilaterally reject the proposal with `veto()`. /// @param proposal The details of the proposal. /// @param latestSnapIndex The index of the caller's most recent voting power /// snapshot before the proposal was created. Should /// be retrieved off-chain and passed in. function propose( Proposal memory proposal, uint256 latestSnapIndex ) external returns (uint256 proposalId) { _assertActiveMember(); proposalId = ++lastProposalId; ProposalStorage.GovernanceValues memory gv = _getSharedProposalStorage().governanceValues; // Store the time the proposal was created and the proposal hash. ( _proposalStateByProposalId[proposalId].values, _proposalStateByProposalId[proposalId].hash ) = ( ProposalStateValues({ proposedTime: uint40(block.timestamp), passedTime: 0, executedTime: 0, completedTime: 0, votes: 0, totalVotingPower: gv.totalVotingPower, numHosts: numHosts, numHostsAccepted: 0, voteDuration: gv.voteDuration, executionDelay: gv.executionDelay, passThresholdBps: gv.passThresholdBps }), getProposalHash(proposal) ); emit Proposed(proposalId, msg.sender, proposal); accept(proposalId, latestSnapIndex); _emitMetadataUpdateEvent(); } /// @notice Vote to support a proposed proposal. /// @dev The voting power cast will be the effective voting power of the caller /// just before `propose()` was called (see `getVotingPowerAt()`). /// If the proposal reaches `passThresholdBps` acceptance ratio then the /// proposal will be in the `Passed` state and will be executable after /// the `executionDelay` has passed, putting it in the `Ready` state. /// @param proposalId The ID of the proposal to accept. /// @param snapIndex The index of the caller's last voting power snapshot /// before the proposal was created. Should be retrieved /// off-chain and passed in. /// @return totalVotes The total votes cast on the proposal. function accept(uint256 proposalId, uint256 snapIndex) public returns (uint256 totalVotes) { // Get the information about the proposal. ProposalState storage info = _proposalStateByProposalId[proposalId]; ProposalStateValues memory values = info.values; // Can only vote in certain proposal statuses. { ProposalStatus status = _getProposalStatus(values); // Allow voting even if the proposal is passed/ready so it can // potentially reach 100% consensus, which unlocks special // behaviors for certain proposal types. if ( status != ProposalStatus.Voting && status != ProposalStatus.Passed && status != ProposalStatus.Ready ) { revert BadProposalStatusError(status); } } // Prevent voting in the same block as the last total voting power // change. This is to prevent an exploit where a member can, for // example, rage quit to reduce the total voting power of the party, // then propose and vote in the same block since `getVotingPowerAt()` // uses `values.proposedTime - 1`. This would allow them to use the // voting power snapshot just before their card was burned to vote, // potentially passing a proposal that would have otherwise not passed. if (lastTotalVotingPowerChangeTimestamp == block.timestamp) { revert CannotModifyTotalVotingPowerAndAcceptError(); } // Cannot vote twice. if (info.hasVoted[msg.sender]) { revert AlreadyVotedError(msg.sender); } // Mark the caller as having voted. info.hasVoted[msg.sender] = true; // Increase the total votes that have been cast on this proposal. uint96 votingPower = getVotingPowerAt(msg.sender, values.proposedTime - 1, snapIndex); values.votes += votingPower; if (isHost[msg.sender]) { ++values.numHostsAccepted; } info.values = values; emit ProposalAccepted(proposalId, msg.sender, votingPower); // Update the proposal status if it has reached the pass threshold. if ( values.passedTime == 0 && (uint256(values.votes) * 1e4) / uint256(values.totalVotingPower) >= uint256(values.passThresholdBps) ) { info.values.passedTime = uint40(block.timestamp); emit ProposalPassed(proposalId); _emitMetadataUpdateEvent(); } return values.votes; } /// @notice As a party host, veto a proposal, unilaterally rejecting it. /// @dev The proposal will never be executable and cannot be voted on anymore. /// A proposal that has been already executed at least once (in the `InProgress` status) /// cannot be vetoed. /// @param proposalId The ID of the proposal to veto. function veto(uint256 proposalId) external { _assertHost(); // Setting `votes` to -1 indicates a veto. ProposalState storage info = _proposalStateByProposalId[proposalId]; ProposalStateValues memory values = info.values; { ProposalStatus status = _getProposalStatus(values); // Proposal must be in one of the following states. if ( status != ProposalStatus.Voting && status != ProposalStatus.Passed && status != ProposalStatus.Ready ) { revert BadProposalStatusError(status); } } // -1 indicates veto. info.values.votes = VETO_VALUE; emit ProposalVetoed(proposalId, msg.sender); _emitMetadataUpdateEvent(); } /// @notice Executes a proposal that has passed governance. /// @dev The proposal must be in the `Ready` or `InProgress` status. /// A `ProposalExecuted` event will be emitted with a non-empty `nextProgressData` /// if the proposal has extra steps (must be executed again) to carry out, /// in which case `nextProgressData` should be passed into the next `execute()` call. /// The `ProposalExecutionEngine` enforces that only one `InProgress` proposal /// is active at a time, so that proposal must be completed or cancelled via `cancel()` /// in order to execute a different proposal. /// `extraData` is optional, off-chain data a proposal might need to execute a step. /// @param proposalId The ID of the proposal to execute. /// @param proposal The details of the proposal. /// @param preciousTokens The tokens that the party considers precious. /// @param preciousTokenIds The token IDs associated with each precious token. /// @param progressData The data returned from the last `execute()` call, if any. /// @param extraData Off-chain data a proposal might need to execute a step. function execute( uint256 proposalId, Proposal memory proposal, IERC721[] memory preciousTokens, uint256[] memory preciousTokenIds, bytes calldata progressData, bytes calldata extraData ) external payable { _assertNotGloballyDisabled(); _assertActiveMember(); // Get information about the proposal. ProposalState storage proposalState = _proposalStateByProposalId[proposalId]; // Proposal details must remain the same from `propose()`. _validateProposalHash(proposal, proposalState.hash); ProposalStateValues memory values = proposalState.values; ProposalStatus status = _getProposalStatus(values); // The proposal must be executable or have already been executed but still // has more steps to go. if (status != ProposalStatus.Ready && status != ProposalStatus.InProgress) { revert BadProposalStatusError(status); } if (status == ProposalStatus.Ready) { // If the proposal has not been executed yet, make sure it hasn't // expired. Note that proposals that have been executed // (but still have more steps) ignore `maxExecutableTime`. if (proposal.maxExecutableTime < block.timestamp) { revert ExecutionTimeExceededError( proposal.maxExecutableTime, uint40(block.timestamp) ); } proposalState.values.executedTime = uint40(block.timestamp); } // Check that the precious list is valid. if (!_isPreciousListCorrect(preciousTokens, preciousTokenIds)) { revert BadPreciousListError(); } // Preemptively set the proposal to completed to avoid it being executed // again in a deeper call. proposalState.values.completedTime = uint40(block.timestamp); // Execute the proposal. bool completed = _executeProposal( proposalId, proposal, preciousTokens, preciousTokenIds, _getProposalFlags(values), progressData, extraData ); if (!completed) { // Proposal did not complete. proposalState.values.completedTime = 0; } } /// @notice Cancel a (probably stuck) InProgress proposal. /// @dev `proposal.cancelDelay` seconds must have passed since it was first /// executed for this to be valid. The currently active proposal will /// simply be yeeted out of existence so another proposal can execute. /// This is intended to be a last resort and can leave the party in a /// broken state. Whenever possible, active proposals should be /// allowed to complete their lifecycle. /// @param proposalId The ID of the proposal to cancel. /// @param proposal The details of the proposal to cancel. function cancel(uint256 proposalId, Proposal calldata proposal) external { _assertActiveMember(); // Get information about the proposal. ProposalState storage proposalState = _proposalStateByProposalId[proposalId]; // Proposal details must remain the same from `propose()`. _validateProposalHash(proposal, proposalState.hash); ProposalStateValues memory values = proposalState.values; { // Must be `InProgress`. ProposalStatus status = _getProposalStatus(values); if (status != ProposalStatus.InProgress) { revert BadProposalStatusError(status); } } { // Limit the `cancelDelay` to the global max and min cancel delay // to mitigate parties accidentally getting stuck forever by setting an // unrealistic `cancelDelay` or being reckless with too low a // cancel delay. uint256 cancelDelay = proposal.cancelDelay; uint256 globalMaxCancelDelay = _GLOBALS.getUint256( LibGlobals.GLOBAL_PROPOSAL_MAX_CANCEL_DURATION ); uint256 globalMinCancelDelay = _GLOBALS.getUint256( LibGlobals.GLOBAL_PROPOSAL_MIN_CANCEL_DURATION ); if (globalMaxCancelDelay != 0) { // Only if we have one set. if (cancelDelay > globalMaxCancelDelay) { cancelDelay = globalMaxCancelDelay; } } if (globalMinCancelDelay != 0) { // Only if we have one set. if (cancelDelay < globalMinCancelDelay) { cancelDelay = globalMinCancelDelay; } } uint256 cancelTime = values.executedTime + cancelDelay; // Must not be too early. if (block.timestamp < cancelTime) { revert ProposalCannotBeCancelledYetError( uint40(block.timestamp), uint40(cancelTime) ); } } // Mark the proposal as cancelled by setting the completed time to the current // time with the high bit set. proposalState.values.completedTime = uint40(block.timestamp | UINT40_HIGH_BIT); { // Delegatecall into the proposal engine impl to perform the cancel. (bool success, bytes memory resultData) = ( address(_getSharedProposalStorage().engineImpl) ).delegatecall(abi.encodeCall(IProposalExecutionEngine.cancelProposal, (proposalId))); if (!success) { resultData.rawRevert(); } } emit ProposalCancelled(proposalId); _emitMetadataUpdateEvent(); } /// @notice As the DAO, execute an arbitrary function call from this contract. /// @dev Emergency actions must not be revoked for this to work. /// @param targetAddress The contract to call. /// @param targetCallData The data to pass to the contract. /// @param amountEth The amount of ETH to send to the contract. function emergencyExecute( address targetAddress, bytes calldata targetCallData, uint256 amountEth ) external payable onlyPartyDao onlyWhenEmergencyExecuteAllowed { (bool success, bytes memory res) = targetAddress.call{ value: amountEth }(targetCallData); if (!success) { res.rawRevert(); } emit EmergencyExecute(targetAddress, targetCallData, amountEth); } /// @notice Revoke the DAO's ability to call emergencyExecute(). /// @dev Either the DAO or the party host can call this. function disableEmergencyExecute() external onlyPartyDaoOrHost { emergencyExecuteDisabled = true; emit EmergencyExecuteDisabled(); } function _executeProposal( uint256 proposalId, Proposal memory proposal, IERC721[] memory preciousTokens, uint256[] memory preciousTokenIds, uint256 flags, bytes memory progressData, bytes memory extraData ) private returns (bool completed) { // Setup the arguments for the proposal execution engine. IProposalExecutionEngine.ExecuteProposalParams memory executeParams = IProposalExecutionEngine.ExecuteProposalParams({ proposalId: proposalId, proposalData: proposal.proposalData, progressData: progressData, extraData: extraData, preciousTokens: preciousTokens, preciousTokenIds: preciousTokenIds, flags: flags }); // Get the progress data returned after the proposal is executed. bytes memory nextProgressData; { // Execute the proposal. (bool success, bytes memory resultData) = address( _getSharedProposalStorage().engineImpl ).delegatecall( abi.encodeCall(IProposalExecutionEngine.executeProposal, (executeParams)) ); if (!success) { resultData.rawRevert(); } nextProgressData = abi.decode(resultData, (bytes)); } emit ProposalExecuted(proposalId, msg.sender, nextProgressData); _emitMetadataUpdateEvent(); // If the returned progress data is empty, then the proposal completed // and it should not be executed again. return nextProgressData.length == 0; } // Get the most recent voting power snapshot <= timestamp using `hintindex` as a "hint". function _getVotingPowerSnapshotAt( address voter, uint40 timestamp, uint256 hintIndex ) internal view returns (VotingPowerSnapshot memory snap) { VotingPowerSnapshot[] storage snaps = _votingPowerSnapshotsByVoter[voter]; uint256 snapsLength = snaps.length; if (snapsLength != 0) { if ( // Hint is within bounds. hintIndex < snapsLength && // Snapshot is not too recent. snaps[hintIndex].timestamp <= timestamp && // Snapshot is not too old. (hintIndex == snapsLength - 1 || snaps[hintIndex + 1].timestamp > timestamp) ) { return snaps[hintIndex]; } // Hint was wrong, fallback to binary search to find snapshot. hintIndex = findVotingPowerSnapshotIndex(voter, timestamp); // Check that snapshot was found. if (hintIndex != type(uint256).max) { return snaps[hintIndex]; } } // No snapshot found. return snap; } // Transfers some voting power of `from` to `to`. The total voting power of // their respective delegates will be updated as well. function _transferVotingPower(address from, address to, uint256 power) internal { int192 powerI192 = power.safeCastUint256ToInt192(); _adjustVotingPower(from, -powerI192, address(0)); _adjustVotingPower(to, powerI192, address(0)); } // Increase `voter`'s intrinsic voting power and update their delegate if delegate is nonzero. function _adjustVotingPower(address voter, int192 votingPower, address delegate) internal { VotingPowerSnapshot memory oldSnap = _getLastVotingPowerSnapshotForVoter(voter); address oldDelegate = delegationsByVoter[voter]; // If `oldDelegate` is zero and `voter` never delegated, then have // `voter` delegate to themself. oldDelegate = oldDelegate == address(0) ? voter : oldDelegate; // If the new `delegate` is zero, use the current (old) delegate. delegate = delegate == address(0) ? oldDelegate : delegate; VotingPowerSnapshot memory newSnap = VotingPowerSnapshot({ timestamp: uint40(block.timestamp), delegatedVotingPower: oldSnap.delegatedVotingPower, intrinsicVotingPower: (oldSnap.intrinsicVotingPower.safeCastUint96ToInt192() + votingPower).safeCastInt192ToUint96(), isDelegated: delegate != voter }); _insertVotingPowerSnapshot(voter, newSnap); delegationsByVoter[voter] = delegate; // This event is emitted even if the delegate did not change. emit PartyDelegateUpdated(voter, delegate); // Handle rebalancing delegates. _rebalanceDelegates(voter, oldDelegate, delegate, oldSnap, newSnap); } // Update the delegated voting power of the old and new delegates delegated to // by `voter` based on the snapshot change. function _rebalanceDelegates( address voter, address oldDelegate, address newDelegate, VotingPowerSnapshot memory oldSnap, VotingPowerSnapshot memory newSnap ) private { if (newDelegate == address(0) || oldDelegate == address(0)) { revert InvalidDelegateError(); } if (oldDelegate != voter && oldDelegate != newDelegate) { // Remove past voting power from old delegate. VotingPowerSnapshot memory oldDelegateSnap = _getLastVotingPowerSnapshotForVoter( oldDelegate ); VotingPowerSnapshot memory updatedOldDelegateSnap = VotingPowerSnapshot({ timestamp: uint40(block.timestamp), delegatedVotingPower: oldDelegateSnap.delegatedVotingPower - oldSnap.intrinsicVotingPower, intrinsicVotingPower: oldDelegateSnap.intrinsicVotingPower, isDelegated: oldDelegateSnap.isDelegated }); _insertVotingPowerSnapshot(oldDelegate, updatedOldDelegateSnap); } if (newDelegate != voter) { // Not delegating to self. // Add new voting power to new delegate. VotingPowerSnapshot memory newDelegateSnap = _getLastVotingPowerSnapshotForVoter( newDelegate ); uint96 newDelegateDelegatedVotingPower = newDelegateSnap.delegatedVotingPower + newSnap.intrinsicVotingPower; if (newDelegate == oldDelegate) { // If the old and new delegate are the same, subtract the old // intrinsic voting power of the voter, or else we will double // count a portion of it. newDelegateDelegatedVotingPower -= oldSnap.intrinsicVotingPower; } VotingPowerSnapshot memory updatedNewDelegateSnap = VotingPowerSnapshot({ timestamp: uint40(block.timestamp), delegatedVotingPower: newDelegateDelegatedVotingPower, intrinsicVotingPower: newDelegateSnap.intrinsicVotingPower, isDelegated: newDelegateSnap.isDelegated }); _insertVotingPowerSnapshot(newDelegate, updatedNewDelegateSnap); } } // Append a new voting power snapshot, overwriting the last one if possible. function _insertVotingPowerSnapshot(address voter, VotingPowerSnapshot memory snap) private { emit PartyVotingSnapshotCreated( voter, snap.timestamp, snap.delegatedVotingPower, snap.intrinsicVotingPower, snap.isDelegated ); VotingPowerSnapshot[] storage voterSnaps = _votingPowerSnapshotsByVoter[voter]; uint256 n = voterSnaps.length; // If same timestamp as last entry, overwrite the last snapshot, otherwise append. if (n != 0) { VotingPowerSnapshot memory lastSnap = voterSnaps[n - 1]; if (lastSnap.timestamp == snap.timestamp) { voterSnaps[n - 1] = snap; return; } } voterSnaps.push(snap); } function _getLastVotingPowerSnapshotForVoter( address voter ) private view returns (VotingPowerSnapshot memory snap) { VotingPowerSnapshot[] storage voterSnaps = _votingPowerSnapshotsByVoter[voter]; uint256 n = voterSnaps.length; if (n != 0) { snap = voterSnaps[n - 1]; } } function _getProposalFlags(ProposalStateValues memory pv) private pure returns (uint256) { uint256 flags = 0; if (_isUnanimousVotes(pv.votes, pv.totalVotingPower)) { flags = flags | LibProposal.PROPOSAL_FLAG_UNANIMOUS; } if (_hostsAccepted(pv.numHosts, pv.numHostsAccepted)) { flags = flags | LibProposal.PROPOSAL_FLAG_HOSTS_ACCEPT; } return flags; } function _getProposalStatus( ProposalStateValues memory pv ) private view returns (ProposalStatus status) { // Never proposed. if (pv.proposedTime == 0) { return ProposalStatus.Invalid; } // Executed at least once. if (pv.executedTime != 0) { if (pv.completedTime == 0) { return ProposalStatus.InProgress; } // completedTime high bit will be set if cancelled. if (pv.completedTime & UINT40_HIGH_BIT == UINT40_HIGH_BIT) { return ProposalStatus.Cancelled; } return ProposalStatus.Complete; } // Vetoed. if (pv.votes == type(uint96).max) { return ProposalStatus.Defeated; } uint40 t = uint40(block.timestamp); if (pv.passedTime != 0) { // Ready. if (pv.passedTime + pv.executionDelay <= t) { return ProposalStatus.Ready; } // If unanimous, we skip the execution delay. if (_isUnanimousVotes(pv.votes, pv.totalVotingPower)) { return ProposalStatus.Ready; } // If all hosts voted, skip execution delay if (_hostsAccepted(pv.numHosts, pv.numHostsAccepted)) { return ProposalStatus.Ready; } // Passed. return ProposalStatus.Passed; } // Voting window expired. if (pv.proposedTime + pv.voteDuration <= t) { return ProposalStatus.Defeated; } return ProposalStatus.Voting; } function _isUnanimousVotes( uint96 totalVotes, uint96 totalVotingPower ) private pure returns (bool) { uint256 acceptanceRatio = (uint256(totalVotes) * 1e4) / totalVotingPower; // If >= 99.99% acceptance, consider it unanimous. // The minting formula for voting power is a bit lossy, so we check // for slightly less than 100%. return acceptanceRatio >= 0.9999e4; } function _hostsAccepted( uint8 snapshotNumHosts, uint8 numHostsAccepted ) private pure returns (bool) { return snapshotNumHosts > 0 && snapshotNumHosts == numHostsAccepted; } function _areVotesPassing( uint96 voteCount, uint96 totalVotingPower, uint16 passThresholdBps ) private pure returns (bool) { return (uint256(voteCount) * 1e4) / uint256(totalVotingPower) >= uint256(passThresholdBps); } function _setPreciousList( IERC721[] memory preciousTokens, uint256[] memory preciousTokenIds ) private { if (preciousTokens.length != preciousTokenIds.length) { revert MismatchedPreciousListLengths(); } preciousListHash = _hashPreciousList(preciousTokens, preciousTokenIds); } function _isPreciousListCorrect( IERC721[] memory preciousTokens, uint256[] memory preciousTokenIds ) private view returns (bool) { return preciousListHash == _hashPreciousList(preciousTokens, preciousTokenIds); } function _hashPreciousList( IERC721[] memory preciousTokens, uint256[] memory preciousTokenIds ) internal pure returns (bytes32 h) { assembly { mstore(0x00, keccak256(add(preciousTokens, 0x20), mul(mload(preciousTokens), 0x20))) mstore(0x20, keccak256(add(preciousTokenIds, 0x20), mul(mload(preciousTokenIds), 0x20))) h := keccak256(0x00, 0x40) } } function _emitMetadataUpdateEvent() internal { emit BatchMetadataUpdate(0, type(uint256).max); } // Assert that the hash of a proposal matches expectedHash. function _validateProposalHash(Proposal memory proposal, bytes32 expectedHash) private pure { bytes32 actualHash = getProposalHash(proposal); if (expectedHash != actualHash) { revert BadProposalHashError(actualHash, expectedHash); } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; library LibSafeCast { error Uint256ToUint96CastOutOfRange(uint256 v); error Uint256ToInt192CastOutOfRange(uint256 v); error Int192ToUint96CastOutOfRange(int192 i192); error Uint256ToInt128CastOutOfRangeError(uint256 u256); error Uint256ToUint128CastOutOfRangeError(uint256 u256); error Uint256ToUint40CastOutOfRangeError(uint256 u256); error Uint96ToUint16CastOutOfRange(uint96 u96); function safeCastUint256ToUint96(uint256 v) internal pure returns (uint96) { if (v > uint256(type(uint96).max)) { revert Uint256ToUint96CastOutOfRange(v); } return uint96(v); } function safeCastUint256ToUint128(uint256 v) internal pure returns (uint128) { if (v > uint256(type(uint128).max)) { revert Uint256ToUint128CastOutOfRangeError(v); } return uint128(v); } function safeCastUint256ToUint160(uint256 v) internal pure returns (uint160) { if (v > uint256(type(uint160).max)) { revert Uint256ToUint128CastOutOfRangeError(v); } return uint160(v); } function safeCastUint256ToInt192(uint256 v) internal pure returns (int192) { if (v > uint256(uint192(type(int192).max))) { revert Uint256ToInt192CastOutOfRange(v); } return int192(uint192(v)); } function safeCastUint96ToUint16(uint96 v) internal pure returns (uint16) { if (v > uint96(type(uint16).max)) { revert Uint96ToUint16CastOutOfRange(v); } return uint16(v); } function safeCastUint96ToInt192(uint96 v) internal pure returns (int192) { return int192(uint192(v)); } function safeCastInt192ToUint96(int192 i192) internal pure returns (uint96) { if (i192 < 0 || i192 > int192(uint192(type(uint96).max))) { revert Int192ToUint96CastOutOfRange(i192); } return uint96(uint192(i192)); } function safeCastUint256ToInt128(uint256 x) internal pure returns (int128) { if (x > uint256(uint128(type(int128).max))) { revert Uint256ToInt128CastOutOfRangeError(x); } return int128(uint128(x)); } function safeCastUint256ToUint40(uint256 x) internal pure returns (uint40) { if (x > uint256(type(uint40).max)) { revert Uint256ToUint40CastOutOfRangeError(x); } return uint40(x); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; library LibAddress { error EthTransferFailed(address receiver, bytes errData); // Transfer ETH with full gas stipend. function transferEth(address payable receiver, uint256 amount) internal { if (amount == 0) return; (bool s, bytes memory r) = receiver.call{ value: amount }(""); if (!s) { revert EthTransferFailed(receiver, r); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.19; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo( uint256 tokenId, uint256 salePrice ) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; import "../utils/Implementation.sol"; // Single registry of global values controlled by multisig. // See `LibGlobals` for all valid keys. interface IGlobals { function multiSig() external view returns (address); function getBytes32(uint256 key) external view returns (bytes32); function getUint256(uint256 key) external view returns (uint256); function getBool(uint256 key) external view returns (bool); function getAddress(uint256 key) external view returns (address); function getImplementation(uint256 key) external view returns (Implementation); function getIncludesBytes32(uint256 key, bytes32 value) external view returns (bool); function getIncludesUint256(uint256 key, uint256 value) external view returns (bool); function getIncludesAddress(uint256 key, address value) external view returns (bool); function setBytes32(uint256 key, bytes32 value) external; function setUint256(uint256 key, uint256 value) external; function setBool(uint256 key, bool value) external; function setAddress(uint256 key, address value) external; function setIncludesBytes32(uint256 key, bytes32 value, bool isIncluded) external; function setIncludesUint256(uint256 key, uint256 value, bool isIncluded) external; function setIncludesAddress(uint256 key, address value, bool isIncluded) external; }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; import "../../tokens/IERC721.sol"; import "../../utils/EIP165.sol"; /// @notice Modern, minimalist, and gas efficient ERC-721 implementation. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol) /// @dev Modified from Solmate abstract contract ERC721 is IERC721, EIP165 { error NotMinted(); error ZeroAddress(); error UnsafeRecipient(); error Unauthorized(); /*////////////////////////////////////////////////////////////// METADATA STORAGE/LOGIC //////////////////////////////////////////////////////////////*/ string public name; string public symbol; function tokenURI(uint256 id /* view */) public virtual returns (string memory); /*////////////////////////////////////////////////////////////// ERC721 BALANCE/OWNER STORAGE //////////////////////////////////////////////////////////////*/ mapping(uint256 => address) internal _ownerOf; mapping(address => uint256) internal _balanceOf; function ownerOf(uint256 id) public view virtual returns (address owner) { owner = _ownerOf[id]; if (owner == address(0)) { revert NotMinted(); } } function balanceOf(address owner) public view virtual returns (uint256) { if (owner == address(0)) { revert ZeroAddress(); } return _balanceOf[owner]; } /*////////////////////////////////////////////////////////////// ERC721 APPROVAL STORAGE //////////////////////////////////////////////////////////////*/ mapping(uint256 => address) public getApproved; mapping(address => mapping(address => bool)) public isApprovedForAll; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor(string memory _name, string memory _symbol) { name = _name; symbol = _symbol; } /*////////////////////////////////////////////////////////////// ERC721 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 id) public virtual { address owner = _ownerOf[id]; if (msg.sender != owner && !isApprovedForAll[owner][msg.sender]) { revert Unauthorized(); } getApproved[id] = spender; emit Approval(owner, spender, id); } function setApprovalForAll(address operator, bool approved) public virtual { isApprovedForAll[msg.sender][operator] = approved; emit ApprovalForAll(msg.sender, operator, approved); } function transferFrom(address from, address to, uint256 id) public virtual { if (from != _ownerOf[id]) { revert Unauthorized(); } if (to == address(0)) { revert ZeroAddress(); } if ( msg.sender != from && !isApprovedForAll[from][msg.sender] && msg.sender != getApproved[id] ) { revert Unauthorized(); } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. unchecked { _balanceOf[from]--; _balanceOf[to]++; } _ownerOf[id] = to; delete getApproved[id]; emit Transfer(from, to, id); } function safeTransferFrom(address from, address to, uint256 id) public virtual { transferFrom(from, to, id); if ( to.code.length != 0 && ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") != ERC721TokenReceiver.onERC721Received.selector ) { revert UnsafeRecipient(); } } function safeTransferFrom( address from, address to, uint256 id, bytes calldata data ) public virtual { transferFrom(from, to, id); if ( to.code.length != 0 && ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) != ERC721TokenReceiver.onERC721Received.selector ) { revert UnsafeRecipient(); } } /*////////////////////////////////////////////////////////////// ERC165 LOGIC //////////////////////////////////////////////////////////////*/ function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) { // NOTE: modified from original to call super. return super.supportsInterface(interfaceId) || interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721 interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 id) internal virtual { if (to == address(0)) { revert ZeroAddress(); } if (_ownerOf[id] != address(0)) { revert Unauthorized(); } // Counter overflow is incredibly unrealistic. unchecked { _balanceOf[to]++; } _ownerOf[id] = to; emit Transfer(address(0), to, id); } function _burn(uint256 id) internal virtual { address owner = _ownerOf[id]; if (owner == address(0)) { revert Unauthorized(); } // Ownership check above ensures no underflow. unchecked { _balanceOf[owner]--; } delete _ownerOf[id]; delete getApproved[id]; emit Transfer(owner, address(0), id); } /*////////////////////////////////////////////////////////////// INTERNAL SAFE MINT LOGIC //////////////////////////////////////////////////////////////*/ function _safeMint(address to, uint256 id) internal virtual { _mint(to, id); if ( to.code.length != 0 && ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") != ERC721TokenReceiver.onERC721Received.selector ) { revert UnsafeRecipient(); } } function _safeMint(address to, uint256 id, bytes memory data) internal virtual { _mint(to, id); if ( to.code.length != 0 && ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) != ERC721TokenReceiver.onERC721Received.selector ) { revert UnsafeRecipient(); } } } /// @notice A generic interface for a contract which properly accepts ERC721 tokens. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol) abstract contract ERC721TokenReceiver { function onERC721Received( address, address, uint256, bytes calldata ) external virtual returns (bytes4) { return ERC721TokenReceiver.onERC721Received.selector; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; import "solmate/utils/SSTORE2.sol"; import "../utils/Multicall.sol"; contract RendererStorage is Multicall { error AlreadySetError(); error NotOwnerError(address caller, address owner); event OwnershipTransferred(address previousOwner, address newOwner); uint256 constant CROWDFUND_CARD_DATA = 0; uint256 constant PARTY_CARD_DATA = 1; /// @notice Address allowed to store new data. address public owner; /// @notice Customization presets by ID, used for rendering cards. Begins at /// 1, 0 is reserved to indicate in `getPresetFor()` that a /// party instance use the preset set by the crowdfund instance that /// created it. mapping(uint256 => bytes) public customizationPresets; /// @notice Customization preset used by a crowdfund or party instance. mapping(address => uint256) public getPresetFor; /// @notice Addresses where URI data chunks are stored. mapping(uint256 => address) public files; modifier onlyOwner() { address owner_ = owner; if (msg.sender != owner_) { revert NotOwnerError(msg.sender, owner_); } _; } constructor(address _owner) { // Set the address allowed to write new data. owner = _owner; // Write URI data used by V1 of the renderers: files[CROWDFUND_CARD_DATA] = SSTORE2.write( bytes( '<path class="o" d="M118.4 419.5h5.82v1.73h-4.02v1.87h3.74v1.73h-3.74v1.94h4.11v1.73h-5.91v-9Zm9.93 1.76h-2.6v-1.76h7.06v1.76h-2.61v7.24h-1.85v-7.24Zm6.06-1.76h1.84v3.55h3.93v-3.55H142v9h-1.84v-3.67h-3.93v3.67h-1.84v-9Z"/><path class="o" d="M145 413a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H35a4 4 0 0 1-4-4v-14a4 4 0 0 1 4-4h110m0-1H35a5 5 0 0 0-5 5v14a5 5 0 0 0 5 5h110a5 5 0 0 0 5-5v-14a5 5 0 0 0-5-5Z"/><path d="M239.24 399.83h3.04c1.7 0 2.82 1 2.82 2.55 0 2.1-1.27 3.32-3.57 3.32h-1.97l-.71 3.3h-1.56l1.96-9.17Zm2.34 4.38c1.23 0 1.88-.58 1.88-1.68 0-.73-.49-1.2-1.48-1.2h-1.51l-.6 2.88h1.7Zm3.57 1.86c0-2.27 1.44-3.83 3.57-3.83 1.82 0 3.06 1.25 3.06 3.09 0 2.28-1.43 3.83-3.57 3.83-1.82 0-3.06-1.25-3.06-3.09Zm3.13 1.74c1.19 0 1.93-1.02 1.93-2.52 0-1.06-.62-1.69-1.56-1.69-1.19 0-1.93 1.02-1.93 2.52 0 1.06.62 1.69 1.56 1.69Zm4.74-5.41h1.49l.28 4.73 2.25-4.73h1.64l.23 4.77 2.25-4.77h1.56l-3.3 6.61h-1.62l-.25-5.04-2.42 5.04h-1.63l-.48-6.61Zm9.54 3.66c0-2.27 1.45-3.81 3.6-3.81 2 0 3.05 1.58 2.33 3.92h-4.46c0 1.1.81 1.68 2.05 1.68.8 0 1.45-.2 2.1-.59l-.31 1.46a4.2 4.2 0 0 1-2.04.44c-2.06 0-3.26-1.19-3.26-3.11Zm4.7-1.07c.12-.86-.31-1.46-1.22-1.46s-1.57.61-1.82 1.46h3.05Zm3.46-2.59h1.55l-.28 1.28c.81-1.7 2.56-1.36 2.77-1.29l-.35 1.46c-.18-.06-2.3-.63-2.82 1.68l-.74 3.48h-1.55l1.42-6.61Zm3.91 3.66c0-2.27 1.45-3.81 3.6-3.81 2 0 3.05 1.58 2.33 3.92h-4.46c0 1.1.81 1.68 2.05 1.68.8 0 1.45-.2 2.1-.59l-.31 1.46a4.2 4.2 0 0 1-2.04.44c-2.06 0-3.26-1.19-3.26-3.11Zm4.7-1.07c.12-.86-.31-1.46-1.22-1.46s-1.57.61-1.82 1.46h3.05Zm2.25 1.36c0-2.44 1.36-4.1 3.26-4.1 1 0 1.76.53 2.05 1.31l.79-3.72h1.55l-1.96 9.17h-1.55l.2-.92a2.15 2.15 0 0 1-1.92 1.08c-1.49 0-2.43-1.18-2.43-2.82Zm3 1.51c.88 0 1.51-.58 1.73-1.56l.17-.81c.24-1.1-.31-1.93-1.36-1.93-1.19 0-1.94 1.08-1.94 2.59 0 1.06.55 1.71 1.4 1.71Zm9.6-.01-.25 1.16h-1.55l1.96-9.17h1.55l-.73 3.47a2.35 2.35 0 0 1 1.99-1.05c1.49 0 2.35 1.16 2.35 2.76 0 2.52-1.36 4.16-3.21 4.16-.98 0-1.81-.53-2.1-1.32Zm1.83.01c1.16 0 1.87-1.06 1.87-2.61 0-1.04-.5-1.69-1.39-1.69s-1.52.56-1.73 1.55l-.17.79c-.24 1.14.34 1.97 1.42 1.97Zm5.68 1.16-1.04-6.62h1.52l.66 4.75 2.66-4.75h1.69l-5.31 9.13h-1.73l1.55-2.51Zm23.48-6.8a42.14 42.14 0 0 0-.75 6.01 43.12 43.12 0 0 0 5.58 2.35 42.54 42.54 0 0 0 5.58-2.35 45.32 45.32 0 0 0-.75-6.01c-.91-.79-2.6-2.21-4.83-3.66a42.5 42.5 0 0 0-4.83 3.66Zm13.07-7.95s.82-.29 1.76-.45a14.9 14.9 0 0 0-9.53-3.81c.66.71 1.28 1.67 1.84 2.75 1.84.22 4.07.7 5.92 1.51Zm-2.71 18.36c-2.06-.4-4.05-.97-5.53-1.51a38.65 38.65 0 0 1-5.53 1.51c.12 1.5.35 3.04.76 4.58 0 0 1.54 1.82 4.78 2.8 3.23-.98 4.78-2.8 4.78-2.8.4-1.53.64-3.08.76-4.58Zm-13.77-18.37a22.3 22.3 0 0 1 5.93-1.51 12.4 12.4 0 0 1 1.84-2.75 14.97 14.97 0 0 0-9.53 3.81c.95.16 1.76.45 1.76.45Zm-4.72 8.77a25.74 25.74 0 0 0 3.58 2.94 37.48 37.48 0 0 1 4.08-4.04c.27-1.56.77-3.57 1.46-5.55a25.24 25.24 0 0 0-4.34-1.63s-2.35.42-4.81 2.74c-.77 3.29.04 5.54.04 5.54Zm25.92 0s.81-2.25.04-5.54c-2.46-2.31-4.81-2.74-4.81-2.74-1.53.42-2.99.99-4.34 1.63a37.79 37.79 0 0 1 1.46 5.55 37.44 37.44 0 0 1 4.08 4.04 25.86 25.86 0 0 0 3.58-2.94Zm-26.38.2s-.66-.56-1.27-1.3c-.7 3.34-.27 6.93 1.46 10.16.28-.93.8-1.94 1.46-2.97a22.32 22.32 0 0 1-1.66-5.88Zm8.24 14.27a22.07 22.07 0 0 1-4.27-4.38c-1.22.06-2.36 0-3.3-.22a14.91 14.91 0 0 0 8.07 6.34c-.34-.9-.5-1.75-.5-1.75Zm18.6-14.27s.66-.56 1.27-1.3c.7 3.34.27 6.93-1.46 10.16-.28-.93-.8-1.94-1.46-2.97a22.32 22.32 0 0 0 1.66-5.88Zm-8.24 14.27a22.07 22.07 0 0 0 4.27-4.38c1.22.06 2.36 0 3.3-.22a14.91 14.91 0 0 1-8.07 6.34c.34-.9.5-1.75.5-1.75ZM330 391.84l-4.12 2.45 1.26 3.91h5.72l1.26-3.91-4.12-2.45Zm-11.4 19.74 4.18 2.35 2.75-3.05-2.86-4.95-4.02.86-.06 4.79Zm22.79 0-.06-4.79-4.02-.86-2.86 4.95 2.75 3.05 4.18-2.35Z" style="fill:#00c1fa"/><use height="300" transform="matrix(1 0 0 .09 29.85 444)" width="300.15" xlink:href="#a"/><use height="21.15" transform="translate(30 446.92)" width="300" xlink:href="#b"/><g><path d="m191.54 428.67-28.09-24.34A29.98 29.98 0 0 0 143.8 397H30a15 15 0 0 0-15 15v98a15 15 0 0 0 15 15h300a15 15 0 0 0 15-15v-59a15 15 0 0 0-15-15H211.19a30 30 0 0 1-19.65-7.33Z" style="fill:url(#i)"/></g></svg>' ) ); files[PARTY_CARD_DATA] = SSTORE2.write( bytes( ' d="M188 444.3h2.4l2.6 8.2 2.7-8.2h2.3l-3.7 10.7h-2.8l-3.5-10.7zm10.5 5.3c0-3.2 2.2-5.6 5.3-5.6 3.1 0 5.3 2.3 5.3 5.6 0 3.2-2.2 5.5-5.3 5.5-3.1.1-5.3-2.2-5.3-5.5zm5.3 3.5c1.8 0 3-1.3 3-3.4 0-2.1-1.1-3.5-3-3.5s-3 1.3-3 3.5c0 2.1 1.1 3.4 3 3.4zm8.7-6.7h-3.1v-2.1h8.4v2.1h-3.1v8.6h-2.2v-8.6zm6.9-2.1h2.2V455h-2.2v-10.7zm4.3 0h2.9l4 8.2v-8.2h2.1V455h-2.9l-4-8.2v8.2h-2.1v-10.7zm10.6 5.4c0-3.4 2.3-5.6 6-5.6 1.2 0 2.3.2 3.1.6v2.3c-.9-.6-1.9-.8-3.1-.8-2.4 0-3.8 1.3-3.8 3.5 0 2.1 1.3 3.4 3.5 3.4.5 0 .9-.1 1.3-.2v-2.2h-2.2v-1.9h4.3v5.6c-1 .5-2.2.8-3.4.8-3.5 0-5.7-2.2-5.7-5.5zm15.1-5.4h4.3c2.3 0 3.7 1.3 3.7 3.5s-1.4 3.5-3.7 3.5h-2.1v3.7h-2.2v-10.7zm4.1 5c1.1 0 1.6-.5 1.6-1.5s-.5-1.5-1.6-1.5h-1.9v2.9h1.9zm4.8.3c0-3.2 2.2-5.6 5.3-5.6 3.1 0 5.3 2.3 5.3 5.6 0 3.2-2.2 5.5-5.3 5.5-3.1.1-5.3-2.2-5.3-5.5zm5.3 3.5c1.8 0 3-1.3 3-3.4 0-2.1-1.1-3.5-3-3.5s-3 1.3-3 3.5c0 2.1 1.1 3.4 3 3.4zm5.8-8.8h2.3l1.7 7.8 1.9-7.8h2.4l1.8 7.8 1.8-7.8h2.3l-2.7 10.7h-2.5l-1.9-8.2-1.8 8.2h-2.5l-2.8-10.7zm15.4 0h6.9v2.1H287v2.2h4.5v2.1H287v2.3h4.9v2.1h-7v-10.8zm9 0h4.5c2 0 3.3 1.3 3.3 3.2 0 1.9-1.2 3.1-3 3.2l3.5 4.3h-2.7l-3.5-4.4v4.4h-2.1v-10.7zm4.1 4.8c1 0 1.5-.5 1.5-1.4 0-.9-.6-1.4-1.5-1.4h-2v2.9h2zM30 444.3h4.3c3 0 5.2 2.1 5.2 5.4s-2.1 5.4-5.2 5.4H30v-10.8zm4 8.6c2.1 0 3.2-1.2 3.2-3.2s-1.2-3.3-3.2-3.3h-1.8v6.5H34zm7.7-8.6h2.2V455h-2.2v-10.7zm4.8 10V452c1 .7 2.1 1.1 3.2 1.1s1.7-.5 1.7-1.2-.4-1-1.2-1.2l-1.2-.3c-1.8-.5-2.7-1.5-2.7-3.1 0-2 1.5-3.2 3.9-3.2 1 0 2.1.2 2.9.7v2.3c-.9-.6-1.9-.8-3-.8-.9 0-1.6.4-1.6 1.1 0 .6.4.9 1.2 1.1l1.3.4c1.8.5 2.6 1.4 2.6 3.1 0 2.1-1.5 3.4-3.8 3.4-1.1-.2-2.3-.5-3.3-1.1zm12-7.9h-3.1v-2.1h8.4v2.1h-3.1v8.6h-2.2v-8.6zm7.5-2.1h4.5c2 0 3.3 1.3 3.3 3.2 0 1.9-1.2 3.1-3 3.2l3.5 4.3h-2.7l-3.5-4.4v4.4H66v-10.7zm4.1 4.8c1 0 1.5-.5 1.5-1.4s-.6-1.4-1.5-1.4h-2v2.9h2zm6.1-4.8h2.2V455h-2.2v-10.7zm5 0h4.5c2 0 3.2 1.1 3.2 2.8 0 1.1-.5 1.9-1.4 2.3 1.1.3 1.8 1.3 1.8 2.5 0 1.9-1.3 3.1-3.5 3.1h-4.6v-10.7zm4.2 4.4c.9 0 1.4-.5 1.4-1.3s-.5-1.3-1.4-1.3h-2.1v2.5l2.1.1zm.3 4.4c.9 0 1.5-.5 1.5-1.3s-.6-1.3-1.5-1.3h-2.4v2.6h2.4zm5.7-2.5v-6.3h2.2v6.3c0 1.6.9 2.5 2.3 2.5s2.3-.9 2.3-2.5v-6.3h2.2v6.3c0 2.9-1.7 4.6-4.5 4.6s-4.6-1.7-4.5-4.6zm14.2-4.2h-3.1v-2.1h8.4v2.1h-3.1v8.6h-2.2v-8.6zm7.5-2.1h2.2V455h-2.2v-10.7zm4.5 5.3c0-3.2 2.2-5.6 5.3-5.6s5.3 2.3 5.3 5.6-2.2 5.5-5.3 5.5-5.3-2.2-5.3-5.5zm5.3 3.5c1.8 0 3-1.3 3-3.5s-1.2-3.5-3-3.5-3 1.3-3 3.5 1.1 3.5 3 3.5zm7.5-8.8h2.9l4 8.2v-8.2h2.1V455h-2.9l-4-8.2v8.2h-2.1v-10.7zm11.7 10V452c1 .7 2.1 1.1 3.2 1.1s1.7-.5 1.7-1.2-.4-1-1.2-1.2l-1.2-.3c-1.8-.5-2.6-1.5-2.6-3.1 0-2 1.5-3.2 3.9-3.2 1.1 0 2.1.2 2.9.7v2.3c-.9-.6-1.9-.8-3-.8-.9 0-1.6.4-1.6 1.1 0 .6.4.9 1.2 1.1l1.3.4c1.8.5 2.6 1.4 2.6 3.1 0 2.1-1.5 3.4-3.8 3.4a9.7 9.7 0 0 1-3.4-1.1zM30 259.3h4.3c2.2 0 3.7 1.3 3.7 3.5s-1.4 3.5-3.7 3.5h-2.1v3.7H30v-10.7zm4.1 5c1.1 0 1.6-.5 1.6-1.5s-.5-1.5-1.6-1.5h-1.9v2.9h1.9zm6.1-5h4.5c2 0 3.3 1.3 3.3 3.2 0 1.9-1.2 3.1-3 3.2l3.5 4.3h-2.7l-3.5-4.4v4.4h-2.1v-10.7zm4.1 4.8c1 0 1.5-.5 1.5-1.4s-.6-1.4-1.5-1.4h-2v2.9h2zm5.4.5c0-3.2 2.2-5.6 5.3-5.6s5.3 2.3 5.3 5.6-2.2 5.5-5.3 5.5-5.3-2.2-5.3-5.5zm5.3 3.5c1.8 0 3-1.3 3-3.5s-1.2-3.5-3-3.5-3 1.3-3 3.5 1.1 3.5 3 3.5zm7.6-8.8h4.3c2.2 0 3.7 1.3 3.7 3.5s-1.4 3.5-3.7 3.5h-2.1v3.7h-2.2v-10.7zm4.1 5c1.1 0 1.6-.5 1.6-1.5s-.6-1.5-1.6-1.5h-1.9v2.9h1.9zm5.4.4c0-3.2 2.2-5.6 5.3-5.6s5.3 2.3 5.3 5.6-2.2 5.5-5.3 5.5-5.3-2.3-5.3-5.5zm5.4 3.4c1.8 0 3-1.3 3-3.5s-1.2-3.5-3-3.5-3 1.3-3 3.5 1.1 3.5 3 3.5zm7.2 1.2V267c1 .7 2.1 1.1 3.2 1.1s1.7-.5 1.7-1.2-.4-1-1.2-1.2l-1.2-.3c-1.8-.5-2.7-1.5-2.7-3.1 0-2 1.5-3.2 3.9-3.2 1.1 0 2.1.2 2.9.7v2.3c-.9-.6-1.9-.8-3-.8-.9 0-1.6.4-1.6 1.1 0 .6.4.9 1.2 1.1l1.3.4c1.8.5 2.6 1.4 2.6 3.1 0 2.1-1.5 3.4-3.8 3.4-1.1-.2-2.3-.5-3.3-1.1zm12.2-10h2.8l3.7 10.7h-2.3l-.8-2.5h-4l-.8 2.5h-2.2l3.6-10.7zm2.8 6.3-1.4-4.2-1.4 4.2h2.8zm5.7-6.3h2.2v8.6h4.7v2.1h-6.9v-10.7zm9.1 10V267c1 .7 2.1 1.1 3.2 1.1s1.7-.5 1.7-1.2-.4-1-1.2-1.2l-1.2-.3c-1.8-.5-2.7-1.5-2.7-3.1 0-2 1.5-3.2 3.9-3.2 1.1 0 2.1.2 2.9.7v2.3c-.9-.6-1.9-.8-3-.8-.9 0-1.6.4-1.6 1.1 0 .6.4.9 1.2 1.1l1.3.4c1.8.5 2.6 1.4 2.6 3.1 0 2.1-1.5 3.4-3.8 3.4-1.1-.2-2.3-.5-3.3-1.1zm-84.5-70h2.9l4 8.2v-8.2H39V210h-2.9l-4-8.2v8.2H30v-10.7zm14.7 0h2.8l3.7 10.7h-2.3l-.8-2.6h-4l-.8 2.6H41l3.7-10.7zm2.8 6.2-1.4-4.2-1.4 4.2h2.8zm5.7-6.2h3.3l2.5 8.2 2.5-8.2h3.3V210h-2v-8.6L60 210h-2.1l-2.7-8.5v8.5h-2v-10.7zm14.4 0h6.9v2.1h-4.8v2.2h4.4v2.1h-4.4v2.3h4.9v2.1h-7v-10.8z" /><path d="M239.24 24.83h3.04c1.7 0 2.82 1 2.82 2.55 0 2.1-1.27 3.32-3.57 3.32h-1.97l-.71 3.3h-1.56l1.96-9.17Zm2.34 4.38c1.23 0 1.88-.58 1.88-1.68 0-.73-.49-1.2-1.48-1.2h-1.51l-.6 2.88h1.7Zm3.57 1.86c0-2.27 1.44-3.83 3.57-3.83 1.82 0 3.06 1.25 3.06 3.09 0 2.28-1.43 3.83-3.57 3.83-1.82 0-3.06-1.25-3.06-3.09Zm3.13 1.74c1.19 0 1.93-1.02 1.93-2.52 0-1.06-.62-1.69-1.56-1.69-1.19 0-1.93 1.02-1.93 2.52 0 1.06.62 1.69 1.56 1.69Zm4.74-5.41h1.49l.28 4.73 2.25-4.73h1.64l.23 4.77 2.25-4.77h1.56l-3.3 6.61h-1.62l-.25-5.04-2.42 5.04h-1.63l-.48-6.61Zm9.54 3.66c0-2.27 1.45-3.81 3.6-3.81 2 0 3.05 1.58 2.33 3.92h-4.46c0 1.1.81 1.68 2.05 1.68.8 0 1.45-.2 2.1-.59l-.31 1.46a4.2 4.2 0 0 1-2.04.44c-2.06 0-3.26-1.19-3.26-3.11Zm4.7-1.07c.12-.86-.31-1.46-1.22-1.46s-1.57.61-1.82 1.46h3.05Zm3.46-2.59h1.55l-.28 1.28c.81-1.7 2.56-1.36 2.77-1.29l-.35 1.46c-.18-.06-2.3-.63-2.82 1.68l-.74 3.48h-1.55l1.42-6.61Zm3.91 3.66c0-2.27 1.45-3.81 3.6-3.81 2 0 3.05 1.58 2.33 3.92h-4.46c0 1.1.81 1.68 2.05 1.68.8 0 1.45-.2 2.1-.59l-.31 1.46a4.2 4.2 0 0 1-2.04.44c-2.06 0-3.26-1.19-3.26-3.11Zm4.7-1.07c.12-.86-.31-1.46-1.22-1.46s-1.57.61-1.82 1.46h3.05Zm2.25 1.36c0-2.44 1.36-4.1 3.26-4.1 1 0 1.76.53 2.05 1.31l.79-3.72h1.55l-1.96 9.17h-1.55l.2-.92a2.15 2.15 0 0 1-1.92 1.08c-1.49 0-2.43-1.18-2.43-2.82Zm3 1.51c.88 0 1.51-.58 1.73-1.56l.17-.81c.24-1.1-.31-1.93-1.36-1.93-1.19 0-1.94 1.08-1.94 2.59 0 1.06.55 1.71 1.4 1.71Zm9.6-.01-.25 1.16h-1.55l1.96-9.17h1.55l-.73 3.47a2.35 2.35 0 0 1 1.99-1.05c1.49 0 2.35 1.16 2.35 2.76 0 2.52-1.36 4.16-3.21 4.16-.98 0-1.81-.53-2.1-1.32Zm1.83.01c1.16 0 1.87-1.06 1.87-2.61 0-1.04-.5-1.69-1.39-1.69s-1.52.56-1.73 1.55l-.17.79c-.24 1.14.34 1.97 1.42 1.97Zm5.68 1.16-1.04-6.62h1.52l.66 4.75 2.66-4.75h1.69l-5.31 9.13h-1.73l1.55-2.51Zm23.47-6.8c.91-.79 2.6-2.21 4.83-3.66a42.5 42.5 0 0 1 4.83 3.66c.23 1.18.62 3.36.75 6.01a43.12 43.12 0 0 1-5.58 2.35 42.54 42.54 0 0 1-5.58-2.35c.14-2.65.53-4.83.75-6.01Zm13.07-7.95s.82-.29 1.76-.45a14.9 14.9 0 0 0-9.53-3.81c.66.71 1.28 1.67 1.84 2.75 1.84.22 4.07.7 5.92 1.51Zm-2.71 18.36c-2.06-.4-4.05-.97-5.53-1.51a38.65 38.65 0 0 1-5.53 1.51c.12 1.5.35 3.04.76 4.58 0 0 1.54 1.82 4.78 2.8 3.23-.98 4.78-2.8 4.78-2.8.4-1.53.64-3.08.76-4.58Zm-13.77-18.37a22.3 22.3 0 0 1 5.93-1.51 12.4 12.4 0 0 1 1.84-2.75 14.97 14.97 0 0 0-9.53 3.81c.95.16 1.76.45 1.76.45Zm-4.72 8.77a25.74 25.74 0 0 0 3.58 2.94 37.48 37.48 0 0 1 4.08-4.04c.27-1.56.77-3.57 1.46-5.55a25.24 25.24 0 0 0-4.34-1.63s-2.35.42-4.81 2.74c-.77 3.29.04 5.54.04 5.54Zm25.92 0s.81-2.25.04-5.54c-2.46-2.31-4.81-2.74-4.81-2.74-1.53.42-2.99.99-4.34 1.63a37.79 37.79 0 0 1 1.46 5.55 37.44 37.44 0 0 1 4.08 4.04 25.86 25.86 0 0 0 3.58-2.94Zm-26.38.2s-.66-.56-1.27-1.3c-.7 3.34-.27 6.93 1.46 10.16.28-.93.8-1.94 1.46-2.97a22.32 22.32 0 0 1-1.66-5.88Zm8.24 14.27a22.07 22.07 0 0 1-4.27-4.38c-1.22.06-2.36 0-3.3-.22a14.91 14.91 0 0 0 8.07 6.34c-.34-.9-.5-1.75-.5-1.75Zm18.6-14.27s.66-.56 1.27-1.3c.7 3.34.27 6.93-1.46 10.16-.28-.93-.8-1.94-1.46-2.97a22.32 22.32 0 0 0 1.66-5.88Zm-8.24 14.27a22.07 22.07 0 0 0 4.27-4.38c1.22.06 2.36 0 3.3-.22a14.91 14.91 0 0 1-8.07 6.34c.34-.9.5-1.75.5-1.75Zm-5.18-25.66-4.12 2.45 1.26 3.91h5.72l1.26-3.91-4.12-2.45Zm-11.4 19.74 4.18 2.35 2.75-3.05-2.86-4.95-4.02.86-.06 4.79Zm22.79 0-.06-4.79-4.02-.86-2.86 4.95 2.75 3.05 4.18-2.35Z" style="fill:#00c1fa"/><path d="M106.67 109.1a304.9 304.9 0 0 0-3.72-10.89c5.04-5.53 35.28-40.74 24.54-68.91 10.57 10.67 8.19 28.85 3.59 41.95-4.79 13.14-13.43 26.48-24.4 37.84Zm30.89 20.82c-5.87 6.12-20.46 17.92-21.67 18.77a99.37 99.37 0 0 0 7.94 6.02 133.26 133.26 0 0 0 20.09-18.48 353.47 353.47 0 0 0-6.36-6.31Zm-29.65-16.74a380.9 380.9 0 0 1 3.13 11.56c-4.8-1.37-8.66-2.53-12.36-3.82a123.4 123.4 0 0 1-21.16 13.21l15.84 5.47c14.83-8.23 28.13-20.82 37.81-34.68 0 0 8.56-12.55 12.42-23.68 2.62-7.48 4.46-16.57 3.49-24.89-2.21-12.27-6.95-15.84-9.32-17.66 6.16 5.72 3.25 27.8-2.79 39.89-6.08 12.16-15.73 24.27-27.05 34.59Zm59.05-37.86c-.03 7.72-3.05 15.69-6.44 22.69 1.7 2.2 3.18 4.36 4.42 6.49 7.97-16.51 3.74-26.67 2.02-29.18ZM61.18 128.51l12.5 4.3a101.45 101.45 0 0 0 21.42-13.19 163.26 163.26 0 0 1-10.61-4.51 101.28 101.28 0 0 1-23.3 13.4Zm87.78-42.73c.86.77 5.44 5.18 6.75 6.59 6.39-16.61.78-28.86-1.27-30.56.72 8.05-2.02 16.51-5.48 23.98Zm-14.29 40.62-2.47-15.18a142.42 142.42 0 0 1-35.74 29.45c6.81 2.36 12.69 4.4 15.45 5.38a115.98 115.98 0 0 0 22.75-19.66Zm-42.62 34.73c4.48 2.93 12.94 4.24 18.8 1.23 6.03-3.84-.6-8.34-8.01-9.88-9.8-2.03-16.82 1.22-13.4 6.21.41.6 1.19 1.5 2.62 2.44m-1.84.4c-3.56-2.37-6.77-7.2-.23-10.08 10.41-3.43 28.39 3.2 24.99 9.22-.58 1.04-1.46 1.6-2.38 2.19h-.03v.02h-.03v.02h-.03c-7.04 3.65-17.06 2.13-22.3-1.36m5.48-3.86a4.94 4.94 0 0 0 5.06.49l1.35-.74-4.68-2.38-1.47.79c-.38.22-1.53.88-.26 1.84m-1.7.59c-2.35-1.57-.78-2.61-.02-3.11 1.09-.57 2.19-1.15 3.28-1.77 6.95 3.67 7.22 3.81 13.19 6.17l-1.38.81c-1.93-.78-4.52-1.82-6.42-2.68.86 1.4 1.99 3.27 2.9 4.64l-1.68.87c-.75-1.28-1.76-2.99-2.47-4.29-3.19 2.06-6.99-.36-7.42-.64" style="fill:url(#f2)"/><path d="M159.13 52.37C143.51 24.04 119.45 15 103.6 15c-11.92 0-25.97 5.78-36.84 13.17 9.54 4.38 21.86 15.96 22.02 16.11-7.94-3.05-17.83-6.72-33.23-7.87a135.1 135.1 0 0 0-19.77 20.38c.77 7.66 2.88 15.68 2.88 15.68-6.28-4.75-11.02-4.61-18 9.45-5.4 12.66-6.93 24.25-4.65 33.18 0 0 4.72 26.8 36.23 40.07-1.3-4.61-1.58-9.91-.93-15.73a87.96 87.96 0 0 1-15.63-9.87c.79-6.61 2.79-13.82 6-21.36 4.42-10.66 4.35-15.14 4.35-15.19.03.07 5.48 12.43 12.95 22.08 4.23-8.84 9.46-16.08 13.67-21.83l-3.77-6.75a143.73 143.73 0 0 1 18.19-18.75c2.05 1.07 4.79 2.47 6.84 3.58 8.68-7.27 19.25-14.05 30.56-18.29-7-11.49-16.02-19.27-16.02-19.27s27.7 2.74 42.02 15.69a25.8 25.8 0 0 1 8.65 2.89ZM28.58 107.52a70.1 70.1 0 0 0-2.74 12.52 55.65 55.65 0 0 1-6.19-8.84 69.17 69.17 0 0 1 2.65-12.1c1.77-5.31 3.35-5.91 5.86-2.23v-.05c2.14 3.07 1.81 6.14.42 10.7ZM61.69 72.2l-.05.05a221.85 221.85 0 0 1-7.77-18.1l.14-.14a194.51 194.51 0 0 1 18.56 6.98 144.44 144.44 0 0 0-10.88 11.22Zm54.84-47.38c-4.42.7-9.02 1.95-13.67 3.72a65.03 65.03 0 0 0-7.81-5.31 66.04 66.04 0 0 1 13.02-3.54c1.53-.19 6.23-.79 10.32 2.42v-.05c2.47 1.91.14 2.37-1.86 2.75Z" style="fill:url(#h)"/>' ) ); } /// @notice Transfer ownership to a new owner. /// @param newOwner The address to transfer ownership to. function transferOwnership(address newOwner) external onlyOwner { emit OwnershipTransferred(owner, newOwner); owner = newOwner; } /// @notice Write data to be accessed by a given file key. /// @param key The key to access the written data. /// @param data The data to be written. function writeFile(uint256 key, string memory data) external onlyOwner { files[key] = SSTORE2.write(bytes(data)); } /// @notice Read data using a given file key. /// @param key The key to access the stored data. /// @return data The data stored at the given key. function readFile(uint256 key) external view returns (string memory data) { return string(SSTORE2.read(files[key])); } /// @notice Create or set a customization preset for renderers to use. /// @param id The ID of the customization preset. /// @param customizationData Data decoded by renderers used to render the SVG according to the preset. function createCustomizationPreset( uint256 id, bytes memory customizationData ) external onlyOwner { customizationPresets[id] = customizationData; } /// @notice For crowdfund or party instances to set the customization preset they want to use. /// @param id The ID of the customization preset. function useCustomizationPreset(uint256 id) external { getPresetFor[msg.sender] = id; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; import "../tokens/IERC20.sol"; import "../party/Party.sol"; /// @notice Creates token distributions for parties. interface ITokenDistributor { enum TokenType { Native, Erc20 } // Info on a distribution, created by createDistribution(). struct DistributionInfo { // Type of distribution/token. TokenType tokenType; // ID of the distribution. Assigned by createDistribution(). uint256 distributionId; // The party whose members can claim the distribution. Party party; // Who can claim `fee`. address payable feeRecipient; // The token being distributed. address token; // Total amount of `token` that can be claimed by party members. uint128 memberSupply; // Amount of `token` to be redeemed by `feeRecipient`. uint128 fee; // Total shares at time distribution was created. uint96 totalShares; } event DistributionCreated(Party indexed party, DistributionInfo info); event DistributionFeeClaimed( Party indexed party, address indexed feeRecipient, TokenType tokenType, address token, uint256 amount ); event DistributionClaimedByPartyToken( Party indexed party, uint256 indexed partyTokenId, address indexed owner, TokenType tokenType, address token, uint256 amountClaimed ); /// @notice Create a new distribution for an outstanding native token balance /// governed by a party. /// @dev Native tokens should be transferred directly into this contract /// immediately prior (same tx) to calling `createDistribution()` or /// attached to the call itself. /// @param party The party whose members can claim the distribution. /// @param feeRecipient Who can claim `fee`. /// @param feeBps Percentage (in bps) of the distribution `feeRecipient` receives. /// @return info Information on the created distribution. function createNativeDistribution( Party party, address payable feeRecipient, uint16 feeBps ) external payable returns (DistributionInfo memory info); /// @notice Create a new distribution for an outstanding ERC20 token balance /// governed by a party. /// @dev ERC20 tokens should be transferred directly into this contract /// immediately prior (same tx) to calling `createDistribution()` or /// attached to the call itself. /// @param token The ERC20 token to distribute. /// @param party The party whose members can claim the distribution. /// @param feeRecipient Who can claim `fee`. /// @param feeBps Percentage (in bps) of the distribution `feeRecipient` receives. /// @return info Information on the created distribution. function createErc20Distribution( IERC20 token, Party party, address payable feeRecipient, uint16 feeBps ) external returns (DistributionInfo memory info); /// @notice Claim a portion of a distribution owed to a `partyTokenId` belonging /// to the party that created the distribution. The caller /// must own this token. /// @param info Information on the distribution being claimed. /// @param partyTokenId The ID of the party token to claim for. /// @return amountClaimed The amount of the distribution claimed. function claim( DistributionInfo calldata info, uint256 partyTokenId ) external returns (uint128 amountClaimed); /// @notice Claim the fee for a distribution. Only a distribution's `feeRecipient` /// can call this. /// @param info Information on the distribution being claimed. /// @param recipient The address to send the fee to. function claimFee(DistributionInfo calldata info, address payable recipient) external; /// @notice Batch version of `claim()`. /// @param infos Information on the distributions being claimed. /// @param partyTokenIds The ID of the party tokens to claim for. /// @return amountsClaimed The amount of the distributions claimed. function batchClaim( DistributionInfo[] calldata infos, uint256[] calldata partyTokenIds ) external returns (uint128[] memory amountsClaimed); /// @notice Batch version of `claimFee()`. /// @param infos Information on the distributions to claim fees for. /// @param recipients The addresses to send the fees to. function batchClaimFee( DistributionInfo[] calldata infos, address payable[] calldata recipients ) external; /// @notice Compute the amount of a distribution's token are owed to a party /// member, identified by the `partyTokenId`. /// @param info Information on the distribution being claimed. /// @param partyTokenId The ID of the party token to claim for. /// @return claimAmount The amount of the distribution owed to the party member. function getClaimAmount( DistributionInfo calldata info, uint256 partyTokenId ) external view returns (uint128); /// @notice Check whether the fee has been claimed for a distribution. /// @param party The party to use for checking whether the fee has been claimed. /// @param distributionId The ID of the distribution to check. /// @return feeClaimed Whether the fee has been claimed. function wasFeeClaimed(Party party, uint256 distributionId) external view returns (bool); /// @notice Check whether a `partyTokenId` has claimed their share of a distribution. /// @param party The party to use for checking whether the `partyTokenId` has claimed. /// @param partyTokenId The ID of the party token to check. /// @param distributionId The ID of the distribution to check. /// @return hasClaimed Whether the `partyTokenId` has claimed. function hasPartyTokenIdClaimed( Party party, uint256 partyTokenId, uint256 distributionId ) external view returns (bool); /// @notice Get how much unclaimed member tokens are left in a distribution. /// @param party The party to use for checking the unclaimed member tokens. /// @param distributionId The ID of the distribution to check. /// @return remainingMemberSupply The amount of distribution supply remaining. function getRemainingMemberSupply( Party party, uint256 distributionId ) external view returns (uint128); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; import "./LibRawResult.sol"; interface IReadOnlyDelegateCall { // Marked `view` so that `_readOnlyDelegateCall` can be `view` as well. function delegateCallAndRevert(address impl, bytes memory callData) external view; } // Inherited by contracts to perform read-only delegate calls. abstract contract ReadOnlyDelegateCall { using LibRawResult for bytes; // Delegatecall into implement and revert with the raw result. function delegateCallAndRevert(address impl, bytes memory callData) external { // Attempt to gate to only `_readOnlyDelegateCall()` invocations. require(msg.sender == address(this)); (bool s, bytes memory r) = impl.delegatecall(callData); // Revert with success status and return data. abi.encode(s, r).rawRevert(); } // Perform a `delegateCallAndRevert()` then return the raw result data. function _readOnlyDelegateCall(address impl, bytes memory callData) internal view { try IReadOnlyDelegateCall(address(this)).delegateCallAndRevert(impl, callData) { // Should never happen. assert(false); } catch (bytes memory r) { (bool success, bytes memory resultData) = abi.decode(r, (bool, bytes)); if (!success) { resultData.rawRevert(); } resultData.rawReturn(); } } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8; // Minimal ERC20 interface. interface IERC20 { event Transfer(address indexed owner, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 allowance); function transfer(address to, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); function approve(address spender, uint256 allowance) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function balanceOf(address owner) external view returns (uint256); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8; interface IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes memory data ) external returns (bytes4); }
// SPDX-License-Identifier: AGPL-3.0-only // Only modified to inherit IERC1155 and rename ERC1155TokenReceiver -> ERC1155TokenReceiverBase. pragma solidity ^0.8; import "../../tokens/IERC1155.sol"; /// @notice Minimalist and gas efficient standard ERC1155 implementation. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol) abstract contract ERC1155 is IERC1155 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event URI(string value, uint256 indexed id); /*////////////////////////////////////////////////////////////// ERC1155 STORAGE //////////////////////////////////////////////////////////////*/ mapping(address => mapping(uint256 => uint256)) public balanceOf; mapping(address => mapping(address => bool)) public isApprovedForAll; /*////////////////////////////////////////////////////////////// METADATA LOGIC //////////////////////////////////////////////////////////////*/ function uri(uint256 id) public view virtual returns (string memory); /*////////////////////////////////////////////////////////////// ERC1155 LOGIC //////////////////////////////////////////////////////////////*/ function setApprovalForAll(address operator, bool approved) public virtual { isApprovedForAll[msg.sender][operator] = approved; emit ApprovalForAll(msg.sender, operator, approved); } function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) public virtual { require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED"); balanceOf[from][id] -= amount; balanceOf[to][id] += amount; emit TransferSingle(msg.sender, from, to, id, amount); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiverBase(to).onERC1155Received( msg.sender, from, id, amount, data ) == ERC1155TokenReceiverBase.onERC1155Received.selector, "UNSAFE_RECIPIENT" ); } function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) public virtual { require(ids.length == amounts.length, "LENGTH_MISMATCH"); require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED"); // Storing these outside the loop saves ~15 gas per iteration. uint256 id; uint256 amount; for (uint256 i; i < ids.length; ) { id = ids[i]; amount = amounts[i]; balanceOf[from][id] -= amount; balanceOf[to][id] += amount; // An array can't have a total length // larger than the max uint256 value. unchecked { ++i; } } emit TransferBatch(msg.sender, from, to, ids, amounts); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiverBase(to).onERC1155BatchReceived( msg.sender, from, ids, amounts, data ) == ERC1155TokenReceiverBase.onERC1155BatchReceived.selector, "UNSAFE_RECIPIENT" ); } function balanceOfBatch( address[] calldata owners, uint256[] calldata ids ) public view virtual returns (uint256[] memory balances) { require(owners.length == ids.length, "LENGTH_MISMATCH"); balances = new uint256[](owners.length); // Unchecked because the only math done is incrementing // the array index counter which cannot possibly overflow. unchecked { for (uint256 i; i < owners.length; ++i) { balances[i] = balanceOf[owners[i]][ids[i]]; } } } /*////////////////////////////////////////////////////////////// ERC165 LOGIC //////////////////////////////////////////////////////////////*/ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155 interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual { balanceOf[to][id] += amount; emit TransferSingle(msg.sender, address(0), to, id, amount); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiverBase(to).onERC1155Received( msg.sender, address(0), id, amount, data ) == ERC1155TokenReceiverBase.onERC1155Received.selector, "UNSAFE_RECIPIENT" ); } function _batchMint( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { uint256 idsLength = ids.length; // Saves MLOADs. require(idsLength == amounts.length, "LENGTH_MISMATCH"); for (uint256 i; i < idsLength; ) { balanceOf[to][ids[i]] += amounts[i]; // An array can't have a total length // larger than the max uint256 value. unchecked { ++i; } } emit TransferBatch(msg.sender, address(0), to, ids, amounts); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiverBase(to).onERC1155BatchReceived( msg.sender, address(0), ids, amounts, data ) == ERC1155TokenReceiverBase.onERC1155BatchReceived.selector, "UNSAFE_RECIPIENT" ); } function _batchBurn( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { uint256 idsLength = ids.length; // Saves MLOADs. require(idsLength == amounts.length, "LENGTH_MISMATCH"); for (uint256 i; i < idsLength; ) { balanceOf[from][ids[i]] -= amounts[i]; // An array can't have a total length // larger than the max uint256 value. unchecked { ++i; } } emit TransferBatch(msg.sender, from, address(0), ids, amounts); } function _burn(address from, uint256 id, uint256 amount) internal virtual { balanceOf[from][id] -= amount; emit TransferSingle(msg.sender, from, address(0), id, amount); } } /// @notice A generic interface for a contract which properly accepts ERC1155 tokens. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol) abstract contract ERC1155TokenReceiverBase { function onERC1155Received( address, address, uint256, uint256, bytes calldata ) external virtual returns (bytes4) { return ERC1155TokenReceiverBase.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] calldata, uint256[] calldata, bytes calldata ) external virtual returns (bytes4) { return ERC1155TokenReceiverBase.onERC1155BatchReceived.selector; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; import "../tokens/IERC20.sol"; // Compatibility helpers for ERC20s. library LibERC20Compat { error NotATokenError(IERC20 token); error TokenTransferFailedError(IERC20 token, address to, uint256 amount); error TokenApprovalFailed(IERC20 token, address spender, uint256 amount); // Perform an `IERC20.transfer()` handling non-compliant implementations. function compatTransfer(IERC20 token, address to, uint256 amount) internal { (bool s, bytes memory r) = address(token).call( abi.encodeCall(IERC20.transfer, (to, amount)) ); if (s) { if (r.length == 0) { uint256 cs; assembly { cs := extcodesize(token) } if (cs == 0) { revert NotATokenError(token); } return; } if (abi.decode(r, (bool))) { return; } } revert TokenTransferFailedError(token, to, amount); } // Perform an `IERC20.transferFrom()` handling non-compliant implementations. function compatTransferFrom(IERC20 token, address from, address to, uint256 amount) internal { (bool s, bytes memory r) = address(token).call( abi.encodeCall(IERC20.transferFrom, (from, to, amount)) ); if (s) { if (r.length == 0) { uint256 cs; assembly { cs := extcodesize(token) } if (cs == 0) { revert NotATokenError(token); } return; } if (abi.decode(r, (bool))) { return; } } revert TokenTransferFailedError(token, to, amount); } function compatApprove(IERC20 token, address spender, uint256 amount) internal { (bool s, bytes memory r) = address(token).call( abi.encodeCall(IERC20.approve, (spender, amount)) ); if (s) { if (r.length == 0) { uint256 cs; assembly { cs := extcodesize(token) } if (cs == 0) { revert NotATokenError(token); } return; } if (abi.decode(r, (bool))) { return; } } revert TokenApprovalFailed(token, spender, amount); } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; library LibRawResult { // Revert with the data in `b`. function rawRevert(bytes memory b) internal pure { assembly { revert(add(b, 32), mload(b)) } } // Return with the data in `b`. function rawReturn(bytes memory b) internal pure { assembly { return(add(b, 32), mload(b)) } } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8; interface IERC4906 { event MetadataUpdate(uint256 _tokenId); event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; // Valid keys in `IGlobals`. Append-only. library LibGlobals { // The Globals commented out below were depreciated in 1.2; factories // can now choose the implementation address to deploy and no longer // deploy the latest implementation. They will no longer be updated // in future releases. // // See https://github.com/PartyDAO/party-migrations for // implementation addresses by release. uint256 internal constant GLOBAL_PARTY_IMPL = 1; uint256 internal constant GLOBAL_PROPOSAL_ENGINE_IMPL = 2; uint256 internal constant GLOBAL_PARTY_FACTORY = 3; uint256 internal constant GLOBAL_GOVERNANCE_NFT_RENDER_IMPL = 4; uint256 internal constant GLOBAL_CF_NFT_RENDER_IMPL = 5; uint256 internal constant GLOBAL_OS_ZORA_AUCTION_TIMEOUT = 6; uint256 internal constant GLOBAL_OS_ZORA_AUCTION_DURATION = 7; // uint256 internal constant GLOBAL_AUCTION_CF_IMPL = 8; // uint256 internal constant GLOBAL_BUY_CF_IMPL = 9; // uint256 internal constant GLOBAL_COLLECTION_BUY_CF_IMPL = 10; uint256 internal constant GLOBAL_DAO_WALLET = 11; uint256 internal constant GLOBAL_TOKEN_DISTRIBUTOR = 12; uint256 internal constant GLOBAL_OPENSEA_CONDUIT_KEY = 13; uint256 internal constant GLOBAL_OPENSEA_ZONE = 14; uint256 internal constant GLOBAL_PROPOSAL_MAX_CANCEL_DURATION = 15; uint256 internal constant GLOBAL_ZORA_MIN_AUCTION_DURATION = 16; uint256 internal constant GLOBAL_ZORA_MAX_AUCTION_DURATION = 17; uint256 internal constant GLOBAL_ZORA_MAX_AUCTION_TIMEOUT = 18; uint256 internal constant GLOBAL_OS_MIN_ORDER_DURATION = 19; uint256 internal constant GLOBAL_OS_MAX_ORDER_DURATION = 20; uint256 internal constant GLOBAL_DISABLE_PARTY_ACTIONS = 21; uint256 internal constant GLOBAL_RENDERER_STORAGE = 22; uint256 internal constant GLOBAL_PROPOSAL_MIN_CANCEL_DURATION = 23; // uint256 internal constant GLOBAL_ROLLING_AUCTION_CF_IMPL = 24; // uint256 internal constant GLOBAL_COLLECTION_BATCH_BUY_CF_IMPL = 25; uint256 internal constant GLOBAL_METADATA_REGISTRY = 26; // uint256 internal constant GLOBAL_CROWDFUND_FACTORY = 27; // uint256 internal constant GLOBAL_INITIAL_ETH_CF_IMPL = 28; // uint256 internal constant GLOBAL_RERAISE_ETH_CF_IMPL = 29; uint256 internal constant GLOBAL_SEAPORT = 30; uint256 internal constant GLOBAL_CONDUIT_CONTROLLER = 31; uint256 internal constant GLOBAL_OFF_CHAIN_SIGNATURE_VALIDATOR = 32; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; import "../tokens/IERC721.sol"; // Upgradeable proposals logic contract interface. interface IProposalExecutionEngine { struct ExecuteProposalParams { uint256 proposalId; bytes proposalData; bytes progressData; bytes extraData; uint256 flags; IERC721[] preciousTokens; uint256[] preciousTokenIds; } function initialize(address oldImpl, bytes memory initData) external; /// @notice Execute a proposal. /// @dev Must be delegatecalled into by PartyGovernance. /// If the proposal is incomplete, continues its next step (if possible). /// If another proposal is incomplete, this will fail. Only one /// incomplete proposal is allowed at a time. /// @param params The data needed to execute the proposal. /// @return nextProgressData Bytes to be passed into the next `execute()` call, /// if the proposal execution is incomplete. Otherwise, empty bytes /// to indicate the proposal is complete. function executeProposal( ExecuteProposalParams memory params ) external payable returns (bytes memory nextProgressData); /// @notice Forcibly cancel an incomplete proposal. /// @param proposalId The ID of the proposal to cancel. /// @dev This is intended to be a last resort as it can leave a party in a /// broken step. Whenever possible, proposals should be allowed to /// complete their entire lifecycle. function cancelProposal(uint256 proposalId) external; }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; import "../tokens/IERC721.sol"; library LibProposal { uint256 internal constant PROPOSAL_FLAG_UNANIMOUS = 0x1; uint256 internal constant PROPOSAL_FLAG_HOSTS_ACCEPT = 0x2; function isTokenPrecious( IERC721 token, IERC721[] memory preciousTokens ) internal pure returns (bool) { for (uint256 i; i < preciousTokens.length; ++i) { if (token == preciousTokens[i]) { return true; } } return false; } function isTokenIdPrecious( IERC721 token, uint256 tokenId, IERC721[] memory preciousTokens, uint256[] memory preciousTokenIds ) internal pure returns (bool) { for (uint256 i; i < preciousTokens.length; ++i) { if (token == preciousTokens[i] && tokenId == preciousTokenIds[i]) { return true; } } return false; } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; import "./IProposalExecutionEngine.sol"; import "../utils/LibRawResult.sol"; // The storage bucket shared by `PartyGovernance` and the `ProposalExecutionEngine`. // Read this for more context on the pattern motivating this: // https://github.com/dragonfly-xyz/useful-solidity-patterns/tree/main/patterns/explicit-storage-buckets abstract contract ProposalStorage { using LibRawResult for bytes; struct SharedProposalStorage { IProposalExecutionEngine engineImpl; ProposalEngineOpts opts; GovernanceValues governanceValues; } /// @notice Governance values stored for a party struct GovernanceValues { uint40 voteDuration; uint40 executionDelay; uint16 passThresholdBps; uint96 totalVotingPower; } struct ProposalEngineOpts { // Whether the party can add new authorities with the add authority proposal. bool enableAddAuthorityProposal; // Whether the party can spend ETH from the party's balance with // arbitrary call proposals. bool allowArbCallsToSpendPartyEth; // Whether operators can be used. bool allowOperators; // Whether distributions require a vote or can be executed by any active member. bool distributionsRequireVote; } uint256 internal constant PROPOSAL_FLAG_UNANIMOUS = 0x1; uint256 private constant SHARED_STORAGE_SLOT = uint256(keccak256("ProposalStorage.SharedProposalStorage")); function _initProposalImpl(IProposalExecutionEngine impl, bytes memory initData) internal { SharedProposalStorage storage stor = _getSharedProposalStorage(); IProposalExecutionEngine oldImpl = stor.engineImpl; stor.engineImpl = impl; (bool s, bytes memory r) = address(impl).delegatecall( abi.encodeCall(IProposalExecutionEngine.initialize, (address(oldImpl), initData)) ); if (!s) { r.rawRevert(); } } function _getSharedProposalStorage() internal pure returns (SharedProposalStorage storage stor) { uint256 s = SHARED_STORAGE_SLOT; assembly { stor.slot := s } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; // Base contract for all contracts intended to be delegatecalled into. abstract contract Implementation { event Initialized(); error AlreadyInitialized(); error OnlyDelegateCallError(); /// @notice The address of the implementation contract. address public immutable implementation; /// @notice Whether or not the implementation has been initialized. bool public initialized; constructor() { implementation = address(this); } // Reverts if the current function context is not inside of a delegatecall. modifier onlyDelegateCall() virtual { if (address(this) == implementation) { revert OnlyDelegateCallError(); } _; } modifier onlyInitialize() { if (initialized) revert AlreadyInitialized(); initialized = true; emit Initialized(); _; } /// @notice The address of the implementation contract. /// @dev This is an alias for `implementation` for backwards compatibility. function IMPL() external view returns (address) { return implementation; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.19; /** * @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: GPL-3.0 pragma solidity 0.8.20; abstract contract EIP165 { /// @notice Query if a contract implements an interface. /// @param interfaceId The interface identifier, as specified in ERC-165 /// @return `true` if the contract implements `interfaceId` and /// `interfaceId` is not 0xffffffff, `false` otherwise function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) { return interfaceId == this.supportsInterface.selector; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Read and write to persistent storage at a fraction of the cost. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SSTORE2.sol) /// @author Modified from 0xSequence (https://github.com/0xSequence/sstore2/blob/master/contracts/SSTORE2.sol) library SSTORE2 { uint256 internal constant DATA_OFFSET = 1; // We skip the first byte as it's a STOP opcode to ensure the contract can't be called. /*////////////////////////////////////////////////////////////// WRITE LOGIC //////////////////////////////////////////////////////////////*/ function write(bytes memory data) internal returns (address pointer) { // Prefix the bytecode with a STOP opcode to ensure it cannot be called. bytes memory runtimeCode = abi.encodePacked(hex"00", data); bytes memory creationCode = abi.encodePacked( //---------------------------------------------------------------------------------------------------------------// // Opcode | Opcode + Arguments | Description | Stack View // //---------------------------------------------------------------------------------------------------------------// // 0x60 | 0x600B | PUSH1 11 | codeOffset // // 0x59 | 0x59 | MSIZE | 0 codeOffset // // 0x81 | 0x81 | DUP2 | codeOffset 0 codeOffset // // 0x38 | 0x38 | CODESIZE | codeSize codeOffset 0 codeOffset // // 0x03 | 0x03 | SUB | (codeSize - codeOffset) 0 codeOffset // // 0x80 | 0x80 | DUP | (codeSize - codeOffset) (codeSize - codeOffset) 0 codeOffset // // 0x92 | 0x92 | SWAP3 | codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) // // 0x59 | 0x59 | MSIZE | 0 codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) // // 0x39 | 0x39 | CODECOPY | 0 (codeSize - codeOffset) // // 0xf3 | 0xf3 | RETURN | // //---------------------------------------------------------------------------------------------------------------// hex"60_0B_59_81_38_03_80_92_59_39_F3", // Returns all code in the contract except for the first 11 (0B in hex) bytes. runtimeCode // The bytecode we want the contract to have after deployment. Capped at 1 byte less than the code size limit. ); /// @solidity memory-safe-assembly assembly { // Deploy a new contract with the generated creation code. // We start 32 bytes into the code to avoid copying the byte length. pointer := create(0, add(creationCode, 32), mload(creationCode)) } require(pointer != address(0), "DEPLOYMENT_FAILED"); } /*////////////////////////////////////////////////////////////// READ LOGIC //////////////////////////////////////////////////////////////*/ function read(address pointer) internal view returns (bytes memory) { return readBytecode(pointer, DATA_OFFSET, pointer.code.length - DATA_OFFSET); } function read(address pointer, uint256 start) internal view returns (bytes memory) { start += DATA_OFFSET; return readBytecode(pointer, start, pointer.code.length - start); } function read(address pointer, uint256 start, uint256 end) internal view returns (bytes memory) { start += DATA_OFFSET; end += DATA_OFFSET; require(pointer.code.length >= end, "OUT_OF_BOUNDS"); return readBytecode(pointer, start, end - start); } /*////////////////////////////////////////////////////////////// INTERNAL HELPER LOGIC //////////////////////////////////////////////////////////////*/ function readBytecode(address pointer, uint256 start, uint256 size) private view returns (bytes memory data) { /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. data := mload(0x40) // Update the free memory pointer to prevent overriding our data. // We use and(x, not(31)) as a cheaper equivalent to sub(x, mod(x, 32)). // Adding 31 to size and running the result through the logic above ensures // the memory pointer remains word-aligned, following the Solidity convention. mstore(0x40, add(data, and(add(add(size, 32), 31), not(31)))) // Store the size of the data in the first 32 byte chunk of free memory. mstore(data, size) // Copy the code into memory right after the 32 bytes we used to store the size. extcodecopy(pointer, add(data, 32), start, size) } } }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.20; import "../utils/LibRawResult.sol"; abstract contract Multicall { using LibRawResult for bytes; /// @notice Perform multiple delegatecalls on ourselves. function multicall(bytes[] calldata multicallData) external { for (uint256 i; i < multicallData.length; ++i) { (bool s, bytes memory r) = address(this).delegatecall(multicallData[i]); if (!s) { r.rawRevert(); } } } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8; // Minimal ERC1155 interface. interface IERC1155 { event TransferSingle( address indexed operator, address indexed from, address indexed to, uint256 id, uint256 amount ); event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] amounts ); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function setApprovalForAll(address operator, bool approved) external; function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; function balanceOf(address owner, uint256 tokenId) external view returns (uint256); function isApprovedForAll(address owner, address spender) external view returns (bool); function balanceOfBatch( address[] calldata owners, uint256[] calldata ids ) external view returns (uint256[] memory balances); }
{ "remappings": [ "forge-std/=lib/forge-std/src/", "openzeppelin/=lib/openzeppelin-contracts/", "solmate/=lib/solmate/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "party-addresses/=lib/party-addresses/" ], "optimizer": { "enabled": true, "runs": 0 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "shanghai", "libraries": { "contracts/utils/LibRenderer.sol": { "LibRenderer": "0xc23e0eb44b4468266d36568bbbf39b1766937932" } }, "viaIR": true }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IGlobals","name":"globals","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[{"internalType":"address","name":"voter","type":"address"}],"name":"AlreadyVotedError","type":"error"},{"inputs":[],"name":"BadPreciousListError","type":"error"},{"inputs":[{"internalType":"bytes32","name":"proposalHash","type":"bytes32"},{"internalType":"bytes32","name":"actualHash","type":"bytes32"}],"name":"BadProposalHashError","type":"error"},{"inputs":[{"internalType":"enum PartyGovernance.ProposalStatus","name":"status","type":"uint8"}],"name":"BadProposalStatusError","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minAmount","type":"uint256"}],"name":"BelowMinWithdrawAmountError","type":"error"},{"inputs":[],"name":"CannotDisableRageQuitAfterInitializationError","type":"error"},{"inputs":[],"name":"CannotEnableRageQuitIfNotDistributionsRequireVoteError","type":"error"},{"inputs":[],"name":"CannotModifyTotalVotingPowerAndAcceptError","type":"error"},{"inputs":[{"internalType":"uint40","name":"rageQuitTimestamp","type":"uint40"}],"name":"CannotRageQuitError","type":"error"},{"inputs":[],"name":"DistributionsRequireVoteError","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bytes","name":"errData","type":"bytes"}],"name":"EthTransferFailed","type":"error"},{"inputs":[{"internalType":"uint40","name":"maxExecutableTime","type":"uint40"},{"internalType":"uint40","name":"timestamp","type":"uint40"}],"name":"ExecutionTimeExceededError","type":"error"},{"inputs":[{"internalType":"uint40","name":"rageQuitTimestamp","type":"uint40"}],"name":"FixedRageQuitTimestampError","type":"error"},{"inputs":[{"internalType":"int192","name":"i192","type":"int192"}],"name":"Int192ToUint96CastOutOfRange","type":"error"},{"inputs":[{"internalType":"uint16","name":"bps","type":"uint16"}],"name":"InvalidBpsError","type":"error"},{"inputs":[],"name":"InvalidDelegateError","type":"error"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"InvalidGovernanceParameter","type":"error"},{"inputs":[],"name":"InvalidNewHostError","type":"error"},{"inputs":[],"name":"InvalidTokenOrderError","type":"error"},{"inputs":[],"name":"MismatchedPreciousListLengths","type":"error"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"NotATokenError","type":"error"},{"inputs":[],"name":"NotAuthorized","type":"error"},{"inputs":[],"name":"NotMinted","type":"error"},{"inputs":[],"name":"NothingToBurnError","type":"error"},{"inputs":[],"name":"OnlyDelegateCallError","type":"error"},{"inputs":[],"name":"OnlyWhenEmergencyActionsAllowedError","type":"error"},{"inputs":[],"name":"OnlyWhenEnabledError","type":"error"},{"inputs":[],"name":"PartyNotStartedError","type":"error"},{"inputs":[{"internalType":"uint40","name":"currentTime","type":"uint40"},{"internalType":"uint40","name":"cancelTime","type":"uint40"}],"name":"ProposalCannotBeCancelledYetError","type":"error"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenTransferFailedError","type":"error"},{"inputs":[],"name":"TooManyHosts","type":"error"},{"inputs":[{"internalType":"uint256","name":"v","type":"uint256"}],"name":"Uint256ToInt192CastOutOfRange","type":"error"},{"inputs":[{"internalType":"uint256","name":"v","type":"uint256"}],"name":"Uint256ToUint96CastOutOfRange","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnsafeRecipient","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authority","type":"address"}],"name":"AuthorityAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authority","type":"address"}],"name":"AuthorityRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"votingPower","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum ITokenDistributor.TokenType","name":"tokenType","type":"uint8"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"DistributionCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"amountEth","type":"uint256"}],"name":"EmergencyExecute","type":"event"},{"anonymous":false,"inputs":[],"name":"EmergencyExecuteDisabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldHost","type":"address"},{"indexed":false,"internalType":"address","name":"newHost","type":"address"}],"name":"HostStatusTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"intrinsicVotingPower","type":"uint256"}],"name":"PartyCardIntrinsicVotingPowerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"}],"name":"PartyDelegateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint40","name":"timestamp","type":"uint40"},{"indexed":false,"internalType":"uint96","name":"delegatedVotingPower","type":"uint96"},{"indexed":false,"internalType":"uint96","name":"intrinsicVotingPower","type":"uint96"},{"indexed":false,"internalType":"bool","name":"isDelegated","type":"bool"}],"name":"PartyVotingSnapshotCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"weight","type":"uint256"}],"name":"ProposalAccepted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"ProposalCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"executor","type":"address"},{"indexed":false,"internalType":"bytes","name":"nextProgressData","type":"bytes"}],"name":"ProposalExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"ProposalPassed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"host","type":"address"}],"name":"ProposalVetoed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"proposer","type":"address"},{"components":[{"internalType":"uint40","name":"maxExecutableTime","type":"uint40"},{"internalType":"uint40","name":"cancelDelay","type":"uint40"},{"internalType":"bytes","name":"proposalData","type":"bytes"}],"indexed":false,"internalType":"struct PartyGovernance.Proposal","name":"proposal","type":"tuple"}],"name":"Proposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"caller","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"contract IERC20[]","name":"withdrawTokens","type":"address[]"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"RageQuit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint40","name":"oldRageQuitTimestamp","type":"uint40"},{"indexed":false,"internalType":"uint40","name":"newRageQuitTimestamp","type":"uint40"}],"name":"RageQuitSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"IMPL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION_ID","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"abdicateAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPartyHost","type":"address"}],"name":"abdicateHost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint256","name":"snapIndex","type":"uint256"}],"name":"accept","outputs":[{"internalType":"uint256","name":"totalVotes","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"authority","type":"address"}],"name":"addAuthority","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"components":[{"internalType":"uint40","name":"maxExecutableTime","type":"uint40"},{"internalType":"uint40","name":"cancelDelay","type":"uint40"},{"internalType":"bytes","name":"proposalData","type":"bytes"}],"internalType":"struct PartyGovernance.Proposal","name":"proposal","type":"tuple"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint96","name":"votingPower","type":"uint96"}],"name":"decreaseTotalVotingPower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint96","name":"votingPower","type":"uint96"}],"name":"decreaseVotingPower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"impl","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"name":"delegateCallAndRevert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegate","type":"address"}],"name":"delegateVotingPower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"delegationsByVoter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableEmergencyExecute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum ITokenDistributor.TokenType","name":"tokenType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"distribute","outputs":[{"components":[{"internalType":"enum ITokenDistributor.TokenType","name":"tokenType","type":"uint8"},{"internalType":"uint256","name":"distributionId","type":"uint256"},{"internalType":"contract Party","name":"party","type":"address"},{"internalType":"address payable","name":"feeRecipient","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint128","name":"memberSupply","type":"uint128"},{"internalType":"uint128","name":"fee","type":"uint128"},{"internalType":"uint96","name":"totalShares","type":"uint96"}],"internalType":"struct ITokenDistributor.DistributionInfo","name":"distInfo","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"},{"internalType":"bytes","name":"targetCallData","type":"bytes"},{"internalType":"uint256","name":"amountEth","type":"uint256"}],"name":"emergencyExecute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"emergencyExecuteDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"components":[{"internalType":"uint40","name":"maxExecutableTime","type":"uint40"},{"internalType":"uint40","name":"cancelDelay","type":"uint40"},{"internalType":"bytes","name":"proposalData","type":"bytes"}],"internalType":"struct PartyGovernance.Proposal","name":"proposal","type":"tuple"},{"internalType":"contract IERC721[]","name":"preciousTokens","type":"address[]"},{"internalType":"uint256[]","name":"preciousTokenIds","type":"uint256[]"},{"internalType":"bytes","name":"progressData","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"feeBps","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"voter","type":"address"},{"internalType":"uint40","name":"timestamp","type":"uint40"}],"name":"findVotingPowerSnapshotIndex","outputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getDistributionShareOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGovernanceValues","outputs":[{"components":[{"internalType":"uint40","name":"voteDuration","type":"uint40"},{"internalType":"uint40","name":"executionDelay","type":"uint40"},{"internalType":"uint16","name":"passThresholdBps","type":"uint16"},{"internalType":"uint96","name":"totalVotingPower","type":"uint96"}],"internalType":"struct ProposalStorage.GovernanceValues","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProposalEngineOpts","outputs":[{"components":[{"internalType":"bool","name":"enableAddAuthorityProposal","type":"bool"},{"internalType":"bool","name":"allowArbCallsToSpendPartyEth","type":"bool"},{"internalType":"bool","name":"allowOperators","type":"bool"},{"internalType":"bool","name":"distributionsRequireVote","type":"bool"}],"internalType":"struct ProposalStorage.ProposalEngineOpts","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProposalExecutionEngine","outputs":[{"internalType":"contract IProposalExecutionEngine","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint40","name":"maxExecutableTime","type":"uint40"},{"internalType":"uint40","name":"cancelDelay","type":"uint40"},{"internalType":"bytes","name":"proposalData","type":"bytes"}],"internalType":"struct PartyGovernance.Proposal","name":"proposal","type":"tuple"}],"name":"getProposalHash","outputs":[{"internalType":"bytes32","name":"proposalHash","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"getProposalStateInfo","outputs":[{"internalType":"enum PartyGovernance.ProposalStatus","name":"status","type":"uint8"},{"components":[{"internalType":"uint40","name":"proposedTime","type":"uint40"},{"internalType":"uint40","name":"passedTime","type":"uint40"},{"internalType":"uint40","name":"executedTime","type":"uint40"},{"internalType":"uint40","name":"completedTime","type":"uint40"},{"internalType":"uint96","name":"votes","type":"uint96"},{"internalType":"uint96","name":"totalVotingPower","type":"uint96"},{"internalType":"uint8","name":"numHosts","type":"uint8"},{"internalType":"uint8","name":"numHostsAccepted","type":"uint8"},{"internalType":"uint40","name":"voteDuration","type":"uint40"},{"internalType":"uint40","name":"executionDelay","type":"uint40"},{"internalType":"uint16","name":"passThresholdBps","type":"uint16"}],"internalType":"struct PartyGovernance.ProposalStateValues","name":"values","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"voter","type":"address"},{"internalType":"uint40","name":"timestamp","type":"uint40"},{"internalType":"uint256","name":"snapIndex","type":"uint256"}],"name":"getVotingPowerAt","outputs":[{"internalType":"uint96","name":"votingPower","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getVotingPowerShareOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint96","name":"votingPower","type":"uint96"}],"name":"increaseTotalVotingPower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint96","name":"votingPower","type":"uint96"}],"name":"increaseVotingPower","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"components":[{"components":[{"internalType":"address[]","name":"hosts","type":"address[]"},{"internalType":"uint40","name":"voteDuration","type":"uint40"},{"internalType":"uint40","name":"executionDelay","type":"uint40"},{"internalType":"uint16","name":"passThresholdBps","type":"uint16"},{"internalType":"uint96","name":"totalVotingPower","type":"uint96"},{"internalType":"uint16","name":"feeBps","type":"uint16"},{"internalType":"address payable","name":"feeRecipient","type":"address"}],"internalType":"struct PartyGovernance.GovernanceOpts","name":"governance","type":"tuple"},{"components":[{"internalType":"bool","name":"enableAddAuthorityProposal","type":"bool"},{"internalType":"bool","name":"allowArbCallsToSpendPartyEth","type":"bool"},{"internalType":"bool","name":"allowOperators","type":"bool"},{"internalType":"bool","name":"distributionsRequireVote","type":"bool"}],"internalType":"struct ProposalStorage.ProposalEngineOpts","name":"proposalEngine","type":"tuple"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"customizationPresetId","type":"uint256"}],"internalType":"struct Party.PartyOptions","name":"options","type":"tuple"},{"internalType":"contract IERC721[]","name":"preciousTokens","type":"address[]"},{"internalType":"uint256[]","name":"preciousTokenIds","type":"uint256[]"},{"internalType":"address[]","name":"authorities","type":"address[]"},{"internalType":"uint40","name":"rageQuitTimestamp","type":"uint40"}],"internalType":"struct Party.PartyInitData","name":"initData","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAuthority","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isHost","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastProposalId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTotalVotingPowerChangeTimestamp","outputs":[{"internalType":"uint40","name":"","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"votingPower","type":"uint256"},{"internalType":"address","name":"delegate","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintedVotingPower","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numHosts","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"preciousListHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint40","name":"maxExecutableTime","type":"uint40"},{"internalType":"uint40","name":"cancelDelay","type":"uint40"},{"internalType":"bytes","name":"proposalData","type":"bytes"}],"internalType":"struct PartyGovernance.Proposal","name":"proposal","type":"tuple"},{"internalType":"uint256","name":"latestSnapIndex","type":"uint256"}],"name":"propose","outputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"contract IERC20[]","name":"withdrawTokens","type":"address[]"},{"internalType":"uint256[]","name":"minWithdrawAmounts","type":"uint256[]"},{"internalType":"address","name":"receiver","type":"address"}],"name":"rageQuit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rageQuitTimestamp","outputs":[{"internalType":"uint40","name":"","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint40","name":"newRageQuitTimestamp","type":"uint40"}],"name":"setRageQuit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenCount","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"veto","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"votingPowerByTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60e0346200037557601f19906001600160401b03601f620062a43881900382810186168501848111868210176200037957859282916040528339602094859181010312620003755751936001600160a01b03851685036200037557620000646200038d565b935f90818652620000746200038d565b92828452306080528760a05286518681116200036157600854976001988981811c9116801562000356575b858210146200034257908188849311620002ee575b5084908883116001146200028c57869262000280575b50505f19600383901b1c191690881b176008555b83519586116200026c576009548781811c9116801562000261575b838210146200024d5785811162000204575b50819486116001146200019d5750509183949184939462000191575b50501b915f199060031b1c1916176009555b60c052604051615ef69081620003ae823960805181611adf015260a0518181816114d00152818161170601528181612a2f015281816136cb0152818161394301526150c6015260c05181818161304901526158440152f35b015192505f8062000127565b600983528183209493928692918316915b88838310620001e95750505010620001d0575b505050811b0160095562000139565b01515f1960f88460031b161c191690555f8080620001c1565b858701518855909601959485019487935090810190620001ae565b600984528284208680890160051c820192858a1062000243575b0160051c019088905b828110620002375750506200010b565b85815501889062000227565b925081926200021e565b634e487b7160e01b84526022600452602484fd5b90607f1690620000f9565b634e487b7160e01b83526041600452602483fd5b015190505f80620000ca565b90848b9416916008885286882092885b88828210620002d75750508411620002be575b505050811b01600855620000de565b01515f1960f88460031b161c191690555f8080620002af565b8385015186558e979095019493840193016200029c565b909150600886528486208880850160051c82019287861062000338575b918c91869594930160051c01915b82811062000329575050620000b4565b8881558594508c910162000319565b925081926200030b565b634e487b7160e01b86526022600452602486fd5b90607f16906200009f565b634e487b7160e01b84526041600452602484fd5b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b60405190602082016001600160401b03811183821017620003795760405256fe60806040526004361015610021575b361561001f573415613160575b5f80fd5b005b5f3560e01c806301ffc9a71461042657806302403f711461042157806306fdde031461041c578063081812fc146104175780630935847914610412578063095ea7b31461040d5780630d4d151314610408578063158ef93e1461040357806316399ea2146103fe5780631d28dec7146103f95780632330f247146103f457806323b872dd146103ef57806324a9d853146103ea57806326defa73146103e557806327cb04b4146103e0578063287b4399146103db5780632a55205a146103d65780632d992cd3146103d15780632fd75a27146103cc578063305a0721146103c757806333b9d8c4146103c25780633846b6d2146103bd5780633e4011b9146103b85780634121c931146103b357806342842e0e146103ae57806342966c68146103a957806343bc8831146103a4578063469048401461039f57806352a702b51461039a57806356973ee5146103955780635c60da1b146103955780636210f6b2146103905780636352211e1461038b5780636fd44cfd1461038657806370a082311461038157806374cb30411461037c57806378cfabac1461033b578063791fec56146103775780638518a7451461037257806395d89b411461036d5780639cd28894146103685780639f181b5e14610363578063a22cb4651461035e578063a25632fd14610359578063b20240ee14610354578063b80f55c91461034f578063b88d4fde1461034a578063c43683a114610345578063c87b56dd14610340578063caf6aa4b1461033b578063cc7b9d0614610336578063cd36324914610331578063cf67f3441461032c578063d1a35cba14610327578063d3c989af14610322578063d7faa2621461031d578063e6f26d9a14610318578063e7265a9514610313578063e8a3d4851461030e578063e985e9c514610309578063eb2931b714610304578063f0689b47146102ff578063f3ff955a146102fa578063fea44a56146102f55763fffc559d0361000e57612add565b6129f9565b6128ee565b612854565b612814565b6127bd565b6127a8565b61269f565b61267b565b61265e565b61259b565b61247b565b612441565b6123f8565b6123dd565b611bfb565b6123c7565b61233b565b612140565b612105565b612074565b611ee4565b611df1565b611dc9565b611da3565b611d13565b611ca2565b611c25565b611bde565b611b8a565b611b5e565b611b2e565b611b0e565b611aca565b611a8d565b611a66565b611a3f565b6119d1565b6118f3565b611641565b6115b1565b61157d565b611549565b611471565b611426565b611354565b610f98565b610f43565b610e83565b610e04565b610de1565b610dca565b610d5e565b610bc1565b610b20565b610aff565b6109a4565b6108ca565b610890565b61085e565b61073f565b610529565b61043d565b6001600160e01b031981160361001b57565b3461001b57602036600319011261001b5761049960043561045d8161042b565b63ffffffff60e01b16630a85bd0160e11b81149081156104ee575b81156104ae575b811561049d575b5060405190151581529081906020820190565b0390f35b63152a902d60e11b1490505f610486565b90506301ffc9a760e01b811480156104de575b80156104ce575b9061047f565b50635b5e139f60e01b81146104c8565b506380ac58cd60e01b81146104c1565b630271189760e51b81149150610478565b6001600160601b031690565b6001600160601b0381160361001b57565b35906105278261050b565b565b3461001b57604036600319011261001b576004356024356105498161050b565b6105516153e9565b60018060601b039061059861056d8284600e5460601c1661472e565b600e8054600160601b600160c01b03191660609290921b600160601b600160c01b0316919091179055565b1690805f52600f60205260405f20908154918383039283116105fc575f80516020615e81833981519152936105f7936105e792556105e16105d884615b7d565b9160170b615400565b906145bc565b6040519081529081906020820190565b0390a1005b61320d565b5f91031261001b57565b90600182811c92168015610639575b602083101461062557565b634e487b7160e01b5f52602260045260245ffd5b91607f169161061a565b634e487b7160e01b5f52604160045260245ffd5b608081019081106001600160401b0382111761067257604052565b610643565b61016081019081106001600160401b0382111761067257604052565b6001600160401b03811161067257604052565b61010081019081106001600160401b0382111761067257604052565b601f909101601f19168101906001600160401b0382119082101761067257604052565b5f5b8381106106f65750505f910152565b81810151838201526020016106e7565b9060209161071f815180928185528580860191016106e5565b601f01601f1916010190565b90602061073c928181520190610706565b90565b3461001b575f8060031936011261080457604051816008546107608161060b565b808452906001908181169081156107dc5750600114610796575b6104998461078a818803826106c2565b6040519182918261072b565b60088352602094505f80516020615e018339815191525b8284106107c957505050816104999361078a928201019361077a565b80548585018701529285019281016107ad565b610499965061078a9450602092508593915060ff191682840152151560051b8201019361077a565b80fd5b5f52600c60205260405f2090565b5f52600f60205260405f2090565b5f52600660205260405f2090565b5f52600a60205260405f2090565b6001600160a01b031690565b6001600160a01b03909116815260200190565b3461001b57602036600319011261001b576004355f52600c602052602060018060a01b0360405f205416604051908152f35b3461001b57604036600319011261001b5760206108b1602435600435613cf9565b604051908152f35b6001600160a01b0381160361001b57565b3461001b57604036600319011261001b576004356108e7816108b9565b6024355f818152600a602052604081205490926001600160a01b039182169190338314158061097b575b61096a576109418161092286610807565b80546001600160a01b0319166001600160a01b03909216919091179055565b16907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b6040516282b42960e81b8152600490fd5b5061099f61099b6109943361098f87610cb3565b610d49565b5460ff1690565b1590565b610911565b3461001b57606036600319011261001b576104995f80516020615d818339815191526105e7610a996004356109d8816108b9565b610ace6044356109e7816108b9565b6109ef6153e9565b600e5460018060601b03808260601c1691815f80516020615da18339815191525460601c1692610a20602435615a51565b9380151580610ae8575b610adb575b5050600e80546001600160601b0319166001600160601b0392841660010184169283161790559788968792610a7161056d86610a6c600e5461336e565b613221565b84169384610a7e85610815565b556040516001600160601b0390911681529081906020820190565b0390a2610ab5610aa885610ccc565b546001600160a01b031690565b6001600160a01b038116610ad3575b5060170b83614688565b615c61565b91505f610ac4565b0382169250600182610a2f565b50610af3828261472e565b84808716911610610a2a565b3461001b575f36600319011261001b57602060ff5f54166040519015158152f35b3461001b57602036600319011261001b57610ba2610b6b600435610b438161050b565b610b4b6153e9565b5f80516020615da18339815191525460601c6001600160601b031661472e565b5f80516020615da18339815191528054600160601b600160c01b03191660609290921b600160601b600160c01b0316919091179055565b5f80516020615dc1833981519152604080515f81525f196020820152a1005b3461001b57602036600319011261001b57600435610bdd6134f4565b805f52600660205260405f20610bfa610bf582613297565b614b3f565b610c038161223e565b600181141580610c9f575b80610c8b575b610c6a575080546001600160a01b03166001600160a01b03191790557fc2131db10d833d6b93ae553fa450ea0f6c0c2dfb0160cb3309468bf72718f3eb60405180610c5f338261084b565b0390a261001f614d34565b604051630821641d60e21b8152908190610c879060048301613c98565b0390fd5b50610c958161223e565b6004811415610c14565b50610ca98161223e565b6003811415610c0e565b6001600160a01b03165f908152600d6020526040902090565b6001600160a01b03165f90815260046020526040902090565b6001600160a01b03165f90815260036020526040902090565b6001600160a01b03165f90815260106020526040902090565b6001600160a01b03165f90815260076020526040902090565b6001600160a01b03165f908152600b6020526040902090565b9060018060a01b03165f5260205260405f2090565b3461001b57602036600319011261001b57600435610d7b816108b9565b60018060a01b03165f526010602052602060ff60405f2054166040519015158152f35b606090600319011261001b57600435610db6816108b9565b90602435610dc3816108b9565b9060443590565b3461001b5761001f610ddb36610d9e565b91615702565b3461001b575f36600319011261001b57602061ffff5f5460101c16604051908152f35b3461001b57602036600319011261001b57600435610e21816108b9565b303303610e71576001600160a01b03165f818152601060205260408120805460ff19166001179055907f550a8ae64ec9d6640b6f168a26d3e6364b90defe8110c92135aa775b279e54ea8280a280f35b60405163ea8e4eb560e01b8152600490fd5b3461001b57602036600319011261001b57600435610ea0816108b9565b610ea86134f4565b6001600160a01b03811615610ec95760405163640c1a3360e01b8152600490fd5b6005549060ff82169081156105fc577fddffcdb3bb07c5efc18b0918cf4e3e88c7d42cc05156cdadb2ec12c3b5ff892f9260ff6105f7935f1901169060ff191617600555610f23610f1933610ce5565b805460ff19169055565b604080513381526001600160a01b03909216602083015290918291820190565b3461001b575f8060031936011261080457610f5c6153e9565b33808252601060205260408220805460ff191690557f272215cde179041f7a3e8da6f8aabc7c8fc1336ccd73aba698cb825a80d3be488280a280f35b3461001b57604036600319011215615829575f80fd5b6040519060e082016001600160401b0381118382101761067257604052565b6040519060a082016001600160401b0381118382101761067257604052565b6040519061052782610677565b6040519061052782610657565b6001600160401b0381116106725760051b60200190565b81601f8201121561001b5780359161103483611006565b9261104260405194856106c2565b808452602092838086019260051b82010192831161001b578301905b82821061106c575050505090565b838091833561107a816108b9565b81520191019061105e565b64ffffffffff81160361001b57565b359061052782611085565b359061ffff8216820361001b57565b3590610527826108b9565b91909160e08184031261001b576110ce610fae565b928135916001600160401b03831161001b576110f160c09261114e94830161101d565b85526110ff60208201611094565b602086015261111060408201611094565b60408601526111216060820161109f565b60608601526111326080820161051c565b608086015261114360a0820161109f565b60a0860152016110ae565b60c0830152565b8015150361001b57565b919082608091031261001b5760405161117781610657565b6060808294803561118781611155565b8452602081013561119781611155565b602085015260408101356111aa81611155565b60408501520135916111bb83611155565b0152565b6001600160401b03811161067257601f01601f191660200190565b9190916111e6816111bf565b6111f360405191826106c2565b8093828252821161001b5781815f9384602080950137010152565b92919261121a826111bf565b9161122860405193846106c2565b82948184528183011161001b578281602093845f960137010152565b9080601f8301121561001b5781602061073c9335910161120e565b91906101008382031261001b57611274610fcd565b926001600160401b03813581811161001b57836112929184016110b9565b85526112a1836020840161115f565b602086015260a082013581811161001b57836112be918401611244565b604086015260c082013590811161001b5760e0926112dd918301611244565b606085015201356080830152565b92916112f682611006565b9161130460405193846106c2565b829481845260208094019160051b810192831161001b57905b82821061132a5750505050565b8135815290830190830161131d565b9080601f8301121561001b5781602061073c933591016112eb565b3461001b5760031960203682011261001b5760048035916001600160401b03919082841161001b5760a090843603011261001b57611390610fcd565b918382013581811161001b576113ab9083369187010161125f565b8352602484013581811161001b576113c89083369187010161101d565b6020840152604484013581811161001b576113e890833691870101611339565b6040840152606484013590811161001b5761001f9361141160849261141c94369184010161101d565b606085015201611094565b6080820152612f79565b3461001b57602036600319011261001b5760206108b1600435615390565b9181601f8401121561001b578235916001600160401b03831161001b576020838186019501011161001b57565b606036600319011261001b57600435611489816108b9565b6024356001600160401b03811161001b576114a8903690600401611444565b604051635c9fcd8560e11b8152600b60048201529192916001600160a01b03906020816024817f000000000000000000000000000000000000000000000000000000000000000086165afa908115611544575f91611516575b50163303610e715761001f92604435926140f8565b611537915060203d811161153d575b61152f81836106c2565b810190613553565b5f611501565b503d611525565b613568565b3461001b575f36600319011261001b575f80516020615ea1833981519152546040516001600160a01b039091168152602090f35b3461001b57604036600319011261001b5760206108b160043561159f816108b9565b602435906115ac82611085565b613467565b3461001b57604036600319011261001b576004356115ce816108b9565b6024356001600160401b03811161001b576115ed903690600401611244565b9030330361001b575f828192602082519201905af461162f61163d6116106140c9565b6040519283916020830195151586526040808401526060830190610706565b03601f1981018352826106c2565b5190fd5b3461001b576003196040368201811361001b576004803592602435906001600160401b03821161001b57606090823603011261001b5761167f613c60565b61168884610823565b6116a1600282015461169c36858701611e78565b614d53565b6116aa81613297565b916116b483614b3f565b6116bd8161223e565b600581036118d857506116d560246116df92016140b0565b64ffffffffff1690565b8451631106aeeb60e21b808252600f8287019081526020966001600160a01b0396909492937f000000000000000000000000000000000000000000000000000000000000000088169289908290819083010381865afa9485156115445789915f966118b9575b508a51938491825281806117608a8201906017602083019252565b03915afa80156115445761179d948a935f9261188a575b508061187a575b5080611868575b5001516117989064ffffffffff166116d5565b6133f8565b9081421061184257865f8088886117da896117c542600160271b1764ffffffffff168b613a31565b5f80516020615ea1833981519152541661083f565b915163e0a8f6f560e01b918101918252602481018690526117fe816044810161162f565b51915af461180a6140c9565b901561183d57507f416e669c63d9a3a5e36ee7cc7e2104b8db28ccd286aa18966e98fa230c73b08c5f80a261001f614d34565b61417e565b610c8786519283926303861c4b60e41b845264ffffffffff809216914216908401613f5c565b80841015611785579250611798611785565b8085111561177e5793505f61177e565b6118ab9192508a3d8c116118b2575b6118a381836106c2565b8101906140ba565b905f611777565b503d611899565b6118d1919650823d84116118b2576118a381836106c2565b945f611745565b8551630821641d60e21b8152908190610c8790828801613c98565b3461001b5761190136610d9e565b919061190e838284615702565b803b15159283611934575b50505061192257005b604051633da6393160e01b8152600490fd5b604051630a85bd0160e11b8082523360048301526001600160a01b0394851660248301526044820192909252608060648201525f6084820181905291945092602092849260a4928492165af1908115611544575f916119a3575b506001600160e01b03191614155f8080611919565b6119c4915060203d81116119ca575b6119bc81836106c2565b810190615baf565b5f61198e565b503d6119b2565b3461001b57602036600319011261001b57604080519081016001600160401b03811182821017610672576040526001815260208101906020368337805115611a295761001f916004359052611a246153e9565b615417565b613423565b64ffffffffff909116815260200190565b3461001b575f36600319011261001b57602064ffffffffff600e5460c01c16604051908152f35b3461001b575f36600319011261001b575f54604051602091821c6001600160a01b03168152f35b3461001b57602036600319011261001b576020600435611aac816108b9565b60018060a01b038091165f526004825260405f205416604051908152f35b3461001b575f36600319011261001b576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b3461001b575f36600319011261001b57602060ff60055416604051908152f35b3461001b57602036600319011261001b576020611b4c600435615b7d565b6040516001600160a01b039091168152f35b3461001b575f36600319011261001b57600e5460405160609190911c6001600160601b03168152602090f35b3461001b57602036600319011261001b57600435611ba7816108b9565b6001600160a01b03168015611bcc575f52600b602052602060405f2054604051908152f35b60405163d92e233d60e01b8152600490fd5b3461001b575f36600319011261001b576020600254604051908152f35b3461001b57602036600319011261001b576004355f52600f602052602060405f2054604051908152f35b3461001b57602036600319011261001b57610ba2610b6b600435611c488161050b565b611c506153e9565b5f80516020615da18339815191525460601c6001600160601b0316613221565b919091606080608083019480511515845260208101511515602085015260408101511515604085015201511515910152565b3461001b575f36600319011261001b57611cba6131e9565b50610499604051611cca81610657565b60ff5f80516020615de18339815191525481811615158352818160081c1615156020840152818160101c161515604084015260181c161515606082015260405191829182611c70565b3461001b575f806003193601126108045760405181600954611d348161060b565b808452906001908181169081156107dc5750600114611d5d576104998461078a818803826106c2565b60098352602094505f80516020615e418339815191525b828410611d9057505050816104999361078a928201019361077a565b8054858501870152928501928101611d74565b3461001b575f36600319011261001b57602064ffffffffff5f5460c01c16604051908152f35b3461001b575f36600319011261001b57600e546040516001600160601b039091168152602090f35b3461001b57604036600319011261001b57600435611e0e816108b9565b60243590611e1b82611155565b335f52600d602052611e308160405f20610d49565b9115159160ff1981541660ff841617905560405191825260018060a01b0316907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b91909160608184031261001b57604051906001600160401b039060608301828111848210176106725760405282948135611eb181611085565b84526020820135611ec181611085565b6020850152604082013592831161001b57604092611edf9201611244565b910152565b3461001b57604036600319011261001b576004356001600160401b03811161001b57611f17610499913690600401611e78565b611f1f613c60565b7fea77d064c7d953e57748855e7b0751ea190d1df7505615a4e39336d4d548f68861205c611f4e6002546139c2565b92611f5884600255565b61204e611f6361337d565b612029611f7360608301516104ff565b9161201d611f8360055460ff1690565b91612013611f96825164ffffffffff1690565b612003611fba6040611fb0602087015164ffffffffff1690565b95015161ffff1690565b95611ff9611fc6610fec565b99611fd864ffffffffff42168c61327c565b5f60208c01525f60408c01525f60608c01525f60808c015260a08b01613288565b60ff1660c0890152565b5f60e0880152610100870161327c565b610120850161327c565b61ffff16610140830152565b612032836133d1565b61203b87610823565b90600261204789610823565b0155613a56565b604051918291338684613c15565b0390a161206b60243582613cf9565b506105e7614d34565b3461001b575f36600319011261001b5761208c6131e9565b50608060405161209b81610657565b5f80516020615da18339815191525464ffffffffff808216928381526020810191808460281c1683526040820190606061ffff93848760501c168452019360018060601b03809660601c168552604051968752511660208601525116604084015251166060820152f35b3461001b57602036600319011261001b576004356001600160401b03811161001b5761213861001f913690600401611339565b611a246153e9565b3461001b57608036600319011261001b5760043561215d816108b9565b602435612169816108b9565b604435916064356001600160401b03811161001b5761218c903690600401611444565b9092612199858285615702565b803b151593846121b0575b50505050905061192257005b6121da94505f6020949660405196879586948593630a85bd0160e11b9b8c86523360048701615bc4565b03926001600160a01b03165af1908115611544575f9161220c575b506001600160e01b0319161415805f8080806121a4565b612224915060203d81116119ca576119bc81836106c2565b5f6121f5565b634e487b7160e01b5f52602160045260245ffd5b6008111561224857565b61222a565b9060088210156122485752565b6101606105279294936122728361018081019761224d565b805164ffffffffff166020840152602081015164ffffffffff166040840152604081015164ffffffffff166060840152606081015164ffffffffff16608084015260808101516001600160601b031660a084015260a08101516001600160601b031660c084015260c081015160ff1660e084015260e08101516122fd610100918286019060ff169052565b810151612316610120918286019064ffffffffff169052565b81015190612330610140928386019064ffffffffff169052565b015161ffff16910152565b3461001b57602036600319011261001b576123af6040610140815161235f81610677565b5f91818380935282602082015282858201528260608201528260808201528260a08201528260c08201528260e0820152826101008201528261012082015201526004358152600660205220613297565b6123b881614b3f565b6104996040519283928361225a565b3461001b57602036600319011215615829575f80fd5b3461001b575f36600319011261001b57602060405160028152f35b3461001b57606036600319011261001b57602061242f60043561241a816108b9565b60243561242681611085565b6044359161323a565b6040516001600160601b039091168152f35b3461001b57602036600319011261001b576004356001600160401b03811161001b576108b16124766020923690600401611e78565b6133d1565b3461001b57602036600319011261001b5760043561249881611085565b6124a06134f4565b64ffffffffff9064ab2cb218608282168114612568575f80516020615de18339815191525460181c60ff161561255657600e5460c01c64ffffffffff1692831690646b5b567bfe821491821561254c575b5050612531577f33d3074d42e98b5940d3d8364ba0f3421c4fde9db929c3d1c2899a36c5b216f29161252282614fca565b6105f760405192839283613f5c565b60405163066a813560e51b815280610c878460048301611a2e565b1490505f806124f1565b60405163064023b360e51b8152600490fd5b604051635f07128f60e01b8152600490fd5b6002111561001b57565b6002111561224857565b9060028210156122485752565b3461001b57608036600319011261001b576101006125d66024356125be8161257a565b6044356125ca816108b9565b6064359160043561366b565b61265c60e0604051926125ea84825161258e565b6020810151602085015260018060a01b03806040830151166040860152806060830151166060860152608082015116608085015261263760a082015160a086019060018060801b03169052565b60c0818101516001600160801b03169085015201516001600160601b031660e0830152565bf35b3461001b575f36600319011261001b576020600154604051908152f35b3461001b575f36600319011261001b57602060ff5f5460081c166040519015158152f35b3461001b57604036600319011261001b575f80516020615e818339815191526105f76004356105e76024356126d38161050b565b82816126dd6153e9565b6126e8600e5461336e565b5f80516020615da1833981519152546001600160601b039260609190911c831690811515908161278f575b50612780575b5061274f5f80516020615d818339815191529261273c61056d8761276a95613221565b61274585610815565b54951680956133f8565b8061275985610815565b556040519081529081906020820190565b0390a261277683615b7d565b9060170b906145bc565b8190038216935061274f612719565b9050838061279d858561472e565b92169116105f612713565b3461001b575f36600319011215615829575f80fd5b3461001b57604036600319011261001b57602060ff6128086004356127e1816108b9565b602435906127ee826108b9565b6001600160a01b03165f908152600d855260409020610d49565b54166040519015158152f35b3461001b57602036600319011261001b57600435612831816108b9565b60018060a01b03165f526003602052602060ff60405f2054166040519015158152f35b60c036600319011261001b576001600160401b0360243581811161001b5761288160049136908301611e78565b9060443583811161001b57612899903690830161101d565b60643584811161001b576128b09036908401611339565b9060843585811161001b576128c89036908501611444565b92909160a43596871161001b576128e561001f9736908701611444565b96909535613f74565b3461001b57602036600319011261001b5761001f60043561290e816108b9565b61291733614a86565b612923610aa833610ccc565b6001600160a01b0392908381166129f3575033905b8084166129ed5750805b61294f60208401516104ff565b936129b561298261297d61297861296960408901516104ff565b6001600160601b031660170b90565b614577565b615a7d565b918416916129ac612991610ff9565b976129a364ffffffffff42168a61327c565b60208901613288565b60408701613288565b3381141560608601526129c8853361496e565b6129d58361092233610ccc565b335f80516020615e618339815191525f80a333614747565b90612942565b90612938565b3461001b575f8060031936011261080457604051635c9fcd8560e11b8152600b60048201526001600160a01b03906020816024817f000000000000000000000000000000000000000000000000000000000000000086165afa908115611544578391612a8f575b501633141580612a7a575b610e7157612a776141b8565b80f35b50612a8a61099b61099433610ce5565b612a6b565b612aa7915060203d811161153d5761152f81836106c2565b5f612a60565b9181601f8401121561001b578235916001600160401b03831161001b576020808501948460051b01011161001b57565b3461001b57608036600319011261001b5760046001600160401b03813581811161001b57612b0e9036908401612aad565b9160243581811161001b57612b269036908601612aad565b9160443590811161001b57612b3e9036908701612aad565b9560643596612b4c886108b9565b8615612f6957612b5e61099433610cfe565b92612b73600e5464ffffffffff9060c01c1690565b93159081612f0b575b600e805464ffffffffff60c01b19166405596590c360c51b1790555f805464ffffffffff60c01b19164260c01b64ffffffffff60c01b16179055612bbf87615612565b91888a5f805b8b8210612da9575050612c0592612be4610b6b93612be99336916112eb565b615533565b612c005f80516020615da18339815191525461336e565b61472e565b5f5460101c61ffff1661ffff165f5b888110612c5a577f1d1937c6b6f4541f415f6e3e99b2b7a960dcedc201d01deada3d90b8cf77f9578b8b6105f78f8d8d612c4d8e614fca565b604051958695338761565e565b612c6d612c68828b8b615644565b615654565b612c778286614ff1565b51612c8d612c858583613ce6565b612710900490565b80612d2f575b50612c9f838887615644565b35808210612d0a575090818e612cbd9493612cc2575b5050506139c2565b612c14565b6001600160a01b039280841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee03612cfb5750612cf39216615913565b5f808e612cb5565b612d05935061596e565b612cf3565b60408051632d9eac9360e01b8152808b01938452602084019290925290918291010390fd5b9081612d3a9161345a565b906001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee03612d7d575f54612d77919060201c6001600160a01b0316615913565b5f612c93565b5f54612da49190612d9e9060201c6001600160a01b031661083f565b61083f565b8461596e565b612d77565b91509150612dbe612d99612c68848d8d615644565b6001600160a01b039091161015612efa57879073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee612e04612d9980612c68858f612dfe8383838c615644565b98615644565b14818b8b5f935f14612e915750505050475b5f5b8d8d818310612e375750505050612e2e906139c2565b8b908b92612bc5565b612e6c612e5e612e58612e5286612e8c9796612e7c96615644565b35615390565b86613ce6565b670de0b6b3a7640000900490565b612e76868b614ff1565b516133f8565b612e86858a614ff1565b526139c2565b612e18565b612ea292612d9992612c6892615644565b612ec58960405180936370a0823160e01b8252818060209586953090830161084b565b03915afa9283156115445792612edd575b5050612e16565b612ef39250803d106118b2576118a381836106c2565b5f80612ed6565b604051633a67cf6d60e01b81528690fd5b64ffffffffff8516646b5b567bfe8103612f26575b50612b7c565b64ab2cb218608114908115612f5f575b50612f41575f612f20565b505060405163a16caf5360e01b8152928392610c8792508301611a2e565b905042115f612f36565b50604051630c48157760e11b8152fd5b5f90815460ff811661314f5760ff1916600190811783557f5daa87a0e9463431830481fd4b6e3403442dfb9a12b9c07597e9f61d50b633c88380a1808251926040840151936060810151946130086080830151966130036020855195015193612ffe60208801516040890151908764ffffffffff608060608d01519c01511699615005565b614e2c565b614efb565b81613132575b505084915b6130e8575b50505080613024575050565b604051635c9fcd8560e11b8152601660048201526001600160a01b03906020816024817f000000000000000000000000000000000000000000000000000000000000000086165afa9081156115445784916130ca575b501690813b156130c65760405163fc9968df60e01b8152600481019190915291908290602490829084905af18015611544576130b35750565b806130c061052792610693565b80610601565b8280fd5b6130e2915060203d811161153d5761152f81836106c2565b5f61307a565b805182101561312d578282613126613119613114613107859787614ff1565b516001600160a01b031690565b610cfe565b805460ff19166001179055565b0191613013565b613018565b6060015190925015612556576131488392614fca565b5f8061300e565b60405162dc149f60e41b8152600490fd5b3660041161001b575f356001600160e01b03191663bc197c8160e01b811480156131d9575b80156131c9575b6131b8575f80516020615ea1833981519152546001600160a01b03166131b236806111da565b90615ac4565b602090604051908152818101604052f35b50630a85bd0160e11b811461318c565b5063f23a6e6160e01b8114613185565b604051906131f682610657565b5f6060838281528260208201528260408201520152565b634e487b7160e01b5f52601160045260245ffd5b6001600160601b0391821690821601919082116105fc57565b916132489161073c93614499565b606081015115613268575f905b602001516001600160601b031690613221565b60408101516001600160601b031690613255565b9064ffffffffff169052565b6001600160601b039091169052565b9061052761ffff6132a6610fec565b9361335c600182549261330764ffffffffff946132c58682168b61327c565b6132d7868260281c1660208c0161327c565b6132e9868260501c1660408c0161327c565b6132fb868260781c1660608c0161327c565b60a01c60808a01613288565b0154916133206001600160601b03841660a08901613288565b606083901c60ff1660c0880152606883901c60ff1660e088015261334d818460701c16610100890161327c565b8260981c16610120870161327c565b60c01c1661014084019061ffff169052565b60601c6001600160601b031690565b6040519061338a82610657565b5f80516020615da18339815191525464ffffffffff8082168452602882901c166020840152605081901c61ffff166040840152606090811c6001600160601b031690830152565b9060408201916060835191825160208401208552209252565b90600182018092116105fc57565b919082018092116105fc57565b811561340f570490565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b8054821015611a29575f5260205f2001905f90565b5f198101919082116105fc57565b919082039182116105fc57565b6001600160a01b03165f9081526007602052604081208054925b83831061349f575050508061349657505f1990565b61073c9061344c565b9091928084018085116105fc5760011c906134c96134bd8386613437565b505464ffffffffff1690565b64ffffffffff848116911611156134e45750925b9190613481565b93506134ef906133ea565b6134dd565b335f52600360205260ff60405f20541615610e7157565b60405190613518826106a6565b8160e05f918281528260208201528260408201528260608201528260808201528260a08201528260c08201520152565b5190610527826108b9565b9081602091031261001b575161073c816108b9565b6040513d5f823e3d90fd5b60409194939261358782606081019761258e565b6001600160a01b031660208201520152565b51906001600160801b038216820361001b57565b51906105278261050b565b908161010091031261001b5761364860e0604051926135d6846106a6565b80516135e18161257a565b8452602081015160208501526135f960408201613548565b604085015261360a60608201613548565b606085015261361b60808201613548565b608085015261362c60a08201613599565b60a085015261363d60c08201613599565b60c0850152016135ad565b60e082015290565b1561365757565b634e487b7160e01b5f52600160045260245ffd5b909261367561350b565b5061367e613927565b303303613888575b5f80516020615da18339815191525460601c6001600160601b03161561387657604051635c9fcd8560e11b8152600c60048201526001600160a01b03906020816024817f000000000000000000000000000000000000000000000000000000000000000086165afa80156115445782613733917fdda962f630bf2f85c8412f305206a4f363688481dd632689f88ad7022e4cc233935f91613858575b501693604051918291888a84613573565b0390a161373e614d34565b5f549361ffff828660201c169560101c169561375981612584565b8015613812576137d693925f96979261378060018461377a61378996612584565b14613650565b1694838661596e565b60405163eedaf00d60e01b81526001600160a01b03948516600482015230602482015295909316604486015261ffff90921660648501526101009392849284929091839182906084820190565b03925af1918215611544575f926137ec57505090565b61073c9250803d1061380b575b61380381836106c2565b8101906135b8565b503d6137f9565b5050604051631d1972a760e11b81523060048201526001600160a01b0390941660248501525061ffff9093166044830152610100928391839190829081606481016137d6565b613870915060203d811161153d5761152f81836106c2565b5f613722565b6040516311bf009f60e21b8152600490fd5b60ff5f80516020615de18339815191525460181c16613900576138aa33614a86565b60408101516001600160601b03906138c1906104ff565b161590816138e2575b50156136865760405163ea8e4eb560e01b8152600490fd5b6138f9915060206138f49101516104ff565b6104ff565b155f6138ca565b604051632e31362d60e01b8152600490fd5b9081602091031261001b575161073c81611155565b6040516331a1aa3360e11b8152601560048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115611544575f91613994575b5061398257565b604051632fb3e88560e01b8152600490fd5b6139b5915060203d81116139bb575b6139ad81836106c2565b810190613912565b5f61397b565b503d6139a3565b5f1981146105fc5760010190565b9064ffffffffff1664ffffffffff19825416179055565b805464ffffffffff60281b191660289290921b64ffffffffff60281b16919091179055565b805464ffffffffff60501b191660509290921b64ffffffffff60501b16919091179055565b805464ffffffffff60781b191660789290921b64ffffffffff60781b16919091179055565b90613bf9610140600161052794613a7b613a75865164ffffffffff1690565b826139d0565b613a96613a90602087015164ffffffffff1690565b826139e7565b613ab1613aab604087015164ffffffffff1690565b82613a0c565b613acc613ac6606087015164ffffffffff1690565b82613a31565b613afc613adc60808701516104ff565b82546001600160a01b031660a09190911b6001600160a01b031916178255565b0192613b2a613b0e60a08301516104ff565b85546001600160601b0319166001600160601b03909116178555565b613b55613b3b60c083015160ff1690565b855460ff60601b191660609190911b60ff60601b16178555565b613b80613b6660e083015160ff1690565b855460ff60681b191660689190911b60ff60681b16178555565b613bb8613b9661010083015164ffffffffff1690565b855464ffffffffff60701b191660709190911b64ffffffffff60701b16178555565b613bf0613bce61012083015164ffffffffff1690565b855464ffffffffff60981b191660989190911b64ffffffffff60981b16178555565b015161ffff1690565b815461ffff60c01b191660c09190911b61ffff60c01b16179055565b9161073c9360409160c093855260018060a01b0316602085015260608285015264ffffffffff8082511660608601526020820151166080850152015191606060a08201520190610706565b613c6933614a86565b60408101516001600160601b03908116159182613c89575b5050610e7157565b60200151161590505f80613c81565b602081019291610527919061224d565b64ffffffffff9081165f1901919082116105fc57565b60ff1660ff81146105fc5760010190565b90612710918281029281840414901517156105fc57565b818102929181159184041417156105fc57565b90613d0382610823565b91613d0d83613297565b90613d1782614b3f565b613d208161223e565b600181141580613f48575b80613f34575b610c6a57505f5460c01c64ffffffffff1664ffffffffff9081164214613f1f576003850194613d636109943388610d49565b613f0457613d9c6138f495613d7f61311961073c993390610d49565b613d96613d91875164ffffffffff1690565b613ca8565b3361323a565b937fea45672a2d92b09ff2dd48aa67615f8b5c79d7808b7282fc026a24e00283f78d613e1e6080830196613ddd613dd782610a6c8b516104ff565b89613288565b613de961099433610ce5565b613ede575b613df88486613a56565b604080518881523360208201526001600160601b03909216908201529081906060820190565b0390a182613e34602083015164ffffffffff1690565b16159081613e8c575b50613e4c575b505050516104ff565b613e58914216906139e7565b7fe36f8b7448daff4a52e2945db0d1d7a436279cc1d527a45c27835dcbd27f336d5f80a2613e84614d34565b5f8080613e43565b9050613ed6613ecf610140613ec5613eaf613eaa6138f48b516104ff565b613ccf565b613ebf6138f460a08801516104ff565b90613405565b93015161ffff1690565b61ffff1690565b11155f613e3d565b613eff60e08501613ef8613ef3825160ff1690565b613cbe565b60ff169052565b613dee565b604051630b517d8f60e41b815280610c87336004830161084b565b6040516001621af97960e21b03198152600490fd5b50613f3e8161223e565b6004811415613d31565b50613f528161223e565b6003811415613d2b565b64ffffffffff91821681529116602082015260400190565b93949196929096613f83613927565b613f8b613c60565b613f9485610823565b97613fa360028a015482614d53565b613fac89613297565b96613fb688614b3f565b613fbf8161223e565b600481149081158061409c575b610c6a57613fd99061223e565b614058575b613feb61099b8585614d03565b6140465761402e986140206140289261401861099b9b6140138f64ffffffffff421690613a31565b614acf565b97369161120e565b96369161120e565b9561436c565b6140355750565b805464ffffffffff60781b19169055565b604051633b43666f60e01b8152600490fd5b815164ffffffffff90811642811061407c57506140779042168b613a0c565b613fde565b604051632f7e600560e21b8152918291610c879142169060048401613f5c565b506140a68161223e565b6005811415613fcc565b3561073c81611085565b9081602091031261001b575190565b3d156140f3573d906140da826111bf565b916140e860405193846106c2565b82523d5f602084013e565b606090565b90939260ff5f5460081c16614186575f806040518588823780868101838152039084865af16141256140c9565b901561417e57506141737f66cf5924183d7d44caa75d9268a169d7c1422fef43848743d5e1ba32d5833acf949560405194859460018060a01b03168552606060208601526060850191614198565b9060408301520390a1565b602081519101fd5b6040516304e71fd360e31b8152600490fd5b908060209392818452848401375f828201840152601f01601f1916010190565b61010061ff00195f5416175f557f447e75484d6bdb571b4a92ae14018db7b6dd41f3f02360690c554e1d48f46f875f80a1565b9081518082526020808093019301915f5b82811061420a575050505090565b8351855293810193928101926001016141fc565b91906020928381528151848201526142458483015160e06040840152610100830190610706565b90614279614265604085015193601f199485858303016060860152610706565b606085015184848303016080850152610706565b92608081015160a083015260a081015193838382030160c08401528680865192838152019501905f5b8181106142c65750505061073c94955060c060e091015192828503019101526141eb565b82516001600160a01b0316875295880195918801916001016142a2565b81601f8201121561001b5780516142f9816111bf565b9261430760405194856106c2565b8184526020828401011161001b5761073c91602080850191016106e5565b9060208282031261001b5781516001600160401b03811161001b5761073c92016142e3565b6001600160a01b03909116815260406020820181905261073c92910190610706565b95935f959392919460408796015194614383610fae565b898152602081019690965260408601526060850152608084015260a083015260c08201525f80516020615ea1833981519152546143c8906001600160a01b031661083f565b906040516143eb8161162f602082019463a7c8a3f960e01b86526024830161421e565b51915af46143f76140c9565b901561183d578060208061441093518301019101614325565b907fc98fbf8f20b11b050a9541d12aee1c11fcd31e8e42975cc885fb3d33a6accc826040518061444185338361434a565b0390a261444c614d34565b511590565b9060405161445e81610657565b915464ffffffffff81168352602881901c6001600160601b039081166020850152608882901c16604084015260e81c60ff1615156060830152565b91906144a36131e9565b926144ad81610d17565b928354806144be575b505050505090565b8082109081614555575b81614515575b506145045750906144de91613467565b90600182016144ef578080806144b6565b61073c9250906144fe91613437565b50614451565b91505061073c92506144fe91613437565b61451f915061344c565b8114801561452e575b5f6144ce565b506145446134bd61453e836133ea565b86613437565b64ffffffffff808516911611614528565b90506145646134bd8387613437565b64ffffffffff80861691161115906144c8565b60170b906001600160bf1b0382136001600160bf1b03198312176105fc57565b601791820b910b01906001600160bf1b031982126001600160bf1b038313176105fc57565b90610527916145ca81614a86565b906001600160a01b03806145dd83610ccc565b54168061468057508182915b602085015160408601516001600160601b03918216976146109261297d921660170b614597565b9061464a81841691851692614641614626610ff9565b9961463864ffffffffff42168c61327c565b60208b01613288565b60408901613288565b81811415606088015261465d878461496e565b61466a8461092285610ccc565b5f80516020615e618339815191525f80a3614747565b9182916145e9565b916105279261469681614a86565b916146a3610aa883610ccc565b6001600160a01b039290838116614728575080915b808416614722575081925b6146ec61297d6146d660208801516104ff565b976146e761296960408a01516104ff565b614597565b9061470281841691861692614641614626610ff9565b818114156060880152614715878461496e565b61466a8561092285610ccc565b926146c3565b916146b8565b6001600160601b0391821690821603919082116105fc57565b90936001600160a01b03838116949192851580156148b2575b6148a0578116908616958187141580614896575b61484c575b508403614788575b5050505050565b614820946147b961479885614a86565b936147b360406147ab60208801516104ff565b9201516104ff565b90613221565b941461482a575b50806148126147e260606147da604061481b9601516104ff565b930151151590565b916148096147ee610ff9565b9661480064ffffffffff42168961327c565b60208801613288565b60408601613288565b15156060840152565b61496e565b5f80808080614781565b61481b919361483f60406148459301516104ff565b9061472e565b92906147c0565b8061485961489092614a86565b9061481b61487a61486d60208501516104ff565b61483f60408901516104ff565b926148126147e260606147da60408501516104ff565b5f614779565b5085871415614774565b60405163e5ec2d2560e01b8152600490fd5b5081871615614760565b9190614932576148d464ffffffffff825116836139d0565b602081015182546040830151606090930151600160281b600160f01b031990911660289290921b600160281b600160881b03169190911760889290921b600160881b600160e81b03169190911790151560e81b60ff60e81b16179055565b634e487b7160e01b5f525f60045260245ffd5b80549190600160401b831015610672578261496891600161052795018155613437565b906148bc565b90614a1864ffffffffff92838351167f59c8109016c9c9310894a72309b48d2a442208dacb537923fca808618ce5710260018060601b036020860151166149b860408701516104ff565b90614a106149c96060890151151590565b6040805164ffffffffff90971687526001600160601b039384166020880152929093169185019190915290151560608401526001600160a01b038416929081906080820190565b0390a2610d17565b9182549081614a2d575b505061052791614945565b614a50614a456144fe614a3f8561344c565b87613437565b5164ffffffffff1690565b90614a636116d5855164ffffffffff1690565b911614614a705780614a22565b61052792614a806149689261344c565b90613437565b90614a8f6131e9565b6001600160a01b039092165f90815260076020526040902080549081614ab3575050565b9192505f198101919082116105fc5761073c916144fe91613437565b608081015160a08201515f9291614af2916001600160601b039081169116614cb5565b614b1d575b8060ff60e08160c0614b10950151169201511690614ce9565b614b175790565b60021790565b60019150614af7565b91909164ffffffffff808094169116019182116105fc57565b64ffffffffff80614b55835164ffffffffff1690565b1615614caf57614b706116d5604084015164ffffffffff1690565b614c7d57608082019160018060601b0380614b8b85516104ff565b1614614c755781421692614ba7602083015164ffffffffff1690565b838116614bed57505080614bd6610100614bc9614bdc945164ffffffffff1690565b92015164ffffffffff1690565b90614b26565b161115614be857600190565b600290565b614c0990614bd6610120859795969496015164ffffffffff1690565b161115614c6e57614c1d614c3091516104ff565b614c2a60a08401516104ff565b90614cb5565b614c685780614c5460e0614c4b60c0614c5a95015160ff1690565b92015160ff1690565b90614ce9565b614c6357600390565b600490565b50600490565b5050600490565b505050600290565b60609091015164ffffffffff1690811615614ca957600160271b90811614614ca457600690565b600790565b50600590565b50505f90565b6001600160601b0391906127109083168181029181159183041417156105fc5761270f92614ce4921690613405565b101590565b60ff168015159182614cfa57505090565b60ff1614919050565b60015491614d1091614d14565b1490565b6020815160051b9101205f526020815160051b91012060205260405f2090565b5f80516020615dc1833981519152604080515f81525f196020820152a1565b614d5c906133d1565b90818103614d68575050565b6044925060405191630267877160e11b835260048301526024820152fd5b601f8111614d92575050565b5f906008825260208220906020601f850160051c83019410614dcf575b601f0160051c01915b828110614dc457505050565b818155600101614db8565b9092508290614daf565b601f8111614de5575050565b5f906009825260208220906020601f850160051c83019410614e22575b601f0160051c01915b828110614e1757505050565b818155600101614e0b565b9092508290614e02565b80519091906001600160401b03811161067257614e5381614e4e60085461060b565b614d86565b602080601f8311600114614e8d57508192935f92614e82575b50508160011b915f199060031b1c191617600855565b015190505f80614e6c565b60085f52601f198316949091905f80516020615e01833981519152925f905b878210614ee3575050836001959610614ecb575b505050811b01600855565b01515f1960f88460031b161c191690555f8080614ec0565b80600185968294968601518155019501930190614eac565b80519091906001600160401b03811161067257614f2281614f1d60095461060b565b614dd9565b602080601f8311600114614f5c57508192935f92614f51575b50508160011b915f199060031b1c191617600955565b015190505f80614f3b565b60095f52601f198316949091905f80516020615e41833981519152925f905b878210614fb2575050836001959610614f9a575b505050811b01600955565b01515f1960f88460031b161c191690555f8080614f8f565b80600185968294968601518155019501930190614f7b565b600e805464ffffffffff60c01b191660c09290921b64ffffffffff60c01b16919091179055565b8051821015611a295760209160051b010190565b9260a0840192615017845161ffff1690565b9361271061ffff95818782161161532157506020918288019261503f845164ffffffffff1690565b9764ffffffffff98610e108a821610615349575060608a0193615064855161ffff1690565b91821690811591821561533f575b50506153215750604097888a019061508f825164ffffffffff1690565b9081168015908115615314575b506152f857508851635c9fcd8560e11b815260026004820152916001600160a01b039080846024817f000000000000000000000000000000000000000000000000000000000000000086165afa8015611544578c6151886152259861516e8f61527d9f61515d61515161523e9f614a45615166946151fe9f9d60809761519b9f9d8f6151929f5f926152d3575b5061513d61514b9293519586928301611c70565b03601f1981018552846106c2565b166158a5565b9a5164ffffffffff1690565b935161ffff1690565b9401516104ff565b9461518161517a610ff9565b988961327c565b870161327c565b61ffff16848d0152565b60608301613288565b64ffffffffff8151165f80516020615da18339815191529182549164ffffffffff60281b602083015160281b169061ffff60501b604084015160501b169260606001811b600160c01b0391015160601b169360018060c01b031916171717179055565b61521d61520d89515160ff1690565b60ff1660ff196005541617600555565b5161ffff1690565b63ffff00005f549160101b169063ffff00001916175f55565b61527861524e60c087015161083f565b5f8054600160201b600160c01b03191660209290921b600160201b600160c01b0316919091179055565b615366565b60ff825151116152c057505f5b81519081518110156152bb576152b16131196152ac613107846152b696614ff1565b610ce5565b6139c2565b61528a565b505050565b5160016211dcdd60e31b03198152600490fd5b61514b92506152f161513d91833d851161153d5761152f81836106c2565b9250615129565b8951636dfaf3cd60e01b8152908190610c879060048301611a2e565b62278d009150115f61509c565b6040516323dd0d6d60e11b815261ffff919091166004820152602490fd5b1190505f80615072565b604051636dfaf3cd60e01b8152908190610c879060048301611a2e565b90815181510361537e5761537991614d14565b600155565b6040516357cc2fc760e01b8152600490fd5b5f80516020615da18339815191525460601c6001600160601b0316905f826153b9575050505f90565b6040918152600f602052205490670de0b6b3a7640000918281029281840414901517156105fc5761073c91613405565b335f52601060205260ff60405f20541615610e7157565b60170b6001600160bf1b031981146105fc575f0390565b905f8092815b81518110156154f357805f80516020615d618339815191526154426154ee9385614ff1565b519661544d88615b7d565b976154e661546d61546661546084610815565b54615a51565b8094613221565b998861547884610815565b556154b7604091845f80516020615d8183398151915284518061549f81905f602083019252565b0390a26105e16001600160601b03871660170b615400565b6154c083615bf5565b5133815260208101929092526001600160601b0390921660408201529081906060820190565b0390a16139c2565b61541d565b50505061550861056d83612c00600e5461336e565b5f80516020615dc18339815191526040518061552e815f81525f19602082015260400190565b0390a1565b91905f9283845b82518110156155fb57908161555184938695614ff1565b5161555b81615b7d565b9561559a575b61559192816154e66155866154666154605f80516020615d6183398151915296610815565b988b61547884610815565b9290919261553a565b336001600160a01b0387161415806155e3575b806155ca575b156155615760405163ea8e4eb560e01b8152600490fd5b506155de61099b6109943361098f8a610cb3565b6155b3565b50336155f4612d99610aa884610807565b14156155ad565b509350505061550861056d83612c00600e5461336e565b9061561c82611006565b61562960405191826106c2565b828152809261563a601f1991611006565b0190602036910137565b9190811015611a295760051b0190565b3561073c816108b9565b6001600160a01b03918216815260806020808301829052908201859052909796959390926001600160fb1b03821161001b5760c0916005959493951b809160a08b013788018360a0820160a08b84030160408c0152520193925f905b8382106156dc5750505050509060606105279294019060018060a01b03169052565b909192939483806001928489356156f2816108b9565b16815201960194939201906156ba565b5f838152600f60205260409020546001600160bf1b03811161581157615746906001600160c01b031660170b61574061573a82615400565b846145bc565b836145bc565b615755612d99610aa885610831565b6001600160a01b038083169291830361096a578316928315611bcc5782331415806157f8575b806157e0575b61096a576157916157b192610d30565b80545f190190556157a181610d30565b8054600101905561092285610831565b6157cd6157bd84610807565b80546001600160a01b0319169055565b5f80516020615e218339815191525f80a4565b506157f0612d99610aa887610807565b331415615781565b5061580c61099b6109943361098f86610cb3565b61577b565b6024906040519063e9a5989b60e01b82526004820152fd5b604051635c9fcd8560e11b81526004808201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115611544575f91615887575b506131b236366111da565b61589f915060203d811161153d5761152f81836106c2565b5f61587c565b5f80516020615ea183398151915280546001600160a01b039283166001600160a01b03198216811790925560405163347d5e2560e21b602082019081525f95869591936158fe92849261162f929091166024840161434a565b51915af461590a6140c9565b901561417e5750565b811561596a576001600160a01b0316905f90819081908190855af1906159376140c9565b9115615941575050565b610c8760405192839263354db69760e01b84526004840152604060248401526044830190610706565b5050565b60405163a9059cbb60e01b602082019081526001600160a01b03841660248301526044820185905292949193925f918291906159ad816064810161162f565b5190826001600160a01b0388165af16159c46140c9565b906159fc575b5050604051631702a98760e11b81526001600160a01b0392831660048201529290911660248301526044820152606490fd5b805115615a265780602080615a1693518301019101613912565b615a2057806159ca565b92505050565b50925050803b15615a345750565b604051639fe23a3960e01b8152908190610c87906004830161084b565b6001600160601b0390818111615a65571690565b60249060405190636f55e21560e11b82526004820152fd5b8060170b5f81128015615ab4575b615a9c57506001600160601b031690565b602490604051906394e08f6160e01b82526004820152fd5b506001600160601b038113615a8b565b303b1561001b5760405190633e4011b960e01b82528180615aeb5f9586946004840161434a565b0381305afa9081615b66575b50615b5257615b046140c9565b805181019160408284031261080457602082015192615b2284611155565b6040830151916001600160401b0383116108045750615b489260209182019201016142e3565b90615b755761417e565b634e487b7160e01b81526001600452602490fd5b615b6f90610693565b5f615af7565b602081519101f35b5f908152600a60205260409020546001600160a01b0316908115615b9d57565b604051634d5e5fb360e01b8152600490fd5b9081602091031261001b575161073c8161042b565b6001600160a01b03918216815291166020820152604081019190915260806060820181905261073c93910191614198565b5f818152600a60205260408120546001600160a01b0316801561096a57808252600b6020526040822080545f19019055615c2e83610831565b80546001600160a01b0319908116909155615c4884610807565b9081541690555f80516020615e218339815191528280a4565b90615c6c8183615d0a565b813b15159182615c7f575b505061192257565b604051630a85bd0160e11b8082523360048301525f6024830181905260448301949094526080606483015260848201849052935091602091839160a4918391906001600160a01b03165af1908115611544575f91615cec575b506001600160e01b03191614155f80615c77565b615d04915060203d81116119ca576119bc81836106c2565b5f615cd8565b6001600160a01b0381811691908215611bcc57835f52600a60205260405f20541661096a5780615d3c615d4c92610d30565b6001815401905561092284610831565b5f5f80516020615e218339815191528180a456fe49995e5dd6158cf69ad3e9777c46755a1a826a446c6416992167462dad033b2a84a9a38a0d320e93bcc5ebdabf23f355777c9b2251f0a2eceb54e0bddcf6f728eb054550c406db3b89dc7016369a66aff0ce40188133281942b92e6188c6b1f16bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661ceb054550c406db3b89dc7016369a66aff0ce40188133281942b92e6188c6b1f0f3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7afad2543a59f1b8c397ab540030b195cbeea5fadc4d5560e9fdf1ca5f750b72506f8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7eb054550c406db3b89dc7016369a66aff0ce40188133281942b92e6188c6b1efa2646970667358221220aab51b8e67bdc39b6b5d66bac1531d8807888e741a9c70f819025ff6ffdfc27864736f6c634300081400330000000000000000000000001ca20040ce6ad406bc2a6c89976388829e7fbade
Deployed Bytecode
0x60806040526004361015610021575b361561001f573415613160575b5f80fd5b005b5f3560e01c806301ffc9a71461042657806302403f711461042157806306fdde031461041c578063081812fc146104175780630935847914610412578063095ea7b31461040d5780630d4d151314610408578063158ef93e1461040357806316399ea2146103fe5780631d28dec7146103f95780632330f247146103f457806323b872dd146103ef57806324a9d853146103ea57806326defa73146103e557806327cb04b4146103e0578063287b4399146103db5780632a55205a146103d65780632d992cd3146103d15780632fd75a27146103cc578063305a0721146103c757806333b9d8c4146103c25780633846b6d2146103bd5780633e4011b9146103b85780634121c931146103b357806342842e0e146103ae57806342966c68146103a957806343bc8831146103a4578063469048401461039f57806352a702b51461039a57806356973ee5146103955780635c60da1b146103955780636210f6b2146103905780636352211e1461038b5780636fd44cfd1461038657806370a082311461038157806374cb30411461037c57806378cfabac1461033b578063791fec56146103775780638518a7451461037257806395d89b411461036d5780639cd28894146103685780639f181b5e14610363578063a22cb4651461035e578063a25632fd14610359578063b20240ee14610354578063b80f55c91461034f578063b88d4fde1461034a578063c43683a114610345578063c87b56dd14610340578063caf6aa4b1461033b578063cc7b9d0614610336578063cd36324914610331578063cf67f3441461032c578063d1a35cba14610327578063d3c989af14610322578063d7faa2621461031d578063e6f26d9a14610318578063e7265a9514610313578063e8a3d4851461030e578063e985e9c514610309578063eb2931b714610304578063f0689b47146102ff578063f3ff955a146102fa578063fea44a56146102f55763fffc559d0361000e57612add565b6129f9565b6128ee565b612854565b612814565b6127bd565b6127a8565b61269f565b61267b565b61265e565b61259b565b61247b565b612441565b6123f8565b6123dd565b611bfb565b6123c7565b61233b565b612140565b612105565b612074565b611ee4565b611df1565b611dc9565b611da3565b611d13565b611ca2565b611c25565b611bde565b611b8a565b611b5e565b611b2e565b611b0e565b611aca565b611a8d565b611a66565b611a3f565b6119d1565b6118f3565b611641565b6115b1565b61157d565b611549565b611471565b611426565b611354565b610f98565b610f43565b610e83565b610e04565b610de1565b610dca565b610d5e565b610bc1565b610b20565b610aff565b6109a4565b6108ca565b610890565b61085e565b61073f565b610529565b61043d565b6001600160e01b031981160361001b57565b3461001b57602036600319011261001b5761049960043561045d8161042b565b63ffffffff60e01b16630a85bd0160e11b81149081156104ee575b81156104ae575b811561049d575b5060405190151581529081906020820190565b0390f35b63152a902d60e11b1490505f610486565b90506301ffc9a760e01b811480156104de575b80156104ce575b9061047f565b50635b5e139f60e01b81146104c8565b506380ac58cd60e01b81146104c1565b630271189760e51b81149150610478565b6001600160601b031690565b6001600160601b0381160361001b57565b35906105278261050b565b565b3461001b57604036600319011261001b576004356024356105498161050b565b6105516153e9565b60018060601b039061059861056d8284600e5460601c1661472e565b600e8054600160601b600160c01b03191660609290921b600160601b600160c01b0316919091179055565b1690805f52600f60205260405f20908154918383039283116105fc575f80516020615e81833981519152936105f7936105e792556105e16105d884615b7d565b9160170b615400565b906145bc565b6040519081529081906020820190565b0390a1005b61320d565b5f91031261001b57565b90600182811c92168015610639575b602083101461062557565b634e487b7160e01b5f52602260045260245ffd5b91607f169161061a565b634e487b7160e01b5f52604160045260245ffd5b608081019081106001600160401b0382111761067257604052565b610643565b61016081019081106001600160401b0382111761067257604052565b6001600160401b03811161067257604052565b61010081019081106001600160401b0382111761067257604052565b601f909101601f19168101906001600160401b0382119082101761067257604052565b5f5b8381106106f65750505f910152565b81810151838201526020016106e7565b9060209161071f815180928185528580860191016106e5565b601f01601f1916010190565b90602061073c928181520190610706565b90565b3461001b575f8060031936011261080457604051816008546107608161060b565b808452906001908181169081156107dc5750600114610796575b6104998461078a818803826106c2565b6040519182918261072b565b60088352602094505f80516020615e018339815191525b8284106107c957505050816104999361078a928201019361077a565b80548585018701529285019281016107ad565b610499965061078a9450602092508593915060ff191682840152151560051b8201019361077a565b80fd5b5f52600c60205260405f2090565b5f52600f60205260405f2090565b5f52600660205260405f2090565b5f52600a60205260405f2090565b6001600160a01b031690565b6001600160a01b03909116815260200190565b3461001b57602036600319011261001b576004355f52600c602052602060018060a01b0360405f205416604051908152f35b3461001b57604036600319011261001b5760206108b1602435600435613cf9565b604051908152f35b6001600160a01b0381160361001b57565b3461001b57604036600319011261001b576004356108e7816108b9565b6024355f818152600a602052604081205490926001600160a01b039182169190338314158061097b575b61096a576109418161092286610807565b80546001600160a01b0319166001600160a01b03909216919091179055565b16907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b6040516282b42960e81b8152600490fd5b5061099f61099b6109943361098f87610cb3565b610d49565b5460ff1690565b1590565b610911565b3461001b57606036600319011261001b576104995f80516020615d818339815191526105e7610a996004356109d8816108b9565b610ace6044356109e7816108b9565b6109ef6153e9565b600e5460018060601b03808260601c1691815f80516020615da18339815191525460601c1692610a20602435615a51565b9380151580610ae8575b610adb575b5050600e80546001600160601b0319166001600160601b0392841660010184169283161790559788968792610a7161056d86610a6c600e5461336e565b613221565b84169384610a7e85610815565b556040516001600160601b0390911681529081906020820190565b0390a2610ab5610aa885610ccc565b546001600160a01b031690565b6001600160a01b038116610ad3575b5060170b83614688565b615c61565b91505f610ac4565b0382169250600182610a2f565b50610af3828261472e565b84808716911610610a2a565b3461001b575f36600319011261001b57602060ff5f54166040519015158152f35b3461001b57602036600319011261001b57610ba2610b6b600435610b438161050b565b610b4b6153e9565b5f80516020615da18339815191525460601c6001600160601b031661472e565b5f80516020615da18339815191528054600160601b600160c01b03191660609290921b600160601b600160c01b0316919091179055565b5f80516020615dc1833981519152604080515f81525f196020820152a1005b3461001b57602036600319011261001b57600435610bdd6134f4565b805f52600660205260405f20610bfa610bf582613297565b614b3f565b610c038161223e565b600181141580610c9f575b80610c8b575b610c6a575080546001600160a01b03166001600160a01b03191790557fc2131db10d833d6b93ae553fa450ea0f6c0c2dfb0160cb3309468bf72718f3eb60405180610c5f338261084b565b0390a261001f614d34565b604051630821641d60e21b8152908190610c879060048301613c98565b0390fd5b50610c958161223e565b6004811415610c14565b50610ca98161223e565b6003811415610c0e565b6001600160a01b03165f908152600d6020526040902090565b6001600160a01b03165f90815260046020526040902090565b6001600160a01b03165f90815260036020526040902090565b6001600160a01b03165f90815260106020526040902090565b6001600160a01b03165f90815260076020526040902090565b6001600160a01b03165f908152600b6020526040902090565b9060018060a01b03165f5260205260405f2090565b3461001b57602036600319011261001b57600435610d7b816108b9565b60018060a01b03165f526010602052602060ff60405f2054166040519015158152f35b606090600319011261001b57600435610db6816108b9565b90602435610dc3816108b9565b9060443590565b3461001b5761001f610ddb36610d9e565b91615702565b3461001b575f36600319011261001b57602061ffff5f5460101c16604051908152f35b3461001b57602036600319011261001b57600435610e21816108b9565b303303610e71576001600160a01b03165f818152601060205260408120805460ff19166001179055907f550a8ae64ec9d6640b6f168a26d3e6364b90defe8110c92135aa775b279e54ea8280a280f35b60405163ea8e4eb560e01b8152600490fd5b3461001b57602036600319011261001b57600435610ea0816108b9565b610ea86134f4565b6001600160a01b03811615610ec95760405163640c1a3360e01b8152600490fd5b6005549060ff82169081156105fc577fddffcdb3bb07c5efc18b0918cf4e3e88c7d42cc05156cdadb2ec12c3b5ff892f9260ff6105f7935f1901169060ff191617600555610f23610f1933610ce5565b805460ff19169055565b604080513381526001600160a01b03909216602083015290918291820190565b3461001b575f8060031936011261080457610f5c6153e9565b33808252601060205260408220805460ff191690557f272215cde179041f7a3e8da6f8aabc7c8fc1336ccd73aba698cb825a80d3be488280a280f35b3461001b57604036600319011215615829575f80fd5b6040519060e082016001600160401b0381118382101761067257604052565b6040519060a082016001600160401b0381118382101761067257604052565b6040519061052782610677565b6040519061052782610657565b6001600160401b0381116106725760051b60200190565b81601f8201121561001b5780359161103483611006565b9261104260405194856106c2565b808452602092838086019260051b82010192831161001b578301905b82821061106c575050505090565b838091833561107a816108b9565b81520191019061105e565b64ffffffffff81160361001b57565b359061052782611085565b359061ffff8216820361001b57565b3590610527826108b9565b91909160e08184031261001b576110ce610fae565b928135916001600160401b03831161001b576110f160c09261114e94830161101d565b85526110ff60208201611094565b602086015261111060408201611094565b60408601526111216060820161109f565b60608601526111326080820161051c565b608086015261114360a0820161109f565b60a0860152016110ae565b60c0830152565b8015150361001b57565b919082608091031261001b5760405161117781610657565b6060808294803561118781611155565b8452602081013561119781611155565b602085015260408101356111aa81611155565b60408501520135916111bb83611155565b0152565b6001600160401b03811161067257601f01601f191660200190565b9190916111e6816111bf565b6111f360405191826106c2565b8093828252821161001b5781815f9384602080950137010152565b92919261121a826111bf565b9161122860405193846106c2565b82948184528183011161001b578281602093845f960137010152565b9080601f8301121561001b5781602061073c9335910161120e565b91906101008382031261001b57611274610fcd565b926001600160401b03813581811161001b57836112929184016110b9565b85526112a1836020840161115f565b602086015260a082013581811161001b57836112be918401611244565b604086015260c082013590811161001b5760e0926112dd918301611244565b606085015201356080830152565b92916112f682611006565b9161130460405193846106c2565b829481845260208094019160051b810192831161001b57905b82821061132a5750505050565b8135815290830190830161131d565b9080601f8301121561001b5781602061073c933591016112eb565b3461001b5760031960203682011261001b5760048035916001600160401b03919082841161001b5760a090843603011261001b57611390610fcd565b918382013581811161001b576113ab9083369187010161125f565b8352602484013581811161001b576113c89083369187010161101d565b6020840152604484013581811161001b576113e890833691870101611339565b6040840152606484013590811161001b5761001f9361141160849261141c94369184010161101d565b606085015201611094565b6080820152612f79565b3461001b57602036600319011261001b5760206108b1600435615390565b9181601f8401121561001b578235916001600160401b03831161001b576020838186019501011161001b57565b606036600319011261001b57600435611489816108b9565b6024356001600160401b03811161001b576114a8903690600401611444565b604051635c9fcd8560e11b8152600b60048201529192916001600160a01b03906020816024817f0000000000000000000000001ca20040ce6ad406bc2a6c89976388829e7fbade86165afa908115611544575f91611516575b50163303610e715761001f92604435926140f8565b611537915060203d811161153d575b61152f81836106c2565b810190613553565b5f611501565b503d611525565b613568565b3461001b575f36600319011261001b575f80516020615ea1833981519152546040516001600160a01b039091168152602090f35b3461001b57604036600319011261001b5760206108b160043561159f816108b9565b602435906115ac82611085565b613467565b3461001b57604036600319011261001b576004356115ce816108b9565b6024356001600160401b03811161001b576115ed903690600401611244565b9030330361001b575f828192602082519201905af461162f61163d6116106140c9565b6040519283916020830195151586526040808401526060830190610706565b03601f1981018352826106c2565b5190fd5b3461001b576003196040368201811361001b576004803592602435906001600160401b03821161001b57606090823603011261001b5761167f613c60565b61168884610823565b6116a1600282015461169c36858701611e78565b614d53565b6116aa81613297565b916116b483614b3f565b6116bd8161223e565b600581036118d857506116d560246116df92016140b0565b64ffffffffff1690565b8451631106aeeb60e21b808252600f8287019081526020966001600160a01b0396909492937f0000000000000000000000001ca20040ce6ad406bc2a6c89976388829e7fbade88169289908290819083010381865afa9485156115445789915f966118b9575b508a51938491825281806117608a8201906017602083019252565b03915afa80156115445761179d948a935f9261188a575b508061187a575b5080611868575b5001516117989064ffffffffff166116d5565b6133f8565b9081421061184257865f8088886117da896117c542600160271b1764ffffffffff168b613a31565b5f80516020615ea1833981519152541661083f565b915163e0a8f6f560e01b918101918252602481018690526117fe816044810161162f565b51915af461180a6140c9565b901561183d57507f416e669c63d9a3a5e36ee7cc7e2104b8db28ccd286aa18966e98fa230c73b08c5f80a261001f614d34565b61417e565b610c8786519283926303861c4b60e41b845264ffffffffff809216914216908401613f5c565b80841015611785579250611798611785565b8085111561177e5793505f61177e565b6118ab9192508a3d8c116118b2575b6118a381836106c2565b8101906140ba565b905f611777565b503d611899565b6118d1919650823d84116118b2576118a381836106c2565b945f611745565b8551630821641d60e21b8152908190610c8790828801613c98565b3461001b5761190136610d9e565b919061190e838284615702565b803b15159283611934575b50505061192257005b604051633da6393160e01b8152600490fd5b604051630a85bd0160e11b8082523360048301526001600160a01b0394851660248301526044820192909252608060648201525f6084820181905291945092602092849260a4928492165af1908115611544575f916119a3575b506001600160e01b03191614155f8080611919565b6119c4915060203d81116119ca575b6119bc81836106c2565b810190615baf565b5f61198e565b503d6119b2565b3461001b57602036600319011261001b57604080519081016001600160401b03811182821017610672576040526001815260208101906020368337805115611a295761001f916004359052611a246153e9565b615417565b613423565b64ffffffffff909116815260200190565b3461001b575f36600319011261001b57602064ffffffffff600e5460c01c16604051908152f35b3461001b575f36600319011261001b575f54604051602091821c6001600160a01b03168152f35b3461001b57602036600319011261001b576020600435611aac816108b9565b60018060a01b038091165f526004825260405f205416604051908152f35b3461001b575f36600319011261001b576040517f0000000000000000000000009a85ad6eb642bd1409df73484b331a1925b6c6cd6001600160a01b03168152602090f35b3461001b575f36600319011261001b57602060ff60055416604051908152f35b3461001b57602036600319011261001b576020611b4c600435615b7d565b6040516001600160a01b039091168152f35b3461001b575f36600319011261001b57600e5460405160609190911c6001600160601b03168152602090f35b3461001b57602036600319011261001b57600435611ba7816108b9565b6001600160a01b03168015611bcc575f52600b602052602060405f2054604051908152f35b60405163d92e233d60e01b8152600490fd5b3461001b575f36600319011261001b576020600254604051908152f35b3461001b57602036600319011261001b576004355f52600f602052602060405f2054604051908152f35b3461001b57602036600319011261001b57610ba2610b6b600435611c488161050b565b611c506153e9565b5f80516020615da18339815191525460601c6001600160601b0316613221565b919091606080608083019480511515845260208101511515602085015260408101511515604085015201511515910152565b3461001b575f36600319011261001b57611cba6131e9565b50610499604051611cca81610657565b60ff5f80516020615de18339815191525481811615158352818160081c1615156020840152818160101c161515604084015260181c161515606082015260405191829182611c70565b3461001b575f806003193601126108045760405181600954611d348161060b565b808452906001908181169081156107dc5750600114611d5d576104998461078a818803826106c2565b60098352602094505f80516020615e418339815191525b828410611d9057505050816104999361078a928201019361077a565b8054858501870152928501928101611d74565b3461001b575f36600319011261001b57602064ffffffffff5f5460c01c16604051908152f35b3461001b575f36600319011261001b57600e546040516001600160601b039091168152602090f35b3461001b57604036600319011261001b57600435611e0e816108b9565b60243590611e1b82611155565b335f52600d602052611e308160405f20610d49565b9115159160ff1981541660ff841617905560405191825260018060a01b0316907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b91909160608184031261001b57604051906001600160401b039060608301828111848210176106725760405282948135611eb181611085565b84526020820135611ec181611085565b6020850152604082013592831161001b57604092611edf9201611244565b910152565b3461001b57604036600319011261001b576004356001600160401b03811161001b57611f17610499913690600401611e78565b611f1f613c60565b7fea77d064c7d953e57748855e7b0751ea190d1df7505615a4e39336d4d548f68861205c611f4e6002546139c2565b92611f5884600255565b61204e611f6361337d565b612029611f7360608301516104ff565b9161201d611f8360055460ff1690565b91612013611f96825164ffffffffff1690565b612003611fba6040611fb0602087015164ffffffffff1690565b95015161ffff1690565b95611ff9611fc6610fec565b99611fd864ffffffffff42168c61327c565b5f60208c01525f60408c01525f60608c01525f60808c015260a08b01613288565b60ff1660c0890152565b5f60e0880152610100870161327c565b610120850161327c565b61ffff16610140830152565b612032836133d1565b61203b87610823565b90600261204789610823565b0155613a56565b604051918291338684613c15565b0390a161206b60243582613cf9565b506105e7614d34565b3461001b575f36600319011261001b5761208c6131e9565b50608060405161209b81610657565b5f80516020615da18339815191525464ffffffffff808216928381526020810191808460281c1683526040820190606061ffff93848760501c168452019360018060601b03809660601c168552604051968752511660208601525116604084015251166060820152f35b3461001b57602036600319011261001b576004356001600160401b03811161001b5761213861001f913690600401611339565b611a246153e9565b3461001b57608036600319011261001b5760043561215d816108b9565b602435612169816108b9565b604435916064356001600160401b03811161001b5761218c903690600401611444565b9092612199858285615702565b803b151593846121b0575b50505050905061192257005b6121da94505f6020949660405196879586948593630a85bd0160e11b9b8c86523360048701615bc4565b03926001600160a01b03165af1908115611544575f9161220c575b506001600160e01b0319161415805f8080806121a4565b612224915060203d81116119ca576119bc81836106c2565b5f6121f5565b634e487b7160e01b5f52602160045260245ffd5b6008111561224857565b61222a565b9060088210156122485752565b6101606105279294936122728361018081019761224d565b805164ffffffffff166020840152602081015164ffffffffff166040840152604081015164ffffffffff166060840152606081015164ffffffffff16608084015260808101516001600160601b031660a084015260a08101516001600160601b031660c084015260c081015160ff1660e084015260e08101516122fd610100918286019060ff169052565b810151612316610120918286019064ffffffffff169052565b81015190612330610140928386019064ffffffffff169052565b015161ffff16910152565b3461001b57602036600319011261001b576123af6040610140815161235f81610677565b5f91818380935282602082015282858201528260608201528260808201528260a08201528260c08201528260e0820152826101008201528261012082015201526004358152600660205220613297565b6123b881614b3f565b6104996040519283928361225a565b3461001b57602036600319011215615829575f80fd5b3461001b575f36600319011261001b57602060405160028152f35b3461001b57606036600319011261001b57602061242f60043561241a816108b9565b60243561242681611085565b6044359161323a565b6040516001600160601b039091168152f35b3461001b57602036600319011261001b576004356001600160401b03811161001b576108b16124766020923690600401611e78565b6133d1565b3461001b57602036600319011261001b5760043561249881611085565b6124a06134f4565b64ffffffffff9064ab2cb218608282168114612568575f80516020615de18339815191525460181c60ff161561255657600e5460c01c64ffffffffff1692831690646b5b567bfe821491821561254c575b5050612531577f33d3074d42e98b5940d3d8364ba0f3421c4fde9db929c3d1c2899a36c5b216f29161252282614fca565b6105f760405192839283613f5c565b60405163066a813560e51b815280610c878460048301611a2e565b1490505f806124f1565b60405163064023b360e51b8152600490fd5b604051635f07128f60e01b8152600490fd5b6002111561001b57565b6002111561224857565b9060028210156122485752565b3461001b57608036600319011261001b576101006125d66024356125be8161257a565b6044356125ca816108b9565b6064359160043561366b565b61265c60e0604051926125ea84825161258e565b6020810151602085015260018060a01b03806040830151166040860152806060830151166060860152608082015116608085015261263760a082015160a086019060018060801b03169052565b60c0818101516001600160801b03169085015201516001600160601b031660e0830152565bf35b3461001b575f36600319011261001b576020600154604051908152f35b3461001b575f36600319011261001b57602060ff5f5460081c166040519015158152f35b3461001b57604036600319011261001b575f80516020615e818339815191526105f76004356105e76024356126d38161050b565b82816126dd6153e9565b6126e8600e5461336e565b5f80516020615da1833981519152546001600160601b039260609190911c831690811515908161278f575b50612780575b5061274f5f80516020615d818339815191529261273c61056d8761276a95613221565b61274585610815565b54951680956133f8565b8061275985610815565b556040519081529081906020820190565b0390a261277683615b7d565b9060170b906145bc565b8190038216935061274f612719565b9050838061279d858561472e565b92169116105f612713565b3461001b575f36600319011215615829575f80fd5b3461001b57604036600319011261001b57602060ff6128086004356127e1816108b9565b602435906127ee826108b9565b6001600160a01b03165f908152600d855260409020610d49565b54166040519015158152f35b3461001b57602036600319011261001b57600435612831816108b9565b60018060a01b03165f526003602052602060ff60405f2054166040519015158152f35b60c036600319011261001b576001600160401b0360243581811161001b5761288160049136908301611e78565b9060443583811161001b57612899903690830161101d565b60643584811161001b576128b09036908401611339565b9060843585811161001b576128c89036908501611444565b92909160a43596871161001b576128e561001f9736908701611444565b96909535613f74565b3461001b57602036600319011261001b5761001f60043561290e816108b9565b61291733614a86565b612923610aa833610ccc565b6001600160a01b0392908381166129f3575033905b8084166129ed5750805b61294f60208401516104ff565b936129b561298261297d61297861296960408901516104ff565b6001600160601b031660170b90565b614577565b615a7d565b918416916129ac612991610ff9565b976129a364ffffffffff42168a61327c565b60208901613288565b60408701613288565b3381141560608601526129c8853361496e565b6129d58361092233610ccc565b335f80516020615e618339815191525f80a333614747565b90612942565b90612938565b3461001b575f8060031936011261080457604051635c9fcd8560e11b8152600b60048201526001600160a01b03906020816024817f0000000000000000000000001ca20040ce6ad406bc2a6c89976388829e7fbade86165afa908115611544578391612a8f575b501633141580612a7a575b610e7157612a776141b8565b80f35b50612a8a61099b61099433610ce5565b612a6b565b612aa7915060203d811161153d5761152f81836106c2565b5f612a60565b9181601f8401121561001b578235916001600160401b03831161001b576020808501948460051b01011161001b57565b3461001b57608036600319011261001b5760046001600160401b03813581811161001b57612b0e9036908401612aad565b9160243581811161001b57612b269036908601612aad565b9160443590811161001b57612b3e9036908701612aad565b9560643596612b4c886108b9565b8615612f6957612b5e61099433610cfe565b92612b73600e5464ffffffffff9060c01c1690565b93159081612f0b575b600e805464ffffffffff60c01b19166405596590c360c51b1790555f805464ffffffffff60c01b19164260c01b64ffffffffff60c01b16179055612bbf87615612565b91888a5f805b8b8210612da9575050612c0592612be4610b6b93612be99336916112eb565b615533565b612c005f80516020615da18339815191525461336e565b61472e565b5f5460101c61ffff1661ffff165f5b888110612c5a577f1d1937c6b6f4541f415f6e3e99b2b7a960dcedc201d01deada3d90b8cf77f9578b8b6105f78f8d8d612c4d8e614fca565b604051958695338761565e565b612c6d612c68828b8b615644565b615654565b612c778286614ff1565b51612c8d612c858583613ce6565b612710900490565b80612d2f575b50612c9f838887615644565b35808210612d0a575090818e612cbd9493612cc2575b5050506139c2565b612c14565b6001600160a01b039280841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee03612cfb5750612cf39216615913565b5f808e612cb5565b612d05935061596e565b612cf3565b60408051632d9eac9360e01b8152808b01938452602084019290925290918291010390fd5b9081612d3a9161345a565b906001600160a01b03831673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee03612d7d575f54612d77919060201c6001600160a01b0316615913565b5f612c93565b5f54612da49190612d9e9060201c6001600160a01b031661083f565b61083f565b8461596e565b612d77565b91509150612dbe612d99612c68848d8d615644565b6001600160a01b039091161015612efa57879073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee612e04612d9980612c68858f612dfe8383838c615644565b98615644565b14818b8b5f935f14612e915750505050475b5f5b8d8d818310612e375750505050612e2e906139c2565b8b908b92612bc5565b612e6c612e5e612e58612e5286612e8c9796612e7c96615644565b35615390565b86613ce6565b670de0b6b3a7640000900490565b612e76868b614ff1565b516133f8565b612e86858a614ff1565b526139c2565b612e18565b612ea292612d9992612c6892615644565b612ec58960405180936370a0823160e01b8252818060209586953090830161084b565b03915afa9283156115445792612edd575b5050612e16565b612ef39250803d106118b2576118a381836106c2565b5f80612ed6565b604051633a67cf6d60e01b81528690fd5b64ffffffffff8516646b5b567bfe8103612f26575b50612b7c565b64ab2cb218608114908115612f5f575b50612f41575f612f20565b505060405163a16caf5360e01b8152928392610c8792508301611a2e565b905042115f612f36565b50604051630c48157760e11b8152fd5b5f90815460ff811661314f5760ff1916600190811783557f5daa87a0e9463431830481fd4b6e3403442dfb9a12b9c07597e9f61d50b633c88380a1808251926040840151936060810151946130086080830151966130036020855195015193612ffe60208801516040890151908764ffffffffff608060608d01519c01511699615005565b614e2c565b614efb565b81613132575b505084915b6130e8575b50505080613024575050565b604051635c9fcd8560e11b8152601660048201526001600160a01b03906020816024817f0000000000000000000000001ca20040ce6ad406bc2a6c89976388829e7fbade86165afa9081156115445784916130ca575b501690813b156130c65760405163fc9968df60e01b8152600481019190915291908290602490829084905af18015611544576130b35750565b806130c061052792610693565b80610601565b8280fd5b6130e2915060203d811161153d5761152f81836106c2565b5f61307a565b805182101561312d578282613126613119613114613107859787614ff1565b516001600160a01b031690565b610cfe565b805460ff19166001179055565b0191613013565b613018565b6060015190925015612556576131488392614fca565b5f8061300e565b60405162dc149f60e41b8152600490fd5b3660041161001b575f356001600160e01b03191663bc197c8160e01b811480156131d9575b80156131c9575b6131b8575f80516020615ea1833981519152546001600160a01b03166131b236806111da565b90615ac4565b602090604051908152818101604052f35b50630a85bd0160e11b811461318c565b5063f23a6e6160e01b8114613185565b604051906131f682610657565b5f6060838281528260208201528260408201520152565b634e487b7160e01b5f52601160045260245ffd5b6001600160601b0391821690821601919082116105fc57565b916132489161073c93614499565b606081015115613268575f905b602001516001600160601b031690613221565b60408101516001600160601b031690613255565b9064ffffffffff169052565b6001600160601b039091169052565b9061052761ffff6132a6610fec565b9361335c600182549261330764ffffffffff946132c58682168b61327c565b6132d7868260281c1660208c0161327c565b6132e9868260501c1660408c0161327c565b6132fb868260781c1660608c0161327c565b60a01c60808a01613288565b0154916133206001600160601b03841660a08901613288565b606083901c60ff1660c0880152606883901c60ff1660e088015261334d818460701c16610100890161327c565b8260981c16610120870161327c565b60c01c1661014084019061ffff169052565b60601c6001600160601b031690565b6040519061338a82610657565b5f80516020615da18339815191525464ffffffffff8082168452602882901c166020840152605081901c61ffff166040840152606090811c6001600160601b031690830152565b9060408201916060835191825160208401208552209252565b90600182018092116105fc57565b919082018092116105fc57565b811561340f570490565b634e487b7160e01b5f52601260045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b8054821015611a29575f5260205f2001905f90565b5f198101919082116105fc57565b919082039182116105fc57565b6001600160a01b03165f9081526007602052604081208054925b83831061349f575050508061349657505f1990565b61073c9061344c565b9091928084018085116105fc5760011c906134c96134bd8386613437565b505464ffffffffff1690565b64ffffffffff848116911611156134e45750925b9190613481565b93506134ef906133ea565b6134dd565b335f52600360205260ff60405f20541615610e7157565b60405190613518826106a6565b8160e05f918281528260208201528260408201528260608201528260808201528260a08201528260c08201520152565b5190610527826108b9565b9081602091031261001b575161073c816108b9565b6040513d5f823e3d90fd5b60409194939261358782606081019761258e565b6001600160a01b031660208201520152565b51906001600160801b038216820361001b57565b51906105278261050b565b908161010091031261001b5761364860e0604051926135d6846106a6565b80516135e18161257a565b8452602081015160208501526135f960408201613548565b604085015261360a60608201613548565b606085015261361b60808201613548565b608085015261362c60a08201613599565b60a085015261363d60c08201613599565b60c0850152016135ad565b60e082015290565b1561365757565b634e487b7160e01b5f52600160045260245ffd5b909261367561350b565b5061367e613927565b303303613888575b5f80516020615da18339815191525460601c6001600160601b03161561387657604051635c9fcd8560e11b8152600c60048201526001600160a01b03906020816024817f0000000000000000000000001ca20040ce6ad406bc2a6c89976388829e7fbade86165afa80156115445782613733917fdda962f630bf2f85c8412f305206a4f363688481dd632689f88ad7022e4cc233935f91613858575b501693604051918291888a84613573565b0390a161373e614d34565b5f549361ffff828660201c169560101c169561375981612584565b8015613812576137d693925f96979261378060018461377a61378996612584565b14613650565b1694838661596e565b60405163eedaf00d60e01b81526001600160a01b03948516600482015230602482015295909316604486015261ffff90921660648501526101009392849284929091839182906084820190565b03925af1918215611544575f926137ec57505090565b61073c9250803d1061380b575b61380381836106c2565b8101906135b8565b503d6137f9565b5050604051631d1972a760e11b81523060048201526001600160a01b0390941660248501525061ffff9093166044830152610100928391839190829081606481016137d6565b613870915060203d811161153d5761152f81836106c2565b5f613722565b6040516311bf009f60e21b8152600490fd5b60ff5f80516020615de18339815191525460181c16613900576138aa33614a86565b60408101516001600160601b03906138c1906104ff565b161590816138e2575b50156136865760405163ea8e4eb560e01b8152600490fd5b6138f9915060206138f49101516104ff565b6104ff565b155f6138ca565b604051632e31362d60e01b8152600490fd5b9081602091031261001b575161073c81611155565b6040516331a1aa3360e11b8152601560048201526020816024817f0000000000000000000000001ca20040ce6ad406bc2a6c89976388829e7fbade6001600160a01b03165afa908115611544575f91613994575b5061398257565b604051632fb3e88560e01b8152600490fd5b6139b5915060203d81116139bb575b6139ad81836106c2565b810190613912565b5f61397b565b503d6139a3565b5f1981146105fc5760010190565b9064ffffffffff1664ffffffffff19825416179055565b805464ffffffffff60281b191660289290921b64ffffffffff60281b16919091179055565b805464ffffffffff60501b191660509290921b64ffffffffff60501b16919091179055565b805464ffffffffff60781b191660789290921b64ffffffffff60781b16919091179055565b90613bf9610140600161052794613a7b613a75865164ffffffffff1690565b826139d0565b613a96613a90602087015164ffffffffff1690565b826139e7565b613ab1613aab604087015164ffffffffff1690565b82613a0c565b613acc613ac6606087015164ffffffffff1690565b82613a31565b613afc613adc60808701516104ff565b82546001600160a01b031660a09190911b6001600160a01b031916178255565b0192613b2a613b0e60a08301516104ff565b85546001600160601b0319166001600160601b03909116178555565b613b55613b3b60c083015160ff1690565b855460ff60601b191660609190911b60ff60601b16178555565b613b80613b6660e083015160ff1690565b855460ff60681b191660689190911b60ff60681b16178555565b613bb8613b9661010083015164ffffffffff1690565b855464ffffffffff60701b191660709190911b64ffffffffff60701b16178555565b613bf0613bce61012083015164ffffffffff1690565b855464ffffffffff60981b191660989190911b64ffffffffff60981b16178555565b015161ffff1690565b815461ffff60c01b191660c09190911b61ffff60c01b16179055565b9161073c9360409160c093855260018060a01b0316602085015260608285015264ffffffffff8082511660608601526020820151166080850152015191606060a08201520190610706565b613c6933614a86565b60408101516001600160601b03908116159182613c89575b5050610e7157565b60200151161590505f80613c81565b602081019291610527919061224d565b64ffffffffff9081165f1901919082116105fc57565b60ff1660ff81146105fc5760010190565b90612710918281029281840414901517156105fc57565b818102929181159184041417156105fc57565b90613d0382610823565b91613d0d83613297565b90613d1782614b3f565b613d208161223e565b600181141580613f48575b80613f34575b610c6a57505f5460c01c64ffffffffff1664ffffffffff9081164214613f1f576003850194613d636109943388610d49565b613f0457613d9c6138f495613d7f61311961073c993390610d49565b613d96613d91875164ffffffffff1690565b613ca8565b3361323a565b937fea45672a2d92b09ff2dd48aa67615f8b5c79d7808b7282fc026a24e00283f78d613e1e6080830196613ddd613dd782610a6c8b516104ff565b89613288565b613de961099433610ce5565b613ede575b613df88486613a56565b604080518881523360208201526001600160601b03909216908201529081906060820190565b0390a182613e34602083015164ffffffffff1690565b16159081613e8c575b50613e4c575b505050516104ff565b613e58914216906139e7565b7fe36f8b7448daff4a52e2945db0d1d7a436279cc1d527a45c27835dcbd27f336d5f80a2613e84614d34565b5f8080613e43565b9050613ed6613ecf610140613ec5613eaf613eaa6138f48b516104ff565b613ccf565b613ebf6138f460a08801516104ff565b90613405565b93015161ffff1690565b61ffff1690565b11155f613e3d565b613eff60e08501613ef8613ef3825160ff1690565b613cbe565b60ff169052565b613dee565b604051630b517d8f60e41b815280610c87336004830161084b565b6040516001621af97960e21b03198152600490fd5b50613f3e8161223e565b6004811415613d31565b50613f528161223e565b6003811415613d2b565b64ffffffffff91821681529116602082015260400190565b93949196929096613f83613927565b613f8b613c60565b613f9485610823565b97613fa360028a015482614d53565b613fac89613297565b96613fb688614b3f565b613fbf8161223e565b600481149081158061409c575b610c6a57613fd99061223e565b614058575b613feb61099b8585614d03565b6140465761402e986140206140289261401861099b9b6140138f64ffffffffff421690613a31565b614acf565b97369161120e565b96369161120e565b9561436c565b6140355750565b805464ffffffffff60781b19169055565b604051633b43666f60e01b8152600490fd5b815164ffffffffff90811642811061407c57506140779042168b613a0c565b613fde565b604051632f7e600560e21b8152918291610c879142169060048401613f5c565b506140a68161223e565b6005811415613fcc565b3561073c81611085565b9081602091031261001b575190565b3d156140f3573d906140da826111bf565b916140e860405193846106c2565b82523d5f602084013e565b606090565b90939260ff5f5460081c16614186575f806040518588823780868101838152039084865af16141256140c9565b901561417e57506141737f66cf5924183d7d44caa75d9268a169d7c1422fef43848743d5e1ba32d5833acf949560405194859460018060a01b03168552606060208601526060850191614198565b9060408301520390a1565b602081519101fd5b6040516304e71fd360e31b8152600490fd5b908060209392818452848401375f828201840152601f01601f1916010190565b61010061ff00195f5416175f557f447e75484d6bdb571b4a92ae14018db7b6dd41f3f02360690c554e1d48f46f875f80a1565b9081518082526020808093019301915f5b82811061420a575050505090565b8351855293810193928101926001016141fc565b91906020928381528151848201526142458483015160e06040840152610100830190610706565b90614279614265604085015193601f199485858303016060860152610706565b606085015184848303016080850152610706565b92608081015160a083015260a081015193838382030160c08401528680865192838152019501905f5b8181106142c65750505061073c94955060c060e091015192828503019101526141eb565b82516001600160a01b0316875295880195918801916001016142a2565b81601f8201121561001b5780516142f9816111bf565b9261430760405194856106c2565b8184526020828401011161001b5761073c91602080850191016106e5565b9060208282031261001b5781516001600160401b03811161001b5761073c92016142e3565b6001600160a01b03909116815260406020820181905261073c92910190610706565b95935f959392919460408796015194614383610fae565b898152602081019690965260408601526060850152608084015260a083015260c08201525f80516020615ea1833981519152546143c8906001600160a01b031661083f565b906040516143eb8161162f602082019463a7c8a3f960e01b86526024830161421e565b51915af46143f76140c9565b901561183d578060208061441093518301019101614325565b907fc98fbf8f20b11b050a9541d12aee1c11fcd31e8e42975cc885fb3d33a6accc826040518061444185338361434a565b0390a261444c614d34565b511590565b9060405161445e81610657565b915464ffffffffff81168352602881901c6001600160601b039081166020850152608882901c16604084015260e81c60ff1615156060830152565b91906144a36131e9565b926144ad81610d17565b928354806144be575b505050505090565b8082109081614555575b81614515575b506145045750906144de91613467565b90600182016144ef578080806144b6565b61073c9250906144fe91613437565b50614451565b91505061073c92506144fe91613437565b61451f915061344c565b8114801561452e575b5f6144ce565b506145446134bd61453e836133ea565b86613437565b64ffffffffff808516911611614528565b90506145646134bd8387613437565b64ffffffffff80861691161115906144c8565b60170b906001600160bf1b0382136001600160bf1b03198312176105fc57565b601791820b910b01906001600160bf1b031982126001600160bf1b038313176105fc57565b90610527916145ca81614a86565b906001600160a01b03806145dd83610ccc565b54168061468057508182915b602085015160408601516001600160601b03918216976146109261297d921660170b614597565b9061464a81841691851692614641614626610ff9565b9961463864ffffffffff42168c61327c565b60208b01613288565b60408901613288565b81811415606088015261465d878461496e565b61466a8461092285610ccc565b5f80516020615e618339815191525f80a3614747565b9182916145e9565b916105279261469681614a86565b916146a3610aa883610ccc565b6001600160a01b039290838116614728575080915b808416614722575081925b6146ec61297d6146d660208801516104ff565b976146e761296960408a01516104ff565b614597565b9061470281841691861692614641614626610ff9565b818114156060880152614715878461496e565b61466a8561092285610ccc565b926146c3565b916146b8565b6001600160601b0391821690821603919082116105fc57565b90936001600160a01b03838116949192851580156148b2575b6148a0578116908616958187141580614896575b61484c575b508403614788575b5050505050565b614820946147b961479885614a86565b936147b360406147ab60208801516104ff565b9201516104ff565b90613221565b941461482a575b50806148126147e260606147da604061481b9601516104ff565b930151151590565b916148096147ee610ff9565b9661480064ffffffffff42168961327c565b60208801613288565b60408601613288565b15156060840152565b61496e565b5f80808080614781565b61481b919361483f60406148459301516104ff565b9061472e565b92906147c0565b8061485961489092614a86565b9061481b61487a61486d60208501516104ff565b61483f60408901516104ff565b926148126147e260606147da60408501516104ff565b5f614779565b5085871415614774565b60405163e5ec2d2560e01b8152600490fd5b5081871615614760565b9190614932576148d464ffffffffff825116836139d0565b602081015182546040830151606090930151600160281b600160f01b031990911660289290921b600160281b600160881b03169190911760889290921b600160881b600160e81b03169190911790151560e81b60ff60e81b16179055565b634e487b7160e01b5f525f60045260245ffd5b80549190600160401b831015610672578261496891600161052795018155613437565b906148bc565b90614a1864ffffffffff92838351167f59c8109016c9c9310894a72309b48d2a442208dacb537923fca808618ce5710260018060601b036020860151166149b860408701516104ff565b90614a106149c96060890151151590565b6040805164ffffffffff90971687526001600160601b039384166020880152929093169185019190915290151560608401526001600160a01b038416929081906080820190565b0390a2610d17565b9182549081614a2d575b505061052791614945565b614a50614a456144fe614a3f8561344c565b87613437565b5164ffffffffff1690565b90614a636116d5855164ffffffffff1690565b911614614a705780614a22565b61052792614a806149689261344c565b90613437565b90614a8f6131e9565b6001600160a01b039092165f90815260076020526040902080549081614ab3575050565b9192505f198101919082116105fc5761073c916144fe91613437565b608081015160a08201515f9291614af2916001600160601b039081169116614cb5565b614b1d575b8060ff60e08160c0614b10950151169201511690614ce9565b614b175790565b60021790565b60019150614af7565b91909164ffffffffff808094169116019182116105fc57565b64ffffffffff80614b55835164ffffffffff1690565b1615614caf57614b706116d5604084015164ffffffffff1690565b614c7d57608082019160018060601b0380614b8b85516104ff565b1614614c755781421692614ba7602083015164ffffffffff1690565b838116614bed57505080614bd6610100614bc9614bdc945164ffffffffff1690565b92015164ffffffffff1690565b90614b26565b161115614be857600190565b600290565b614c0990614bd6610120859795969496015164ffffffffff1690565b161115614c6e57614c1d614c3091516104ff565b614c2a60a08401516104ff565b90614cb5565b614c685780614c5460e0614c4b60c0614c5a95015160ff1690565b92015160ff1690565b90614ce9565b614c6357600390565b600490565b50600490565b5050600490565b505050600290565b60609091015164ffffffffff1690811615614ca957600160271b90811614614ca457600690565b600790565b50600590565b50505f90565b6001600160601b0391906127109083168181029181159183041417156105fc5761270f92614ce4921690613405565b101590565b60ff168015159182614cfa57505090565b60ff1614919050565b60015491614d1091614d14565b1490565b6020815160051b9101205f526020815160051b91012060205260405f2090565b5f80516020615dc1833981519152604080515f81525f196020820152a1565b614d5c906133d1565b90818103614d68575050565b6044925060405191630267877160e11b835260048301526024820152fd5b601f8111614d92575050565b5f906008825260208220906020601f850160051c83019410614dcf575b601f0160051c01915b828110614dc457505050565b818155600101614db8565b9092508290614daf565b601f8111614de5575050565b5f906009825260208220906020601f850160051c83019410614e22575b601f0160051c01915b828110614e1757505050565b818155600101614e0b565b9092508290614e02565b80519091906001600160401b03811161067257614e5381614e4e60085461060b565b614d86565b602080601f8311600114614e8d57508192935f92614e82575b50508160011b915f199060031b1c191617600855565b015190505f80614e6c565b60085f52601f198316949091905f80516020615e01833981519152925f905b878210614ee3575050836001959610614ecb575b505050811b01600855565b01515f1960f88460031b161c191690555f8080614ec0565b80600185968294968601518155019501930190614eac565b80519091906001600160401b03811161067257614f2281614f1d60095461060b565b614dd9565b602080601f8311600114614f5c57508192935f92614f51575b50508160011b915f199060031b1c191617600955565b015190505f80614f3b565b60095f52601f198316949091905f80516020615e41833981519152925f905b878210614fb2575050836001959610614f9a575b505050811b01600955565b01515f1960f88460031b161c191690555f8080614f8f565b80600185968294968601518155019501930190614f7b565b600e805464ffffffffff60c01b191660c09290921b64ffffffffff60c01b16919091179055565b8051821015611a295760209160051b010190565b9260a0840192615017845161ffff1690565b9361271061ffff95818782161161532157506020918288019261503f845164ffffffffff1690565b9764ffffffffff98610e108a821610615349575060608a0193615064855161ffff1690565b91821690811591821561533f575b50506153215750604097888a019061508f825164ffffffffff1690565b9081168015908115615314575b506152f857508851635c9fcd8560e11b815260026004820152916001600160a01b039080846024817f0000000000000000000000001ca20040ce6ad406bc2a6c89976388829e7fbade86165afa8015611544578c6151886152259861516e8f61527d9f61515d61515161523e9f614a45615166946151fe9f9d60809761519b9f9d8f6151929f5f926152d3575b5061513d61514b9293519586928301611c70565b03601f1981018552846106c2565b166158a5565b9a5164ffffffffff1690565b935161ffff1690565b9401516104ff565b9461518161517a610ff9565b988961327c565b870161327c565b61ffff16848d0152565b60608301613288565b64ffffffffff8151165f80516020615da18339815191529182549164ffffffffff60281b602083015160281b169061ffff60501b604084015160501b169260606001811b600160c01b0391015160601b169360018060c01b031916171717179055565b61521d61520d89515160ff1690565b60ff1660ff196005541617600555565b5161ffff1690565b63ffff00005f549160101b169063ffff00001916175f55565b61527861524e60c087015161083f565b5f8054600160201b600160c01b03191660209290921b600160201b600160c01b0316919091179055565b615366565b60ff825151116152c057505f5b81519081518110156152bb576152b16131196152ac613107846152b696614ff1565b610ce5565b6139c2565b61528a565b505050565b5160016211dcdd60e31b03198152600490fd5b61514b92506152f161513d91833d851161153d5761152f81836106c2565b9250615129565b8951636dfaf3cd60e01b8152908190610c879060048301611a2e565b62278d009150115f61509c565b6040516323dd0d6d60e11b815261ffff919091166004820152602490fd5b1190505f80615072565b604051636dfaf3cd60e01b8152908190610c879060048301611a2e565b90815181510361537e5761537991614d14565b600155565b6040516357cc2fc760e01b8152600490fd5b5f80516020615da18339815191525460601c6001600160601b0316905f826153b9575050505f90565b6040918152600f602052205490670de0b6b3a7640000918281029281840414901517156105fc5761073c91613405565b335f52601060205260ff60405f20541615610e7157565b60170b6001600160bf1b031981146105fc575f0390565b905f8092815b81518110156154f357805f80516020615d618339815191526154426154ee9385614ff1565b519661544d88615b7d565b976154e661546d61546661546084610815565b54615a51565b8094613221565b998861547884610815565b556154b7604091845f80516020615d8183398151915284518061549f81905f602083019252565b0390a26105e16001600160601b03871660170b615400565b6154c083615bf5565b5133815260208101929092526001600160601b0390921660408201529081906060820190565b0390a16139c2565b61541d565b50505061550861056d83612c00600e5461336e565b5f80516020615dc18339815191526040518061552e815f81525f19602082015260400190565b0390a1565b91905f9283845b82518110156155fb57908161555184938695614ff1565b5161555b81615b7d565b9561559a575b61559192816154e66155866154666154605f80516020615d6183398151915296610815565b988b61547884610815565b9290919261553a565b336001600160a01b0387161415806155e3575b806155ca575b156155615760405163ea8e4eb560e01b8152600490fd5b506155de61099b6109943361098f8a610cb3565b6155b3565b50336155f4612d99610aa884610807565b14156155ad565b509350505061550861056d83612c00600e5461336e565b9061561c82611006565b61562960405191826106c2565b828152809261563a601f1991611006565b0190602036910137565b9190811015611a295760051b0190565b3561073c816108b9565b6001600160a01b03918216815260806020808301829052908201859052909796959390926001600160fb1b03821161001b5760c0916005959493951b809160a08b013788018360a0820160a08b84030160408c0152520193925f905b8382106156dc5750505050509060606105279294019060018060a01b03169052565b909192939483806001928489356156f2816108b9565b16815201960194939201906156ba565b5f838152600f60205260409020546001600160bf1b03811161581157615746906001600160c01b031660170b61574061573a82615400565b846145bc565b836145bc565b615755612d99610aa885610831565b6001600160a01b038083169291830361096a578316928315611bcc5782331415806157f8575b806157e0575b61096a576157916157b192610d30565b80545f190190556157a181610d30565b8054600101905561092285610831565b6157cd6157bd84610807565b80546001600160a01b0319169055565b5f80516020615e218339815191525f80a4565b506157f0612d99610aa887610807565b331415615781565b5061580c61099b6109943361098f86610cb3565b61577b565b6024906040519063e9a5989b60e01b82526004820152fd5b604051635c9fcd8560e11b81526004808201526020816024817f0000000000000000000000001ca20040ce6ad406bc2a6c89976388829e7fbade6001600160a01b03165afa908115611544575f91615887575b506131b236366111da565b61589f915060203d811161153d5761152f81836106c2565b5f61587c565b5f80516020615ea183398151915280546001600160a01b039283166001600160a01b03198216811790925560405163347d5e2560e21b602082019081525f95869591936158fe92849261162f929091166024840161434a565b51915af461590a6140c9565b901561417e5750565b811561596a576001600160a01b0316905f90819081908190855af1906159376140c9565b9115615941575050565b610c8760405192839263354db69760e01b84526004840152604060248401526044830190610706565b5050565b60405163a9059cbb60e01b602082019081526001600160a01b03841660248301526044820185905292949193925f918291906159ad816064810161162f565b5190826001600160a01b0388165af16159c46140c9565b906159fc575b5050604051631702a98760e11b81526001600160a01b0392831660048201529290911660248301526044820152606490fd5b805115615a265780602080615a1693518301019101613912565b615a2057806159ca565b92505050565b50925050803b15615a345750565b604051639fe23a3960e01b8152908190610c87906004830161084b565b6001600160601b0390818111615a65571690565b60249060405190636f55e21560e11b82526004820152fd5b8060170b5f81128015615ab4575b615a9c57506001600160601b031690565b602490604051906394e08f6160e01b82526004820152fd5b506001600160601b038113615a8b565b303b1561001b5760405190633e4011b960e01b82528180615aeb5f9586946004840161434a565b0381305afa9081615b66575b50615b5257615b046140c9565b805181019160408284031261080457602082015192615b2284611155565b6040830151916001600160401b0383116108045750615b489260209182019201016142e3565b90615b755761417e565b634e487b7160e01b81526001600452602490fd5b615b6f90610693565b5f615af7565b602081519101f35b5f908152600a60205260409020546001600160a01b0316908115615b9d57565b604051634d5e5fb360e01b8152600490fd5b9081602091031261001b575161073c8161042b565b6001600160a01b03918216815291166020820152604081019190915260806060820181905261073c93910191614198565b5f818152600a60205260408120546001600160a01b0316801561096a57808252600b6020526040822080545f19019055615c2e83610831565b80546001600160a01b0319908116909155615c4884610807565b9081541690555f80516020615e218339815191528280a4565b90615c6c8183615d0a565b813b15159182615c7f575b505061192257565b604051630a85bd0160e11b8082523360048301525f6024830181905260448301949094526080606483015260848201849052935091602091839160a4918391906001600160a01b03165af1908115611544575f91615cec575b506001600160e01b03191614155f80615c77565b615d04915060203d81116119ca576119bc81836106c2565b5f615cd8565b6001600160a01b0381811691908215611bcc57835f52600a60205260405f20541661096a5780615d3c615d4c92610d30565b6001815401905561092284610831565b5f5f80516020615e218339815191528180a456fe49995e5dd6158cf69ad3e9777c46755a1a826a446c6416992167462dad033b2a84a9a38a0d320e93bcc5ebdabf23f355777c9b2251f0a2eceb54e0bddcf6f728eb054550c406db3b89dc7016369a66aff0ce40188133281942b92e6188c6b1f16bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661ceb054550c406db3b89dc7016369a66aff0ce40188133281942b92e6188c6b1f0f3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7afad2543a59f1b8c397ab540030b195cbeea5fadc4d5560e9fdf1ca5f750b72506f8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce7eb054550c406db3b89dc7016369a66aff0ce40188133281942b92e6188c6b1efa2646970667358221220aab51b8e67bdc39b6b5d66bac1531d8807888e741a9c70f819025ff6ffdfc27864736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001ca20040ce6ad406bc2a6c89976388829e7fbade
-----Decoded View---------------
Arg [0] : globals (address): 0x1cA20040cE6aD406bC2A6c89976388829E7fbAde
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001ca20040ce6ad406bc2a6c89976388829e7fbade
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.