Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0.02 ETH
Eth Value
$68.70 (@ $3,435.12/ETH)More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 4,050 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Execute Request ... | 16268598 | 730 days ago | IN | 0 ETH | 0.00122505 | ||||
Execute Request ... | 16098914 | 754 days ago | IN | 0 ETH | 0.00127597 | ||||
Execute Request ... | 15887319 | 784 days ago | IN | 0 ETH | 0.00154459 | ||||
Execute Request ... | 15872355 | 786 days ago | IN | 0 ETH | 0.00110877 | ||||
Execute Request ... | 15865478 | 787 days ago | IN | 0 ETH | 0.00082929 | ||||
Execute Request ... | 15865168 | 787 days ago | IN | 0 ETH | 0.00077863 | ||||
Execute Request ... | 15849724 | 789 days ago | IN | 0 ETH | 0.00149172 | ||||
Execute Request ... | 15845946 | 789 days ago | IN | 0 ETH | 0.00106432 | ||||
Execute Request ... | 15844788 | 789 days ago | IN | 0 ETH | 0.00112138 | ||||
Execute Request ... | 15843823 | 790 days ago | IN | 0 ETH | 0.00119785 | ||||
Execute Request ... | 15843456 | 790 days ago | IN | 0 ETH | 0.00113777 | ||||
Execute Request ... | 15843133 | 790 days ago | IN | 0 ETH | 0.00129685 | ||||
Execute Request ... | 15837547 | 790 days ago | IN | 0 ETH | 0.00100066 | ||||
Execute Request ... | 15765904 | 800 days ago | IN | 0 ETH | 0.00109988 | ||||
Execute Request ... | 15760836 | 801 days ago | IN | 0 ETH | 0.00114446 | ||||
Execute Request ... | 15760239 | 801 days ago | IN | 0 ETH | 0.00134305 | ||||
Execute Request ... | 15759642 | 801 days ago | IN | 0 ETH | 0.00108381 | ||||
Execute Request ... | 15759044 | 801 days ago | IN | 0 ETH | 0.00106022 | ||||
Execute Request ... | 15758449 | 802 days ago | IN | 0 ETH | 0.00127092 | ||||
Execute Request ... | 15757852 | 802 days ago | IN | 0 ETH | 0.00145286 | ||||
Execute Request ... | 15757257 | 802 days ago | IN | 0 ETH | 0.0016162 | ||||
Execute Request ... | 15756661 | 802 days ago | IN | 0 ETH | 0.00165726 | ||||
Execute Request ... | 15756062 | 802 days ago | IN | 0 ETH | 0.00161555 | ||||
Execute Request ... | 15755469 | 802 days ago | IN | 0 ETH | 0.00165623 | ||||
Execute Request ... | 15754871 | 802 days ago | IN | 0 ETH | 0.00163661 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
||||
---|---|---|---|---|---|---|---|
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH | |||||
20182699 | 181 days ago | 0 ETH |
Loading...
Loading
Contract Name:
SeederV2
Compiler Version
v0.8.11+commit.d7f03943
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /// @title RaidParty Randomness and Seeder V2 /** * ___ _ _ ___ _ * | _ \__ _(_)__| | _ \__ _ _ _| |_ _ _ * | / _` | / _` | _/ _` | '_| _| || | * |_|_\__,_|_\__,_|_| \__,_|_| \__|\_, | * |__/ */ pragma solidity ^0.8.0; import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "./SeedStorage.sol"; import "./RequestStorage.sol"; import "../interfaces/ISeeder.sol"; import "../lib/Randomness.sol"; contract SeederV2 is VRFConsumerBaseV2, AccessControlEnumerable, ISeeder { VRFCoordinatorV2Interface private immutable _coordinator; LinkTokenInterface private immutable _linkToken; bytes32 private immutable _keyHash; ISeeder private immutable _seederV1; SeedStorage private immutable _seedStorage; RequestStorage private immutable _requestStorage; bytes32 public constant INTERNAL_CALLER_ROLE = keccak256("INTERNAL_CALLER_ROLE"); uint32 private constant CALLBACK_GAS_LIMIT = 100000; uint32 private constant NUM_WORDS = 1; uint16 private constant REQUEST_CONFIRMATIONS = 3; uint256 private _fee; uint256 private _lastBatchTimestamp; uint256 private _batchCadence; uint256 private _batch; uint64 private _subscriptionId; constructor( uint64 subscriptionId, address link, address coordinator, bytes32 keyHash, uint256 batch, address seederv1, address seedStorage, address requestStorage, address admin, uint256 batchCadence ) VRFConsumerBaseV2(coordinator) { require(batch > 0, "SeederV2: Invalid initial batch"); _setupRole(DEFAULT_ADMIN_ROLE, admin); _setupRole(INTERNAL_CALLER_ROLE, admin); _coordinator = VRFCoordinatorV2Interface(coordinator); _linkToken = LinkTokenInterface(link); _keyHash = keyHash; _subscriptionId = subscriptionId; _batch = batch; _batchCadence = batchCadence; _seederV1 = ISeeder(seederv1); _seedStorage = SeedStorage(seedStorage); _requestStorage = RequestStorage(requestStorage); _fee = 2500000000000000; } /** PUBLIC */ // Returns a seed or 0 if not yet seeded function getSeed(address origin, uint256 identifier) external view override returns (uint256) { if (_isPreMigration(origin, identifier)) { return _seederV1.getSeed(origin, identifier); } Randomness.SeedData memory data = _getData(origin, identifier); uint256 randomness; if (data.batch == 0) { randomness = _seedStorage.getRandomness(data.randomnessId); } else { randomness = _seedStorage.getRandomness( _requestStorage.getRequestIdFromBatch(data.batch) ); } if ( (data.randomnessId == 0 && _requestStorage.getRequestIdFromBatch(data.batch) == 0) || randomness == 0 ) { return 0; } else { return uint256(keccak256(abi.encode(origin, identifier, randomness))); } } function getSeedSafe(address origin, uint256 identifier) external view override returns (uint256) { if (_isPreMigration(origin, identifier)) { return _seederV1.getSeedSafe(origin, identifier); } Randomness.SeedData memory data = _getData(origin, identifier); uint256 randomness; if (data.batch == 0) { randomness = _seedStorage.getRandomness(data.randomnessId); } else { randomness = _seedStorage.getRandomness( _requestStorage.getRequestIdFromBatch(data.batch) ); } require( (data.randomnessId != 0 || _requestStorage.getRequestIdFromBatch(data.batch) != 0) && randomness != 0, "Seeder::getSeedSafe: got 0 value seed" ); return uint256(keccak256(abi.encode(origin, identifier, randomness))); } // Returns current batch function getBatch() external view returns (uint256) { return _batch; } // Returns req for a given batch function getReqByBatch(uint256 batch) external view returns (bytes32) { return _requestStorage.getRequestIdFromBatch(batch); } function setFee(uint256 fee) external onlyRole(DEFAULT_ADMIN_ROLE) { _fee = fee; } function getFee() external view returns (uint256) { return _fee; } function withdraw() external onlyRole(DEFAULT_ADMIN_ROLE) { uint256 amount = address(this).balance; (bool success, ) = address(msg.sender).call{value: amount}(""); require(success, "SeederV2::withdraw: Failed to send Ether"); } function isSeeded(address origin, uint256 identifier) public view override returns (bool) { Randomness.SeedData memory data; uint256 randomness; if (_isPreMigration(origin, identifier)) { return _seederV1.isSeeded(origin, identifier); } else { data = _getData(origin, identifier); } if (data.batch == 0) { randomness = _seedStorage.getRandomness(data.randomnessId); } else { randomness = _seedStorage.getRandomness( _requestStorage.getRequestIdFromBatch(data.batch) ); } return ((data.randomnessId != 0 || _requestStorage.getRequestIdFromBatch(data.batch) != 0) && randomness != 0); } // getIdentifiers returns a list of seeded identifiers for a given randomness id, assumes ordered identifier function getIdentifiers( bytes32 randomnessId, address origin, uint256 startIdx, uint256 count ) external view returns (uint256[] memory) { unchecked { uint256[] memory identifiers = new uint256[](count); Randomness.SeedData memory data; uint256 idx = startIdx; uint256 identifierIdx = 0; while (isSeeded(origin, idx)) { data = _getData(origin, idx); if ( data.randomnessId == randomnessId || _requestStorage.getRequestIdFromBatch(data.batch) == randomnessId ) { identifiers[identifierIdx] = idx; identifierIdx += 1; if (identifierIdx == count) { return identifiers; } } idx += 1; } revert("Seeder::getIdentifiers: count mismatch"); } } function getIdReferenceCount( bytes32 randomnessId, address origin, uint256 startIdx ) external view returns (uint256) { unchecked { Randomness.SeedData memory data; uint256 idx = startIdx; uint256 count = 0; while (isSeeded(origin, idx)) { data = _getData(origin, idx); if ( data.randomnessId == randomnessId || _requestStorage.getRequestIdFromBatch(data.batch) == randomnessId ) { count += 1; } idx += 1; } return count; } } // Requests randomness, limited only to internal callers which must maintain distinct id's function requestSeed(uint256 identifier) external override onlyRole(INTERNAL_CALLER_ROLE) { Randomness.SeedData memory data = _getData(msg.sender, identifier); require( data.randomnessId == 0 && data.batch == 0, "Seeder::generateSeed: Seed already requested" ); require( identifier != 0, "Seeder::generateSeed: Identifier cannot be 0" ); _requestStorage.setRequest( msg.sender, identifier, Randomness.SeedData(_batch, 0) ); emit Requested(msg.sender, identifier); } // executeRequestMulti batch executes requests from the queue function executeRequestMulti() external { require( _lastBatchTimestamp + _batchCadence <= block.timestamp, "Seeder::executeRequestMulti: Batch cadence not passed" ); _lastBatchTimestamp = block.timestamp; uint256 linkReqID = _coordinator.requestRandomWords( _keyHash, _subscriptionId, REQUEST_CONFIRMATIONS, CALLBACK_GAS_LIMIT, NUM_WORDS ); _requestStorage.setBatchRequestId(_batch, bytes32(linkReqID)); unchecked { _batch += 1; } } // Executes a single request function executeRequest(address origin, uint256 identifier) external payable { require( !_isPreMigration(origin, identifier), "Seeder::executeRequest: Pre-migration requests may not be manually executed" ); Randomness.SeedData memory data = _getData(origin, identifier); require( _lastBatchTimestamp + _batchCadence > block.timestamp, "Seeder::executeRequest: Cannot seed individually during batch seeding" ); require( data.randomnessId == 0 && _requestStorage.getRequestIdFromBatch(data.batch) == 0, "Seeder::executeRequest: Seed already generated" ); require( data.batch != 0, "Seeder::executeRequest: Seed not yet requested" ); require( msg.value == _fee, "Seeder::executeRequest: Transaction value does not match expected fee" ); uint256 linkReqID = _coordinator.requestRandomWords( _keyHash, _subscriptionId, REQUEST_CONFIRMATIONS, CALLBACK_GAS_LIMIT, NUM_WORDS ); _requestStorage.updateRequest(origin, identifier, bytes32(linkReqID)); } function getSubscriptionId() external view returns (uint64) { return _subscriptionId; } function setBatchCadence(uint256 batchCadence) external onlyRole(DEFAULT_ADMIN_ROLE) { _batchCadence = batchCadence; } function setSubscriptionId(uint64 subscriptionId) external onlyRole(DEFAULT_ADMIN_ROLE) { _subscriptionId = subscriptionId; } function getNextAvailableBatch() external view returns (uint256) { return _lastBatchTimestamp + _batchCadence; } function getData(address origin, uint256 identifier) external view returns (Randomness.SeedData memory) { if (_isPreMigration(origin, identifier)) { return _seederV1.getData(origin, identifier); } return _getData(origin, identifier); } /** INTERNAL */ function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override { _seedStorage.setRandomness(bytes32(requestId), randomWords[0]); emit Seeded(bytes32(requestId), randomWords[0]); } /** MIGRATION */ function _getData(address origin, uint256 identifier) internal view returns (Randomness.SeedData memory) { return _requestStorage.getRequest(origin, identifier); } // TODO: Fixme for mainnet / testnet function _isPreMigration(address origin, uint256 identifier) internal pure returns (bool) { return ((origin == address(0x966731dFD9b9925DD105FF465687F5aA8f54Ee9f) && identifier <= 5337 && identifier > 0) || (origin == address(0x87E738a3d5E5345d6212D8982205A564289e6324) && identifier <= 9131 && identifier > 0)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. It ensures 2 things: * @dev 1. The fulfillment came from the VRFCoordinator * @dev 2. The consumer contract implements fulfillRandomWords. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constructor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash). Create subscription, fund it * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface * @dev subscription management functions). * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations, * @dev callbackGasLimit, numWords), * @dev see (VRFCoordinatorInterface for a description of the arguments). * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomWords method. * * @dev The randomness argument to fulfillRandomWords is a set of random words * @dev generated from your requestId and the blockHash of the request. * * @dev If your contract could have concurrent requests open, you can use the * @dev requestId returned from requestRandomWords to track which response is associated * @dev with which randomness request. * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously. * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. It is for this reason that * @dev that you can signal to an oracle you'd like them to wait longer before * @dev responding to the request (however this is not enforced in the contract * @dev and so remains effective only in the case of unmodified oracle software). */ abstract contract VRFConsumerBaseV2 { error OnlyCoordinatorCanFulfill(address have, address want); address private immutable vrfCoordinator; /** * @param _vrfCoordinator address of VRFCoordinator contract */ constructor(address _vrfCoordinator) { vrfCoordinator = _vrfCoordinator; } /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomWords the VRF output expanded to the requested number of words */ function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual; // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external { if (msg.sender != vrfCoordinator) { revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator); } fulfillRandomWords(requestId, randomWords); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface LinkTokenInterface { function allowance(address owner, address spender) external view returns (uint256 remaining); function approve(address spender, uint256 value) external returns (bool success); function balanceOf(address owner) external view returns (uint256 balance); function decimals() external view returns (uint8 decimalPlaces); function decreaseApproval(address spender, uint256 addedValue) external returns (bool success); function increaseApproval(address spender, uint256 subtractedValue) external; function name() external view returns (string memory tokenName); function symbol() external view returns (string memory tokenSymbol); function totalSupply() external view returns (uint256 totalTokensIssued); function transfer(address to, uint256 value) external returns (bool success); function transferAndCall( address to, uint256 value, bytes calldata data ) external returns (bool success); function transferFrom( address from, address to, uint256 value ) external returns (bool success); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface VRFCoordinatorV2Interface { /** * @notice Get configuration relevant for making requests * @return minimumRequestConfirmations global min for request confirmations * @return maxGasLimit global max for request gas limit * @return s_provingKeyHashes list of registered key hashes */ function getRequestConfig() external view returns ( uint16, uint32, bytes32[] memory ); /** * @notice Request a set of random words. * @param keyHash - Corresponds to a particular oracle job which uses * that key for generating the VRF proof. Different keyHash's have different gas price * ceilings, so you can select a specific one to bound your maximum per request cost. * @param subId - The ID of the VRF subscription. Must be funded * with the minimum subscription balance required for the selected keyHash. * @param minimumRequestConfirmations - How many blocks you'd like the * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS * for why you may want to request more. The acceptable range is * [minimumRequestBlockConfirmations, 200]. * @param callbackGasLimit - How much gas you'd like to receive in your * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords * may be slightly less than this amount because of gas used calling the function * (argument decoding etc.), so you may need to request slightly more than you expect * to have inside fulfillRandomWords. The acceptable range is * [0, maxGasLimit] * @param numWords - The number of uint256 random values you'd like to receive * in your fulfillRandomWords callback. Note these numbers are expanded in a * secure way by the VRFCoordinator from a single random value supplied by the oracle. * @return requestId - A unique identifier of the request. Can be used to match * a request to a response in fulfillRandomWords. */ function requestRandomWords( bytes32 keyHash, uint64 subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords ) external returns (uint256 requestId); /** * @notice Create a VRF subscription. * @return subId - A unique subscription id. * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer. * @dev Note to fund the subscription, use transferAndCall. For example * @dev LINKTOKEN.transferAndCall( * @dev address(COORDINATOR), * @dev amount, * @dev abi.encode(subId)); */ function createSubscription() external returns (uint64 subId); /** * @notice Get a VRF subscription. * @param subId - ID of the subscription * @return balance - LINK balance of the subscription in juels. * @return reqCount - number of requests for this subscription, determines fee tier. * @return owner - owner of the subscription. * @return consumers - list of consumer address which are able to use this subscription. */ function getSubscription(uint64 subId) external view returns ( uint96 balance, uint64 reqCount, address owner, address[] memory consumers ); /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @param newOwner - proposed new owner of the subscription */ function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external; /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @dev will revert if original owner of subId has * not requested that msg.sender become the new owner. */ function acceptSubscriptionOwnerTransfer(uint64 subId) external; /** * @notice Add a consumer to a VRF subscription. * @param subId - ID of the subscription * @param consumer - New consumer which can use the subscription */ function addConsumer(uint64 subId, address consumer) external; /** * @notice Remove a consumer from a VRF subscription. * @param subId - ID of the subscription * @param consumer - Consumer to remove from the subscription */ function removeConsumer(uint64 subId, address consumer) external; /** * @notice Cancel a subscription * @param subId - ID of the subscription * @param to - Where to send the remaining LINK to */ function cancelSubscription(uint64 subId, address to) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../lib/Randomness.sol"; interface ISeeder { event Requested(address indexed origin, uint256 indexed identifier); event Seeded(bytes32 identifier, uint256 randomness); function getIdReferenceCount( bytes32 randomnessId, address origin, uint256 startIdx ) external view returns (uint256); function getIdentifiers( bytes32 randomnessId, address origin, uint256 startIdx, uint256 count ) external view returns (uint256[] memory); function requestSeed(uint256 identifier) external; function getSeed(address origin, uint256 identifier) external view returns (uint256); function getSeedSafe(address origin, uint256 identifier) external view returns (uint256); function executeRequestMulti() external; function isSeeded(address origin, uint256 identifier) external view returns (bool); function setFee(uint256 fee) external; function getFee() external view returns (uint256); function getData(address origin, uint256 identifier) external view returns (Randomness.SeedData memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library Randomness { struct SeedData { uint256 batch; bytes32 randomnessId; } }
// SPDX-License-Identifier: MIT /// @title RaidParty Request Storage /** * ___ _ _ ___ _ * | _ \__ _(_)__| | _ \__ _ _ _| |_ _ _ * | / _` | / _` | _/ _` | '_| _| || | * |_|_\__,_|_\__,_|_| \__,_|_| \__|\_, | * |__/ */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "../lib/Randomness.sol"; contract RequestStorage is AccessControlEnumerable { bytes32 public constant WRITE_ROLE = keccak256("WRITE_ROLE"); mapping(address => mapping(uint256 => Randomness.SeedData)) private _seedData; mapping(uint256 => bytes32) private _batchToReq; constructor(address admin) { _setupRole(DEFAULT_ADMIN_ROLE, admin); _setupRole(WRITE_ROLE, admin); } function getRequest(address origin, uint256 identifier) external view returns (Randomness.SeedData memory) { return _seedData[origin][identifier]; } function getRequestIdFromBatch(uint256 batch) external view returns (bytes32) { return _batchToReq[batch]; } function setRequest( address origin, uint256 identifier, Randomness.SeedData memory data ) external onlyRole(WRITE_ROLE) { require( _seedData[origin][identifier].batch == 0 && _seedData[origin][identifier].randomnessId == 0, "RequestStorage::setRequest: request already set" ); _seedData[origin][identifier] = data; } function updateRequest( address origin, uint256 identifier, bytes32 randomnessId ) external onlyRole(WRITE_ROLE) { _seedData[origin][identifier].batch = 0; _seedData[origin][identifier].randomnessId = randomnessId; } function setBatchRequestId(uint256 batch, bytes32 requestId) external onlyRole(WRITE_ROLE) { require( _batchToReq[batch] == 0, "RequestStorage::updateBatchRequestId: id already set" ); _batchToReq[batch] = requestId; } }
// SPDX-License-Identifier: MIT /// @title RaidParty Seed Storage /** * ___ _ _ ___ _ * | _ \__ _(_)__| | _ \__ _ _ _| |_ _ _ * | / _` | / _` | _/ _` | '_| _| || | * |_|_\__,_|_\__,_|_| \__,_|_| \__|\_, | * |__/ */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; contract SeedStorage is AccessControlEnumerable { bytes32 public constant WRITE_ROLE = keccak256("WRITE_ROLE"); mapping(bytes32 => uint256) private _randomness; constructor(address admin) { _setupRole(DEFAULT_ADMIN_ROLE, admin); _setupRole(WRITE_ROLE, admin); } function getRandomness(bytes32 key) external view returns (uint256) { return _randomness[key]; } function setRandomness(bytes32 key, uint256 value) external onlyRole(WRITE_ROLE) { require( _randomness[key] == 0, "SeedStorage::setRandomness: value already set at id" ); _randomness[key] = value; } }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 1000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"address","name":"link","type":"address"},{"internalType":"address","name":"coordinator","type":"address"},{"internalType":"bytes32","name":"keyHash","type":"bytes32"},{"internalType":"uint256","name":"batch","type":"uint256"},{"internalType":"address","name":"seederv1","type":"address"},{"internalType":"address","name":"seedStorage","type":"address"},{"internalType":"address","name":"requestStorage","type":"address"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"uint256","name":"batchCadence","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"origin","type":"address"},{"indexed":true,"internalType":"uint256","name":"identifier","type":"uint256"}],"name":"Requested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"identifier","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"Seeded","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INTERNAL_CALLER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"origin","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"}],"name":"executeRequest","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"executeRequestMulti","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getBatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"origin","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"}],"name":"getData","outputs":[{"components":[{"internalType":"uint256","name":"batch","type":"uint256"},{"internalType":"bytes32","name":"randomnessId","type":"bytes32"}],"internalType":"struct Randomness.SeedData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"randomnessId","type":"bytes32"},{"internalType":"address","name":"origin","type":"address"},{"internalType":"uint256","name":"startIdx","type":"uint256"}],"name":"getIdReferenceCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"randomnessId","type":"bytes32"},{"internalType":"address","name":"origin","type":"address"},{"internalType":"uint256","name":"startIdx","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"getIdentifiers","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextAvailableBatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"batch","type":"uint256"}],"name":"getReqByBatch","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"origin","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"}],"name":"getSeed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"origin","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"}],"name":"getSeedSafe","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSubscriptionId","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"origin","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"}],"name":"isSeeded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"identifier","type":"uint256"}],"name":"requestSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"batchCadence","type":"uint256"}],"name":"setBatchCadence","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"subscriptionId","type":"uint64"}],"name":"setSubscriptionId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101606040523480156200001257600080fd5b506040516200328b3803806200328b8339810160408190526200003591620002bb565b6001600160a01b03881660805285620000945760405162461bcd60e51b815260206004820152601f60248201527f53656564657256323a20496e76616c696420696e697469616c20626174636800604482015260640160405180910390fd5b620000a160008362000139565b620000cd7fe8dded5728677640466e7896edff34f8ce3b97886ddf76f85f4bfa57aa02f3ae8362000139565b6001600160a01b0397881660a05297871660c0525060e094909452600680546001600160401b0319166001600160401b039890981697909717909655600591909155600493909355918116610100529182166101205216610140526608e1bc9bf040006002556200037c565b62000145828262000149565b5050565b6200016082826200018c60201b620020b61760201c565b600082815260016020908152604090912062000187918390620021546200022c821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000145576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001e83390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000243836001600160a01b0384166200024c565b90505b92915050565b6000818152600183016020526040812054620002955750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000246565b50600062000246565b80516001600160a01b0381168114620002b657600080fd5b919050565b6000806000806000806000806000806101408b8d031215620002dc57600080fd5b8a516001600160401b0381168114620002f457600080fd5b99506200030460208c016200029e565b98506200031460408c016200029e565b975060608b0151965060808b015195506200033260a08c016200029e565b94506200034260c08c016200029e565b93506200035260e08c016200029e565b9250620003636101008c016200029e565b91506101208b015190509295989b9194979a5092959850565b60805160a05160c05160e051610100516101205161014051612e086200048360003960008181610ad001528181610d1a01528181610e0d01528181610eb001528181610fda0152818161129b015281816114b8015281816117d10152818161189301528181611b1d01528181611c1001528181611e8c01528181611f7f01526123a9015260008181610c5501528181610cf001528181611a5801528181611af301528181611dc701528181611e6201526121d201526000818161070c01528181610bb3015281816119b80152611d640152600081816109d301526116c201526000505060008181610a25015261171301526000818161060f015261066a0152612e086000f3fe6080604052600436106101c25760003560e01c80637ad2ae14116100f7578063c345288311610095578063de3d9fb711610064578063de3d9fb714610537578063ea17bb1c14610560578063ea7b4f7714610580578063ff5bf7f9146105a057600080fd5b8063c3452883146104c2578063ca15c873146104e2578063ced72f8714610502578063d547741f1461051757600080fd5b8063a217fddf116100d1578063a217fddf14610446578063a9df851a1461045b578063afbe61131461047b578063b4c89d6b1461048e57600080fd5b80637ad2ae141461039d5780639010d07c146103ca57806391d148541461040257600080fd5b80633b1fee6c116101645780634eb6ff861161013e5780634eb6ff86146103285780634ff069641461033d578063591c0e1c1461035d57806369fe0e2d1461037d57600080fd5b80633b1fee6c146102e95780633c099fce146102fe5780633ccfd60b1461031357600080fd5b80632979d025116101a05780632979d0251461025c5780632f2ff15d1461028957806336568abe146102a957806337ed6e6f146102c957600080fd5b806301ffc9a7146101c75780631fe543e3146101fc578063248a9ca31461021e575b600080fd5b3480156101d357600080fd5b506101e76101e23660046128cc565b6105c0565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b5061021c61021736600461293d565b610604565b005b34801561022a57600080fd5b5061024e6102393660046129ef565b60009081526020819052604090206001015490565b6040519081526020016101f3565b34801561026857600080fd5b5061027c610277366004612a24565b6106aa565b6040516101f39190612a4e565b34801561029557600080fd5b5061021c6102a4366004612a65565b61078e565b3480156102b557600080fd5b5061021c6102c4366004612a65565b6107b9565b3480156102d557600080fd5b5061021c6102e43660046129ef565b610841565b3480156102f557600080fd5b5060055461024e565b34801561030a57600080fd5b5061024e610853565b34801561031f57600080fd5b5061021c61086a565b34801561033457600080fd5b5061021c610936565b34801561034957600080fd5b506101e7610358366004612a24565b610b4c565b34801561036957600080fd5b5061024e6103783660046129ef565b610e97565b34801561038957600080fd5b5061021c6103983660046129ef565b610f23565b3480156103a957600080fd5b506103bd6103b8366004612a91565b610f35565b6040516101f39190612acc565b3480156103d657600080fd5b506103ea6103e5366004612b10565b61110f565b6040516001600160a01b0390911681526020016101f3565b34801561040e57600080fd5b506101e761041d366004612a65565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561045257600080fd5b5061024e600081565b34801561046757600080fd5b5061021c6104763660046129ef565b611127565b61021c610489366004612a24565b611337565b34801561049a57600080fd5b5061024e7fe8dded5728677640466e7896edff34f8ce3b97886ddf76f85f4bfa57aa02f3ae81565b3480156104ce57600080fd5b5061024e6104dd366004612b32565b611835565b3480156104ee57600080fd5b5061024e6104fd3660046129ef565b61192b565b34801561050e57600080fd5b5060025461024e565b34801561052357600080fd5b5061021c610532366004612a65565b611942565b34801561054357600080fd5b5060065460405167ffffffffffffffff90911681526020016101f3565b34801561056c57600080fd5b5061024e61057b366004612a24565b611968565b34801561058c57600080fd5b5061021c61059b366004612b67565b611ce3565b3480156105ac57600080fd5b5061024e6105bb366004612a24565b611d14565b60006001600160e01b031982167f5a05180f0000000000000000000000000000000000000000000000000000000014806105fe57506105fe82612169565b92915050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461069c576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660248201526044015b60405180910390fd5b6106a682826121d0565b5050565b60408051808201909152600080825260208201526106c883836122d9565b1561077d576040517f2979d0250000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490527f00000000000000000000000000000000000000000000000000000000000000001690632979d025906044016040805180830381865afa158015610752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190612b91565b90506105fe565b6107878383612358565b9392505050565b6000828152602081905260409020600101546107aa8133612413565b6107b48383612491565b505050565b6001600160a01b03811633146108375760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610693565b6106a682826124b3565b600061084d8133612413565b50600455565b60006004546003546108659190612bf6565b905090565b60006108768133612413565b6040514790600090339083908381818185875af1925050503d80600081146108ba576040519150601f19603f3d011682016040523d82523d6000602084013e6108bf565b606091505b50509050806107b45760405162461bcd60e51b815260206004820152602860248201527f53656564657256323a3a77697468647261773a204661696c656420746f20736560448201527f6e642045746865720000000000000000000000000000000000000000000000006064820152608401610693565b426004546003546109479190612bf6565b11156109bb5760405162461bcd60e51b815260206004820152603560248201527f5365656465723a3a65786563757465526571756573744d756c74693a2042617460448201527f636820636164656e6365206e6f742070617373656400000000000000000000006064820152608401610693565b4260039081556006546040516305d3b1d360e41b81527f0000000000000000000000000000000000000000000000000000000000000000600482015267ffffffffffffffff90911660248201526044810191909152620186a06064820152600160848201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015610a76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9a9190612c0e565b6005546040517f472bd6750000000000000000000000000000000000000000000000000000000081529192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163472bd67591610b0e918590600401918252602082015260400190565b600060405180830381600087803b158015610b2857600080fd5b505af1158015610b3c573d6000803e3d6000fd5b5050600580546001019055505050565b60408051808201909152600080825260208201819052906000610b6f85856122d9565b15610c27576040517f4ff069640000000000000000000000000000000000000000000000000000000081526001600160a01b038681166004830152602482018690527f00000000000000000000000000000000000000000000000000000000000000001690634ff0696490604401602060405180830381865afa158015610bfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1e9190612c27565b925050506105fe565b610c318585612358565b91508151610ccf5760208201516040516302d8ca0160e11b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906305b1940290602401602060405180830381865afa158015610ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc89190612c0e565b9050610de7565b81516040516302d2c61560e41b815260048101919091526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116916305b19402917f00000000000000000000000000000000000000000000000000000000000000001690632d2c615090602401602060405180830381865afa158015610d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d859190612c0e565b6040518263ffffffff1660e01b8152600401610da391815260200190565b602060405180830381865afa158015610dc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de49190612c0e565b90505b6020820151151580610e83575081516040516302d2c61560e41b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632d2c615090602401602060405180830381865afa158015610e5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e809190612c0e565b15155b8015610e8e57508015155b95945050505050565b6040516302d2c61560e41b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632d2c615090602401602060405180830381865afa158015610eff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fe9190612c0e565b6000610f2f8133612413565b50600255565b606060008267ffffffffffffffff811115610f5257610f526128f6565b604051908082528060200260200182016040528015610f7b578160200160208202803683370190505b5060408051808201909152600080825260208201529091508460005b610fa18883610b4c565b1561109957610fb08883612358565b92508883602001511480611054575082516040516302d2c61560e41b81528a916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691632d2c6150916110119160040190815260200190565b602060405180830381865afa15801561102e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110529190612c0e565b145b1561108e578184828151811061106c5761106c612c49565b60209081029190910101526001018581141561108e5783945050505050611107565b600182019150610f97565b60405162461bcd60e51b815260206004820152602660248201527f5365656465723a3a6765744964656e746966696572733a20636f756e74206d6960448201527f736d6174636800000000000000000000000000000000000000000000000000006064820152608401610693565b949350505050565b600082815260016020526040812061078790836124d5565b7fe8dded5728677640466e7896edff34f8ce3b97886ddf76f85f4bfa57aa02f3ae6111528133612413565b600061115e3384612358565b602081015190915015801561117257508051155b6111e45760405162461bcd60e51b815260206004820152602c60248201527f5365656465723a3a67656e6572617465536565643a205365656420616c72656160448201527f64792072657175657374656400000000000000000000000000000000000000006064820152608401610693565b826112575760405162461bcd60e51b815260206004820152602c60248201527f5365656465723a3a67656e6572617465536565643a204964656e74696669657260448201527f2063616e6e6f74206265203000000000000000000000000000000000000000006064820152608401610693565b60408051808201825260055481526000602082015290517fb6be63940000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163b6be6394916112d3913391889190600401612c5f565b600060405180830381600087803b1580156112ed57600080fd5b505af1158015611301573d6000803e3d6000fd5b50506040518592503391507f189155e729161d41c9756b8f023ae2bcb16166eb447c05edd79b57f5c29f19e390600090a3505050565b61134182826122d9565b156113da5760405162461bcd60e51b815260206004820152604b60248201527f5365656465723a3a65786563757465526571756573743a205072652d6d69677260448201527f6174696f6e207265717565737473206d6179206e6f74206265206d616e75616c60648201527f6c79206578656375746564000000000000000000000000000000000000000000608482015260a401610693565b60006113e68383612358565b9050426004546003546113f99190612bf6565b116114925760405162461bcd60e51b815260206004820152604560248201527f5365656465723a3a65786563757465526571756573743a2043616e6e6f74207360448201527f65656420696e646976696475616c6c7920647572696e6720626174636820736560648201527f6564696e67000000000000000000000000000000000000000000000000000000608482015260a401610693565b602081015115801561152d575080516040516302d2c61560e41b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632d2c615090602401602060405180830381865afa158015611507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152b9190612c0e565b155b61159f5760405162461bcd60e51b815260206004820152602e60248201527f5365656465723a3a65786563757465526571756573743a205365656420616c7260448201527f656164792067656e6572617465640000000000000000000000000000000000006064820152608401610693565b80516116135760405162461bcd60e51b815260206004820152602e60248201527f5365656465723a3a65786563757465526571756573743a2053656564206e6f7460448201527f20796574207265717565737465640000000000000000000000000000000000006064820152608401610693565b60025434146116b05760405162461bcd60e51b815260206004820152604560248201527f5365656465723a3a65786563757465526571756573743a205472616e7361637460448201527f696f6e2076616c756520646f6573206e6f74206d61746368206578706563746560648201527f6420666565000000000000000000000000000000000000000000000000000000608482015260a401610693565b6006546040516305d3b1d360e41b81527f0000000000000000000000000000000000000000000000000000000000000000600482015267ffffffffffffffff909116602482015260036044820152620186a06064820152600160848201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015611764573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117889190612c0e565b6040517f19980ae60000000000000000000000000000000000000000000000000000000081526001600160a01b03868116600483015260248201869052604482018390529192507f0000000000000000000000000000000000000000000000000000000000000000909116906319980ae690606401600060405180830381600087803b15801561181757600080fd5b505af115801561182b573d6000803e3d6000fd5b5050505050505050565b60408051808201909152600080825260208201819052908260005b61185a8683610b4c565b15611921576118698683612358565b9250868360200151148061190d575082516040516302d2c61560e41b815288916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691632d2c6150916118ca9160040190815260200190565b602060405180830381865afa1580156118e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190b9190612c0e565b145b15611916576001015b600182019150611850565b9695505050505050565b60008181526001602052604081206105fe906124e1565b60008281526020819052604090206001015461195e8133612413565b6107b483836124b3565b600061197483836122d9565b15611a24576040517fea17bb1c0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063ea17bb1c906044015b602060405180830381865afa158015611a00573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190612c0e565b6000611a308484612358565b8051909150600090611ad25760208201516040516302d8ca0160e11b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906305b1940290602401602060405180830381865afa158015611aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611acb9190612c0e565b9050611bea565b81516040516302d2c61560e41b815260048101919091526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116916305b19402917f00000000000000000000000000000000000000000000000000000000000000001690632d2c615090602401602060405180830381865afa158015611b64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b889190612c0e565b6040518263ffffffff1660e01b8152600401611ba691815260200190565b602060405180830381865afa158015611bc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be79190612c0e565b90505b6020820151158015611c85575081516040516302d2c61560e41b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632d2c615090602401602060405180830381865afa158015611c5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c839190612c0e565b155b80611c8e575080155b15611c9e576000925050506105fe565b604080516001600160a01b0387166020820152908101859052606081018290526080016040516020818303038152906040528051906020012060001c925050506105fe565b6000611cef8133612413565b506006805467ffffffffffffffff191667ffffffffffffffff92909216919091179055565b6000611d2083836122d9565b15611d93576040517fff5bf7f90000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063ff5bf7f9906044016119e3565b6000611d9f8484612358565b8051909150600090611e415760208201516040516302d8ca0160e11b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906305b1940290602401602060405180830381865afa158015611e16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3a9190612c0e565b9050611f59565b81516040516302d2c61560e41b815260048101919091526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116916305b19402917f00000000000000000000000000000000000000000000000000000000000000001690632d2c615090602401602060405180830381865afa158015611ed3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef79190612c0e565b6040518263ffffffff1660e01b8152600401611f1591815260200190565b602060405180830381865afa158015611f32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f569190612c0e565b90505b6020820151151580611ff5575081516040516302d2c61560e41b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632d2c615090602401602060405180830381865afa158015611fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff29190612c0e565b15155b801561200057508015155b6120725760405162461bcd60e51b815260206004820152602560248201527f5365656465723a3a67657453656564536166653a20676f7420302076616c756560448201527f20736565640000000000000000000000000000000000000000000000000000006064820152608401610693565b604080516001600160a01b03871660208201529081018590526060810182905260800160408051601f19818403018152919052805160209091012095945050505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166106a6576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556121103390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610787836001600160a01b0384166124eb565b60006001600160e01b031982167f7965db0b0000000000000000000000000000000000000000000000000000000014806105fe57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146105fe565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663113d49f88360001b8360008151811061221657612216612c49565b60200260200101516040518363ffffffff1660e01b8152600401612244929190918252602082015260400190565b600060405180830381600087803b15801561225e57600080fd5b505af1158015612272573d6000803e3d6000fd5b505050507f6d4b4a1164728d1f0da29720fe5dacc0090f960127d964cb532dfb89eaf420148260001b826000815181106122ae576122ae612c49565b60200260200101516040516122cd929190918252602082015260400190565b60405180910390a15050565b60006001600160a01b03831673966731dfd9b9925dd105ff465687f5aa8f54ee9f14801561230957506114d98211155b80156123155750600082115b8061078757506001600160a01b0383167387e738a3d5e5345d6212d8982205a564289e632414801561234957506123ab8211155b80156107875750501515919050565b6040805180820182526000808252602082015290517f726d0a280000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063726d0a28906044016040805180830381865afa1580156123ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190612b91565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166106a65761244f816001600160a01b0316601461253a565b61245a83602061253a565b60405160200161246b929190612cbb565b60408051601f198184030181529082905262461bcd60e51b825261069391600401612d3c565b61249b82826120b6565b60008281526001602052604090206107b49082612154565b6124bd828261271b565b60008281526001602052604090206107b4908261279a565b600061078783836127af565b60006105fe825490565b6000818152600183016020526040812054612532575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105fe565b5060006105fe565b60606000612549836002612d6f565b612554906002612bf6565b67ffffffffffffffff81111561256c5761256c6128f6565b6040519080825280601f01601f191660200182016040528015612596576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106125cd576125cd612c49565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061261857612618612c49565b60200101906001600160f81b031916908160001a905350600061263c846002612d6f565b612647906001612bf6565b90505b60018111156126cc577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061268857612688612c49565b1a60f81b82828151811061269e5761269e612c49565b60200101906001600160f81b031916908160001a90535060049490941c936126c581612d8e565b905061264a565b5083156107875760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610693565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16156106a6576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610787836001600160a01b0384166127d9565b60008260000182815481106127c6576127c6612c49565b9060005260206000200154905092915050565b600081815260018301602052604081205480156128c25760006127fd600183612da5565b855490915060009061281190600190612da5565b905081811461287657600086600001828154811061283157612831612c49565b906000526020600020015490508087600001848154811061285457612854612c49565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061288757612887612dbc565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105fe565b60009150506105fe565b6000602082840312156128de57600080fd5b81356001600160e01b03198116811461078757600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612935576129356128f6565b604052919050565b6000806040838503121561295057600080fd5b8235915060208084013567ffffffffffffffff8082111561297057600080fd5b818601915086601f83011261298457600080fd5b813581811115612996576129966128f6565b8060051b91506129a784830161290c565b81815291830184019184810190898411156129c157600080fd5b938501935b838510156129df578435825293850193908501906129c6565b8096505050505050509250929050565b600060208284031215612a0157600080fd5b5035919050565b80356001600160a01b0381168114612a1f57600080fd5b919050565b60008060408385031215612a3757600080fd5b612a4083612a08565b946020939093013593505050565b8151815260208083015190820152604081016105fe565b60008060408385031215612a7857600080fd5b82359150612a8860208401612a08565b90509250929050565b60008060008060808587031215612aa757600080fd5b84359350612ab760208601612a08565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b81811015612b0457835183529284019291840191600101612ae8565b50909695505050505050565b60008060408385031215612b2357600080fd5b50508035926020909101359150565b600080600060608486031215612b4757600080fd5b83359250612b5760208501612a08565b9150604084013590509250925092565b600060208284031215612b7957600080fd5b813567ffffffffffffffff8116811461078757600080fd5b600060408284031215612ba357600080fd5b6040516040810181811067ffffffffffffffff82111715612bc657612bc66128f6565b604052825181526020928301519281019290925250919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115612c0957612c09612be0565b500190565b600060208284031215612c2057600080fd5b5051919050565b600060208284031215612c3957600080fd5b8151801515811461078757600080fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0384168152602080820184905282516040830152820151606082015260808101611107565b60005b83811015612ca6578181015183820152602001612c8e565b83811115612cb5576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612cf3816017850160208801612c8b565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612d30816028840160208801612c8b565b01602801949350505050565b6020815260008251806020840152612d5b816040850160208701612c8b565b601f01601f19169190910160400192915050565b6000816000190483118215151615612d8957612d89612be0565b500290565b600081612d9d57612d9d612be0565b506000190190565b600082821015612db757612db7612be0565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208cb5080448290d9dfc286182fccb8371b0db8b15f4ee4aa911112ce17013b8dd64736f6c634300080b00330000000000000000000000000000000000000000000000000000000000000008000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699098af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef00000000000000000000000000000000000000000000000000000000000000030000000000000000000000004da977642f783bbce82af502310c5626a2c9296a000000000000000000000000fc8f72ac252d5409ba427629f0f1bab113a7492f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c57000000000000000000000000cf2d2da4c2f9b0675a197febc6708704834f9c240000000000000000000000000000000000000000000000000000000000000e10
Deployed Bytecode
0x6080604052600436106101c25760003560e01c80637ad2ae14116100f7578063c345288311610095578063de3d9fb711610064578063de3d9fb714610537578063ea17bb1c14610560578063ea7b4f7714610580578063ff5bf7f9146105a057600080fd5b8063c3452883146104c2578063ca15c873146104e2578063ced72f8714610502578063d547741f1461051757600080fd5b8063a217fddf116100d1578063a217fddf14610446578063a9df851a1461045b578063afbe61131461047b578063b4c89d6b1461048e57600080fd5b80637ad2ae141461039d5780639010d07c146103ca57806391d148541461040257600080fd5b80633b1fee6c116101645780634eb6ff861161013e5780634eb6ff86146103285780634ff069641461033d578063591c0e1c1461035d57806369fe0e2d1461037d57600080fd5b80633b1fee6c146102e95780633c099fce146102fe5780633ccfd60b1461031357600080fd5b80632979d025116101a05780632979d0251461025c5780632f2ff15d1461028957806336568abe146102a957806337ed6e6f146102c957600080fd5b806301ffc9a7146101c75780631fe543e3146101fc578063248a9ca31461021e575b600080fd5b3480156101d357600080fd5b506101e76101e23660046128cc565b6105c0565b60405190151581526020015b60405180910390f35b34801561020857600080fd5b5061021c61021736600461293d565b610604565b005b34801561022a57600080fd5b5061024e6102393660046129ef565b60009081526020819052604090206001015490565b6040519081526020016101f3565b34801561026857600080fd5b5061027c610277366004612a24565b6106aa565b6040516101f39190612a4e565b34801561029557600080fd5b5061021c6102a4366004612a65565b61078e565b3480156102b557600080fd5b5061021c6102c4366004612a65565b6107b9565b3480156102d557600080fd5b5061021c6102e43660046129ef565b610841565b3480156102f557600080fd5b5060055461024e565b34801561030a57600080fd5b5061024e610853565b34801561031f57600080fd5b5061021c61086a565b34801561033457600080fd5b5061021c610936565b34801561034957600080fd5b506101e7610358366004612a24565b610b4c565b34801561036957600080fd5b5061024e6103783660046129ef565b610e97565b34801561038957600080fd5b5061021c6103983660046129ef565b610f23565b3480156103a957600080fd5b506103bd6103b8366004612a91565b610f35565b6040516101f39190612acc565b3480156103d657600080fd5b506103ea6103e5366004612b10565b61110f565b6040516001600160a01b0390911681526020016101f3565b34801561040e57600080fd5b506101e761041d366004612a65565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561045257600080fd5b5061024e600081565b34801561046757600080fd5b5061021c6104763660046129ef565b611127565b61021c610489366004612a24565b611337565b34801561049a57600080fd5b5061024e7fe8dded5728677640466e7896edff34f8ce3b97886ddf76f85f4bfa57aa02f3ae81565b3480156104ce57600080fd5b5061024e6104dd366004612b32565b611835565b3480156104ee57600080fd5b5061024e6104fd3660046129ef565b61192b565b34801561050e57600080fd5b5060025461024e565b34801561052357600080fd5b5061021c610532366004612a65565b611942565b34801561054357600080fd5b5060065460405167ffffffffffffffff90911681526020016101f3565b34801561056c57600080fd5b5061024e61057b366004612a24565b611968565b34801561058c57600080fd5b5061021c61059b366004612b67565b611ce3565b3480156105ac57600080fd5b5061024e6105bb366004612a24565b611d14565b60006001600160e01b031982167f5a05180f0000000000000000000000000000000000000000000000000000000014806105fe57506105fe82612169565b92915050565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909161461069c576040517f1cf993f40000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091660248201526044015b60405180910390fd5b6106a682826121d0565b5050565b60408051808201909152600080825260208201526106c883836122d9565b1561077d576040517f2979d0250000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490527f0000000000000000000000004da977642f783bbce82af502310c5626a2c9296a1690632979d025906044016040805180830381865afa158015610752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190612b91565b90506105fe565b6107878383612358565b9392505050565b6000828152602081905260409020600101546107aa8133612413565b6107b48383612491565b505050565b6001600160a01b03811633146108375760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610693565b6106a682826124b3565b600061084d8133612413565b50600455565b60006004546003546108659190612bf6565b905090565b60006108768133612413565b6040514790600090339083908381818185875af1925050503d80600081146108ba576040519150601f19603f3d011682016040523d82523d6000602084013e6108bf565b606091505b50509050806107b45760405162461bcd60e51b815260206004820152602860248201527f53656564657256323a3a77697468647261773a204661696c656420746f20736560448201527f6e642045746865720000000000000000000000000000000000000000000000006064820152608401610693565b426004546003546109479190612bf6565b11156109bb5760405162461bcd60e51b815260206004820152603560248201527f5365656465723a3a65786563757465526571756573744d756c74693a2042617460448201527f636820636164656e6365206e6f742070617373656400000000000000000000006064820152608401610693565b4260039081556006546040516305d3b1d360e41b81527f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef600482015267ffffffffffffffff90911660248201526044810191909152620186a06064820152600160848201526000907f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015610a76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9a9190612c0e565b6005546040517f472bd6750000000000000000000000000000000000000000000000000000000081529192506001600160a01b037f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c57169163472bd67591610b0e918590600401918252602082015260400190565b600060405180830381600087803b158015610b2857600080fd5b505af1158015610b3c573d6000803e3d6000fd5b5050600580546001019055505050565b60408051808201909152600080825260208201819052906000610b6f85856122d9565b15610c27576040517f4ff069640000000000000000000000000000000000000000000000000000000081526001600160a01b038681166004830152602482018690527f0000000000000000000000004da977642f783bbce82af502310c5626a2c9296a1690634ff0696490604401602060405180830381865afa158015610bfa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1e9190612c27565b925050506105fe565b610c318585612358565b91508151610ccf5760208201516040516302d8ca0160e11b815260048101919091527f000000000000000000000000fc8f72ac252d5409ba427629f0f1bab113a7492f6001600160a01b0316906305b1940290602401602060405180830381865afa158015610ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc89190612c0e565b9050610de7565b81516040516302d2c61560e41b815260048101919091526001600160a01b037f000000000000000000000000fc8f72ac252d5409ba427629f0f1bab113a7492f8116916305b19402917f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c571690632d2c615090602401602060405180830381865afa158015610d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d859190612c0e565b6040518263ffffffff1660e01b8152600401610da391815260200190565b602060405180830381865afa158015610dc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de49190612c0e565b90505b6020820151151580610e83575081516040516302d2c61560e41b815260048101919091527f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c576001600160a01b031690632d2c615090602401602060405180830381865afa158015610e5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e809190612c0e565b15155b8015610e8e57508015155b95945050505050565b6040516302d2c61560e41b8152600481018290526000907f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c576001600160a01b031690632d2c615090602401602060405180830381865afa158015610eff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fe9190612c0e565b6000610f2f8133612413565b50600255565b606060008267ffffffffffffffff811115610f5257610f526128f6565b604051908082528060200260200182016040528015610f7b578160200160208202803683370190505b5060408051808201909152600080825260208201529091508460005b610fa18883610b4c565b1561109957610fb08883612358565b92508883602001511480611054575082516040516302d2c61560e41b81528a916001600160a01b037f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c571691632d2c6150916110119160040190815260200190565b602060405180830381865afa15801561102e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110529190612c0e565b145b1561108e578184828151811061106c5761106c612c49565b60209081029190910101526001018581141561108e5783945050505050611107565b600182019150610f97565b60405162461bcd60e51b815260206004820152602660248201527f5365656465723a3a6765744964656e746966696572733a20636f756e74206d6960448201527f736d6174636800000000000000000000000000000000000000000000000000006064820152608401610693565b949350505050565b600082815260016020526040812061078790836124d5565b7fe8dded5728677640466e7896edff34f8ce3b97886ddf76f85f4bfa57aa02f3ae6111528133612413565b600061115e3384612358565b602081015190915015801561117257508051155b6111e45760405162461bcd60e51b815260206004820152602c60248201527f5365656465723a3a67656e6572617465536565643a205365656420616c72656160448201527f64792072657175657374656400000000000000000000000000000000000000006064820152608401610693565b826112575760405162461bcd60e51b815260206004820152602c60248201527f5365656465723a3a67656e6572617465536565643a204964656e74696669657260448201527f2063616e6e6f74206265203000000000000000000000000000000000000000006064820152608401610693565b60408051808201825260055481526000602082015290517fb6be63940000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c57169163b6be6394916112d3913391889190600401612c5f565b600060405180830381600087803b1580156112ed57600080fd5b505af1158015611301573d6000803e3d6000fd5b50506040518592503391507f189155e729161d41c9756b8f023ae2bcb16166eb447c05edd79b57f5c29f19e390600090a3505050565b61134182826122d9565b156113da5760405162461bcd60e51b815260206004820152604b60248201527f5365656465723a3a65786563757465526571756573743a205072652d6d69677260448201527f6174696f6e207265717565737473206d6179206e6f74206265206d616e75616c60648201527f6c79206578656375746564000000000000000000000000000000000000000000608482015260a401610693565b60006113e68383612358565b9050426004546003546113f99190612bf6565b116114925760405162461bcd60e51b815260206004820152604560248201527f5365656465723a3a65786563757465526571756573743a2043616e6e6f74207360448201527f65656420696e646976696475616c6c7920647572696e6720626174636820736560648201527f6564696e67000000000000000000000000000000000000000000000000000000608482015260a401610693565b602081015115801561152d575080516040516302d2c61560e41b815260048101919091527f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c576001600160a01b031690632d2c615090602401602060405180830381865afa158015611507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152b9190612c0e565b155b61159f5760405162461bcd60e51b815260206004820152602e60248201527f5365656465723a3a65786563757465526571756573743a205365656420616c7260448201527f656164792067656e6572617465640000000000000000000000000000000000006064820152608401610693565b80516116135760405162461bcd60e51b815260206004820152602e60248201527f5365656465723a3a65786563757465526571756573743a2053656564206e6f7460448201527f20796574207265717565737465640000000000000000000000000000000000006064820152608401610693565b60025434146116b05760405162461bcd60e51b815260206004820152604560248201527f5365656465723a3a65786563757465526571756573743a205472616e7361637460448201527f696f6e2076616c756520646f6573206e6f74206d61746368206578706563746560648201527f6420666565000000000000000000000000000000000000000000000000000000608482015260a401610693565b6006546040516305d3b1d360e41b81527f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef600482015267ffffffffffffffff909116602482015260036044820152620186a06064820152600160848201526000907f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015611764573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117889190612c0e565b6040517f19980ae60000000000000000000000000000000000000000000000000000000081526001600160a01b03868116600483015260248201869052604482018390529192507f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c57909116906319980ae690606401600060405180830381600087803b15801561181757600080fd5b505af115801561182b573d6000803e3d6000fd5b5050505050505050565b60408051808201909152600080825260208201819052908260005b61185a8683610b4c565b15611921576118698683612358565b9250868360200151148061190d575082516040516302d2c61560e41b815288916001600160a01b037f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c571691632d2c6150916118ca9160040190815260200190565b602060405180830381865afa1580156118e7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061190b9190612c0e565b145b15611916576001015b600182019150611850565b9695505050505050565b60008181526001602052604081206105fe906124e1565b60008281526020819052604090206001015461195e8133612413565b6107b483836124b3565b600061197483836122d9565b15611a24576040517fea17bb1c0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490527f0000000000000000000000004da977642f783bbce82af502310c5626a2c9296a169063ea17bb1c906044015b602060405180830381865afa158015611a00573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190612c0e565b6000611a308484612358565b8051909150600090611ad25760208201516040516302d8ca0160e11b815260048101919091527f000000000000000000000000fc8f72ac252d5409ba427629f0f1bab113a7492f6001600160a01b0316906305b1940290602401602060405180830381865afa158015611aa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611acb9190612c0e565b9050611bea565b81516040516302d2c61560e41b815260048101919091526001600160a01b037f000000000000000000000000fc8f72ac252d5409ba427629f0f1bab113a7492f8116916305b19402917f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c571690632d2c615090602401602060405180830381865afa158015611b64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b889190612c0e565b6040518263ffffffff1660e01b8152600401611ba691815260200190565b602060405180830381865afa158015611bc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be79190612c0e565b90505b6020820151158015611c85575081516040516302d2c61560e41b815260048101919091527f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c576001600160a01b031690632d2c615090602401602060405180830381865afa158015611c5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c839190612c0e565b155b80611c8e575080155b15611c9e576000925050506105fe565b604080516001600160a01b0387166020820152908101859052606081018290526080016040516020818303038152906040528051906020012060001c925050506105fe565b6000611cef8133612413565b506006805467ffffffffffffffff191667ffffffffffffffff92909216919091179055565b6000611d2083836122d9565b15611d93576040517fff5bf7f90000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490527f0000000000000000000000004da977642f783bbce82af502310c5626a2c9296a169063ff5bf7f9906044016119e3565b6000611d9f8484612358565b8051909150600090611e415760208201516040516302d8ca0160e11b815260048101919091527f000000000000000000000000fc8f72ac252d5409ba427629f0f1bab113a7492f6001600160a01b0316906305b1940290602401602060405180830381865afa158015611e16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e3a9190612c0e565b9050611f59565b81516040516302d2c61560e41b815260048101919091526001600160a01b037f000000000000000000000000fc8f72ac252d5409ba427629f0f1bab113a7492f8116916305b19402917f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c571690632d2c615090602401602060405180830381865afa158015611ed3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef79190612c0e565b6040518263ffffffff1660e01b8152600401611f1591815260200190565b602060405180830381865afa158015611f32573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f569190612c0e565b90505b6020820151151580611ff5575081516040516302d2c61560e41b815260048101919091527f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c576001600160a01b031690632d2c615090602401602060405180830381865afa158015611fce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff29190612c0e565b15155b801561200057508015155b6120725760405162461bcd60e51b815260206004820152602560248201527f5365656465723a3a67657453656564536166653a20676f7420302076616c756560448201527f20736565640000000000000000000000000000000000000000000000000000006064820152608401610693565b604080516001600160a01b03871660208201529081018590526060810182905260800160408051601f19818403018152919052805160209091012095945050505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166106a6576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556121103390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610787836001600160a01b0384166124eb565b60006001600160e01b031982167f7965db0b0000000000000000000000000000000000000000000000000000000014806105fe57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146105fe565b7f000000000000000000000000fc8f72ac252d5409ba427629f0f1bab113a7492f6001600160a01b031663113d49f88360001b8360008151811061221657612216612c49565b60200260200101516040518363ffffffff1660e01b8152600401612244929190918252602082015260400190565b600060405180830381600087803b15801561225e57600080fd5b505af1158015612272573d6000803e3d6000fd5b505050507f6d4b4a1164728d1f0da29720fe5dacc0090f960127d964cb532dfb89eaf420148260001b826000815181106122ae576122ae612c49565b60200260200101516040516122cd929190918252602082015260400190565b60405180910390a15050565b60006001600160a01b03831673966731dfd9b9925dd105ff465687f5aa8f54ee9f14801561230957506114d98211155b80156123155750600082115b8061078757506001600160a01b0383167387e738a3d5e5345d6212d8982205a564289e632414801561234957506123ab8211155b80156107875750501515919050565b6040805180820182526000808252602082015290517f726d0a280000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152602482018490527f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c57169063726d0a28906044016040805180830381865afa1580156123ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107879190612b91565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166106a65761244f816001600160a01b0316601461253a565b61245a83602061253a565b60405160200161246b929190612cbb565b60408051601f198184030181529082905262461bcd60e51b825261069391600401612d3c565b61249b82826120b6565b60008281526001602052604090206107b49082612154565b6124bd828261271b565b60008281526001602052604090206107b4908261279a565b600061078783836127af565b60006105fe825490565b6000818152600183016020526040812054612532575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105fe565b5060006105fe565b60606000612549836002612d6f565b612554906002612bf6565b67ffffffffffffffff81111561256c5761256c6128f6565b6040519080825280601f01601f191660200182016040528015612596576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106125cd576125cd612c49565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061261857612618612c49565b60200101906001600160f81b031916908160001a905350600061263c846002612d6f565b612647906001612bf6565b90505b60018111156126cc577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061268857612688612c49565b1a60f81b82828151811061269e5761269e612c49565b60200101906001600160f81b031916908160001a90535060049490941c936126c581612d8e565b905061264a565b5083156107875760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610693565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16156106a6576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610787836001600160a01b0384166127d9565b60008260000182815481106127c6576127c6612c49565b9060005260206000200154905092915050565b600081815260018301602052604081205480156128c25760006127fd600183612da5565b855490915060009061281190600190612da5565b905081811461287657600086600001828154811061283157612831612c49565b906000526020600020015490508087600001848154811061285457612854612c49565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061288757612887612dbc565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105fe565b60009150506105fe565b6000602082840312156128de57600080fd5b81356001600160e01b03198116811461078757600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612935576129356128f6565b604052919050565b6000806040838503121561295057600080fd5b8235915060208084013567ffffffffffffffff8082111561297057600080fd5b818601915086601f83011261298457600080fd5b813581811115612996576129966128f6565b8060051b91506129a784830161290c565b81815291830184019184810190898411156129c157600080fd5b938501935b838510156129df578435825293850193908501906129c6565b8096505050505050509250929050565b600060208284031215612a0157600080fd5b5035919050565b80356001600160a01b0381168114612a1f57600080fd5b919050565b60008060408385031215612a3757600080fd5b612a4083612a08565b946020939093013593505050565b8151815260208083015190820152604081016105fe565b60008060408385031215612a7857600080fd5b82359150612a8860208401612a08565b90509250929050565b60008060008060808587031215612aa757600080fd5b84359350612ab760208601612a08565b93969395505050506040820135916060013590565b6020808252825182820181905260009190848201906040850190845b81811015612b0457835183529284019291840191600101612ae8565b50909695505050505050565b60008060408385031215612b2357600080fd5b50508035926020909101359150565b600080600060608486031215612b4757600080fd5b83359250612b5760208501612a08565b9150604084013590509250925092565b600060208284031215612b7957600080fd5b813567ffffffffffffffff8116811461078757600080fd5b600060408284031215612ba357600080fd5b6040516040810181811067ffffffffffffffff82111715612bc657612bc66128f6565b604052825181526020928301519281019290925250919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115612c0957612c09612be0565b500190565b600060208284031215612c2057600080fd5b5051919050565b600060208284031215612c3957600080fd5b8151801515811461078757600080fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b0384168152602080820184905282516040830152820151606082015260808101611107565b60005b83811015612ca6578181015183820152602001612c8e565b83811115612cb5576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612cf3816017850160208801612c8b565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612d30816028840160208801612c8b565b01602801949350505050565b6020815260008251806020840152612d5b816040850160208701612c8b565b601f01601f19169190910160400192915050565b6000816000190483118215151615612d8957612d89612be0565b500290565b600081612d9d57612d9d612be0565b506000190190565b600082821015612db757612db7612be0565b500390565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208cb5080448290d9dfc286182fccb8371b0db8b15f4ee4aa911112ce17013b8dd64736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000008000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699098af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef00000000000000000000000000000000000000000000000000000000000000030000000000000000000000004da977642f783bbce82af502310c5626a2c9296a000000000000000000000000fc8f72ac252d5409ba427629f0f1bab113a7492f000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c57000000000000000000000000cf2d2da4c2f9b0675a197febc6708704834f9c240000000000000000000000000000000000000000000000000000000000000e10
-----Decoded View---------------
Arg [0] : subscriptionId (uint64): 8
Arg [1] : link (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [2] : coordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [3] : keyHash (bytes32): 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
Arg [4] : batch (uint256): 3
Arg [5] : seederv1 (address): 0x4da977642f783bbCe82aF502310c5626A2c9296A
Arg [6] : seedStorage (address): 0xFc8f72Ac252d5409ba427629F0F1bab113a7492F
Arg [7] : requestStorage (address): 0xC3319dC5e1972bf03C59f9339B08c94083D63C57
Arg [8] : admin (address): 0xcF2D2dA4c2F9B0675A197FEbC6708704834f9c24
Arg [9] : batchCadence (uint256): 3600
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [1] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [2] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [3] : 8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [5] : 0000000000000000000000004da977642f783bbce82af502310c5626a2c9296a
Arg [6] : 000000000000000000000000fc8f72ac252d5409ba427629f0f1bab113a7492f
Arg [7] : 000000000000000000000000c3319dc5e1972bf03c59f9339b08c94083d63c57
Arg [8] : 000000000000000000000000cf2d2da4c2f9b0675a197febc6708704834f9c24
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000e10
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,435.12 | 0.02 | $68.7 |
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.