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 3 internal transactions
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
16860218 | 712 days ago | Contract Creation | 0 ETH | |||
16860164 | 712 days ago | Contract Creation | 0 ETH | |||
16845638 | 714 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Sector3DAOFactory
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import './Sector3DAO.sol'; contract Sector3DAOFactory { address public owner; address[] public daos; event DAODeployed(Sector3DAO dao); constructor() { owner = msg.sender; } function setOwner(address owner_) public { require(msg.sender == owner, "You aren't the owner"); owner = owner_; } function getDAOs() public view returns (address[] memory) { return daos; } function deployDAO(string calldata name, string calldata purpose, address token) public returns (address) { Sector3DAO dao = new Sector3DAO(name, purpose, token); daos.push(address(dao)); emit DAODeployed(dao); return address(dao); } function removeDAO(address dao) public { require(msg.sender == owner, "You aren't the owner"); address[] memory daosAfterRemoval = new address[](daos.length - 1); uint16 daosIndex = 0; for (uint16 i = 0; i < daosAfterRemoval.length; i++) { if (dao == daos[daosIndex]) { daosIndex++; } daosAfterRemoval[i] = daos[daosIndex]; daosIndex++; } daos = daosAfterRemoval; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; interface IPriority { /** * Add a contribution for the current epoch. */ function addContribution(string memory description, string memory proofURL, uint8 hoursSpent, uint8 alignmentPercentage) external; /** * Claim reward for contributions made in a past epoch. */ function claimReward(uint16 epochNumber) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import './Sector3DAOPriority.sol'; /** * When deployed, an instance of this smart contract * represents a new DAO added to the Sector#3 protocol. */ contract Sector3DAO { /** * The protocol version. */ uint8 public constant version = 1; /** * The smart contract owner. */ address public owner; /** * The name of the DAO. */ string public name; /** * The purpose of the DAO. */ string public purpose; /** * The DAO token (e.g. governance token). */ address public token; /** * The priorities added by this DAO. */ Sector3DAOPriority[] public priorities; event PriorityDeployed(Sector3DAOPriority); constructor(string memory name_, string memory purpose_, address token_) { name = name_; purpose = purpose_; token = token_; owner = tx.origin; } /** * Updates the DAO's owner. */ function setOwner(address owner_) public { require(msg.sender == owner, "You aren't the owner"); owner = owner_; } /** * Updates the DAO's name. */ function setName(string calldata name_) public { require(msg.sender == owner, "You aren't the owner"); name = name_; } /** * Updates the DAO's purpose. */ function setPurpose(string calldata purpose_) public { require(msg.sender == owner, "You aren't the owner"); purpose = purpose_; } /** * Updates the DAO's token. */ function setToken(address token_) public { require(msg.sender == owner, "You aren't the owner"); token = token_; } function deployPriority(string calldata title, address rewardToken, uint16 epochDurationInDays, uint256 epochBudget, address gatingNFT) public returns (Sector3DAOPriority) { require(msg.sender == owner, "You aren't the owner"); Sector3DAOPriority priority = new Sector3DAOPriority(address(this), title, rewardToken, epochDurationInDays, epochBudget, gatingNFT); priorities.push(priority); emit PriorityDeployed(priority); return priority; } function getPriorities() public view returns (Sector3DAOPriority[] memory) { return priorities; } function removePriority(Sector3DAOPriority priority) public { require(msg.sender == owner, "You aren't the owner"); Sector3DAOPriority[] memory prioritiesAfterRemoval = new Sector3DAOPriority[](priorities.length - 1); uint16 prioritiesIndex = 0; for (uint16 i = 0; i < prioritiesAfterRemoval.length; i++) { if (priority == priorities[prioritiesIndex]) { prioritiesIndex++; } prioritiesAfterRemoval[i] = priorities[prioritiesIndex]; prioritiesIndex++; } priorities = prioritiesAfterRemoval; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "./IPriority.sol"; import "./Structs.sol"; contract Sector3DAOPriority is IPriority { using SafeERC20 for IERC20; address public immutable dao; string public title; IERC20 public immutable rewardToken; uint256 public immutable startTime; uint16 public immutable epochDuration; uint256 public immutable epochBudget; IERC721 public immutable gatingNFT; Contribution[] contributions; mapping(uint16 => mapping(address => bool)) claims; uint256 public claimsBalance; event ContributionAdded(Contribution contribution); event RewardClaimed(uint16 epochNumber, address contributor, uint256 amount); error EpochNotYetEnded(); error EpochNotYetFunded(); error NoRewardForEpoch(); error RewardAlreadyClaimed(); error NoGatingNFTOwnership(); constructor(address dao_, string memory title_, address rewardToken_, uint16 epochDurationInDays, uint256 epochBudget_, address gatingNFT_) { dao = dao_; title = title_; rewardToken = IERC20(rewardToken_); startTime = block.timestamp; epochDuration = epochDurationInDays; epochBudget = epochBudget_; gatingNFT = IERC721(gatingNFT_); } /** * @notice Calculates the current epoch number based on the priority's start time and epoch duration. * @return [1,2,3,...] */ function getEpochNumber() public view returns (uint16) { uint256 timePassedSinceStart = block.timestamp - startTime; uint256 epochDurationInSeconds = epochDuration * 1 days; return uint16(timePassedSinceStart / epochDurationInSeconds) + 1; } /** * @notice Adds a contribution to the current epoch. */ function addContribution(string memory description, string memory proofURL, uint8 hoursSpent, uint8 alignmentPercentage) public { if (address(gatingNFT) != address(0x0)) { if (gatingNFT.balanceOf(msg.sender) == 0) { revert NoGatingNFTOwnership(); } } Contribution memory contribution = Contribution({ timestamp: block.timestamp, epochNumber: getEpochNumber(), contributor: msg.sender, description: description, proofURL: proofURL, hoursSpent: hoursSpent, alignmentPercentage: alignmentPercentage }); contributions.push(contribution); emit ContributionAdded(contribution); } function getContributions() public view returns (Contribution[] memory) { return contributions; } function getEpochContributions(uint16 epochNumber) public view returns (Contribution[] memory) { uint16 count = 0; for (uint16 i = 0; i < contributions.length; i++) { if (contributions[i].epochNumber == epochNumber) { count++; } } Contribution[] memory epochContributions = new Contribution[](count); count = 0; for (uint16 i = 0; i < contributions.length; i++) { if (contributions[i].epochNumber == epochNumber) { epochContributions[count] = contributions[i]; count++; } } return epochContributions; } /** * @notice Claims a contributor's reward for contributions made in a given epoch. * @dev Claims can only be made for an epoch that has ended. */ function claimReward(uint16 epochNumber) public { if (epochNumber >= getEpochNumber()) { revert EpochNotYetEnded(); } uint256 epochReward = getEpochReward(epochNumber, msg.sender); if (epochReward == 0) { revert NoRewardForEpoch(); } bool epochFunded = isEpochFunded(epochNumber); if (!epochFunded) { revert EpochNotYetFunded(); } bool rewardClaimed = isRewardClaimed(epochNumber, msg.sender); if (rewardClaimed) { revert RewardAlreadyClaimed(); } rewardToken.transfer(msg.sender, epochReward); claims[epochNumber][msg.sender] = true; claimsBalance += epochReward; emit RewardClaimed(epochNumber, msg.sender, epochReward); } /** * @notice Calculates a contributor's token allocation of the budget for a given epoch. */ function getEpochReward(uint16 epochNumber, address contributor) public view returns (uint256) { uint256 allocationPercentage = getAllocationPercentage(epochNumber, contributor); return epochBudget * allocationPercentage / 100 ether; } /** * @notice Checks if a contributor's reward has been claimed for a given epoch. */ function isRewardClaimed(uint16 epochNumber, address contributor) public view returns (bool) { return claims[epochNumber][contributor]; } /** * @notice Calculates a contributor's percentage allocation of the budget for a given epoch. * @return The percentage in `wei` units, e.g. 33333333333333333333 for 33.333333333333333333%. */ function getAllocationPercentage(uint16 epochNumber, address contributor) public view returns (uint256) { uint256 weightContributor = 0; uint256 weightAllContributors = 0; Contribution[] memory epochContributions = getEpochContributions(epochNumber); for (uint16 i = 0; i < epochContributions.length; i++) { Contribution memory contribution = epochContributions[i]; if (contribution.alignmentPercentage == 0) { continue; } uint256 weight = uint256(contribution.hoursSpent) * uint256(contribution.alignmentPercentage); if (contribution.contributor == contributor) { weightContributor += weight; } weightAllContributors += weight; } if (weightAllContributors == 0) { return 0; } else { return 100 ether * weightContributor / weightAllContributors; } } /** * @notice Checks if the smart contract has received enough funding to cover claims for a past epoch. * @dev Epochs without contributions are excluded from funding. */ function isEpochFunded(uint16 epochNumber) public view returns (bool) { if (epochNumber >= getEpochNumber()) { revert EpochNotYetEnded(); } if (getEpochContributions(epochNumber).length == 0) { return false; } uint16 numberOfEpochsWithContributions = 0; for (uint16 i = 0; i <= epochNumber; i++) { if (getEpochContributions(i).length > 0) { numberOfEpochsWithContributions++; } } if (numberOfEpochsWithContributions == 0) { return false; } else { uint256 totalBudget = epochBudget * numberOfEpochsWithContributions; uint256 totalFundingReceived = rewardToken.balanceOf(address(this)) + claimsBalance; return totalFundingReceived >= totalBudget; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; struct Contribution { uint256 timestamp; uint16 epochNumber; address contributor; string description; string proofURL; uint8 hoursSpent; uint8 alignmentPercentage; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract Sector3DAO","name":"dao","type":"address"}],"name":"DAODeployed","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"daos","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"purpose","type":"string"},{"internalType":"address","name":"token","type":"address"}],"name":"deployDAO","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getDAOs","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dao","type":"address"}],"name":"removeDAO","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600080546001600160a01b03191633179055613185806100326000396000f3fe60806040523480156200001157600080fd5b50600436106200006a5760003560e01c806313af4035146200006f578063415cc7dd14620000885780638da5cb5b14620000aa578063ccbbd26014620000d7578063e3bd3bb414620000ee578063f912fbca1462000105575b600080fd5b620000866200008036600462000554565b6200011c565b005b6200009262000195565b604051620000a1919062000579565b60405180910390f35b600054620000be906001600160a01b031681565b6040516001600160a01b039091168152602001620000a1565b620000be620000e8366004620005c8565b620001f9565b620000be620000ff3660046200062e565b62000224565b620000866200011636600462000554565b620002f5565b6000546001600160a01b03163314620001735760405162461bcd60e51b81526020600482015260146024820152732cb7ba9030b932b713ba103a34329037bbb732b960611b60448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60606001805480602002602001604051908101604052809291908181526020018280548015620001ef57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620001d0575b5050505050905090565b600181815481106200020a57600080fd5b6000918252602090912001546001600160a01b0316905081565b60008086868686866040516200023a90620004a8565b6200024a959493929190620006e1565b604051809103906000f08015801562000267573d6000803e3d6000fd5b506001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0383169081179091556040519081529091507f1cb5b7f48694f77209ac2e140151cda89a929b850874f26d327e8638e9fa65e09060200160405180910390a19695505050505050565b6000546001600160a01b03163314620003485760405162461bcd60e51b81526020600482015260146024820152732cb7ba9030b932b713ba103a34329037bbb732b960611b60448201526064016200016a565b600180546000916200035a916200073d565b67ffffffffffffffff81111562000375576200037562000759565b6040519080825280602002602001820160405280156200039f578160200160208202803683370190505b5090506000805b82518161ffff1610156200048c5760018261ffff1681548110620003ce57620003ce6200076f565b6000918252602090912001546001600160a01b0390811690851603620003fe5781620003fa8162000785565b9250505b60018261ffff16815481106200041857620004186200076f565b9060005260206000200160009054906101000a90046001600160a01b0316838261ffff16815181106200044f576200044f6200076f565b6001600160a01b039092166020928302919091019091015281620004738162000785565b9250508080620004839062000785565b915050620003a6565b508151620004a2906001906020850190620004b6565b50505050565b6129a680620007aa83390190565b8280548282559060005260206000209081019282156200050e579160200282015b828111156200050e57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620004d7565b506200051c92915062000520565b5090565b5b808211156200051c576000815560010162000521565b80356001600160a01b03811681146200054f57600080fd5b919050565b6000602082840312156200056757600080fd5b620005728262000537565b9392505050565b6020808252825182820181905260009190848201906040850190845b81811015620005bc5783516001600160a01b03168352928401929184019160010162000595565b50909695505050505050565b600060208284031215620005db57600080fd5b5035919050565b60008083601f840112620005f557600080fd5b50813567ffffffffffffffff8111156200060e57600080fd5b6020830191508360208285010111156200062757600080fd5b9250929050565b6000806000806000606086880312156200064757600080fd5b853567ffffffffffffffff808211156200066057600080fd5b6200066e89838a01620005e2565b909750955060208801359150808211156200068857600080fd5b506200069788828901620005e2565b9094509250620006ac90506040870162000537565b90509295509295909350565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b606081526000620006f7606083018789620006b8565b82810360208401526200070c818688620006b8565b91505060018060a01b03831660408301529695505050505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111562000753576200075362000727565b92915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600061ffff8083168181036200079f576200079f62000727565b600101939250505056fe60806040523480156200001157600080fd5b50604051620029a6380380620029a6833981016040819052620000349162000149565b600162000042848262000265565b50600262000051838262000265565b50600380546001600160a01b039092166001600160a01b0319928316179055600080549091163217905550620003319050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000ac57600080fd5b81516001600160401b0380821115620000c957620000c962000084565b604051601f8301601f19908116603f01168101908282118183101715620000f457620000f462000084565b816040528381526020925086838588010111156200011157600080fd5b600091505b8382101562000135578582018301518183018401529082019062000116565b600093810190920192909252949350505050565b6000806000606084860312156200015f57600080fd5b83516001600160401b03808211156200017757600080fd5b62000185878388016200009a565b945060208601519150808211156200019c57600080fd5b50620001ab868287016200009a565b604086015190935090506001600160a01b0381168114620001cb57600080fd5b809150509250925092565b600181811c90821680620001eb57607f821691505b6020821081036200020c57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200026057600081815260208120601f850160051c810160208610156200023b5750805b601f850160051c820191505b818110156200025c5782815560010162000247565b5050505b505050565b81516001600160401b0381111562000281576200028162000084565b6200029981620002928454620001d6565b8462000212565b602080601f831160018114620002d15760008415620002b85750858301515b600019600386901b1c1916600185901b1785556200025c565b600085815260208120601f198616915b828110156200030257888601518255948401946001909101908401620002e1565b5085821015620003215787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61266580620003416000396000f3fe60806040523480156200001157600080fd5b5060043610620000e05760003560e01c806370740aab1162000097578063b36f923e116200006e578063b36f923e14620001d1578063c47f002714620001e8578063eb68757f14620001ff578063fc0c546a146200021657600080fd5b806370740aab146200019a5780638da5cb5b14620001a4578063a0daeed214620001b857600080fd5b806306fdde0314620000e557806313af40351462000107578063144fa6d714620001205780631f776f22146200013757806340a2f31f146200014e57806354fd4d50146200017e575b600080fd5b620000ef6200022a565b604051620000fe9190620007a4565b60405180910390f35b6200011e620001183660046200080d565b620002c0565b005b6200011e620001313660046200080d565b62000318565b6200011e620001483660046200080d565b62000367565b620001656200015f36600462000880565b620004f6565b6040516001600160a01b039091168152602001620000fe565b62000187600181565b60405160ff9091168152602001620000fe565b620000ef620005fa565b60005462000165906001600160a01b031681565b620001c262000609565b604051620000fe919062000915565b62000165620001e236600462000964565b6200066d565b6200011e620001f93660046200097e565b62000698565b6200011e620002103660046200097e565b620006d9565b60035462000165906001600160a01b031681565b600180546200023990620009c4565b80601f01602080910402602001604051908101604052809291908181526020018280546200026790620009c4565b8015620002b85780601f106200028c57610100808354040283529160200191620002b8565b820191906000526020600020905b8154815290600101906020018083116200029a57829003601f168201915b505050505081565b6000546001600160a01b03163314620002f65760405162461bcd60e51b8152600401620002ed9062000a00565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314620003455760405162461bcd60e51b8152600401620002ed9062000a00565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314620003945760405162461bcd60e51b8152600401620002ed9062000a00565b600454600090620003a89060019062000a44565b67ffffffffffffffff811115620003c357620003c362000a60565b604051908082528060200260200182016040528015620003ed578160200160208202803683370190505b5090506000805b82518161ffff161015620004da5760048261ffff16815481106200041c576200041c62000a76565b6000918252602090912001546001600160a01b03908116908516036200044c5781620004488162000a8c565b9250505b60048261ffff168154811062000466576200046662000a76565b9060005260206000200160009054906101000a90046001600160a01b0316838261ffff16815181106200049d576200049d62000a76565b6001600160a01b039092166020928302919091019091015281620004c18162000a8c565b9250508080620004d19062000a8c565b915050620003f4565b508151620004f090600490602085019062000715565b50505050565b600080546001600160a01b03163314620005245760405162461bcd60e51b8152600401620002ed9062000a00565b6000308888888888886040516200053b906200077f565b6200054d979695949392919062000ab0565b604051809103906000f0801580156200056a573d6000803e3d6000fd5b50600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0383169081179091556040519081529091507f92026cc51d997e31ff1af0b8ed8fc51e8524dcd3032289d307cdb6f94ad32d7c9060200160405180910390a1979650505050505050565b600280546200023990620009c4565b606060048054806020026020016040519081016040528092919081815260200182805480156200066357602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000644575b5050505050905090565b600481815481106200067e57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314620006c55760405162461bcd60e51b8152600401620002ed9062000a00565b6001620006d482848362000b6c565b505050565b6000546001600160a01b03163314620007065760405162461bcd60e51b8152600401620002ed9062000a00565b6002620006d482848362000b6c565b8280548282559060005260206000209081019282156200076d579160200282015b828111156200076d57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000736565b506200077b9291506200078d565b5090565b6119f58062000c3b83390190565b5b808211156200077b57600081556001016200078e565b600060208083528351808285015260005b81811015620007d357858101830151858201604001528201620007b5565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b03811681146200080a57600080fd5b50565b6000602082840312156200082057600080fd5b81356200082d81620007f4565b9392505050565b60008083601f8401126200084757600080fd5b50813567ffffffffffffffff8111156200086057600080fd5b6020830191508360208285010111156200087957600080fd5b9250929050565b60008060008060008060a087890312156200089a57600080fd5b863567ffffffffffffffff811115620008b257600080fd5b620008c089828a0162000834565b9097509550506020870135620008d681620007f4565b9350604087013561ffff81168114620008ee57600080fd5b92506060870135915060808701356200090781620007f4565b809150509295509295509295565b6020808252825182820181905260009190848201906040850190845b81811015620009585783516001600160a01b03168352928401929184019160010162000931565b50909695505050505050565b6000602082840312156200097757600080fd5b5035919050565b600080602083850312156200099257600080fd5b823567ffffffffffffffff811115620009aa57600080fd5b620009b88582860162000834565b90969095509350505050565b600181811c90821680620009d957607f821691505b602082108103620009fa57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601490820152732cb7ba9030b932b713ba103a34329037bbb732b960611b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111562000a5a5762000a5a62000a2e565b92915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600061ffff80831681810362000aa65762000aa662000a2e565b6001019392505050565b6001600160a01b03888116825260c0602083018190528201879052600090878960e0850137600060e0898501015260e0601f19601f8a01168401019150808716604084015261ffff8616606084015284608084015280841660a08401525098975050505050505050565b601f821115620006d457600081815260208120601f850160051c8101602086101562000b435750805b601f850160051c820191505b8181101562000b645782815560010162000b4f565b505050505050565b67ffffffffffffffff83111562000b875762000b8762000a60565b62000b9f8362000b988354620009c4565b8362000b1a565b6000601f84116001811462000bd6576000851562000bbd5750838201355b600019600387901b1c1916600186901b17835562000c33565b600083815260209020601f19861690835b8281101562000c09578685013582556020948501946001909201910162000be7565b508682101562000c275760001960f88860031b161c19848701351681555b505060018560011b0183555b505050505056fe6101406040523480156200001257600080fd5b50604051620019f5380380620019f58339810160408190526200003591620000c4565b6001600160a01b03861660805260006200005086826200027c565b506001600160a01b0393841660a0524260c05261ffff90921660e05261010052166101205250620003489050565b80516001600160a01b03811681146200009657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b805161ffff811681146200009657600080fd5b60008060008060008060c08789031215620000de57600080fd5b620000e9876200007e565b602088810151919750906001600160401b03808211156200010957600080fd5b818a0191508a601f8301126200011e57600080fd5b8151818111156200013357620001336200009b565b604051601f8201601f19908116603f011681019083821181831017156200015e576200015e6200009b565b816040528281528d868487010111156200017757600080fd5b600093505b828410156200019b57848401860151818501870152928501926200017c565b6000868483010152809a50505050505050620001ba604088016200007e565b9350620001ca60608801620000b1565b925060808701519150620001e160a088016200007e565b90509295509295509295565b600181811c908216806200020257607f821691505b6020821081036200022357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200027757600081815260208120601f850160051c81016020861015620002525750805b601f850160051c820191505b8181101562000273578281556001016200025e565b5050505b505050565b81516001600160401b038111156200029857620002986200009b565b620002b081620002a98454620001ed565b8462000229565b602080601f831160018114620002e85760008415620002cf5750858301515b600019600386901b1c1916600185901b17855562000273565b600085815260208120601f198616915b828110156200031957888601518255948401946001909101908401620002f8565b5085821015620003385787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516101005161012051611625620003d06000396000818161024e015281816105be0152610600015260008181610290015281816103bb01526108dc0152600081816101da015261094b015260008181610227015261091a0152600081816102e8015281816104050152610a690152600061018601526116256000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c806378e97925116100a2578063c144fa0511610071578063c144fa051461028b578063c7cf303a146102b2578063dda0a81a146102d2578063f692f7b0146102da578063f7c618c1146102e357600080fd5b806378e979251461022257806380f47153146102495780639a7b3be714610270578063a6f873aa1461027857600080fd5b80634162169f116100de5780634162169f146101815780634a79d50c146101c05780634ff0876a146101d55780636c9330c81461020f57600080fd5b80630953264b1461011057806315e8ab9b146101385780631d98130d1461014b57806320c0ba7b1461016c575b600080fd5b61012361011e366004611091565b61030a565b60405190151581526020015b60405180910390f35b6101236101463660046110b3565b61048d565b61015e6101593660046110b3565b6104bf565b60405190815260200161012f565b61017f61017a3660046111aa565b6105bc565b005b6101a87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161012f565b6101c861082f565b60405161012f9190611275565b6101fc7f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff909116815260200161012f565b61015e61021d3660046110b3565b6108bd565b61015e7f000000000000000000000000000000000000000000000000000000000000000081565b6101a87f000000000000000000000000000000000000000000000000000000000000000081565b6101fc610912565b61017f610286366004611091565b610997565b61015e7f000000000000000000000000000000000000000000000000000000000000000081565b6102c56102c0366004611091565b610b69565b60405161012f9190611307565b6102c5610ea0565b61015e60035481565b6101a87f000000000000000000000000000000000000000000000000000000000000000081565b6000610314610912565b61ffff168261ffff161061033b57604051630c30547560e21b815260040160405180910390fd5b61034482610b69565b5160000361035457506000919050565b6000805b8361ffff168161ffff161161039957600061037282610b69565b51111561038757816103838161137f565b9250505b806103918161137f565b915050610358565b508061ffff166000036103af5750600092915050565b60006103df61ffff83167f00000000000000000000000000000000000000000000000000000000000000006113a0565b6003546040516370a0823160e01b81523060048201529192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa15801561044c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047091906113b7565b61047a91906113d0565b9190911015949350505050565b50919050565b61ffff821660009081526002602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b60008080806104cd86610b69565b905060005b81518161ffff16101561057f576000828261ffff16815181106104f7576104f76113e3565b602002602001015190508060c0015160ff16600003610516575061056d565b60008160c0015160ff168260a0015160ff1661053291906113a0565b9050876001600160a01b031682604001516001600160a01b03160361055e5761055b81876113d0565b95505b61056881866113d0565b945050505b806105778161137f565b9150506104d2565b508160000361059457600093505050506104b9565b816105a88468056bc75e2d631000006113a0565b6105b291906113f9565b93505050506104b9565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615610693576040516370a0823160e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561064f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067391906113b7565b6000036106935760405163cfbc97a160e01b815260040160405180910390fd5b60006040518060e001604052804281526020016106ae610912565b61ffff90811682523360208084019190915260408084018a905260608085018a905260ff808a166080870152881660a090950194909452600180548082018255600091909152855160059091027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68101918255928601517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf784018054938801516001600160a01b031662010000026001600160b01b031990941691909516179190911790925591830151929350839290917fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf801906107ac908261149e565b50608082015160038201906107c1908261149e565b5060a08201516004909101805460c09093015160ff9081166101000261ffff199094169216919091179190911790556040517f8524f0c710f733258a36126730edc8d63bca47ae8f863ce99b7b7457fa2926c39061082090839061155e565b60405180910390a15050505050565b6000805461083c9061141b565b80601f01602080910402602001604051908101604052809291908181526020018280546108689061141b565b80156108b55780601f1061088a576101008083540402835291602001916108b5565b820191906000526020600020905b81548152906001019060200180831161089857829003601f168201915b505050505081565b6000806108ca84846104bf565b905068056bc75e2d63100000610900827f00000000000000000000000000000000000000000000000000000000000000006113a0565b61090a91906113f9565b949350505050565b60008061093f7f000000000000000000000000000000000000000000000000000000000000000042611571565b9050600061097461ffff7f00000000000000000000000000000000000000000000000000000000000000001662015180611584565b62ffffff16905061098581836113f9565b6109909060016115ab565b9250505090565b61099f610912565b61ffff168161ffff16106109c657604051630c30547560e21b815260040160405180910390fd5b60006109d282336108bd565b9050806000036109f5576040516309fa8ea160e21b815260040160405180910390fd5b6000610a008361030a565b905080610a205760405163bd883f2760e01b815260040160405180910390fd5b6000610a2c843361048d565b90508015610a4d57604051632cfe303760e21b815260040160405180910390fd5b60405163a9059cbb60e01b8152336004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610aba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ade91906115cd565b5061ffff841660009081526002602090815260408083203384529091528120805460ff1916600117905560038054859290610b1a9084906113d0565b90915550506040805161ffff861681523360208201529081018490527fd428169967f63b1ca17b214911e21b2b9048284d34490d0b8c71789b80e46c739060600160405180910390a150505050565b60606000805b60015461ffff82161015610bd6578361ffff1660018261ffff1681548110610b9957610b996113e3565b600091825260209091206001600590920201015461ffff1603610bc45781610bc08161137f565b9250505b80610bce8161137f565b915050610b6f565b5060008161ffff1667ffffffffffffffff811115610bf657610bf66110f6565b604051908082528060200260200182016040528015610c5c57816020015b6040805160e081018252600080825260208083018290529282018190526060808301819052608083015260a0820181905260c08201528252600019909201910181610c145790505b5090506000915060005b60015461ffff82161015610e98578461ffff1660018261ffff1681548110610c9057610c906113e3565b600091825260209091206001600590920201015461ffff1603610e865760018161ffff1681548110610cc457610cc46113e3565b60009182526020918290206040805160e08101825260059390930290910180548352600181015461ffff811694840194909452620100009093046001600160a01b031690820152600282018054919291606084019190610d239061141b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4f9061141b565b8015610d9c5780601f10610d7157610100808354040283529160200191610d9c565b820191906000526020600020905b815481529060010190602001808311610d7f57829003601f168201915b50505050508152602001600382018054610db59061141b565b80601f0160208091040260200160405190810160405280929190818152602001828054610de19061141b565b8015610e2e5780601f10610e0357610100808354040283529160200191610e2e565b820191906000526020600020905b815481529060010190602001808311610e1157829003601f168201915b50505091835250506004919091015460ff8082166020840152610100909104166040909101528251839061ffff8616908110610e6c57610e6c6113e3565b60200260200101819052508280610e829061137f565b9350505b80610e908161137f565b915050610c66565b509392505050565b60606001805480602002602001604051908101604052809291908181526020016000905b828210156110715760008481526020908190206040805160e0810182526005860290920180548352600181015461ffff811694840194909452620100009093046001600160a01b031690820152600282018054919291606084019190610f299061141b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f559061141b565b8015610fa25780601f10610f7757610100808354040283529160200191610fa2565b820191906000526020600020905b815481529060010190602001808311610f8557829003601f168201915b50505050508152602001600382018054610fbb9061141b565b80601f0160208091040260200160405190810160405280929190818152602001828054610fe79061141b565b80156110345780601f1061100957610100808354040283529160200191611034565b820191906000526020600020905b81548152906001019060200180831161101757829003601f168201915b50505091835250506004919091015460ff808216602080850191909152610100909204166040909201919091529082526001929092019101610ec4565b50505050905090565b803561ffff8116811461108c57600080fd5b919050565b6000602082840312156110a357600080fd5b6110ac8261107a565b9392505050565b600080604083850312156110c657600080fd5b6110cf8361107a565b915060208301356001600160a01b03811681146110eb57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261111d57600080fd5b813567ffffffffffffffff80821115611138576111386110f6565b604051601f8301601f19908116603f01168101908282118183101715611160576111606110f6565b8160405283815286602085880101111561117957600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff8116811461108c57600080fd5b600080600080608085870312156111c057600080fd5b843567ffffffffffffffff808211156111d857600080fd5b6111e48883890161110c565b955060208701359150808211156111fa57600080fd5b506112078782880161110c565b93505061121660408601611199565b915061122460608601611199565b905092959194509250565b6000815180845260005b8181101561125557602081850181015186830182015201611239565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006110ac602083018461122f565b8051825261ffff602082015116602083015260018060a01b0360408201511660408301526000606082015160e060608501526112c760e085018261122f565b9050608083015184820360808601526112e0828261122f565b91505060ff60a08401511660a085015260ff60c08401511660c08501528091505092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561135c57603f1988860301845261134a858351611288565b9450928501929085019060010161132e565b5092979650505050505050565b634e487b7160e01b600052601160045260246000fd5b600061ffff80831681810361139657611396611369565b6001019392505050565b80820281158282048414176104b9576104b9611369565b6000602082840312156113c957600080fd5b5051919050565b808201808211156104b9576104b9611369565b634e487b7160e01b600052603260045260246000fd5b60008261141657634e487b7160e01b600052601260045260246000fd5b500490565b600181811c9082168061142f57607f821691505b60208210810361048757634e487b7160e01b600052602260045260246000fd5b601f82111561149957600081815260208120601f850160051c810160208610156114765750805b601f850160051c820191505b8181101561149557828155600101611482565b5050505b505050565b815167ffffffffffffffff8111156114b8576114b86110f6565b6114cc816114c6845461141b565b8461144f565b602080601f83116001811461150157600084156114e95750858301515b600019600386901b1c1916600185901b178555611495565b600085815260208120601f198616915b8281101561153057888601518255948401946001909101908401611511565b508582101561154e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6020815260006110ac6020830184611288565b818103818111156104b9576104b9611369565b62ffffff8181168382160280821691908281146115a3576115a3611369565b505092915050565b61ffff8181168382160190808211156115c6576115c6611369565b5092915050565b6000602082840312156115df57600080fd5b815180151581146110ac57600080fdfea264697066735822122065d7ea5f1cc28afa59266f10c5b2279b034fc799023b8d9ad66aaa49a13a3d1f64736f6c63430008130033a2646970667358221220c278f8a5a8db5eaf5e4f59a64e79d11bef3a802be93f53de62e0e4bdbf45a96764736f6c63430008130033a26469706673582212200ec892a6c1f79423363cefd1a61725391584d98a65cfe40be7955682101b75da64736f6c63430008130033
Deployed Bytecode
0x60806040523480156200001157600080fd5b50600436106200006a5760003560e01c806313af4035146200006f578063415cc7dd14620000885780638da5cb5b14620000aa578063ccbbd26014620000d7578063e3bd3bb414620000ee578063f912fbca1462000105575b600080fd5b620000866200008036600462000554565b6200011c565b005b6200009262000195565b604051620000a1919062000579565b60405180910390f35b600054620000be906001600160a01b031681565b6040516001600160a01b039091168152602001620000a1565b620000be620000e8366004620005c8565b620001f9565b620000be620000ff3660046200062e565b62000224565b620000866200011636600462000554565b620002f5565b6000546001600160a01b03163314620001735760405162461bcd60e51b81526020600482015260146024820152732cb7ba9030b932b713ba103a34329037bbb732b960611b60448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60606001805480602002602001604051908101604052809291908181526020018280548015620001ef57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620001d0575b5050505050905090565b600181815481106200020a57600080fd5b6000918252602090912001546001600160a01b0316905081565b60008086868686866040516200023a90620004a8565b6200024a959493929190620006e1565b604051809103906000f08015801562000267573d6000803e3d6000fd5b506001805480820182556000919091527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60180546001600160a01b0319166001600160a01b0383169081179091556040519081529091507f1cb5b7f48694f77209ac2e140151cda89a929b850874f26d327e8638e9fa65e09060200160405180910390a19695505050505050565b6000546001600160a01b03163314620003485760405162461bcd60e51b81526020600482015260146024820152732cb7ba9030b932b713ba103a34329037bbb732b960611b60448201526064016200016a565b600180546000916200035a916200073d565b67ffffffffffffffff81111562000375576200037562000759565b6040519080825280602002602001820160405280156200039f578160200160208202803683370190505b5090506000805b82518161ffff1610156200048c5760018261ffff1681548110620003ce57620003ce6200076f565b6000918252602090912001546001600160a01b0390811690851603620003fe5781620003fa8162000785565b9250505b60018261ffff16815481106200041857620004186200076f565b9060005260206000200160009054906101000a90046001600160a01b0316838261ffff16815181106200044f576200044f6200076f565b6001600160a01b039092166020928302919091019091015281620004738162000785565b9250508080620004839062000785565b915050620003a6565b508151620004a2906001906020850190620004b6565b50505050565b6129a680620007aa83390190565b8280548282559060005260206000209081019282156200050e579160200282015b828111156200050e57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620004d7565b506200051c92915062000520565b5090565b5b808211156200051c576000815560010162000521565b80356001600160a01b03811681146200054f57600080fd5b919050565b6000602082840312156200056757600080fd5b620005728262000537565b9392505050565b6020808252825182820181905260009190848201906040850190845b81811015620005bc5783516001600160a01b03168352928401929184019160010162000595565b50909695505050505050565b600060208284031215620005db57600080fd5b5035919050565b60008083601f840112620005f557600080fd5b50813567ffffffffffffffff8111156200060e57600080fd5b6020830191508360208285010111156200062757600080fd5b9250929050565b6000806000806000606086880312156200064757600080fd5b853567ffffffffffffffff808211156200066057600080fd5b6200066e89838a01620005e2565b909750955060208801359150808211156200068857600080fd5b506200069788828901620005e2565b9094509250620006ac90506040870162000537565b90509295509295909350565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b606081526000620006f7606083018789620006b8565b82810360208401526200070c818688620006b8565b91505060018060a01b03831660408301529695505050505050565b634e487b7160e01b600052601160045260246000fd5b8181038181111562000753576200075362000727565b92915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600061ffff8083168181036200079f576200079f62000727565b600101939250505056fe60806040523480156200001157600080fd5b50604051620029a6380380620029a6833981016040819052620000349162000149565b600162000042848262000265565b50600262000051838262000265565b50600380546001600160a01b039092166001600160a01b0319928316179055600080549091163217905550620003319050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000ac57600080fd5b81516001600160401b0380821115620000c957620000c962000084565b604051601f8301601f19908116603f01168101908282118183101715620000f457620000f462000084565b816040528381526020925086838588010111156200011157600080fd5b600091505b8382101562000135578582018301518183018401529082019062000116565b600093810190920192909252949350505050565b6000806000606084860312156200015f57600080fd5b83516001600160401b03808211156200017757600080fd5b62000185878388016200009a565b945060208601519150808211156200019c57600080fd5b50620001ab868287016200009a565b604086015190935090506001600160a01b0381168114620001cb57600080fd5b809150509250925092565b600181811c90821680620001eb57607f821691505b6020821081036200020c57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200026057600081815260208120601f850160051c810160208610156200023b5750805b601f850160051c820191505b818110156200025c5782815560010162000247565b5050505b505050565b81516001600160401b0381111562000281576200028162000084565b6200029981620002928454620001d6565b8462000212565b602080601f831160018114620002d15760008415620002b85750858301515b600019600386901b1c1916600185901b1785556200025c565b600085815260208120601f198616915b828110156200030257888601518255948401946001909101908401620002e1565b5085821015620003215787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61266580620003416000396000f3fe60806040523480156200001157600080fd5b5060043610620000e05760003560e01c806370740aab1162000097578063b36f923e116200006e578063b36f923e14620001d1578063c47f002714620001e8578063eb68757f14620001ff578063fc0c546a146200021657600080fd5b806370740aab146200019a5780638da5cb5b14620001a4578063a0daeed214620001b857600080fd5b806306fdde0314620000e557806313af40351462000107578063144fa6d714620001205780631f776f22146200013757806340a2f31f146200014e57806354fd4d50146200017e575b600080fd5b620000ef6200022a565b604051620000fe9190620007a4565b60405180910390f35b6200011e620001183660046200080d565b620002c0565b005b6200011e620001313660046200080d565b62000318565b6200011e620001483660046200080d565b62000367565b620001656200015f36600462000880565b620004f6565b6040516001600160a01b039091168152602001620000fe565b62000187600181565b60405160ff9091168152602001620000fe565b620000ef620005fa565b60005462000165906001600160a01b031681565b620001c262000609565b604051620000fe919062000915565b62000165620001e236600462000964565b6200066d565b6200011e620001f93660046200097e565b62000698565b6200011e620002103660046200097e565b620006d9565b60035462000165906001600160a01b031681565b600180546200023990620009c4565b80601f01602080910402602001604051908101604052809291908181526020018280546200026790620009c4565b8015620002b85780601f106200028c57610100808354040283529160200191620002b8565b820191906000526020600020905b8154815290600101906020018083116200029a57829003601f168201915b505050505081565b6000546001600160a01b03163314620002f65760405162461bcd60e51b8152600401620002ed9062000a00565b60405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314620003455760405162461bcd60e51b8152600401620002ed9062000a00565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314620003945760405162461bcd60e51b8152600401620002ed9062000a00565b600454600090620003a89060019062000a44565b67ffffffffffffffff811115620003c357620003c362000a60565b604051908082528060200260200182016040528015620003ed578160200160208202803683370190505b5090506000805b82518161ffff161015620004da5760048261ffff16815481106200041c576200041c62000a76565b6000918252602090912001546001600160a01b03908116908516036200044c5781620004488162000a8c565b9250505b60048261ffff168154811062000466576200046662000a76565b9060005260206000200160009054906101000a90046001600160a01b0316838261ffff16815181106200049d576200049d62000a76565b6001600160a01b039092166020928302919091019091015281620004c18162000a8c565b9250508080620004d19062000a8c565b915050620003f4565b508151620004f090600490602085019062000715565b50505050565b600080546001600160a01b03163314620005245760405162461bcd60e51b8152600401620002ed9062000a00565b6000308888888888886040516200053b906200077f565b6200054d979695949392919062000ab0565b604051809103906000f0801580156200056a573d6000803e3d6000fd5b50600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0383169081179091556040519081529091507f92026cc51d997e31ff1af0b8ed8fc51e8524dcd3032289d307cdb6f94ad32d7c9060200160405180910390a1979650505050505050565b600280546200023990620009c4565b606060048054806020026020016040519081016040528092919081815260200182805480156200066357602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831162000644575b5050505050905090565b600481815481106200067e57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314620006c55760405162461bcd60e51b8152600401620002ed9062000a00565b6001620006d482848362000b6c565b505050565b6000546001600160a01b03163314620007065760405162461bcd60e51b8152600401620002ed9062000a00565b6002620006d482848362000b6c565b8280548282559060005260206000209081019282156200076d579160200282015b828111156200076d57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000736565b506200077b9291506200078d565b5090565b6119f58062000c3b83390190565b5b808211156200077b57600081556001016200078e565b600060208083528351808285015260005b81811015620007d357858101830151858201604001528201620007b5565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b03811681146200080a57600080fd5b50565b6000602082840312156200082057600080fd5b81356200082d81620007f4565b9392505050565b60008083601f8401126200084757600080fd5b50813567ffffffffffffffff8111156200086057600080fd5b6020830191508360208285010111156200087957600080fd5b9250929050565b60008060008060008060a087890312156200089a57600080fd5b863567ffffffffffffffff811115620008b257600080fd5b620008c089828a0162000834565b9097509550506020870135620008d681620007f4565b9350604087013561ffff81168114620008ee57600080fd5b92506060870135915060808701356200090781620007f4565b809150509295509295509295565b6020808252825182820181905260009190848201906040850190845b81811015620009585783516001600160a01b03168352928401929184019160010162000931565b50909695505050505050565b6000602082840312156200097757600080fd5b5035919050565b600080602083850312156200099257600080fd5b823567ffffffffffffffff811115620009aa57600080fd5b620009b88582860162000834565b90969095509350505050565b600181811c90821680620009d957607f821691505b602082108103620009fa57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601490820152732cb7ba9030b932b713ba103a34329037bbb732b960611b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8181038181111562000a5a5762000a5a62000a2e565b92915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600061ffff80831681810362000aa65762000aa662000a2e565b6001019392505050565b6001600160a01b03888116825260c0602083018190528201879052600090878960e0850137600060e0898501015260e0601f19601f8a01168401019150808716604084015261ffff8616606084015284608084015280841660a08401525098975050505050505050565b601f821115620006d457600081815260208120601f850160051c8101602086101562000b435750805b601f850160051c820191505b8181101562000b645782815560010162000b4f565b505050505050565b67ffffffffffffffff83111562000b875762000b8762000a60565b62000b9f8362000b988354620009c4565b8362000b1a565b6000601f84116001811462000bd6576000851562000bbd5750838201355b600019600387901b1c1916600186901b17835562000c33565b600083815260209020601f19861690835b8281101562000c09578685013582556020948501946001909201910162000be7565b508682101562000c275760001960f88860031b161c19848701351681555b505060018560011b0183555b505050505056fe6101406040523480156200001257600080fd5b50604051620019f5380380620019f58339810160408190526200003591620000c4565b6001600160a01b03861660805260006200005086826200027c565b506001600160a01b0393841660a0524260c05261ffff90921660e05261010052166101205250620003489050565b80516001600160a01b03811681146200009657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b805161ffff811681146200009657600080fd5b60008060008060008060c08789031215620000de57600080fd5b620000e9876200007e565b602088810151919750906001600160401b03808211156200010957600080fd5b818a0191508a601f8301126200011e57600080fd5b8151818111156200013357620001336200009b565b604051601f8201601f19908116603f011681019083821181831017156200015e576200015e6200009b565b816040528281528d868487010111156200017757600080fd5b600093505b828410156200019b57848401860151818501870152928501926200017c565b6000868483010152809a50505050505050620001ba604088016200007e565b9350620001ca60608801620000b1565b925060808701519150620001e160a088016200007e565b90509295509295509295565b600181811c908216806200020257607f821691505b6020821081036200022357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200027757600081815260208120601f850160051c81016020861015620002525750805b601f850160051c820191505b8181101562000273578281556001016200025e565b5050505b505050565b81516001600160401b038111156200029857620002986200009b565b620002b081620002a98454620001ed565b8462000229565b602080601f831160018114620002e85760008415620002cf5750858301515b600019600386901b1c1916600185901b17855562000273565b600085815260208120601f198616915b828110156200031957888601518255948401946001909101908401620002f8565b5085821015620003385787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516101005161012051611625620003d06000396000818161024e015281816105be0152610600015260008181610290015281816103bb01526108dc0152600081816101da015261094b015260008181610227015261091a0152600081816102e8015281816104050152610a690152600061018601526116256000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c806378e97925116100a2578063c144fa0511610071578063c144fa051461028b578063c7cf303a146102b2578063dda0a81a146102d2578063f692f7b0146102da578063f7c618c1146102e357600080fd5b806378e979251461022257806380f47153146102495780639a7b3be714610270578063a6f873aa1461027857600080fd5b80634162169f116100de5780634162169f146101815780634a79d50c146101c05780634ff0876a146101d55780636c9330c81461020f57600080fd5b80630953264b1461011057806315e8ab9b146101385780631d98130d1461014b57806320c0ba7b1461016c575b600080fd5b61012361011e366004611091565b61030a565b60405190151581526020015b60405180910390f35b6101236101463660046110b3565b61048d565b61015e6101593660046110b3565b6104bf565b60405190815260200161012f565b61017f61017a3660046111aa565b6105bc565b005b6101a87f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161012f565b6101c861082f565b60405161012f9190611275565b6101fc7f000000000000000000000000000000000000000000000000000000000000000081565b60405161ffff909116815260200161012f565b61015e61021d3660046110b3565b6108bd565b61015e7f000000000000000000000000000000000000000000000000000000000000000081565b6101a87f000000000000000000000000000000000000000000000000000000000000000081565b6101fc610912565b61017f610286366004611091565b610997565b61015e7f000000000000000000000000000000000000000000000000000000000000000081565b6102c56102c0366004611091565b610b69565b60405161012f9190611307565b6102c5610ea0565b61015e60035481565b6101a87f000000000000000000000000000000000000000000000000000000000000000081565b6000610314610912565b61ffff168261ffff161061033b57604051630c30547560e21b815260040160405180910390fd5b61034482610b69565b5160000361035457506000919050565b6000805b8361ffff168161ffff161161039957600061037282610b69565b51111561038757816103838161137f565b9250505b806103918161137f565b915050610358565b508061ffff166000036103af5750600092915050565b60006103df61ffff83167f00000000000000000000000000000000000000000000000000000000000000006113a0565b6003546040516370a0823160e01b81523060048201529192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa15801561044c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047091906113b7565b61047a91906113d0565b9190911015949350505050565b50919050565b61ffff821660009081526002602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b60008080806104cd86610b69565b905060005b81518161ffff16101561057f576000828261ffff16815181106104f7576104f76113e3565b602002602001015190508060c0015160ff16600003610516575061056d565b60008160c0015160ff168260a0015160ff1661053291906113a0565b9050876001600160a01b031682604001516001600160a01b03160361055e5761055b81876113d0565b95505b61056881866113d0565b945050505b806105778161137f565b9150506104d2565b508160000361059457600093505050506104b9565b816105a88468056bc75e2d631000006113a0565b6105b291906113f9565b93505050506104b9565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615610693576040516370a0823160e01b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561064f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067391906113b7565b6000036106935760405163cfbc97a160e01b815260040160405180910390fd5b60006040518060e001604052804281526020016106ae610912565b61ffff90811682523360208084019190915260408084018a905260608085018a905260ff808a166080870152881660a090950194909452600180548082018255600091909152855160059091027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68101918255928601517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf784018054938801516001600160a01b031662010000026001600160b01b031990941691909516179190911790925591830151929350839290917fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf801906107ac908261149e565b50608082015160038201906107c1908261149e565b5060a08201516004909101805460c09093015160ff9081166101000261ffff199094169216919091179190911790556040517f8524f0c710f733258a36126730edc8d63bca47ae8f863ce99b7b7457fa2926c39061082090839061155e565b60405180910390a15050505050565b6000805461083c9061141b565b80601f01602080910402602001604051908101604052809291908181526020018280546108689061141b565b80156108b55780601f1061088a576101008083540402835291602001916108b5565b820191906000526020600020905b81548152906001019060200180831161089857829003601f168201915b505050505081565b6000806108ca84846104bf565b905068056bc75e2d63100000610900827f00000000000000000000000000000000000000000000000000000000000000006113a0565b61090a91906113f9565b949350505050565b60008061093f7f000000000000000000000000000000000000000000000000000000000000000042611571565b9050600061097461ffff7f00000000000000000000000000000000000000000000000000000000000000001662015180611584565b62ffffff16905061098581836113f9565b6109909060016115ab565b9250505090565b61099f610912565b61ffff168161ffff16106109c657604051630c30547560e21b815260040160405180910390fd5b60006109d282336108bd565b9050806000036109f5576040516309fa8ea160e21b815260040160405180910390fd5b6000610a008361030a565b905080610a205760405163bd883f2760e01b815260040160405180910390fd5b6000610a2c843361048d565b90508015610a4d57604051632cfe303760e21b815260040160405180910390fd5b60405163a9059cbb60e01b8152336004820152602481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610aba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ade91906115cd565b5061ffff841660009081526002602090815260408083203384529091528120805460ff1916600117905560038054859290610b1a9084906113d0565b90915550506040805161ffff861681523360208201529081018490527fd428169967f63b1ca17b214911e21b2b9048284d34490d0b8c71789b80e46c739060600160405180910390a150505050565b60606000805b60015461ffff82161015610bd6578361ffff1660018261ffff1681548110610b9957610b996113e3565b600091825260209091206001600590920201015461ffff1603610bc45781610bc08161137f565b9250505b80610bce8161137f565b915050610b6f565b5060008161ffff1667ffffffffffffffff811115610bf657610bf66110f6565b604051908082528060200260200182016040528015610c5c57816020015b6040805160e081018252600080825260208083018290529282018190526060808301819052608083015260a0820181905260c08201528252600019909201910181610c145790505b5090506000915060005b60015461ffff82161015610e98578461ffff1660018261ffff1681548110610c9057610c906113e3565b600091825260209091206001600590920201015461ffff1603610e865760018161ffff1681548110610cc457610cc46113e3565b60009182526020918290206040805160e08101825260059390930290910180548352600181015461ffff811694840194909452620100009093046001600160a01b031690820152600282018054919291606084019190610d239061141b565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4f9061141b565b8015610d9c5780601f10610d7157610100808354040283529160200191610d9c565b820191906000526020600020905b815481529060010190602001808311610d7f57829003601f168201915b50505050508152602001600382018054610db59061141b565b80601f0160208091040260200160405190810160405280929190818152602001828054610de19061141b565b8015610e2e5780601f10610e0357610100808354040283529160200191610e2e565b820191906000526020600020905b815481529060010190602001808311610e1157829003601f168201915b50505091835250506004919091015460ff8082166020840152610100909104166040909101528251839061ffff8616908110610e6c57610e6c6113e3565b60200260200101819052508280610e829061137f565b9350505b80610e908161137f565b915050610c66565b509392505050565b60606001805480602002602001604051908101604052809291908181526020016000905b828210156110715760008481526020908190206040805160e0810182526005860290920180548352600181015461ffff811694840194909452620100009093046001600160a01b031690820152600282018054919291606084019190610f299061141b565b80601f0160208091040260200160405190810160405280929190818152602001828054610f559061141b565b8015610fa25780601f10610f7757610100808354040283529160200191610fa2565b820191906000526020600020905b815481529060010190602001808311610f8557829003601f168201915b50505050508152602001600382018054610fbb9061141b565b80601f0160208091040260200160405190810160405280929190818152602001828054610fe79061141b565b80156110345780601f1061100957610100808354040283529160200191611034565b820191906000526020600020905b81548152906001019060200180831161101757829003601f168201915b50505091835250506004919091015460ff808216602080850191909152610100909204166040909201919091529082526001929092019101610ec4565b50505050905090565b803561ffff8116811461108c57600080fd5b919050565b6000602082840312156110a357600080fd5b6110ac8261107a565b9392505050565b600080604083850312156110c657600080fd5b6110cf8361107a565b915060208301356001600160a01b03811681146110eb57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261111d57600080fd5b813567ffffffffffffffff80821115611138576111386110f6565b604051601f8301601f19908116603f01168101908282118183101715611160576111606110f6565b8160405283815286602085880101111561117957600080fd5b836020870160208301376000602085830101528094505050505092915050565b803560ff8116811461108c57600080fd5b600080600080608085870312156111c057600080fd5b843567ffffffffffffffff808211156111d857600080fd5b6111e48883890161110c565b955060208701359150808211156111fa57600080fd5b506112078782880161110c565b93505061121660408601611199565b915061122460608601611199565b905092959194509250565b6000815180845260005b8181101561125557602081850181015186830182015201611239565b506000602082860101526020601f19601f83011685010191505092915050565b6020815260006110ac602083018461122f565b8051825261ffff602082015116602083015260018060a01b0360408201511660408301526000606082015160e060608501526112c760e085018261122f565b9050608083015184820360808601526112e0828261122f565b91505060ff60a08401511660a085015260ff60c08401511660c08501528091505092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561135c57603f1988860301845261134a858351611288565b9450928501929085019060010161132e565b5092979650505050505050565b634e487b7160e01b600052601160045260246000fd5b600061ffff80831681810361139657611396611369565b6001019392505050565b80820281158282048414176104b9576104b9611369565b6000602082840312156113c957600080fd5b5051919050565b808201808211156104b9576104b9611369565b634e487b7160e01b600052603260045260246000fd5b60008261141657634e487b7160e01b600052601260045260246000fd5b500490565b600181811c9082168061142f57607f821691505b60208210810361048757634e487b7160e01b600052602260045260246000fd5b601f82111561149957600081815260208120601f850160051c810160208610156114765750805b601f850160051c820191505b8181101561149557828155600101611482565b5050505b505050565b815167ffffffffffffffff8111156114b8576114b86110f6565b6114cc816114c6845461141b565b8461144f565b602080601f83116001811461150157600084156114e95750858301515b600019600386901b1c1916600185901b178555611495565b600085815260208120601f198616915b8281101561153057888601518255948401946001909101908401611511565b508582101561154e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6020815260006110ac6020830184611288565b818103818111156104b9576104b9611369565b62ffffff8181168382160280821691908281146115a3576115a3611369565b505092915050565b61ffff8181168382160190808211156115c6576115c6611369565b5092915050565b6000602082840312156115df57600080fd5b815180151581146110ac57600080fdfea264697066735822122065d7ea5f1cc28afa59266f10c5b2279b034fc799023b8d9ad66aaa49a13a3d1f64736f6c63430008130033a2646970667358221220c278f8a5a8db5eaf5e4f59a64e79d11bef3a802be93f53de62e0e4bdbf45a96764736f6c63430008130033a26469706673582212200ec892a6c1f79423363cefd1a61725391584d98a65cfe40be7955682101b75da64736f6c63430008130033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.