Source Code
Overview
APE Balance
APE Value
$0.00Multichain Info
N/A
Latest 1 from a total of 1 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Update Payment P... | 11239376 | 322 days ago | IN | 0 APE | 0.00083715 |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
DotsVRF
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./interfaces/IDotsVRFPayment.sol";
/**
* @title DotsVRF
* @notice VRF implementation using threshold cryptography
* and multi-party computation for secure random number generation
*/
contract DotsVRF is ReentrancyGuard, AccessControl, Pausable {
using ECDSA for bytes32;
using Counters for Counters.Counter;
// Roles
bytes32 public constant VALIDATOR_ROLE = keccak256("VALIDATOR_ROLE");
bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");
bytes32 public constant WHITELISTER_ROLE = keccak256("WHITELISTER_ROLE");
// Whitelist tracking
mapping(address => bool) public whitelistedContracts;
// Configurable parameters
uint256 public immutable THRESHOLD; // Minimum validators required
uint256 public immutable TOTAL_VALIDATORS; // Total number of validators
uint256 public immutable MIN_BLOCKS_DELAY; // Minimum blocks between commit and reveal
uint256 public immutable MAX_BLOCKS_DELAY; // Maximum blocks between commit and reveal
uint256 public immutable MAX_GAS_PRICE; // Maximum gas price for reveals
// Request tracking
Counters.Counter private _requestIdCounter;
struct RandomnessRequest {
uint256 requestId;
bytes32 seed;
uint256 blockNumber;
address requester;
bool fulfilled;
uint256 validSharesCount;
mapping(address => bool) hasCommitted;
mapping(address => bool) hasRevealed;
}
struct CommitmentShare {
bytes32 commitHash;
uint256 timestamp;
uint256 blockNumber;
}
struct RevealedShare {
uint256 value;
bytes signature;
}
// State mappings
mapping(uint256 => RandomnessRequest) public requests;
mapping(uint256 => mapping(address => CommitmentShare)) public commitments;
mapping(uint256 => mapping(address => RevealedShare)) public reveals;
mapping(uint256 => uint256) public randomResults;
// Validator tracking
address[] public validators;
mapping(address => uint256) public validatorIndices;
// Payment system
IDotsVRFPayment public paymentProcessor;
// Events
event PaymentProcessorUpdated(address indexed newPaymentProcessor);
event RandomnessRequested(
uint256 indexed requestId,
address indexed requester,
bytes32 seed
);
event CommitmentSubmitted(
uint256 indexed requestId,
address indexed validator,
bytes32 commitHash
);
event ShareRevealed(
uint256 indexed requestId,
address indexed validator,
uint256 value
);
event RandomnessGenerated(
uint256 indexed requestId,
uint256 randomValue
);
/**
* @notice Contract constructor
* @param threshold Minimum number of validators required
* @param totalValidators Total number of validators in the system
* @param minBlocksDelay Minimum blocks between commit and reveal
* @param maxBlocksDelay Maximum blocks between commit and reveal
* @param maxGasPrice Maximum gas price for reveals
* @param initialValidators Array of initial validator addresses
*/
constructor(
uint256 threshold,
uint256 totalValidators,
uint256 minBlocksDelay,
uint256 maxBlocksDelay,
uint256 maxGasPrice,
address[] memory initialValidators,
address paymentProcessorAddress
) {
require(threshold <= totalValidators, "Threshold exceeds total validators");
require(threshold > totalValidators / 2, "Threshold too low");
require(minBlocksDelay > 0, "Min delay must be > 0");
require(maxBlocksDelay > minBlocksDelay, "Max delay must be > min delay");
require(
initialValidators.length == totalValidators,
"Invalid validator count"
);
require(
paymentProcessorAddress != address(0),
"Invalid payment processor"
);
THRESHOLD = threshold;
TOTAL_VALIDATORS = totalValidators;
MIN_BLOCKS_DELAY = minBlocksDelay;
MAX_BLOCKS_DELAY = maxBlocksDelay;
MAX_GAS_PRICE = maxGasPrice;
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
_setupRole(OPERATOR_ROLE, msg.sender);
_setupRole(WHITELISTER_ROLE, msg.sender);
// Set up initial validators
for (uint256 i = 0; i < initialValidators.length; i++) {
require(initialValidators[i] != address(0), "Invalid validator address");
_setupRole(VALIDATOR_ROLE, initialValidators[i]);
validators.push(initialValidators[i]);
validatorIndices[initialValidators[i]] = i + 1;
}
// Set payment processor
paymentProcessor = IDotsVRFPayment(paymentProcessorAddress);
}
/**
* @notice Request random number generation
* @param seed User-provided seed for randomness
* @return requestId Unique identifier for this request
*/
function requestRandomness(bytes32 seed)
external
nonReentrant
whenNotPaused
returns (uint256)
{
require(tx.gasprice <= MAX_GAS_PRICE, "Gas price too high");
require(whitelistedContracts[msg.sender], "Caller not whitelisted");
// Verify and process request authorization
(bool authorized, string memory reason) = paymentProcessor.authorizeRequest(
msg.sender,
abi.encode(seed) // Pass any relevant request data
);
require(authorized, reason);
_requestIdCounter.increment();
uint256 requestId = _requestIdCounter.current();
RandomnessRequest storage request = requests[requestId];
request.requestId = requestId;
request.seed = seed;
request.blockNumber = block.number;
request.requester = msg.sender;
request.fulfilled = false;
request.validSharesCount = 0;
emit RandomnessRequested(requestId, msg.sender, seed);
return requestId;
}
/**
* @notice Submit commitment for random share
* @param requestId ID of the randomness request
* @param commitHash Hash of the random share
*/
function submitCommitment(uint256 requestId, bytes32 commitHash)
external
nonReentrant
whenNotPaused
onlyRole(VALIDATOR_ROLE)
{
require(tx.gasprice <= MAX_GAS_PRICE, "Gas price too high");
RandomnessRequest storage request = requests[requestId];
require(!request.hasCommitted[msg.sender], "Already committed");
require(!request.fulfilled, "Request already fulfilled");
request.hasCommitted[msg.sender] = true;
commitments[requestId][msg.sender] = CommitmentShare({
commitHash: commitHash,
timestamp: block.timestamp,
blockNumber: block.number
});
emit CommitmentSubmitted(requestId, msg.sender, commitHash);
}
/**
* @notice Reveal random share and signature
* @param requestId ID of the randomness request
* @param value Random share value
* @param signature Cryptographic signature of the share
*/
function revealShare(
uint256 requestId,
uint256 value,
bytes calldata signature
)
external
nonReentrant
whenNotPaused
onlyRole(VALIDATOR_ROLE)
{
require(tx.gasprice <= MAX_GAS_PRICE, "Gas price too high");
RandomnessRequest storage request = requests[requestId];
require(request.hasCommitted[msg.sender], "Must commit first");
require(!request.hasRevealed[msg.sender], "Already revealed");
require(!request.fulfilled, "Request already fulfilled");
CommitmentShare storage commitment = commitments[requestId][msg.sender];
require(
block.number >= commitment.blockNumber + MIN_BLOCKS_DELAY,
"Too early to reveal"
);
require(
block.number <= commitment.blockNumber + MAX_BLOCKS_DELAY,
"Too late to reveal"
);
// Verify commitment
require(
keccak256(abi.encodePacked(value)) == commitment.commitHash,
"Invalid reveal"
);
// Verify signature
bytes32 messageHash = keccak256(abi.encodePacked(
requestId,
request.seed,
value,
commitment.timestamp
));
bytes32 ethSignedMessageHash = messageHash.toEthSignedMessageHash();
address signer = ethSignedMessageHash.recover(signature);
require(signer == msg.sender, "Invalid signature");
request.hasRevealed[msg.sender] = true;
request.validSharesCount++;
reveals[requestId][msg.sender] = RevealedShare({
value: value,
signature: signature
});
emit ShareRevealed(requestId, msg.sender, value);
// If we have enough shares, combine them to generate final random value
if (request.validSharesCount >= THRESHOLD) {
_generateRandomValue(requestId);
}
}
/**
* @notice Combine revealed shares to generate final random value
* @param requestId ID of the randomness request
*/
function _generateRandomValue(uint256 requestId) internal {
RandomnessRequest storage request = requests[requestId];
require(!request.fulfilled, "Already fulfilled");
require(
request.validSharesCount >= THRESHOLD,
"Not enough valid shares"
);
bytes32 combinedHash = bytes32(0);
uint256 validCount = 0;
// Combine all valid revealed shares
for (uint256 i = 0; i < validators.length && validCount < THRESHOLD; i++) {
address validator = validators[i];
if (request.hasRevealed[validator]) {
RevealedShare storage share = reveals[requestId][validator];
combinedHash = keccak256(abi.encodePacked(
combinedHash,
share.value,
share.signature
));
validCount++;
}
}
uint256 randomValue = uint256(combinedHash);
randomResults[requestId] = randomValue;
request.fulfilled = true;
emit RandomnessGenerated(requestId, randomValue);
}
/**
* @notice Get the generated random value for a request
* @param requestId ID of the randomness request
* @return Random value
*/
function getRandomValue(uint256 requestId)
external
view
returns (uint256)
{
require(requests[requestId].fulfilled, "Request not fulfilled");
return randomResults[requestId];
}
/**
* @notice Check if a request has been fulfilled
* @param requestId ID of the randomness request
* @return True if the request has been fulfilled
*/
function isRequestFulfilled(uint256 requestId)
external
view
returns (bool)
{
return requests[requestId].fulfilled;
}
/**
* @notice Get the number of valid shares submitted for a request
* @param requestId ID of the randomness request
* @return Number of valid shares
*/
function getValidSharesCount(uint256 requestId)
external
view
returns (uint256)
{
return requests[requestId].validSharesCount;
}
/**
* @notice Update the payment processor
* @param newPaymentProcessor Address of the new payment processor
*/
function updatePaymentProcessor(address newPaymentProcessor)
external
onlyRole(DEFAULT_ADMIN_ROLE)
whenNotPaused
{
require(
newPaymentProcessor != address(0),
"Invalid payment processor"
);
paymentProcessor = IDotsVRFPayment(newPaymentProcessor);
emit PaymentProcessorUpdated(newPaymentProcessor);
}
// Admin functions
/**
* @notice Pause the contract
*/
function pause() external onlyRole(OPERATOR_ROLE) {
_pause();
}
/**
* @notice Unpause the contract
*/
function unpause() external onlyRole(OPERATOR_ROLE) {
_unpause();
}
/**
* @notice Add a contract to the whitelist
* @param contractAddress Address of the contract to whitelist
*/
function addToWhitelist(address contractAddress)
external
onlyRole(WHITELISTER_ROLE)
{
require(contractAddress != address(0), "Invalid address");
require(!whitelistedContracts[contractAddress], "Already whitelisted");
whitelistedContracts[contractAddress] = true;
}
/**
* @notice Remove a contract from the whitelist
* @param contractAddress Address of the contract to remove
*/
function removeFromWhitelist(address contractAddress)
external
onlyRole(WHITELISTER_ROLE)
{
require(whitelistedContracts[contractAddress], "Not whitelisted");
whitelistedContracts[contractAddress] = false;
}
/**
* @notice Check if a contract is whitelisted
* @param contractAddress Address of the contract to check
* @return True if the contract is whitelisted
*/
function isWhitelisted(address contractAddress)
external
view
returns (bool)
{
return whitelistedContracts[contractAddress];
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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);
_;
}
/**
* @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 virtual override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `_msgSender()` is missing `role`.
* Overriding this function changes the behavior of the {onlyRole} modifier.
*
* Format of the revert message is described in {_checkRole}.
*
* _Available since v4.6._
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @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 virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(account),
" 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 virtual 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.
*
* May emit a {RoleGranted} event.
*/
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.
*
* May emit a {RoleRevoked} event.
*/
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`.
*
* May emit a {RoleRevoked} event.
*/
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.
*
* May emit a {RoleGranted} event.
*
* [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.
*
* May emit a {RoleGranted} event.
*/
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.
*
* May emit a {RoleRevoked} event.
*/
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/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 (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// 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/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.0;
import "../Strings.sol";
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV // Deprecated in v4.8
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
/// @solidity memory-safe-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}// 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 (last updated v4.8.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1);
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator,
Rounding rounding
) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10**64) {
value /= 10**64;
result += 64;
}
if (value >= 10**32) {
value /= 10**32;
result += 32;
}
if (value >= 10**16) {
value /= 10**16;
result += 16;
}
if (value >= 10**8) {
value /= 10**8;
result += 8;
}
if (value >= 10**4) {
value /= 10**4;
result += 4;
}
if (value >= 10**2) {
value /= 10**2;
result += 2;
}
if (value >= 10**1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @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] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
/**
* @title IDotsVRFPayment
* @notice Interface for managing payments in DotsVRF system
*/
interface IDotsVRFPayment {
/**
* @notice Deposit funds for a consumer address to use for randomness requests
* @param consumer Address that will use the deposited funds
*/
function deposit(address consumer) external payable;
/**
* @notice Withdraw unused funds
* @param amount Amount of ETH to withdraw
*/
function withdraw(uint256 amount) external;
/**
* @notice Authorize a randomness request
* @param requester Address requesting randomness
* @param requestData Additional data that might be needed for authorization
* @return success True if request is authorized
* @return reason Optional reason if request is not authorized
*/
function authorizeRequest(address requester, bytes calldata requestData)
external
returns (bool success, string memory reason);
/**
* @notice Check if an address can make requests
* @param requester Address to check
* @param requestData Additional data that might be needed for verification
* @return canRequest True if address can make requests
* @return reason Optional reason if address cannot make requests
*/
function canRequestRandomness(address requester, bytes calldata requestData)
external
view
returns (bool canRequest, string memory reason);
/**
* @notice Get balance of an address
* @param account Address to check balance for
* @return Balance in ETH
*/
function balanceOf(address account) external view returns (uint256);
}{
"evmVersion": "paris",
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"threshold","type":"uint256"},{"internalType":"uint256","name":"totalValidators","type":"uint256"},{"internalType":"uint256","name":"minBlocksDelay","type":"uint256"},{"internalType":"uint256","name":"maxBlocksDelay","type":"uint256"},{"internalType":"uint256","name":"maxGasPrice","type":"uint256"},{"internalType":"address[]","name":"initialValidators","type":"address[]"},{"internalType":"address","name":"paymentProcessorAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":true,"internalType":"address","name":"validator","type":"address"},{"indexed":false,"internalType":"bytes32","name":"commitHash","type":"bytes32"}],"name":"CommitmentSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newPaymentProcessor","type":"address"}],"name":"PaymentProcessorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"randomValue","type":"uint256"}],"name":"RandomnessGenerated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":true,"internalType":"address","name":"requester","type":"address"},{"indexed":false,"internalType":"bytes32","name":"seed","type":"bytes32"}],"name":"RandomnessRequested","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":true,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":true,"internalType":"address","name":"validator","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ShareRevealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BLOCKS_DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_GAS_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_BLOCKS_DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_VALIDATORS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VALIDATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELISTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"addToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"commitments","outputs":[{"internalType":"bytes32","name":"commitHash","type":"bytes32"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"getRandomValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"requestId","type":"uint256"}],"name":"getValidSharesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"requestId","type":"uint256"}],"name":"isRequestFulfilled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentProcessor","outputs":[{"internalType":"contract IDotsVRFPayment","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"randomResults","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"}],"name":"removeFromWhitelist","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":"bytes32","name":"seed","type":"bytes32"}],"name":"requestRandomness","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requests","outputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"bytes32","name":"seed","type":"bytes32"},{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"address","name":"requester","type":"address"},{"internalType":"bool","name":"fulfilled","type":"bool"},{"internalType":"uint256","name":"validSharesCount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"revealShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"reveals","outputs":[{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"stateMutability":"view","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":"requestId","type":"uint256"},{"internalType":"bytes32","name":"commitHash","type":"bytes32"}],"name":"submitCommitment","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":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newPaymentProcessor","type":"address"}],"name":"updatePaymentProcessor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"validatorIndices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"validators","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedContracts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
61012060405234801561001157600080fd5b5060405161539f38038061539f8339818101604052810190610033919061084f565b60016000819055506000600260006101000a81548160ff02191690831515021790555085871115610099576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161009090610990565b60405180910390fd5b6002866100a69190610a0e565b87116100e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100de90610a8b565b60405180910390fd5b6000851161012a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161012190610af7565b60405180910390fd5b84841161016c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016390610b63565b60405180910390fd5b858251146101af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101a690610bcf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361021e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161021590610c3b565b60405180910390fd5b86608081815250508560a081815250508460c081815250508360e0818152505082610100818152505061025a6000801b336104db60201b60201c565b61028a7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929336104db60201b60201c565b6102ba7f8619cecd8b9e095ab43867f5b69d492180450fe862e6b50bfbfb24b75dd84c8a336104db60201b60201c565b60005b825181101561048d57600073ffffffffffffffffffffffffffffffffffffffff168382815181106102f1576102f0610c5b565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff160361034f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161034690610cd6565b60405180910390fd5b6103997f21702c8af46127c7fa207f89d0b0a8441bb32959a0ac7df790e9ab1a25c9892684838151811061038657610385610c5b565b5b60200260200101516104db60201b60201c565b60098382815181106103ae576103ad610c5b565b5b60200260200101519080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001816104239190610cf6565b600a600085848151811061043a57610439610c5b565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080806001019150506102bd565b5080600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050610d2a565b6104eb82826104ef60201b60201c565b5050565b6104ff82826105db60201b60201c565b6105d757600180600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061057c61064660201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b60006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b61067581610662565b811461068057600080fd5b50565b6000815190506106928161066c565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6106e68261069d565b810181811067ffffffffffffffff82111715610705576107046106ae565b5b80604052505050565b600061071861064e565b905061072482826106dd565b919050565b600067ffffffffffffffff821115610744576107436106ae565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006107858261075a565b9050919050565b6107958161077a565b81146107a057600080fd5b50565b6000815190506107b28161078c565b92915050565b60006107cb6107c684610729565b61070e565b905080838252602082019050602084028301858111156107ee576107ed610755565b5b835b81811015610817578061080388826107a3565b8452602084019350506020810190506107f0565b5050509392505050565b600082601f83011261083657610835610698565b5b81516108468482602086016107b8565b91505092915050565b600080600080600080600060e0888a03121561086e5761086d610658565b5b600061087c8a828b01610683565b975050602061088d8a828b01610683565b965050604061089e8a828b01610683565b95505060606108af8a828b01610683565b94505060806108c08a828b01610683565b93505060a088015167ffffffffffffffff8111156108e1576108e061065d565b5b6108ed8a828b01610821565b92505060c06108fe8a828b016107a3565b91505092959891949750929550565b600082825260208201905092915050565b7f5468726573686f6c64206578636565647320746f74616c2076616c696461746f60008201527f7273000000000000000000000000000000000000000000000000000000000000602082015250565b600061097a60228361090d565b91506109858261091e565b604082019050919050565b600060208201905081810360008301526109a98161096d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610a1982610662565b9150610a2483610662565b925082610a3457610a336109b0565b5b828204905092915050565b7f5468726573686f6c6420746f6f206c6f77000000000000000000000000000000600082015250565b6000610a7560118361090d565b9150610a8082610a3f565b602082019050919050565b60006020820190508181036000830152610aa481610a68565b9050919050565b7f4d696e2064656c6179206d757374206265203e20300000000000000000000000600082015250565b6000610ae160158361090d565b9150610aec82610aab565b602082019050919050565b60006020820190508181036000830152610b1081610ad4565b9050919050565b7f4d61782064656c6179206d757374206265203e206d696e2064656c6179000000600082015250565b6000610b4d601d8361090d565b9150610b5882610b17565b602082019050919050565b60006020820190508181036000830152610b7c81610b40565b9050919050565b7f496e76616c69642076616c696461746f7220636f756e74000000000000000000600082015250565b6000610bb960178361090d565b9150610bc482610b83565b602082019050919050565b60006020820190508181036000830152610be881610bac565b9050919050565b7f496e76616c6964207061796d656e742070726f636573736f7200000000000000600082015250565b6000610c2560198361090d565b9150610c3082610bef565b602082019050919050565b60006020820190508181036000830152610c5481610c18565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f496e76616c69642076616c696461746f72206164647265737300000000000000600082015250565b6000610cc060198361090d565b9150610ccb82610c8a565b602082019050919050565b60006020820190508181036000830152610cef81610cb3565b9050919050565b6000610d0182610662565b9150610d0c83610662565b9250828201905080821115610d2457610d236109df565b5b92915050565b60805160a05160c05160e051610100516145f9610da660003960008181610c230152818161127c0152818161145c015261176b015260008181610ffa0152611a1a01526000818161121301526119a80152600061119b015260008181610f3801528181611d96015281816122be015261234001526145f96000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c80638456cb5911610125578063c49baebe116100ad578063e6a3d9dc1161007c578063e6a3d9dc14610691578063e90d4c06146106ad578063ee7ccac3146106df578063f1c6bdf8146106fb578063f5b541a6146107195761021c565b8063c49baebe1461061d578063d547741f1461063b578063e3bbb4f114610657578063e43252d7146106755761021c565b806398dde497116100f457806398dde49714610563578063a217fddf14610581578063a70634821461059f578063ad44777b146105cf578063bb2e2d86146105ff5761021c565b80638456cb59146104ef57806389ad6de1146104f95780638ab1d6811461051757806391d14854146105335761021c565b8063391feebb116101a8578063570618e111610177578063570618e1146104305780635c975abb1461044e5780635e3b709f1461046c578063785ffb371461049c57806381d12c58146104ba5761021c565b8063391feebb146103955780633af32abf146103c55780633f4ba83a146103f55780634ef14888146103ff5761021c565b806325e41da1116101ef57806325e41da1146102e157806327b26f57146103115780632f2ff15d1461032d57806335aa2e441461034957806336568abe146103795761021c565b806301ffc9a7146102215780630e2bfe4614610251578063219be11414610281578063248a9ca3146102b1575b600080fd5b61023b60048036038101906102369190612b63565b610737565b6040516102489190612bab565b60405180910390f35b61026b60048036038101906102669190612c24565b6107b1565b6040516102789190612c6a565b60405180910390f35b61029b60048036038101906102969190612cb1565b6107c9565b6040516102a89190612c6a565b60405180910390f35b6102cb60048036038101906102c69190612d14565b6107e1565b6040516102d89190612d50565b60405180910390f35b6102fb60048036038101906102f69190612cb1565b610801565b6040516103089190612c6a565b60405180910390f35b61032b60048036038101906103269190612c24565b610881565b005b61034760048036038101906103429190612d6b565b61098d565b005b610363600480360381019061035e9190612cb1565b6109ae565b6040516103709190612dba565b60405180910390f35b610393600480360381019061038e9190612d6b565b6109ed565b005b6103af60048036038101906103aa9190612c24565b610a70565b6040516103bc9190612bab565b60405180910390f35b6103df60048036038101906103da9190612c24565b610a90565b6040516103ec9190612bab565b60405180910390f35b6103fd610ae6565b005b61041960048036038101906104149190612dd5565b610b1b565b604051610427929190612ea5565b60405180910390f35b610438610bd4565b6040516104459190612d50565b60405180910390f35b610456610bf8565b6040516104639190612bab565b60405180910390f35b61048660048036038101906104819190612d14565b610c0f565b6040516104939190612c6a565b60405180910390f35b6104a4610f36565b6040516104b19190612c6a565b60405180910390f35b6104d460048036038101906104cf9190612cb1565b610f5a565b6040516104e696959493929190612ed5565b60405180910390f35b6104f7610fc3565b005b610501610ff8565b60405161050e9190612c6a565b60405180910390f35b610531600480360381019061052c9190612c24565b61101c565b005b61054d60048036038101906105489190612d6b565b61112e565b60405161055a9190612bab565b60405180910390f35b61056b611199565b6040516105789190612c6a565b60405180910390f35b6105896111bd565b6040516105969190612d50565b60405180910390f35b6105b960048036038101906105b49190612cb1565b6111c4565b6040516105c69190612c6a565b60405180910390f35b6105e960048036038101906105e49190612cb1565b6111e4565b6040516105f69190612bab565b60405180910390f35b610607611211565b6040516106149190612c6a565b60405180910390f35b610625611235565b6040516106329190612d50565b60405180910390f35b61065560048036038101906106509190612d6b565b611259565b005b61065f61127a565b60405161066c9190612c6a565b60405180910390f35b61068f600480360381019061068a9190612c24565b61129e565b005b6106ab60048036038101906106a69190612f36565b611420565b005b6106c760048036038101906106c29190612dd5565b6116f8565b6040516106d693929190612f76565b60405180910390f35b6106f960048036038101906106f49190613012565b61172f565b005b610703611ddd565b60405161071091906130e5565b60405180910390f35b610721611e03565b60405161072e9190612d50565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806107aa57506107a982611e27565b5b9050919050565b600a6020528060005260406000206000915090505481565b60086020528060005260406000206000915090505481565b600060016000838152602001908152602001600020600101549050919050565b60006005600083815260200190815260200160002060030160149054906101000a900460ff16610866576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085d9061315d565b60405180910390fd5b60086000838152602001908152602001600020549050919050565b6000801b61088e81611e91565b610896611ea5565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fc906131c9565b60405180910390fd5b81600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167fae8716ba090b1cdfccf3851704c6dc4610f3be4f2f6badf912e74315e5280db460405160405180910390a25050565b610996826107e1565b61099f81611e91565b6109a98383611eef565b505050565b600981815481106109be57600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109f5611fcf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a599061325b565b60405180910390fd5b610a6c8282611fd7565b5050565b60036020528060005260406000206000915054906101000a900460ff1681565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610b1081611e91565b610b186120b9565b50565b600760205281600052604060002060205280600052604060002060009150915050806000015490806001018054610b51906132aa565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7d906132aa565b8015610bca5780601f10610b9f57610100808354040283529160200191610bca565b820191906000526020600020905b815481529060010190602001808311610bad57829003601f168201915b5050505050905082565b7f8619cecd8b9e095ab43867f5b69d492180450fe862e6b50bfbfb24b75dd84c8a81565b6000600260009054906101000a900460ff16905090565b6000610c1961211c565b610c21611ea5565b7f00000000000000000000000000000000000000000000000000000000000000003a1115610c84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7b90613327565b60405180910390fd5b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610d10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0790613393565b60405180910390fd5b600080600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a14b2563386604051602001610d639190612d50565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401610d8f9291906133b3565b6000604051808303816000875af1158015610dae573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610dd79190613530565b91509150818190610e1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1591906135d0565b60405180910390fd5b50610e29600461216b565b6000610e356004612181565b90506000600560008381526020019081526020016000209050818160000181905550858160010181905550438160020181905550338160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008160030160146101000a81548160ff021916908315150217905550600081600401819055503373ffffffffffffffffffffffffffffffffffffffff16827f3247b87f5ed1b9ca5cad93bec13999dbb3ebd67df06063f260361c76e2f731fd88604051610f1a9190612d50565b60405180910390a381945050505050610f3161218f565b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60056020528060005260406000206000915090508060000154908060010154908060020154908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160149054906101000a900460ff16908060040154905086565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610fed81611e91565b610ff5612199565b50565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f8619cecd8b9e095ab43867f5b69d492180450fe862e6b50bfbfb24b75dd84c8a61104681611e91565b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166110d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c99061363e565b60405180910390fd5b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000801b81565b600060056000838152602001908152602001600020600401549050919050565b60006005600083815260200190815260200160002060030160149054906101000a900460ff169050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f21702c8af46127c7fa207f89d0b0a8441bb32959a0ac7df790e9ab1a25c9892681565b611262826107e1565b61126b81611e91565b6112758383611fd7565b505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f8619cecd8b9e095ab43867f5b69d492180450fe862e6b50bfbfb24b75dd84c8a6112c881611e91565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611337576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132e906136aa565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156113c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bb90613716565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b61142861211c565b611430611ea5565b7f21702c8af46127c7fa207f89d0b0a8441bb32959a0ac7df790e9ab1a25c9892661145a81611e91565b7f00000000000000000000000000000000000000000000000000000000000000003a11156114bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b490613327565b60405180910390fd5b60006005600085815260200190815260200160002090508060050160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155a90613782565b60405180910390fd5b8060030160149054906101000a900460ff16156115b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115ac906137ee565b60405180910390fd5b60018160050160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506040518060600160405280848152602001428152602001438152506006600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050503373ffffffffffffffffffffffffffffffffffffffff16847f6459ffc8e2e6aea1e7a6161f54ca96e0b0c83db7191f26ccf5c33e14f7f178c5856040516116e29190612d50565b60405180910390a350506116f461218f565b5050565b6006602052816000526040600020602052806000526040600020600091509150508060000154908060010154908060020154905083565b61173761211c565b61173f611ea5565b7f21702c8af46127c7fa207f89d0b0a8441bb32959a0ac7df790e9ab1a25c9892661176981611e91565b7f00000000000000000000000000000000000000000000000000000000000000003a11156117cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c390613327565b60405180910390fd5b60006005600087815260200190815260200160002090508060050160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611871576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118689061385a565b60405180910390fd5b8060060160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611900576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f7906138c6565b60405180910390fd5b8060030160149054906101000a900460ff1615611952576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611949906137ee565b60405180910390fd5b60006006600088815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090507f000000000000000000000000000000000000000000000000000000000000000081600201546119d69190613915565b431015611a18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0f90613995565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008160020154611a489190613915565b431115611a8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8190613a01565b60405180910390fd5b806000015486604051602001611aa09190613a42565b6040516020818303038152906040528051906020012014611af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aed90613aa9565b60405180910390fd5b6000878360010154888460010154604051602001611b179493929190613aea565b6040516020818303038152906040528051906020012090506000611b3a826121fc565b90506000611b9588888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508361222c90919063ffffffff16565b90503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bfc90613b84565b60405180910390fd5b60018560060160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550846004016000815480929190611c7490613ba4565b919050555060405180604001604052808a815260200189898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815250600760008c815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001019081611d419190613d8e565b509050503373ffffffffffffffffffffffffffffffffffffffff168a7f8cda1ba6de5fd54e5f4f1083c87ed5eed50b5da7365780a8b77581fd0671d0768b604051611d8c9190612c6a565b60405180910390a37f0000000000000000000000000000000000000000000000000000000000000000856004015410611dc957611dc88a612253565b5b505050505050611dd761218f565b50505050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611ea281611e9d611fcf565b612527565b50565b611ead610bf8565b15611eed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ee490613eac565b60405180910390fd5b565b611ef9828261112e565b611fcb57600180600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611f70611fcf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b611fe1828261112e565b156120b55760006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061205a611fcf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6120c16125ac565b6000600260006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612105611fcf565b6040516121129190612dba565b60405180910390a1565b600260005403612161576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215890613f18565b60405180910390fd5b6002600081905550565b6001816000016000828254019250508190555050565b600081600001549050919050565b6001600081905550565b6121a1611ea5565b6001600260006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121e5611fcf565b6040516121f29190612dba565b60405180910390a1565b60008160405160200161220f9190613f8f565b604051602081830303815290604052805190602001209050919050565b600080600061223b85856125f5565b9150915061224881612646565b819250505092915050565b60006005600083815260200190815260200160002090508060030160149054906101000a900460ff16156122bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122b390614001565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000081600401541015612323576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161231a9061406d565b60405180910390fd5b60008060001b90506000805b6009805490508110801561236257507f000000000000000000000000000000000000000000000000000000000000000082105b156124aa5760006009828154811061237d5761237c61408d565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508460060160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156124965760006007600088815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508481600001548260010160405160200161246e9392919061414a565b604051602081830303815290604052805190602001209450838061249190613ba4565b945050505b5080806124a290613ba4565b91505061232f565b5060008260001c905080600860008781526020019081526020016000208190555060018460030160146101000a81548160ff021916908315150217905550847fec896808b0b6dea42be36763a896d6001b2f27d92e2e39a8c891ef22419d3a25826040516125189190612c6a565b60405180910390a25050505050565b612531828261112e565b6125a85761253e816127ac565b61254c8360001c60206127d9565b60405160200161255d92919061424c565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161259f91906135d0565b60405180910390fd5b5050565b6125b4610bf8565b6125f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125ea906142d2565b60405180910390fd5b565b60008060418351036126365760008060006020860151925060408601519150606086015160001a905061262a87828585612a15565b9450945050505061263f565b60006002915091505b9250929050565b6000600481111561265a576126596142f2565b5b81600481111561266d5761266c6142f2565b5b03156127a95760016004811115612687576126866142f2565b5b81600481111561269a576126996142f2565b5b036126da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126d19061436d565b60405180910390fd5b600260048111156126ee576126ed6142f2565b5b816004811115612701576127006142f2565b5b03612741576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612738906143d9565b60405180910390fd5b60036004811115612755576127546142f2565b5b816004811115612768576127676142f2565b5b036127a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279f9061446b565b60405180910390fd5b5b50565b60606127d28273ffffffffffffffffffffffffffffffffffffffff16601460ff166127d9565b9050919050565b6060600060028360026127ec919061448b565b6127f69190613915565b67ffffffffffffffff81111561280f5761280e613414565b5b6040519080825280601f01601f1916602001820160405280156128415781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106128795761287861408d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106128dd576128dc61408d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000600184600261291d919061448b565b6129279190613915565b90505b60018111156129c7577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106129695761296861408d565b5b1a60f81b8282815181106129805761297f61408d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c9450806129c0906144cd565b905061292a565b5060008414612a0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a0290614542565b60405180910390fd5b8091505092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115612a50576000600391509150612aee565b600060018787878760405160008152602001604052604051612a75949392919061457e565b6020604051602081039080840390855afa158015612a97573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612ae557600060019250925050612aee565b80600092509250505b94509492505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612b4081612b0b565b8114612b4b57600080fd5b50565b600081359050612b5d81612b37565b92915050565b600060208284031215612b7957612b78612b01565b5b6000612b8784828501612b4e565b91505092915050565b60008115159050919050565b612ba581612b90565b82525050565b6000602082019050612bc06000830184612b9c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612bf182612bc6565b9050919050565b612c0181612be6565b8114612c0c57600080fd5b50565b600081359050612c1e81612bf8565b92915050565b600060208284031215612c3a57612c39612b01565b5b6000612c4884828501612c0f565b91505092915050565b6000819050919050565b612c6481612c51565b82525050565b6000602082019050612c7f6000830184612c5b565b92915050565b612c8e81612c51565b8114612c9957600080fd5b50565b600081359050612cab81612c85565b92915050565b600060208284031215612cc757612cc6612b01565b5b6000612cd584828501612c9c565b91505092915050565b6000819050919050565b612cf181612cde565b8114612cfc57600080fd5b50565b600081359050612d0e81612ce8565b92915050565b600060208284031215612d2a57612d29612b01565b5b6000612d3884828501612cff565b91505092915050565b612d4a81612cde565b82525050565b6000602082019050612d656000830184612d41565b92915050565b60008060408385031215612d8257612d81612b01565b5b6000612d9085828601612cff565b9250506020612da185828601612c0f565b9150509250929050565b612db481612be6565b82525050565b6000602082019050612dcf6000830184612dab565b92915050565b60008060408385031215612dec57612deb612b01565b5b6000612dfa85828601612c9c565b9250506020612e0b85828601612c0f565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612e4f578082015181840152602081019050612e34565b60008484015250505050565b6000601f19601f8301169050919050565b6000612e7782612e15565b612e818185612e20565b9350612e91818560208601612e31565b612e9a81612e5b565b840191505092915050565b6000604082019050612eba6000830185612c5b565b8181036020830152612ecc8184612e6c565b90509392505050565b600060c082019050612eea6000830189612c5b565b612ef76020830188612d41565b612f046040830187612c5b565b612f116060830186612dab565b612f1e6080830185612b9c565b612f2b60a0830184612c5b565b979650505050505050565b60008060408385031215612f4d57612f4c612b01565b5b6000612f5b85828601612c9c565b9250506020612f6c85828601612cff565b9150509250929050565b6000606082019050612f8b6000830186612d41565b612f986020830185612c5b565b612fa56040830184612c5b565b949350505050565b600080fd5b600080fd5b600080fd5b60008083601f840112612fd257612fd1612fad565b5b8235905067ffffffffffffffff811115612fef57612fee612fb2565b5b60208301915083600182028301111561300b5761300a612fb7565b5b9250929050565b6000806000806060858703121561302c5761302b612b01565b5b600061303a87828801612c9c565b945050602061304b87828801612c9c565b935050604085013567ffffffffffffffff81111561306c5761306b612b06565b5b61307887828801612fbc565b925092505092959194509250565b6000819050919050565b60006130ab6130a66130a184612bc6565b613086565b612bc6565b9050919050565b60006130bd82613090565b9050919050565b60006130cf826130b2565b9050919050565b6130df816130c4565b82525050565b60006020820190506130fa60008301846130d6565b92915050565b600082825260208201905092915050565b7f52657175657374206e6f742066756c66696c6c65640000000000000000000000600082015250565b6000613147601583613100565b915061315282613111565b602082019050919050565b600060208201905081810360008301526131768161313a565b9050919050565b7f496e76616c6964207061796d656e742070726f636573736f7200000000000000600082015250565b60006131b3601983613100565b91506131be8261317d565b602082019050919050565b600060208201905081810360008301526131e2816131a6565b9050919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000613245602f83613100565b9150613250826131e9565b604082019050919050565b6000602082019050818103600083015261327481613238565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806132c257607f821691505b6020821081036132d5576132d461327b565b5b50919050565b7f47617320707269636520746f6f20686967680000000000000000000000000000600082015250565b6000613311601283613100565b915061331c826132db565b602082019050919050565b6000602082019050818103600083015261334081613304565b9050919050565b7f43616c6c6572206e6f742077686974656c697374656400000000000000000000600082015250565b600061337d601683613100565b915061338882613347565b602082019050919050565b600060208201905081810360008301526133ac81613370565b9050919050565b60006040820190506133c86000830185612dab565b81810360208301526133da8184612e6c565b90509392505050565b6133ec81612b90565b81146133f757600080fd5b50565b600081519050613409816133e3565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61344c82612e5b565b810181811067ffffffffffffffff8211171561346b5761346a613414565b5b80604052505050565b600061347e612af7565b905061348a8282613443565b919050565b600067ffffffffffffffff8211156134aa576134a9613414565b5b6134b382612e5b565b9050602081019050919050565b60006134d36134ce8461348f565b613474565b9050828152602081018484840111156134ef576134ee61340f565b5b6134fa848285612e31565b509392505050565b600082601f83011261351757613516612fad565b5b81516135278482602086016134c0565b91505092915050565b6000806040838503121561354757613546612b01565b5b6000613555858286016133fa565b925050602083015167ffffffffffffffff81111561357657613575612b06565b5b61358285828601613502565b9150509250929050565b600081519050919050565b60006135a28261358c565b6135ac8185613100565b93506135bc818560208601612e31565b6135c581612e5b565b840191505092915050565b600060208201905081810360008301526135ea8184613597565b905092915050565b7f4e6f742077686974656c69737465640000000000000000000000000000000000600082015250565b6000613628600f83613100565b9150613633826135f2565b602082019050919050565b600060208201905081810360008301526136578161361b565b9050919050565b7f496e76616c696420616464726573730000000000000000000000000000000000600082015250565b6000613694600f83613100565b915061369f8261365e565b602082019050919050565b600060208201905081810360008301526136c381613687565b9050919050565b7f416c72656164792077686974656c697374656400000000000000000000000000600082015250565b6000613700601383613100565b915061370b826136ca565b602082019050919050565b6000602082019050818103600083015261372f816136f3565b9050919050565b7f416c726561647920636f6d6d6974746564000000000000000000000000000000600082015250565b600061376c601183613100565b915061377782613736565b602082019050919050565b6000602082019050818103600083015261379b8161375f565b9050919050565b7f5265717565737420616c72656164792066756c66696c6c656400000000000000600082015250565b60006137d8601983613100565b91506137e3826137a2565b602082019050919050565b60006020820190508181036000830152613807816137cb565b9050919050565b7f4d75737420636f6d6d6974206669727374000000000000000000000000000000600082015250565b6000613844601183613100565b915061384f8261380e565b602082019050919050565b6000602082019050818103600083015261387381613837565b9050919050565b7f416c72656164792072657665616c656400000000000000000000000000000000600082015250565b60006138b0601083613100565b91506138bb8261387a565b602082019050919050565b600060208201905081810360008301526138df816138a3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061392082612c51565b915061392b83612c51565b9250828201905080821115613943576139426138e6565b5b92915050565b7f546f6f206561726c7920746f2072657665616c00000000000000000000000000600082015250565b600061397f601383613100565b915061398a82613949565b602082019050919050565b600060208201905081810360008301526139ae81613972565b9050919050565b7f546f6f206c61746520746f2072657665616c0000000000000000000000000000600082015250565b60006139eb601283613100565b91506139f6826139b5565b602082019050919050565b60006020820190508181036000830152613a1a816139de565b9050919050565b6000819050919050565b613a3c613a3782612c51565b613a21565b82525050565b6000613a4e8284613a2b565b60208201915081905092915050565b7f496e76616c69642072657665616c000000000000000000000000000000000000600082015250565b6000613a93600e83613100565b9150613a9e82613a5d565b602082019050919050565b60006020820190508181036000830152613ac281613a86565b9050919050565b6000819050919050565b613ae4613adf82612cde565b613ac9565b82525050565b6000613af68287613a2b565b602082019150613b068286613ad3565b602082019150613b168285613a2b565b602082019150613b268284613a2b565b60208201915081905095945050505050565b7f496e76616c6964207369676e6174757265000000000000000000000000000000600082015250565b6000613b6e601183613100565b9150613b7982613b38565b602082019050919050565b60006020820190508181036000830152613b9d81613b61565b9050919050565b6000613baf82612c51565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613be157613be06138e6565b5b600182019050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302613c4e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613c11565b613c588683613c11565b95508019841693508086168417925050509392505050565b6000613c8b613c86613c8184612c51565b613086565b612c51565b9050919050565b6000819050919050565b613ca583613c70565b613cb9613cb182613c92565b848454613c1e565b825550505050565b600090565b613cce613cc1565b613cd9818484613c9c565b505050565b5b81811015613cfd57613cf2600082613cc6565b600181019050613cdf565b5050565b601f821115613d4257613d1381613bec565b613d1c84613c01565b81016020851015613d2b578190505b613d3f613d3785613c01565b830182613cde565b50505b505050565b600082821c905092915050565b6000613d6560001984600802613d47565b1980831691505092915050565b6000613d7e8383613d54565b9150826002028217905092915050565b613d9782612e15565b67ffffffffffffffff811115613db057613daf613414565b5b613dba82546132aa565b613dc5828285613d01565b600060209050601f831160018114613df85760008415613de6578287015190505b613df08582613d72565b865550613e58565b601f198416613e0686613bec565b60005b82811015613e2e57848901518255600182019150602085019450602081019050613e09565b86831015613e4b5784890151613e47601f891682613d54565b8355505b6001600288020188555050505b505050505050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b6000613e96601083613100565b9150613ea182613e60565b602082019050919050565b60006020820190508181036000830152613ec581613e89565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613f02601f83613100565b9150613f0d82613ecc565b602082019050919050565b60006020820190508181036000830152613f3181613ef5565b9050919050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000613f79601c83613f38565b9150613f8482613f43565b601c82019050919050565b6000613f9a82613f6c565b9150613fa68284613ad3565b60208201915081905092915050565b7f416c72656164792066756c66696c6c6564000000000000000000000000000000600082015250565b6000613feb601183613100565b9150613ff682613fb5565b602082019050919050565b6000602082019050818103600083015261401a81613fde565b9050919050565b7f4e6f7420656e6f7567682076616c696420736861726573000000000000000000600082015250565b6000614057601783613100565b915061406282614021565b602082019050919050565b600060208201905081810360008301526140868161404a565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081905092915050565b600081546140d4816132aa565b6140de81866140bc565b945060018216600081146140f9576001811461410e57614141565b60ff1983168652811515820286019350614141565b61411785613bec565b60005b838110156141395781548189015260018201915060208101905061411a565b838801955050505b50505092915050565b60006141568286613ad3565b6020820191506141668285613a2b565b60208201915061417682846140c7565b9150819050949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b60006141b9601783613f38565b91506141c482614183565b601782019050919050565b60006141da8261358c565b6141e48185613f38565b93506141f4818560208601612e31565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000614236601183613f38565b915061424182614200565b601182019050919050565b6000614257826141ac565b915061426382856141cf565b915061426e82614229565b915061427a82846141cf565b91508190509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b60006142bc601483613100565b91506142c782614286565b602082019050919050565b600060208201905081810360008301526142eb816142af565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b6000614357601883613100565b915061436282614321565b602082019050919050565b600060208201905081810360008301526143868161434a565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b60006143c3601f83613100565b91506143ce8261438d565b602082019050919050565b600060208201905081810360008301526143f2816143b6565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000614455602283613100565b9150614460826143f9565b604082019050919050565b6000602082019050818103600083015261448481614448565b9050919050565b600061449682612c51565b91506144a183612c51565b92508282026144af81612c51565b915082820484148315176144c6576144c56138e6565b5b5092915050565b60006144d882612c51565b9150600082036144eb576144ea6138e6565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b600061452c602083613100565b9150614537826144f6565b602082019050919050565b6000602082019050818103600083015261455b8161451f565b9050919050565b600060ff82169050919050565b61457881614562565b82525050565b60006080820190506145936000830187612d41565b6145a0602083018661456f565b6145ad6040830185612d41565b6145ba6060830184612d41565b9594505050505056fea26469706673582212202fb7bc3e0138f7498556900a0c1e654050653a5e4a4f5849e53d8530ac29be7f64736f6c634300081c00330000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000174876e80000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000683fa50eab7a0b12cb3d55f6e3f813a87df6d00c000000000000000000000000ade57f1310ef6909b8960d972982ff4aa33a6cff000000000000000000000000e3aae68c403f717fa034762605a32ba1229d4c2f
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061021c5760003560e01c80638456cb5911610125578063c49baebe116100ad578063e6a3d9dc1161007c578063e6a3d9dc14610691578063e90d4c06146106ad578063ee7ccac3146106df578063f1c6bdf8146106fb578063f5b541a6146107195761021c565b8063c49baebe1461061d578063d547741f1461063b578063e3bbb4f114610657578063e43252d7146106755761021c565b806398dde497116100f457806398dde49714610563578063a217fddf14610581578063a70634821461059f578063ad44777b146105cf578063bb2e2d86146105ff5761021c565b80638456cb59146104ef57806389ad6de1146104f95780638ab1d6811461051757806391d14854146105335761021c565b8063391feebb116101a8578063570618e111610177578063570618e1146104305780635c975abb1461044e5780635e3b709f1461046c578063785ffb371461049c57806381d12c58146104ba5761021c565b8063391feebb146103955780633af32abf146103c55780633f4ba83a146103f55780634ef14888146103ff5761021c565b806325e41da1116101ef57806325e41da1146102e157806327b26f57146103115780632f2ff15d1461032d57806335aa2e441461034957806336568abe146103795761021c565b806301ffc9a7146102215780630e2bfe4614610251578063219be11414610281578063248a9ca3146102b1575b600080fd5b61023b60048036038101906102369190612b63565b610737565b6040516102489190612bab565b60405180910390f35b61026b60048036038101906102669190612c24565b6107b1565b6040516102789190612c6a565b60405180910390f35b61029b60048036038101906102969190612cb1565b6107c9565b6040516102a89190612c6a565b60405180910390f35b6102cb60048036038101906102c69190612d14565b6107e1565b6040516102d89190612d50565b60405180910390f35b6102fb60048036038101906102f69190612cb1565b610801565b6040516103089190612c6a565b60405180910390f35b61032b60048036038101906103269190612c24565b610881565b005b61034760048036038101906103429190612d6b565b61098d565b005b610363600480360381019061035e9190612cb1565b6109ae565b6040516103709190612dba565b60405180910390f35b610393600480360381019061038e9190612d6b565b6109ed565b005b6103af60048036038101906103aa9190612c24565b610a70565b6040516103bc9190612bab565b60405180910390f35b6103df60048036038101906103da9190612c24565b610a90565b6040516103ec9190612bab565b60405180910390f35b6103fd610ae6565b005b61041960048036038101906104149190612dd5565b610b1b565b604051610427929190612ea5565b60405180910390f35b610438610bd4565b6040516104459190612d50565b60405180910390f35b610456610bf8565b6040516104639190612bab565b60405180910390f35b61048660048036038101906104819190612d14565b610c0f565b6040516104939190612c6a565b60405180910390f35b6104a4610f36565b6040516104b19190612c6a565b60405180910390f35b6104d460048036038101906104cf9190612cb1565b610f5a565b6040516104e696959493929190612ed5565b60405180910390f35b6104f7610fc3565b005b610501610ff8565b60405161050e9190612c6a565b60405180910390f35b610531600480360381019061052c9190612c24565b61101c565b005b61054d60048036038101906105489190612d6b565b61112e565b60405161055a9190612bab565b60405180910390f35b61056b611199565b6040516105789190612c6a565b60405180910390f35b6105896111bd565b6040516105969190612d50565b60405180910390f35b6105b960048036038101906105b49190612cb1565b6111c4565b6040516105c69190612c6a565b60405180910390f35b6105e960048036038101906105e49190612cb1565b6111e4565b6040516105f69190612bab565b60405180910390f35b610607611211565b6040516106149190612c6a565b60405180910390f35b610625611235565b6040516106329190612d50565b60405180910390f35b61065560048036038101906106509190612d6b565b611259565b005b61065f61127a565b60405161066c9190612c6a565b60405180910390f35b61068f600480360381019061068a9190612c24565b61129e565b005b6106ab60048036038101906106a69190612f36565b611420565b005b6106c760048036038101906106c29190612dd5565b6116f8565b6040516106d693929190612f76565b60405180910390f35b6106f960048036038101906106f49190613012565b61172f565b005b610703611ddd565b60405161071091906130e5565b60405180910390f35b610721611e03565b60405161072e9190612d50565b60405180910390f35b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806107aa57506107a982611e27565b5b9050919050565b600a6020528060005260406000206000915090505481565b60086020528060005260406000206000915090505481565b600060016000838152602001908152602001600020600101549050919050565b60006005600083815260200190815260200160002060030160149054906101000a900460ff16610866576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085d9061315d565b60405180910390fd5b60086000838152602001908152602001600020549050919050565b6000801b61088e81611e91565b610896611ea5565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610905576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fc906131c9565b60405180910390fd5b81600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167fae8716ba090b1cdfccf3851704c6dc4610f3be4f2f6badf912e74315e5280db460405160405180910390a25050565b610996826107e1565b61099f81611e91565b6109a98383611eef565b505050565b600981815481106109be57600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109f5611fcf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a599061325b565b60405180910390fd5b610a6c8282611fd7565b5050565b60036020528060005260406000206000915054906101000a900460ff1681565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610b1081611e91565b610b186120b9565b50565b600760205281600052604060002060205280600052604060002060009150915050806000015490806001018054610b51906132aa565b80601f0160208091040260200160405190810160405280929190818152602001828054610b7d906132aa565b8015610bca5780601f10610b9f57610100808354040283529160200191610bca565b820191906000526020600020905b815481529060010190602001808311610bad57829003601f168201915b5050505050905082565b7f8619cecd8b9e095ab43867f5b69d492180450fe862e6b50bfbfb24b75dd84c8a81565b6000600260009054906101000a900460ff16905090565b6000610c1961211c565b610c21611ea5565b7f000000000000000000000000000000000000000000000000000000174876e8003a1115610c84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7b90613327565b60405180910390fd5b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610d10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0790613393565b60405180910390fd5b600080600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a14b2563386604051602001610d639190612d50565b6040516020818303038152906040526040518363ffffffff1660e01b8152600401610d8f9291906133b3565b6000604051808303816000875af1158015610dae573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610dd79190613530565b91509150818190610e1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1591906135d0565b60405180910390fd5b50610e29600461216b565b6000610e356004612181565b90506000600560008381526020019081526020016000209050818160000181905550858160010181905550438160020181905550338160030160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008160030160146101000a81548160ff021916908315150217905550600081600401819055503373ffffffffffffffffffffffffffffffffffffffff16827f3247b87f5ed1b9ca5cad93bec13999dbb3ebd67df06063f260361c76e2f731fd88604051610f1a9190612d50565b60405180910390a381945050505050610f3161218f565b919050565b7f000000000000000000000000000000000000000000000000000000000000000281565b60056020528060005260406000206000915090508060000154908060010154908060020154908060030160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030160149054906101000a900460ff16908060040154905086565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929610fed81611e91565b610ff5612199565b50565b7f000000000000000000000000000000000000000000000000000000000000000581565b7f8619cecd8b9e095ab43867f5b69d492180450fe862e6b50bfbfb24b75dd84c8a61104681611e91565b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166110d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c99061363e565b60405180910390fd5b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b60006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b7f000000000000000000000000000000000000000000000000000000000000000381565b6000801b81565b600060056000838152602001908152602001600020600401549050919050565b60006005600083815260200190815260200160002060030160149054906101000a900460ff169050919050565b7f000000000000000000000000000000000000000000000000000000000000000181565b7f21702c8af46127c7fa207f89d0b0a8441bb32959a0ac7df790e9ab1a25c9892681565b611262826107e1565b61126b81611e91565b6112758383611fd7565b505050565b7f000000000000000000000000000000000000000000000000000000174876e80081565b7f8619cecd8b9e095ab43867f5b69d492180450fe862e6b50bfbfb24b75dd84c8a6112c881611e91565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611337576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132e906136aa565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156113c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113bb90613716565b60405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b61142861211c565b611430611ea5565b7f21702c8af46127c7fa207f89d0b0a8441bb32959a0ac7df790e9ab1a25c9892661145a81611e91565b7f000000000000000000000000000000000000000000000000000000174876e8003a11156114bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b490613327565b60405180910390fd5b60006005600085815260200190815260200160002090508060050160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155a90613782565b60405180910390fd5b8060030160149054906101000a900460ff16156115b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115ac906137ee565b60405180910390fd5b60018160050160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506040518060600160405280848152602001428152602001438152506006600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010155604082015181600201559050503373ffffffffffffffffffffffffffffffffffffffff16847f6459ffc8e2e6aea1e7a6161f54ca96e0b0c83db7191f26ccf5c33e14f7f178c5856040516116e29190612d50565b60405180910390a350506116f461218f565b5050565b6006602052816000526040600020602052806000526040600020600091509150508060000154908060010154908060020154905083565b61173761211c565b61173f611ea5565b7f21702c8af46127c7fa207f89d0b0a8441bb32959a0ac7df790e9ab1a25c9892661176981611e91565b7f000000000000000000000000000000000000000000000000000000174876e8003a11156117cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c390613327565b60405180910390fd5b60006005600087815260200190815260200160002090508060050160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611871576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118689061385a565b60405180910390fd5b8060060160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611900576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f7906138c6565b60405180910390fd5b8060030160149054906101000a900460ff1615611952576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611949906137ee565b60405180910390fd5b60006006600088815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090507f000000000000000000000000000000000000000000000000000000000000000181600201546119d69190613915565b431015611a18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0f90613995565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000058160020154611a489190613915565b431115611a8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8190613a01565b60405180910390fd5b806000015486604051602001611aa09190613a42565b6040516020818303038152906040528051906020012014611af6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aed90613aa9565b60405180910390fd5b6000878360010154888460010154604051602001611b179493929190613aea565b6040516020818303038152906040528051906020012090506000611b3a826121fc565b90506000611b9588888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508361222c90919063ffffffff16565b90503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bfc90613b84565b60405180910390fd5b60018560060160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550846004016000815480929190611c7490613ba4565b919050555060405180604001604052808a815260200189898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050815250600760008c815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001019081611d419190613d8e565b509050503373ffffffffffffffffffffffffffffffffffffffff168a7f8cda1ba6de5fd54e5f4f1083c87ed5eed50b5da7365780a8b77581fd0671d0768b604051611d8c9190612c6a565b60405180910390a37f0000000000000000000000000000000000000000000000000000000000000002856004015410611dc957611dc88a612253565b5b505050505050611dd761218f565b50505050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b611ea281611e9d611fcf565b612527565b50565b611ead610bf8565b15611eed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ee490613eac565b60405180910390fd5b565b611ef9828261112e565b611fcb57600180600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611f70611fcf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b611fe1828261112e565b156120b55760006001600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061205a611fcf565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b6120c16125ac565b6000600260006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa612105611fcf565b6040516121129190612dba565b60405180910390a1565b600260005403612161576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215890613f18565b60405180910390fd5b6002600081905550565b6001816000016000828254019250508190555050565b600081600001549050919050565b6001600081905550565b6121a1611ea5565b6001600260006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121e5611fcf565b6040516121f29190612dba565b60405180910390a1565b60008160405160200161220f9190613f8f565b604051602081830303815290604052805190602001209050919050565b600080600061223b85856125f5565b9150915061224881612646565b819250505092915050565b60006005600083815260200190815260200160002090508060030160149054906101000a900460ff16156122bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122b390614001565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000281600401541015612323576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161231a9061406d565b60405180910390fd5b60008060001b90506000805b6009805490508110801561236257507f000000000000000000000000000000000000000000000000000000000000000282105b156124aa5760006009828154811061237d5761237c61408d565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508460060160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156124965760006007600088815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508481600001548260010160405160200161246e9392919061414a565b604051602081830303815290604052805190602001209450838061249190613ba4565b945050505b5080806124a290613ba4565b91505061232f565b5060008260001c905080600860008781526020019081526020016000208190555060018460030160146101000a81548160ff021916908315150217905550847fec896808b0b6dea42be36763a896d6001b2f27d92e2e39a8c891ef22419d3a25826040516125189190612c6a565b60405180910390a25050505050565b612531828261112e565b6125a85761253e816127ac565b61254c8360001c60206127d9565b60405160200161255d92919061424c565b6040516020818303038152906040526040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161259f91906135d0565b60405180910390fd5b5050565b6125b4610bf8565b6125f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125ea906142d2565b60405180910390fd5b565b60008060418351036126365760008060006020860151925060408601519150606086015160001a905061262a87828585612a15565b9450945050505061263f565b60006002915091505b9250929050565b6000600481111561265a576126596142f2565b5b81600481111561266d5761266c6142f2565b5b03156127a95760016004811115612687576126866142f2565b5b81600481111561269a576126996142f2565b5b036126da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126d19061436d565b60405180910390fd5b600260048111156126ee576126ed6142f2565b5b816004811115612701576127006142f2565b5b03612741576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612738906143d9565b60405180910390fd5b60036004811115612755576127546142f2565b5b816004811115612768576127676142f2565b5b036127a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279f9061446b565b60405180910390fd5b5b50565b60606127d28273ffffffffffffffffffffffffffffffffffffffff16601460ff166127d9565b9050919050565b6060600060028360026127ec919061448b565b6127f69190613915565b67ffffffffffffffff81111561280f5761280e613414565b5b6040519080825280601f01601f1916602001820160405280156128415781602001600182028036833780820191505090505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106128795761287861408d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106128dd576128dc61408d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506000600184600261291d919061448b565b6129279190613915565b90505b60018111156129c7577f3031323334353637383961626364656600000000000000000000000000000000600f8616601081106129695761296861408d565b5b1a60f81b8282815181106129805761297f61408d565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c9450806129c0906144cd565b905061292a565b5060008414612a0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a0290614542565b60405180910390fd5b8091505092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115612a50576000600391509150612aee565b600060018787878760405160008152602001604052604051612a75949392919061457e565b6020604051602081039080840390855afa158015612a97573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612ae557600060019250925050612aee565b80600092509250505b94509492505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612b4081612b0b565b8114612b4b57600080fd5b50565b600081359050612b5d81612b37565b92915050565b600060208284031215612b7957612b78612b01565b5b6000612b8784828501612b4e565b91505092915050565b60008115159050919050565b612ba581612b90565b82525050565b6000602082019050612bc06000830184612b9c565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612bf182612bc6565b9050919050565b612c0181612be6565b8114612c0c57600080fd5b50565b600081359050612c1e81612bf8565b92915050565b600060208284031215612c3a57612c39612b01565b5b6000612c4884828501612c0f565b91505092915050565b6000819050919050565b612c6481612c51565b82525050565b6000602082019050612c7f6000830184612c5b565b92915050565b612c8e81612c51565b8114612c9957600080fd5b50565b600081359050612cab81612c85565b92915050565b600060208284031215612cc757612cc6612b01565b5b6000612cd584828501612c9c565b91505092915050565b6000819050919050565b612cf181612cde565b8114612cfc57600080fd5b50565b600081359050612d0e81612ce8565b92915050565b600060208284031215612d2a57612d29612b01565b5b6000612d3884828501612cff565b91505092915050565b612d4a81612cde565b82525050565b6000602082019050612d656000830184612d41565b92915050565b60008060408385031215612d8257612d81612b01565b5b6000612d9085828601612cff565b9250506020612da185828601612c0f565b9150509250929050565b612db481612be6565b82525050565b6000602082019050612dcf6000830184612dab565b92915050565b60008060408385031215612dec57612deb612b01565b5b6000612dfa85828601612c9c565b9250506020612e0b85828601612c0f565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612e4f578082015181840152602081019050612e34565b60008484015250505050565b6000601f19601f8301169050919050565b6000612e7782612e15565b612e818185612e20565b9350612e91818560208601612e31565b612e9a81612e5b565b840191505092915050565b6000604082019050612eba6000830185612c5b565b8181036020830152612ecc8184612e6c565b90509392505050565b600060c082019050612eea6000830189612c5b565b612ef76020830188612d41565b612f046040830187612c5b565b612f116060830186612dab565b612f1e6080830185612b9c565b612f2b60a0830184612c5b565b979650505050505050565b60008060408385031215612f4d57612f4c612b01565b5b6000612f5b85828601612c9c565b9250506020612f6c85828601612cff565b9150509250929050565b6000606082019050612f8b6000830186612d41565b612f986020830185612c5b565b612fa56040830184612c5b565b949350505050565b600080fd5b600080fd5b600080fd5b60008083601f840112612fd257612fd1612fad565b5b8235905067ffffffffffffffff811115612fef57612fee612fb2565b5b60208301915083600182028301111561300b5761300a612fb7565b5b9250929050565b6000806000806060858703121561302c5761302b612b01565b5b600061303a87828801612c9c565b945050602061304b87828801612c9c565b935050604085013567ffffffffffffffff81111561306c5761306b612b06565b5b61307887828801612fbc565b925092505092959194509250565b6000819050919050565b60006130ab6130a66130a184612bc6565b613086565b612bc6565b9050919050565b60006130bd82613090565b9050919050565b60006130cf826130b2565b9050919050565b6130df816130c4565b82525050565b60006020820190506130fa60008301846130d6565b92915050565b600082825260208201905092915050565b7f52657175657374206e6f742066756c66696c6c65640000000000000000000000600082015250565b6000613147601583613100565b915061315282613111565b602082019050919050565b600060208201905081810360008301526131768161313a565b9050919050565b7f496e76616c6964207061796d656e742070726f636573736f7200000000000000600082015250565b60006131b3601983613100565b91506131be8261317d565b602082019050919050565b600060208201905081810360008301526131e2816131a6565b9050919050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000613245602f83613100565b9150613250826131e9565b604082019050919050565b6000602082019050818103600083015261327481613238565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806132c257607f821691505b6020821081036132d5576132d461327b565b5b50919050565b7f47617320707269636520746f6f20686967680000000000000000000000000000600082015250565b6000613311601283613100565b915061331c826132db565b602082019050919050565b6000602082019050818103600083015261334081613304565b9050919050565b7f43616c6c6572206e6f742077686974656c697374656400000000000000000000600082015250565b600061337d601683613100565b915061338882613347565b602082019050919050565b600060208201905081810360008301526133ac81613370565b9050919050565b60006040820190506133c86000830185612dab565b81810360208301526133da8184612e6c565b90509392505050565b6133ec81612b90565b81146133f757600080fd5b50565b600081519050613409816133e3565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61344c82612e5b565b810181811067ffffffffffffffff8211171561346b5761346a613414565b5b80604052505050565b600061347e612af7565b905061348a8282613443565b919050565b600067ffffffffffffffff8211156134aa576134a9613414565b5b6134b382612e5b565b9050602081019050919050565b60006134d36134ce8461348f565b613474565b9050828152602081018484840111156134ef576134ee61340f565b5b6134fa848285612e31565b509392505050565b600082601f83011261351757613516612fad565b5b81516135278482602086016134c0565b91505092915050565b6000806040838503121561354757613546612b01565b5b6000613555858286016133fa565b925050602083015167ffffffffffffffff81111561357657613575612b06565b5b61358285828601613502565b9150509250929050565b600081519050919050565b60006135a28261358c565b6135ac8185613100565b93506135bc818560208601612e31565b6135c581612e5b565b840191505092915050565b600060208201905081810360008301526135ea8184613597565b905092915050565b7f4e6f742077686974656c69737465640000000000000000000000000000000000600082015250565b6000613628600f83613100565b9150613633826135f2565b602082019050919050565b600060208201905081810360008301526136578161361b565b9050919050565b7f496e76616c696420616464726573730000000000000000000000000000000000600082015250565b6000613694600f83613100565b915061369f8261365e565b602082019050919050565b600060208201905081810360008301526136c381613687565b9050919050565b7f416c72656164792077686974656c697374656400000000000000000000000000600082015250565b6000613700601383613100565b915061370b826136ca565b602082019050919050565b6000602082019050818103600083015261372f816136f3565b9050919050565b7f416c726561647920636f6d6d6974746564000000000000000000000000000000600082015250565b600061376c601183613100565b915061377782613736565b602082019050919050565b6000602082019050818103600083015261379b8161375f565b9050919050565b7f5265717565737420616c72656164792066756c66696c6c656400000000000000600082015250565b60006137d8601983613100565b91506137e3826137a2565b602082019050919050565b60006020820190508181036000830152613807816137cb565b9050919050565b7f4d75737420636f6d6d6974206669727374000000000000000000000000000000600082015250565b6000613844601183613100565b915061384f8261380e565b602082019050919050565b6000602082019050818103600083015261387381613837565b9050919050565b7f416c72656164792072657665616c656400000000000000000000000000000000600082015250565b60006138b0601083613100565b91506138bb8261387a565b602082019050919050565b600060208201905081810360008301526138df816138a3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061392082612c51565b915061392b83612c51565b9250828201905080821115613943576139426138e6565b5b92915050565b7f546f6f206561726c7920746f2072657665616c00000000000000000000000000600082015250565b600061397f601383613100565b915061398a82613949565b602082019050919050565b600060208201905081810360008301526139ae81613972565b9050919050565b7f546f6f206c61746520746f2072657665616c0000000000000000000000000000600082015250565b60006139eb601283613100565b91506139f6826139b5565b602082019050919050565b60006020820190508181036000830152613a1a816139de565b9050919050565b6000819050919050565b613a3c613a3782612c51565b613a21565b82525050565b6000613a4e8284613a2b565b60208201915081905092915050565b7f496e76616c69642072657665616c000000000000000000000000000000000000600082015250565b6000613a93600e83613100565b9150613a9e82613a5d565b602082019050919050565b60006020820190508181036000830152613ac281613a86565b9050919050565b6000819050919050565b613ae4613adf82612cde565b613ac9565b82525050565b6000613af68287613a2b565b602082019150613b068286613ad3565b602082019150613b168285613a2b565b602082019150613b268284613a2b565b60208201915081905095945050505050565b7f496e76616c6964207369676e6174757265000000000000000000000000000000600082015250565b6000613b6e601183613100565b9150613b7982613b38565b602082019050919050565b60006020820190508181036000830152613b9d81613b61565b9050919050565b6000613baf82612c51565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613be157613be06138e6565b5b600182019050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302613c4e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82613c11565b613c588683613c11565b95508019841693508086168417925050509392505050565b6000613c8b613c86613c8184612c51565b613086565b612c51565b9050919050565b6000819050919050565b613ca583613c70565b613cb9613cb182613c92565b848454613c1e565b825550505050565b600090565b613cce613cc1565b613cd9818484613c9c565b505050565b5b81811015613cfd57613cf2600082613cc6565b600181019050613cdf565b5050565b601f821115613d4257613d1381613bec565b613d1c84613c01565b81016020851015613d2b578190505b613d3f613d3785613c01565b830182613cde565b50505b505050565b600082821c905092915050565b6000613d6560001984600802613d47565b1980831691505092915050565b6000613d7e8383613d54565b9150826002028217905092915050565b613d9782612e15565b67ffffffffffffffff811115613db057613daf613414565b5b613dba82546132aa565b613dc5828285613d01565b600060209050601f831160018114613df85760008415613de6578287015190505b613df08582613d72565b865550613e58565b601f198416613e0686613bec565b60005b82811015613e2e57848901518255600182019150602085019450602081019050613e09565b86831015613e4b5784890151613e47601f891682613d54565b8355505b6001600288020188555050505b505050505050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b6000613e96601083613100565b9150613ea182613e60565b602082019050919050565b60006020820190508181036000830152613ec581613e89565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b6000613f02601f83613100565b9150613f0d82613ecc565b602082019050919050565b60006020820190508181036000830152613f3181613ef5565b9050919050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000613f79601c83613f38565b9150613f8482613f43565b601c82019050919050565b6000613f9a82613f6c565b9150613fa68284613ad3565b60208201915081905092915050565b7f416c72656164792066756c66696c6c6564000000000000000000000000000000600082015250565b6000613feb601183613100565b9150613ff682613fb5565b602082019050919050565b6000602082019050818103600083015261401a81613fde565b9050919050565b7f4e6f7420656e6f7567682076616c696420736861726573000000000000000000600082015250565b6000614057601783613100565b915061406282614021565b602082019050919050565b600060208201905081810360008301526140868161404a565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081905092915050565b600081546140d4816132aa565b6140de81866140bc565b945060018216600081146140f9576001811461410e57614141565b60ff1983168652811515820286019350614141565b61411785613bec565b60005b838110156141395781548189015260018201915060208101905061411a565b838801955050505b50505092915050565b60006141568286613ad3565b6020820191506141668285613a2b565b60208201915061417682846140c7565b9150819050949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b60006141b9601783613f38565b91506141c482614183565b601782019050919050565b60006141da8261358c565b6141e48185613f38565b93506141f4818560208601612e31565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000614236601183613f38565b915061424182614200565b601182019050919050565b6000614257826141ac565b915061426382856141cf565b915061426e82614229565b915061427a82846141cf565b91508190509392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b60006142bc601483613100565b91506142c782614286565b602082019050919050565b600060208201905081810360008301526142eb816142af565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b6000614357601883613100565b915061436282614321565b602082019050919050565b600060208201905081810360008301526143868161434a565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b60006143c3601f83613100565b91506143ce8261438d565b602082019050919050565b600060208201905081810360008301526143f2816143b6565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b6000614455602283613100565b9150614460826143f9565b604082019050919050565b6000602082019050818103600083015261448481614448565b9050919050565b600061449682612c51565b91506144a183612c51565b92508282026144af81612c51565b915082820484148315176144c6576144c56138e6565b5b5092915050565b60006144d882612c51565b9150600082036144eb576144ea6138e6565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b600061452c602083613100565b9150614537826144f6565b602082019050919050565b6000602082019050818103600083015261455b8161451f565b9050919050565b600060ff82169050919050565b61457881614562565b82525050565b60006080820190506145936000830187612d41565b6145a0602083018661456f565b6145ad6040830185612d41565b6145ba6060830184612d41565b9594505050505056fea26469706673582212202fb7bc3e0138f7498556900a0c1e654050653a5e4a4f5849e53d8530ac29be7f64736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000174876e80000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003000000000000000000000000683fa50eab7a0b12cb3d55f6e3f813a87df6d00c000000000000000000000000ade57f1310ef6909b8960d972982ff4aa33a6cff000000000000000000000000e3aae68c403f717fa034762605a32ba1229d4c2f
-----Decoded View---------------
Arg [0] : threshold (uint256): 2
Arg [1] : totalValidators (uint256): 3
Arg [2] : minBlocksDelay (uint256): 1
Arg [3] : maxBlocksDelay (uint256): 5
Arg [4] : maxGasPrice (uint256): 100000000000
Arg [5] : initialValidators (address[]): 0x683fa50EAb7a0B12cb3d55F6e3F813a87DF6d00c,0xade57F1310eF6909B8960d972982fF4aa33A6CFF,0xE3aAe68c403F717Fa034762605A32bA1229d4C2F
Arg [6] : paymentProcessorAddress (address): 0x0000000000000000000000000000000000000001
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [4] : 000000000000000000000000000000000000000000000000000000174876e800
Arg [5] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [8] : 000000000000000000000000683fa50eab7a0b12cb3d55f6e3f813a87df6d00c
Arg [9] : 000000000000000000000000ade57f1310ef6909b8960d972982ff4aa33a6cff
Arg [10] : 000000000000000000000000e3aae68c403f717fa034762605a32ba1229d4c2f
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.