Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- OrandProviderV3
- Optimization enabled
- true
- Compiler version
- v0.8.19+commit.7dd6d404
- Optimization runs
- 1000
- EVM Version
- default
- Verified at
- 2024-10-07T11:14:53.709122Z
contracts/orand-v3/OrandProviderV3.sol
// SPDX-License-Identifier: Apache-2.0pragma solidity 0.8.19;import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';import '../libraries/Ownable.sol';import '../libraries/ReentrancyGuard.sol';import './interfaces/IOrandProviderV3.sol';import './interfaces/IOrandECVRFV3.sol';import './interfaces/IOrandConsumerV3.sol';import './OrandStorageV3.sol';import './OrandManagementV3.sol';import './OrandECDSAV3.sol';import '../orocle-v1/interfaces/IOrocleAggregatorV1.sol';contract OrandProviderV3 isInitializable,Ownable,ReentrancyGuard,OrandStorageV3,OrandManagementV3,OrandECDSAV3,IOrandProviderV3{// ECVRF verifier smart contractIOrandECVRFV3 private ecvrf;// Orocle V1IOrocleAggregatorV1 private oracle;// We allow max batching is 1000uint256 private maxBatching;// Event: Set New ECVRF Verifierevent SetNewECVRFVerifier(address indexed actor, address indexed ecvrfAddress);// Event: Set the limit for batching randomnessevent SetBatchingLimit(address indexed actor, uint256 indexed maxBatching);// Event: set new oracleevent SetNewOracle(address indexed actor, address indexed newOracle);
@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)pragma solidity ^0.8.2;import "../../utils/AddressUpgradeable.sol";/*** @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.** The initialization functions use a version number. Once a version number is used, it is consumed and cannot be* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in* case an upgrade adds a module that needs to be initialized.** For example:** [.hljs-theme-light.nopadding]* ```solidity* contract MyToken is ERC20Upgradeable {* function initialize() initializer public {* __ERC20_init("MyToken", "MTK");* }* }** contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {* function initializeV2() reinitializer(2) public {* __ERC20Permit_init("MyToken");* }* }* ```** TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.** CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.** [CAUTION]
@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)pragma solidity ^0.8.1;/*** @dev Collection of functions related to the address type*/library AddressUpgradeable {/*** @dev Returns true if `account` is a contract.** [IMPORTANT]* ====* It is unsafe to assume that an address for which this function returns* false is an externally-owned account (EOA) and not a contract.** Among others, `isContract` will return false for the following* types of addresses:** - an externally-owned account* - a contract in construction* - an address where a contract will be created* - an address where a contract lived, but was destroyed** Furthermore, `isContract` will also return true if the target contract within* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,* which only has an effect at the end of a transaction.* ====** [IMPORTANT]* ====* You shouldn't rely on `isContract` to protect against flash loan attacks!** Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract* constructor.* ====*/function isContract(address account) internal view returns (bool) {// This method relies on extcodesize/address.code.length, which returns 0
@openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.4) (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;}function _contextSuffixLength() internal view virtual returns (uint256) {return 0;}}
@openzeppelin/contracts/utils/Strings.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)pragma solidity ^0.8.0;import "./math/Math.sol";import "./math/SignedMath.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-assemblyassembly {ptr := add(buffer, add(32, length))}while (true) {ptr--;/// @solidity memory-safe-assemblyassembly {mstore8(ptr, byte(mod(value, 10), _SYMBOLS))}value /= 10;if (value == 0) break;}return buffer;}}/**
@openzeppelin/contracts/utils/cryptography/ECDSA.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.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.
@openzeppelin/contracts/utils/math/Math.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.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 infinityUp, // Toward infinityZero // 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.*
@openzeppelin/contracts/utils/math/SignedMath.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)pragma solidity ^0.8.0;/*** @dev Standard signed math utilities missing in the Solidity language.*/library SignedMath {/*** @dev Returns the largest of two signed numbers.*/function max(int256 a, int256 b) internal pure returns (int256) {return a > b ? a : b;}/*** @dev Returns the smallest of two signed numbers.*/function min(int256 a, int256 b) internal pure returns (int256) {return a < b ? a : b;}/*** @dev Returns the average of two signed numbers without overflow.* The result is rounded towards zero.*/function average(int256 a, int256 b) internal pure returns (int256) {// Formula from the book "Hacker's Delight"int256 x = (a & b) + ((a ^ b) >> 1);return x + (int256(uint256(x) >> 255) & (a ^ b));}/*** @dev Returns the absolute unsigned value of a signed value.*/function abs(int256 n) internal pure returns (uint256) {unchecked {// must be unchecked in order to support `n = type(int256).min`return uint256(n >= 0 ? n : -n);}
contracts/libraries/Bytes.sol
// SPDX-License-Identifier: Apache-2.0pragma solidity 0.8.19;// Index is out of rangeerror OutOfRange(uint256 requiredLen, uint256 maxLen);library Bytes {// Read address from input bytes bufferfunction readAddress(bytes memory input, uint256 offset) internal pure returns (address result) {if (offset + 20 > input.length) {revert OutOfRange(offset + 20, input.length);}assembly {result := shr(96, mload(add(add(input, 0x20), offset)))}}// Read unsafe from input bytes bufferfunction readUintUnsafe(bytes memory input, uint256 offset, uint256 bitLen) internal pure returns (uint256 result) {assembly {result := shr(sub(256, bitLen), mload(add(add(input, 0x20), offset)))}}// Read uint256 from input bytes bufferfunction readUint256(bytes memory input, uint256 offset) internal pure returns (uint256 result) {if (offset + 32 > input.length) {revert OutOfRange(offset + 32, input.length);}assembly {result := mload(add(add(input, 0x20), offset))}}// Read a sub bytes array from input bytes bufferfunction readBytes(bytes memory input, uint256 offset, uint256 length) internal pure returns (bytes memory) {if (offset + length > input.length) {revert OutOfRange(offset + length, input.length);}bytes memory result = new bytes(length);assembly {
contracts/libraries/Ownable.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)pragma solidity ^0.8.0;import '@openzeppelin/contracts/utils/Context.sol';/*** @dev Contract module which provides a basic access control mechanism, where* there is an account (an owner) that can be granted exclusive access to* specific functions.** By default, the owner account will be the one that deploys the contract. This* can later be changed with {transferOwnership}.** This module is used through inheritance. It will make available the modifier* `onlyOwner`, which can be applied to your functions to restrict their use to* the owner.*/abstract contract Ownable is Context {address private _owner;event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);/*** @dev Initializes the contract setting the deployer as the initial owner.*/function _initOwnable() internal {_transferOwnership(_msgSender());}/*** @dev Throws if called by any account other than the owner.*/modifier onlyOwner() {_checkOwner();_;}/*** @dev Returns the address of the current owner.
contracts/orand-v3/interfaces/IOrandECVRFV3.sol
// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.0;import './IOrandProviderV3.sol';interface IOrandECVRFV3 {// Verify raw proof of ECVRFfunction verifyECVRFProof(uint256[2] memory pk,uint256[2] memory gamma,uint256 c,uint256 s,uint256 alpha,address uWitness,uint256[2] memory cGammaWitness,uint256[2] memory sHashWitness,uint256 zInv) external view returns (uint256 y);// Verify structed proof of ECVRFfunction verifyStructECVRFProof(uint256[2] memory pk,IOrandProviderV3.ECVRFProof memory ecvrfProof) external view returns (uint256 y);}
contracts/libraries/ReentrancyGuard.sol
// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.9.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].*/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;function _initReentrancyGuard() internal {_status = _NOT_ENTERED;}
contracts/orand-v3/OrandECDSAV3.sol
// SPDX-License-Identifier: Apache-2.0pragma solidity 0.8.19;import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';import '../libraries/Bytes.sol';import './interfaces/IOrandECDSAV3.sol';contract OrandECDSAV3 is IOrandECDSAV3 {// Event: Set New Operatorevent SetNewOperator(address indexed oldOperator, address indexed newOperator);// Orand operator addressaddress private operator;// Byte manipulationusing Bytes for bytes;// Verifiy digital signatureusing ECDSA for bytes;using ECDSA for bytes32;// Set operator at constructing timefunction _initOrandECDSAV3(address operatorAddress) internal {_setOperator(operatorAddress);}//=======================[ Internal ]====================// Set proof operatorfunction _setOperator(address operatorAddress) internal {emit SetNewOperator(operator, operatorAddress);operator = operatorAddress;}//=======================[ Internal View ]====================// Get operator addressfunction _getOperator() internal view returns (address operatorAddress) {return operator;}
contracts/orand-v3/OrandManagementV3.sol
// SPDX-License-Identifier: Apache-2.0pragma solidity 0.8.19;import '../libraries/Bytes.sol';import './interfaces/IOrandManagementV3.sol';contract OrandManagementV3 is IOrandManagementV3 {// Public key that will be use touint256[2] private publicKey;// Event Set New Public Keyevent SetNewPublicKey(address indexed actor, uint256 indexed pkx, uint256 indexed pky);// Set public key of Orand at the constructing timefunction _initOrandManagementV3(uint256[2] memory publickey) internal {_setPublicKey(publickey);}//=======================[ Internal ]====================// Set new public key by XY to verify ECVRF prooffunction _setPublicKey(uint256[2] memory publickey) internal {publicKey = publickey;emit SetNewPublicKey(msg.sender, publickey[0], publickey[1]);}//=======================[ Internal view ]====================// Get public keyfunction _getPublicKey() internal view returns (uint256[2] memory pubKey) {return publicKey;}// Get public key digestfunction _getPublicKeyDigest() internal view returns (bytes32 pubKeyDigest) {return keccak256(abi.encodePacked(publicKey));}//=======================[ External view ]====================
contracts/orand-v3/OrandStorageV3.sol
// SPDX-License-Identifier: Apache-2.0pragma solidity 0.8.19;import './interfaces/IOrandStorageV3.sol';import '../libraries/Bytes.sol';contract OrandStorageV3 is IOrandStorageV3 {using Bytes for bytes;// Event: New Epochevent NewEpoch(address indexed receiverAddress, uint96 indexed receiverEpoch, uint256 indexed randomness);// Storage of recent epoch's result// Map epoch ++ receiver -> alphamapping(uint256 => uint256) private epochResult;// Map receiver -> total epochmapping(address => uint256) private epochMax;//=======================[ Internal ]====================// Add validity epochfunction _addEpoch(address receiver, uint256 result) internal {uint96 epoch = uint96(epochMax[receiver]);// Add epoch to storage// epoch != 0 => able to sue == trueepochResult[_packing(epoch, receiver)] = result;// If add new epoch we increase the epoch max 1epochMax[receiver] = epoch + 1;// Emit event to outside of EVMemit NewEpoch(receiver, epoch, result);}//=======================[ Internal pure ]====================// Packing adderss and uint96 to a single bytes32// 96 bits a ++ 160 bits bfunction _packing(uint96 a, address b) internal pure returns (uint256 packed) {assembly {packed := or(shl(160, a), b)}
contracts/orand-v3/interfaces/IOrandConsumerV3.sol
// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.0;error InvalidProvider();/*** @dev IOrandConsumerV3 must be implemented for all service that use Orand*/interface IOrandConsumerV3 {/*** Consume the verifiable randomness from Orand provider* @param randomness Randomness value* @return return false if you want to stop batching otherwise return true*/function consumeRandomness(uint256 randomness) external returns (bool);/*** Check the fulfill status of randomness batching* @return true if all requests are fulfilled otherwise return false*/function isFulfilled() external returns (bool);}
contracts/orand-v3/interfaces/IOrandECDSAV3.sol
// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.0;// Errorerror InvalidECDSAProofLength(uint256 proofLength);error InvalidProofSigner(address proofSigner);interface IOrandECDSAV3 {// Struct Orand ECDSA proofstruct OrandECDSAProof {address signer;address receiverAddress;uint96 receiverEpoch;uint256 ecvrfProofDigest;}// Get signer address from a valid prooffunction decomposeProof(bytes memory proof) external pure returns (OrandECDSAProof memory ecdsaProof);// Get operatorfunction getOperator() external view returns (address operatorAddress);}
contracts/orand-v3/interfaces/IOrandManagementV3.sol
// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.0;interface IOrandManagementV3 {// Get public keyfunction getPublicKey() external view returns (uint256[2] memory pubKey);// Get digest of corresponding public keyfunction getPublicKeyDigest() external view returns (bytes32 operator);}
contracts/orand-v3/interfaces/IOrandProviderV3.sol
// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.0;import './IOrandECDSAV3.sol';error UnableToForwardRandomness(address receiver, uint256 y);error InvalidAlphaValue(uint256 expectedAlpha, uint256 givenAlpha);error InvalidGenesisEpoch(uint256 currentEpoch);error InvalidECVRFProofDigest();error InvalidECDSAProof(address signerAddress);interface IOrandProviderV3 is IOrandECDSAV3 {// ECVRF structstruct ECVRFProof {uint256[2] gamma;uint256 c;uint256 s;uint256 alpha;address uWitness;uint256[2] cGammaWitness;uint256[2] sHashWitness;uint256 zInv;}// Start new genesis for receiverfunction genesis(bytes memory fraudProof, ECVRFProof calldata ecvrfProof) external returns (bool);// Publish new epoch with Fraud Prooffunction publishFraudProof(bytes memory fraudProof, ECVRFProof calldata ecvrfProof) external returns (bool);// Publish new epoch with ECDSA Proof and Fraud Prooffunction publish(address receiver, ECVRFProof calldata ecvrfProof) external returns (bool);// Verify a ECVRF proof epoch is valid or notfunction verifyEpoch(bytes memory fraudProof,ECVRFProof calldata ecvrfProof)externalviewreturns (
contracts/orand-v3/interfaces/IOrandStorageV3.sol
// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.0;interface IOrandStorageV3 {// Get a given epoch result for a given receiverfunction getEpochResult(address receiver, uint96 epoch) external view returns (uint256 result);// Get total number of epochs for a given receiverfunction getTotalEpoch(address receiver) external view returns (uint96 epoch);// Get current epoch of a given receiverfunction getCurrentEpoch(address receiver) external view returns (uint96 epoch);// Get current epoch of a given receiverfunction getCurrentEpochResult(address receiver) external view returns (uint256 result);}
contracts/orocle-v1/interfaces/IOrocleAggregatorV1.sol
// SPDX-License-Identifier: Apache-2.0pragma solidity ^0.8.0;error ExistedApplication(uint32 appId);error InvalidApplication(uint32 appId);error InvalidApplicationName(bytes24 appName);error InvalidRoundNumber(uint64 round, uint64 requiredRound);error UndefinedRound(uint64 round);error InvalidDataLength(uint256 length);error UnableToPublishData(bytes data);error DeactivatedUser(address user);interface IOrocleAggregatorV1 {/*** Emit event when a new request is created* @param identifier Data identifier* @param data Data*/function request(uint256 identifier, bytes calldata data) external returns (bool);/*** Fulfill request* @param identifier Data identifier* @param data Data*/function fulfill(uint256 identifier, bytes calldata data) external returns (bool);/*** Check if user is deactivated* @param user User address* @return status*/function isDeactivated(address user) external view returns (bool);/*** Get round of a given application* @param appId Application ID* @return round*/function getMetadata(uint32 appId, bytes20 identifier) external view returns (uint64 round, uint64 lastUpdate);
Compiler Settings
{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata","storageLayout"],"":["ast"]}},"optimizer":{"runs":1000,"enabled":true},"libraries":{}}
Contract ABI
[{"type":"error","name":"InvalidAlphaValue","inputs":[{"type":"uint256","name":"expectedAlpha","internalType":"uint256"},{"type":"uint256","name":"givenAlpha","internalType":"uint256"}]},{"type":"error","name":"InvalidECDSAProof","inputs":[{"type":"address","name":"signerAddress","internalType":"address"}]},{"type":"error","name":"InvalidECDSAProofLength","inputs":[{"type":"uint256","name":"proofLength","internalType":"uint256"}]},{"type":"error","name":"InvalidECVRFProofDigest","inputs":[]},{"type":"error","name":"InvalidGenesisEpoch","inputs":[{"type":"uint256","name":"currentEpoch","internalType":"uint256"}]},{"type":"error","name":"InvalidProofSigner","inputs":[{"type":"address","name":"proofSigner","internalType":"address"}]},{"type":"error","name":"OutOfRange","inputs":[{"type":"uint256","name":"requiredLen","internalType":"uint256"},{"type":"uint256","name":"maxLen","internalType":"uint256"}]},{"type":"event","name":"ExternalError","inputs":[{"type":"address","name":"receiverAddress","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"type":"uint8","name":"version","internalType":"uint8","indexed":false}],"anonymous":false},{"type":"event","name":"NewEpoch","inputs":[{"type":"address","name":"receiverAddress","internalType":"address","indexed":true},{"type":"uint96","name":"receiverEpoch","internalType":"uint96","indexed":true},{"type":"uint256","name":"randomness","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SetBatchingLimit","inputs":[{"type":"address","name":"actor","internalType":"address","indexed":true},{"type":"uint256","name":"maxBatching","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"SetNewECVRFVerifier","inputs":[{"type":"address","name":"actor","internalType":"address","indexed":true},{"type":"address","name":"ecvrfAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SetNewOperator","inputs":[{"type":"address","name":"oldOperator","internalType":"address","indexed":true},{"type":"address","name":"newOperator","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SetNewOracle","inputs":[{"type":"address","name":"actor","internalType":"address","indexed":true},{"type":"address","name":"newOracle","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SetNewPublicKey","inputs":[{"type":"address","name":"actor","internalType":"address","indexed":true},{"type":"uint256","name":"pkx","internalType":"uint256","indexed":true},{"type":"uint256","name":"pky","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"pure","outputs":[{"type":"tuple","name":"ecdsaProof","internalType":"struct IOrandECDSAV3.OrandECDSAProof","components":[{"type":"address","name":"signer","internalType":"address"},{"type":"address","name":"receiverAddress","internalType":"address"},{"type":"uint96","name":"receiverEpoch","internalType":"uint96"},{"type":"uint256","name":"ecvrfProofDigest","internalType":"uint256"}]}],"name":"decomposeProof","inputs":[{"type":"bytes","name":"proof","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"genesis","inputs":[{"type":"bytes","name":"fraudProof","internalType":"bytes"},{"type":"tuple","name":"ecvrfProof","internalType":"struct IOrandProviderV3.ECVRFProof","components":[{"type":"uint256[2]","name":"gamma","internalType":"uint256[2]"},{"type":"uint256","name":"c","internalType":"uint256"},{"type":"uint256","name":"s","internalType":"uint256"},{"type":"uint256","name":"alpha","internalType":"uint256"},{"type":"address","name":"uWitness","internalType":"address"},{"type":"uint256[2]","name":"cGammaWitness","internalType":"uint256[2]"},{"type":"uint256[2]","name":"sHashWitness","internalType":"uint256[2]"},{"type":"uint256","name":"zInv","internalType":"uint256"}]}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint96","name":"epoch","internalType":"uint96"}],"name":"getCurrentEpoch","inputs":[{"type":"address","name":"receiver","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"result","internalType":"uint256"}],"name":"getCurrentEpochResult","inputs":[{"type":"address","name":"receiver","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"ecvrfVerifier","internalType":"address"}],"name":"getECVRFVerifier","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"result","internalType":"uint256"}],"name":"getEpochResult","inputs":[{"type":"address","name":"receiver","internalType":"address"},{"type":"uint96","name":"epoch","internalType":"uint96"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"maxBatchingLimit","internalType":"uint256"}],"name":"getMaximumBatching","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"operatorAddress","internalType":"address"}],"name":"getOperator","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"oracleAddress","internalType":"address"}],"name":"getOracle","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[2]","name":"pubKey","internalType":"uint256[2]"}],"name":"getPublicKey","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"operator","internalType":"bytes32"}],"name":"getPublicKeyDigest","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint96","name":"epoch","internalType":"uint96"}],"name":"getTotalEpoch","inputs":[{"type":"address","name":"receiver","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"uint256[2]","name":"publicKey","internalType":"uint256[2]"},{"type":"address","name":"operator","internalType":"address"},{"type":"address","name":"ecvrfAddress","internalType":"address"},{"type":"address","name":"oracleAddress","internalType":"address"},{"type":"uint256","name":"maxBatchingLimit","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"publish","inputs":[{"type":"address","name":"receiverAddress","internalType":"address"},{"type":"tuple","name":"ecvrfProof","internalType":"struct IOrandProviderV3.ECVRFProof","components":[{"type":"uint256[2]","name":"gamma","internalType":"uint256[2]"},{"type":"uint256","name":"c","internalType":"uint256"},{"type":"uint256","name":"s","internalType":"uint256"},{"type":"uint256","name":"alpha","internalType":"uint256"},{"type":"address","name":"uWitness","internalType":"address"},{"type":"uint256[2]","name":"cGammaWitness","internalType":"uint256[2]"},{"type":"uint256[2]","name":"sHashWitness","internalType":"uint256[2]"},{"type":"uint256","name":"zInv","internalType":"uint256"}]}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"publishFraudProof","inputs":[{"type":"bytes","name":"fraudProof","internalType":"bytes"},{"type":"tuple","name":"ecvrfProof","internalType":"struct IOrandProviderV3.ECVRFProof","components":[{"type":"uint256[2]","name":"gamma","internalType":"uint256[2]"},{"type":"uint256","name":"c","internalType":"uint256"},{"type":"uint256","name":"s","internalType":"uint256"},{"type":"uint256","name":"alpha","internalType":"uint256"},{"type":"address","name":"uWitness","internalType":"address"},{"type":"uint256[2]","name":"cGammaWitness","internalType":"uint256[2]"},{"type":"uint256[2]","name":"sHashWitness","internalType":"uint256[2]"},{"type":"uint256","name":"zInv","internalType":"uint256"}]}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"setMaxBatching","inputs":[{"type":"uint256","name":"maxBatchingLimit","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"setNewECVRFVerifier","inputs":[{"type":"address","name":"ecvrfAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"setNewOracle","inputs":[{"type":"address","name":"oracleAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"setPublicKey","inputs":[{"type":"uint256[2]","name":"pk","internalType":"uint256[2]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"ecdsaProof","internalType":"struct IOrandECDSAV3.OrandECDSAProof","components":[{"type":"address","name":"signer","internalType":"address"},{"type":"address","name":"receiverAddress","internalType":"address"},{"type":"uint96","name":"receiverEpoch","internalType":"uint96"},{"type":"uint256","name":"ecvrfProofDigest","internalType":"uint256"}]},{"type":"uint96","name":"currentEpochNumber","internalType":"uint96"},{"type":"bool","name":"isEpochLinked","internalType":"bool"},{"type":"bool","name":"isValidDualProof","internalType":"bool"},{"type":"uint256","name":"currentEpochResult","internalType":"uint256"},{"type":"uint256","name":"verifiedEpochResult","internalType":"uint256"}],"name":"verifyEpoch","inputs":[{"type":"bytes","name":"fraudProof","internalType":"bytes"},{"type":"tuple","name":"ecvrfProof","internalType":"struct IOrandProviderV3.ECVRFProof","components":[{"type":"uint256[2]","name":"gamma","internalType":"uint256[2]"},{"type":"uint256","name":"c","internalType":"uint256"},{"type":"uint256","name":"s","internalType":"uint256"},{"type":"uint256","name":"alpha","internalType":"uint256"},{"type":"address","name":"uWitness","internalType":"address"},{"type":"uint256[2]","name":"cGammaWitness","internalType":"uint256[2]"},{"type":"uint256[2]","name":"sHashWitness","internalType":"uint256[2]"},{"type":"uint256","name":"zInv","internalType":"uint256"}]}]}]
Contract Creation Code
0x608060405234801561001057600080fd5b50612068806100206000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c8063833b1fce116100e3578063cfa51d9a1161008c578063e7f43c6811610066578063e7f43c6814610371578063f2fde38b14610379578063f4de72311461038c57600080fd5b8063cfa51d9a14610324578063e02bc3c814610349578063e5114f6c1461035157600080fd5b8063b0ab7dac116100bd578063b0ab7dac146102dc578063bf776ba414610300578063c0f948d21461031357600080fd5b8063833b1fce1461028d5780638da5cb5b146102b25780639a336be1146102c957600080fd5b806372ceb2de116101455780637fcde1c21161011f5780637fcde1c214610255578063803ab8db14610268578063804d45961461027b57600080fd5b806372ceb2de1461021c578063769862a71461022f5780637dbfe9f51461024257600080fd5b80633d6a3664116101765780633d6a3664146101dc5780634d3223a5146101ff578063715018a61461021257600080fd5b8063243904d4146101925780632e334452146101c7575b600080fd5b6101a56101a0366004611969565b61039f565b6040516bffffffffffffffffffffffff90911681526020015b60405180910390f35b6101cf6103bf565b6040516101be91906119ae565b6101ef6101ea366004611969565b6103d4565b60405190151581526020016101be565b6101a561020d366004611969565b6103f0565b61021a6103fb565b005b6101ef61022a366004611969565b61040f565b61021a61023d366004611a42565b610422565b6101ef610250366004611a9f565b610582565b6101ef610263366004611ad1565b610595565b6101ef610276366004611b06565b61067d565b6009545b6040519081526020016101be565b6008546001600160a01b03165b6040516001600160a01b0390911681526020016101be565b6000546201000090046001600160a01b031661029a565b6101ef6102d7366004611baf565b610690565b61027f6102ea366004611bf6565b60a01b1760009081526002602052604090205490565b6101ef61030e366004611baf565b61089c565b6007546001600160a01b031661029a565b610337610332366004611baf565b610a2b565b6040516101be96959493929190611c3e565b61027f610b7a565b61036461035f366004611cc0565b610b84565b6040516101be9190611cfd565b61029a610bb1565b61021a610387366004611969565b610bc5565b61027f61039a366004611969565b610c55565b6001600160a01b0381166000908152600360205260408120545b92915050565b6103c76118e1565b6103cf610c60565b905090565b60006103de610c9a565b6103e782610cfb565b5060015b919050565b60006103b982610d54565b610403610c9a565b61040d6000610d91565b565b6000610419610c9a565b6103e782610e02565b600054610100900460ff16158080156104425750600054600160ff909116105b8061045c5750303b15801561045c575060005460ff166001145b6104d35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805460ff1916600117905580156104f6576000805461ff0019166101001790555b6104fe610e5b565b61050760018055565b61051086610e64565b61051985610e6d565b61052284610e02565b61052b83610cfb565b61053482610e76565b801561057a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b600061058c610c9a565b6103e782610e76565b600061059f610eab565b60006105aa84610f04565b9050808360800135146105dd576040516338e5849560e11b815260048101829052608084013560248201526044016104ca565b6007546000906001600160a01b03166331ff34cf6105f9610c60565b866040518363ffffffff1660e01b8152600401610617929190611d50565b602060405180830381865afa158015610634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106589190611dcb565b90506106648582610f34565b61066e8582610fc9565b6001925050506103b960018055565b6000610687610c9a565b6103e7826111b8565b600061069a610eab565b60006106a5846111fb565b905060006106b68260200151610f04565b9050801515806106d7575060408201516bffffffffffffffffffffffff1615155b15610711576040517f2c364f1c000000000000000000000000000000000000000000000000000000008152600481018290526024016104ca565b60065482516001600160a01b039081169116146107685781516040517f0f7070840000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016104ca565b610770610c60565b8460408101356060820135608083013561079060c0850160a08601611969565b8960c0018a610100018b61014001356040516020016107b799989796959493929190611de4565b6040516020818303038152906040528051906020012060001c8260600151146107f3576040516305b604d760e01b815260040160405180910390fd5b6007546000906001600160a01b03166331ff34cf61080f610c60565b876040518363ffffffff1660e01b815260040161082d929190611d50565b602060405180830381865afa15801561084a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086e9190611dcb565b905061087e836020015182610f34565b61088c836020015182610fc9565b600193505050506103b960018055565b60006108a6610eab565b60006108b1846111fb565b905060006108c28260200151610f04565b90506108d66006546001600160a01b031690565b6001600160a01b031682600001516001600160a01b0316146109325781516040517fd90fe8e10000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016104ca565b80846080013514610963576040516338e5849560e11b815260048101829052608085013560248201526044016104ca565b61096b610c60565b8460408101356060820135608083013561098b60c0850160a08601611969565b8960c0018a610100018b61014001356040516020016109b299989796959493929190611de4565b6040516020818303038152906040528051906020012060001c8260600151146109ee576040516305b604d760e01b815260040160405180910390fd5b604051600090610a02908690602001611e73565b6040516020818303038152906040528051906020012060001c905061087e836020015182610f34565b60408051608081018252600080825260208201819052918101829052606081018290529080808080610a5c886111fb565b9550610a66610c60565b87604081013560608201356080830135610a8660c0850160a08601611969565b8c60c0018d610100018e6101400135604051602001610aad99989796959493929190611de4565b6040516020818303038152906040528051906020012060001c8660600151149250610adb8660200151610d54565b9450610aea8660200151610f04565b6007546080890135821495509092506001600160a01b03166331ff34cf610b0f610c60565b896040518363ffffffff1660e01b8152600401610b2d929190611d50565b602060405180830381865afa158015610b4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6e9190611dcb565b90509295509295509295565b60006103cf6112f0565b6040805160808101825260008082526020820181905291810182905260608101919091526103b9826111fb565b60006103cf6006546001600160a01b031690565b610bcd610c9a565b6001600160a01b038116610c495760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104ca565b610c5281610d91565b50565b60006103b982610f04565b610c686118e1565b60408051808201918290529060049060029082845b815481526020019060010190808311610c7d575050505050905090565b6000546001600160a01b036201000090910416331461040d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104ca565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831690811790915560405133907fd85f66a2d033a785734c4777d12d2526304b1727ddd6774582a4ddb3474dac9790600090a350565b6001600160a01b0381166000908152600360205260409020546bffffffffffffffffffffffff8116610d8657806103b9565b6103b9600182611e96565b600080546001600160a01b03838116620100008181027fffffffffffffffffffff0000000000000000000000000000000000000000ffff851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831690811790915560405133907f5f710a9b3681930bf1343b51da6fa8f2476a09903e0831f661f36bd63892931a90600090a350565b61040d33610d91565b610c52816111b8565b610c528161131f565b6009819055604051819033907fe71d538682fa7ee72ed8c324fac011fe5a8d0f5ceb54d49f35c82099889a957c90600090a350565b600260015403610efd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104ca565b6002600155565b600060026000610f1e610f1685610d54565b60a01b851790565b8152602001908152602001600020549050919050565b6001600160a01b03821660009081526003602090815260408083205460a081901b861784526002909252909120829055610f6f816001611ec2565b6001600160a01b0384166000818152600360205260408082206bffffffffffffffffffffffff9485169055518593851692917f50524705e17603fd96db3d4cbd148655f75d19bf9ab86067ef587134b7919e8091a4505050565b8160006001600160a01b0382163b156111b25760005b6009548110156111b0576040517f2f4a1ff5000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b03841690632f4a1ff5906024016020604051808303816000875af1925050508015611065575060408051601f3d908101601f1916820190925261106291810190611ee7565b60015b6110ae576040516001600160a01b0386168152600092507f2db09d5006d15c5b3a0a9520cdb57ecb6381b7e9f478edcf029d11cfcf7dc5ad9060200160405180910390a16110b1565b91505b81156111785760085460408051606088901b6bffffffffffffffffffffffff191660208201528151601481830301815260348201928390527f0d9577c6000000000000000000000000000000000000000000000000000000009092526001600160a01b0390921691630d9577c69161112f9160009190603801611f2d565b6020604051808303816000875af115801561114e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111729190611ee7565b506111b0565b60408051602081018690520160408051601f19818403018152919052805160209091012093506111a9600182611f67565b9050610fdf565b505b50505050565b6111c560048260026118ff565b506020810151815160405133907fbfa225acb3bdc1bbe3faa03e81a000c6399a94d8db72b0c434dd5828b7083f5690600090a450565b604080516080810182526000808252602082018190529181018290526060810191909152815160811461125f5781516040517f0786993c0000000000000000000000000000000000000000000000000000000081526004016104ca91815260200190565b600061126d83826041611388565b9050600061128b60418086516112839190611f7a565b869190611388565b905060006112998282611444565b60a081901c60408601526001600160a01b0381166020808701919091529091506112c4908390611444565b60608501526112dc836112d684611492565b906114cd565b6001600160a01b0316845250919392505050565b600060046040516020016113049190611f8d565b60405160208183030381529060405280519060200120905090565b6006546040516001600160a01b038084169216907f82d04c58d23161f2b0d3c01082dae861326f4703555a22090a04f971dc00d4e790600090a36006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b82516060906113978385611f67565b11156113cb576113a78284611f67565b845160405163abe5c32f60e01b8152600481019290925260248201526044016104ca565b60008267ffffffffffffffff8111156113e6576113e66119bc565b6040519080825280601f01601f191660200182016040528015611410576020820181803683370190505b5090508360208601016020820160005b85811015611438578281015182820152602001611420565b50919695505050505050565b8151600090611454836020611f67565b111561148957611465826020611f67565b835160405163abe5c32f60e01b8152600481019290925260248201526044016104ca565b50016020015190565b600061149e82516114f1565b826040516020016114b0929190611fc1565b604051602081830303815290604052805190602001209050919050565b60008060006114dc8585611591565b915091506114e9816115d6565b509392505050565b606060006114fe8361173b565b600101905060008167ffffffffffffffff81111561151e5761151e6119bc565b6040519080825280601f01601f191660200182016040528015611548576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461155257509392505050565b60008082516041036115c75760208301516040840151606085015160001a6115bb8782858561181d565b945094505050506115cf565b506000905060025b9250929050565b60008160048111156115ea576115ea61201c565b036115f25750565b60018160048111156116065761160661201c565b036116535760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104ca565b60028160048111156116675761166761201c565b036116b45760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104ca565b60038160048111156116c8576116c861201c565b03610c525760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104ca565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611784577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106117b0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106117ce57662386f26fc10000830492506010015b6305f5e10083106117e6576305f5e100830492506008015b61271083106117fa57612710830492506004015b6064831061180c576064830492506002015b600a83106103b95760010192915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561185457506000905060036118d8565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156118a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166118d1576000600192509250506118d8565b9150600090505b94509492505050565b60405180604001604052806002906020820280368337509192915050565b826002810192821561192d579160200282015b8281111561192d578251825591602001919060010190611912565b5061193992915061193d565b5090565b5b80821115611939576000815560010161193e565b80356001600160a01b03811681146103eb57600080fd5b60006020828403121561197b57600080fd5b61198482611952565b9392505050565b8060005b60028110156111b257815184526020938401939091019060010161198f565b604081016103b9828461198b565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126119e357600080fd5b6040516040810181811067ffffffffffffffff82111715611a0657611a066119bc565b8060405250806040840185811115611a1d57600080fd5b845b81811015611a37578035835260209283019201611a1f565b509195945050505050565b600080600080600060c08688031215611a5a57600080fd5b611a6487876119d2565b9450611a7260408701611952565b9350611a8060608701611952565b9250611a8e60808701611952565b9497939650919460a0013592915050565b600060208284031215611ab157600080fd5b5035919050565b60006101608284031215611acb57600080fd5b50919050565b6000806101808385031215611ae557600080fd5b611aee83611952565b9150611afd8460208501611ab8565b90509250929050565b600060408284031215611b1857600080fd5b61198483836119d2565b600082601f830112611b3357600080fd5b813567ffffffffffffffff80821115611b4e57611b4e6119bc565b604051601f8301601f19908116603f01168101908282118183101715611b7657611b766119bc565b81604052838152866020858801011115611b8f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806101808385031215611bc357600080fd5b823567ffffffffffffffff811115611bda57600080fd5b611be685828601611b22565b925050611afd8460208501611ab8565b60008060408385031215611c0957600080fd5b611c1283611952565b915060208301356bffffffffffffffffffffffff81168114611c3357600080fd5b809150509250929050565b6101208101611c8982896001600160a01b03808251168352806020830151166020840152506bffffffffffffffffffffffff6040820151166040830152606081015160608301525050565b6bffffffffffffffffffffffff96909616608082015293151560a085015291151560c084015260e083015261010090910152919050565b600060208284031215611cd257600080fd5b813567ffffffffffffffff811115611ce957600080fd5b611cf584828501611b22565b949350505050565b608081016103b982846001600160a01b03808251168352806020830151166020840152506bffffffffffffffffffffffff6040820151166040830152606081015160608301525050565b60408183375050565b6101a08101611d5f828561198b565b604083604084013760408301356080830152606083013560a0830152608083013560c08301526001600160a01b03611d9960a08501611952565b1660e0830152610100604060c08501828501376101406040828601828601378085013561018085015250509392505050565b600060208284031215611ddd57600080fd5b5051919050565b6000818b825b6002811015611e09578151835260209283019290910190600101611dea565b50505060408a60408401378860808301528760a08301528660c08301526bffffffffffffffffffffffff198660601b1660e0830152611e4b60f4830186611d47565b611e59610134830185611d47565b506101748101919091526101940198975050505050505050565b6040828237604001919050565b634e487b7160e01b600052601160045260246000fd5b6bffffffffffffffffffffffff828116828216039080821115611ebb57611ebb611e80565b5092915050565b6bffffffffffffffffffffffff818116838216019080821115611ebb57611ebb611e80565b600060208284031215611ef957600080fd5b8151801515811461198457600080fd5b60005b83811015611f24578181015183820152602001611f0c565b50506000910152565b8281526040602082015260008251806040840152611f52816060850160208701611f09565b601f01601f1916919091016060019392505050565b808201808211156103b9576103b9611e80565b818103818111156103b9576103b9611e80565b60008183825b6002811015611fb2578154835260209092019160019182019101611f93565b50505060408201905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000815260008351611ff981601a850160208801611f09565b83519083019061201081601a840160208801611f09565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122067c7b495d597b680b9706e498e1788efea65ea59c9cf7576d9c03f2d783dd3e264736f6c63430008130033
Deployed ByteCode
0x608060405234801561001057600080fd5b506004361061018d5760003560e01c8063833b1fce116100e3578063cfa51d9a1161008c578063e7f43c6811610066578063e7f43c6814610371578063f2fde38b14610379578063f4de72311461038c57600080fd5b8063cfa51d9a14610324578063e02bc3c814610349578063e5114f6c1461035157600080fd5b8063b0ab7dac116100bd578063b0ab7dac146102dc578063bf776ba414610300578063c0f948d21461031357600080fd5b8063833b1fce1461028d5780638da5cb5b146102b25780639a336be1146102c957600080fd5b806372ceb2de116101455780637fcde1c21161011f5780637fcde1c214610255578063803ab8db14610268578063804d45961461027b57600080fd5b806372ceb2de1461021c578063769862a71461022f5780637dbfe9f51461024257600080fd5b80633d6a3664116101765780633d6a3664146101dc5780634d3223a5146101ff578063715018a61461021257600080fd5b8063243904d4146101925780632e334452146101c7575b600080fd5b6101a56101a0366004611969565b61039f565b6040516bffffffffffffffffffffffff90911681526020015b60405180910390f35b6101cf6103bf565b6040516101be91906119ae565b6101ef6101ea366004611969565b6103d4565b60405190151581526020016101be565b6101a561020d366004611969565b6103f0565b61021a6103fb565b005b6101ef61022a366004611969565b61040f565b61021a61023d366004611a42565b610422565b6101ef610250366004611a9f565b610582565b6101ef610263366004611ad1565b610595565b6101ef610276366004611b06565b61067d565b6009545b6040519081526020016101be565b6008546001600160a01b03165b6040516001600160a01b0390911681526020016101be565b6000546201000090046001600160a01b031661029a565b6101ef6102d7366004611baf565b610690565b61027f6102ea366004611bf6565b60a01b1760009081526002602052604090205490565b6101ef61030e366004611baf565b61089c565b6007546001600160a01b031661029a565b610337610332366004611baf565b610a2b565b6040516101be96959493929190611c3e565b61027f610b7a565b61036461035f366004611cc0565b610b84565b6040516101be9190611cfd565b61029a610bb1565b61021a610387366004611969565b610bc5565b61027f61039a366004611969565b610c55565b6001600160a01b0381166000908152600360205260408120545b92915050565b6103c76118e1565b6103cf610c60565b905090565b60006103de610c9a565b6103e782610cfb565b5060015b919050565b60006103b982610d54565b610403610c9a565b61040d6000610d91565b565b6000610419610c9a565b6103e782610e02565b600054610100900460ff16158080156104425750600054600160ff909116105b8061045c5750303b15801561045c575060005460ff166001145b6104d35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b6000805460ff1916600117905580156104f6576000805461ff0019166101001790555b6104fe610e5b565b61050760018055565b61051086610e64565b61051985610e6d565b61052284610e02565b61052b83610cfb565b61053482610e76565b801561057a576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b600061058c610c9a565b6103e782610e76565b600061059f610eab565b60006105aa84610f04565b9050808360800135146105dd576040516338e5849560e11b815260048101829052608084013560248201526044016104ca565b6007546000906001600160a01b03166331ff34cf6105f9610c60565b866040518363ffffffff1660e01b8152600401610617929190611d50565b602060405180830381865afa158015610634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106589190611dcb565b90506106648582610f34565b61066e8582610fc9565b6001925050506103b960018055565b6000610687610c9a565b6103e7826111b8565b600061069a610eab565b60006106a5846111fb565b905060006106b68260200151610f04565b9050801515806106d7575060408201516bffffffffffffffffffffffff1615155b15610711576040517f2c364f1c000000000000000000000000000000000000000000000000000000008152600481018290526024016104ca565b60065482516001600160a01b039081169116146107685781516040517f0f7070840000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016104ca565b610770610c60565b8460408101356060820135608083013561079060c0850160a08601611969565b8960c0018a610100018b61014001356040516020016107b799989796959493929190611de4565b6040516020818303038152906040528051906020012060001c8260600151146107f3576040516305b604d760e01b815260040160405180910390fd5b6007546000906001600160a01b03166331ff34cf61080f610c60565b876040518363ffffffff1660e01b815260040161082d929190611d50565b602060405180830381865afa15801561084a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086e9190611dcb565b905061087e836020015182610f34565b61088c836020015182610fc9565b600193505050506103b960018055565b60006108a6610eab565b60006108b1846111fb565b905060006108c28260200151610f04565b90506108d66006546001600160a01b031690565b6001600160a01b031682600001516001600160a01b0316146109325781516040517fd90fe8e10000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201526024016104ca565b80846080013514610963576040516338e5849560e11b815260048101829052608085013560248201526044016104ca565b61096b610c60565b8460408101356060820135608083013561098b60c0850160a08601611969565b8960c0018a610100018b61014001356040516020016109b299989796959493929190611de4565b6040516020818303038152906040528051906020012060001c8260600151146109ee576040516305b604d760e01b815260040160405180910390fd5b604051600090610a02908690602001611e73565b6040516020818303038152906040528051906020012060001c905061087e836020015182610f34565b60408051608081018252600080825260208201819052918101829052606081018290529080808080610a5c886111fb565b9550610a66610c60565b87604081013560608201356080830135610a8660c0850160a08601611969565b8c60c0018d610100018e6101400135604051602001610aad99989796959493929190611de4565b6040516020818303038152906040528051906020012060001c8660600151149250610adb8660200151610d54565b9450610aea8660200151610f04565b6007546080890135821495509092506001600160a01b03166331ff34cf610b0f610c60565b896040518363ffffffff1660e01b8152600401610b2d929190611d50565b602060405180830381865afa158015610b4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6e9190611dcb565b90509295509295509295565b60006103cf6112f0565b6040805160808101825260008082526020820181905291810182905260608101919091526103b9826111fb565b60006103cf6006546001600160a01b031690565b610bcd610c9a565b6001600160a01b038116610c495760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104ca565b610c5281610d91565b50565b60006103b982610f04565b610c686118e1565b60408051808201918290529060049060029082845b815481526020019060010190808311610c7d575050505050905090565b6000546001600160a01b036201000090910416331461040d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104ca565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831690811790915560405133907fd85f66a2d033a785734c4777d12d2526304b1727ddd6774582a4ddb3474dac9790600090a350565b6001600160a01b0381166000908152600360205260409020546bffffffffffffffffffffffff8116610d8657806103b9565b6103b9600182611e96565b600080546001600160a01b03838116620100008181027fffffffffffffffffffff0000000000000000000000000000000000000000ffff851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6007805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03831690811790915560405133907f5f710a9b3681930bf1343b51da6fa8f2476a09903e0831f661f36bd63892931a90600090a350565b61040d33610d91565b610c52816111b8565b610c528161131f565b6009819055604051819033907fe71d538682fa7ee72ed8c324fac011fe5a8d0f5ceb54d49f35c82099889a957c90600090a350565b600260015403610efd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104ca565b6002600155565b600060026000610f1e610f1685610d54565b60a01b851790565b8152602001908152602001600020549050919050565b6001600160a01b03821660009081526003602090815260408083205460a081901b861784526002909252909120829055610f6f816001611ec2565b6001600160a01b0384166000818152600360205260408082206bffffffffffffffffffffffff9485169055518593851692917f50524705e17603fd96db3d4cbd148655f75d19bf9ab86067ef587134b7919e8091a4505050565b8160006001600160a01b0382163b156111b25760005b6009548110156111b0576040517f2f4a1ff5000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b03841690632f4a1ff5906024016020604051808303816000875af1925050508015611065575060408051601f3d908101601f1916820190925261106291810190611ee7565b60015b6110ae576040516001600160a01b0386168152600092507f2db09d5006d15c5b3a0a9520cdb57ecb6381b7e9f478edcf029d11cfcf7dc5ad9060200160405180910390a16110b1565b91505b81156111785760085460408051606088901b6bffffffffffffffffffffffff191660208201528151601481830301815260348201928390527f0d9577c6000000000000000000000000000000000000000000000000000000009092526001600160a01b0390921691630d9577c69161112f9160009190603801611f2d565b6020604051808303816000875af115801561114e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111729190611ee7565b506111b0565b60408051602081018690520160408051601f19818403018152919052805160209091012093506111a9600182611f67565b9050610fdf565b505b50505050565b6111c560048260026118ff565b506020810151815160405133907fbfa225acb3bdc1bbe3faa03e81a000c6399a94d8db72b0c434dd5828b7083f5690600090a450565b604080516080810182526000808252602082018190529181018290526060810191909152815160811461125f5781516040517f0786993c0000000000000000000000000000000000000000000000000000000081526004016104ca91815260200190565b600061126d83826041611388565b9050600061128b60418086516112839190611f7a565b869190611388565b905060006112998282611444565b60a081901c60408601526001600160a01b0381166020808701919091529091506112c4908390611444565b60608501526112dc836112d684611492565b906114cd565b6001600160a01b0316845250919392505050565b600060046040516020016113049190611f8d565b60405160208183030381529060405280519060200120905090565b6006546040516001600160a01b038084169216907f82d04c58d23161f2b0d3c01082dae861326f4703555a22090a04f971dc00d4e790600090a36006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b82516060906113978385611f67565b11156113cb576113a78284611f67565b845160405163abe5c32f60e01b8152600481019290925260248201526044016104ca565b60008267ffffffffffffffff8111156113e6576113e66119bc565b6040519080825280601f01601f191660200182016040528015611410576020820181803683370190505b5090508360208601016020820160005b85811015611438578281015182820152602001611420565b50919695505050505050565b8151600090611454836020611f67565b111561148957611465826020611f67565b835160405163abe5c32f60e01b8152600481019290925260248201526044016104ca565b50016020015190565b600061149e82516114f1565b826040516020016114b0929190611fc1565b604051602081830303815290604052805190602001209050919050565b60008060006114dc8585611591565b915091506114e9816115d6565b509392505050565b606060006114fe8361173b565b600101905060008167ffffffffffffffff81111561151e5761151e6119bc565b6040519080825280601f01601f191660200182016040528015611548576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461155257509392505050565b60008082516041036115c75760208301516040840151606085015160001a6115bb8782858561181d565b945094505050506115cf565b506000905060025b9250929050565b60008160048111156115ea576115ea61201c565b036115f25750565b60018160048111156116065761160661201c565b036116535760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104ca565b60028160048111156116675761166761201c565b036116b45760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104ca565b60038160048111156116c8576116c861201c565b03610c525760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104ca565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310611784577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106117b0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106117ce57662386f26fc10000830492506010015b6305f5e10083106117e6576305f5e100830492506008015b61271083106117fa57612710830492506004015b6064831061180c576064830492506002015b600a83106103b95760010192915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561185457506000905060036118d8565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156118a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166118d1576000600192509250506118d8565b9150600090505b94509492505050565b60405180604001604052806002906020820280368337509192915050565b826002810192821561192d579160200282015b8281111561192d578251825591602001919060010190611912565b5061193992915061193d565b5090565b5b80821115611939576000815560010161193e565b80356001600160a01b03811681146103eb57600080fd5b60006020828403121561197b57600080fd5b61198482611952565b9392505050565b8060005b60028110156111b257815184526020938401939091019060010161198f565b604081016103b9828461198b565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126119e357600080fd5b6040516040810181811067ffffffffffffffff82111715611a0657611a066119bc565b8060405250806040840185811115611a1d57600080fd5b845b81811015611a37578035835260209283019201611a1f565b509195945050505050565b600080600080600060c08688031215611a5a57600080fd5b611a6487876119d2565b9450611a7260408701611952565b9350611a8060608701611952565b9250611a8e60808701611952565b9497939650919460a0013592915050565b600060208284031215611ab157600080fd5b5035919050565b60006101608284031215611acb57600080fd5b50919050565b6000806101808385031215611ae557600080fd5b611aee83611952565b9150611afd8460208501611ab8565b90509250929050565b600060408284031215611b1857600080fd5b61198483836119d2565b600082601f830112611b3357600080fd5b813567ffffffffffffffff80821115611b4e57611b4e6119bc565b604051601f8301601f19908116603f01168101908282118183101715611b7657611b766119bc565b81604052838152866020858801011115611b8f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806101808385031215611bc357600080fd5b823567ffffffffffffffff811115611bda57600080fd5b611be685828601611b22565b925050611afd8460208501611ab8565b60008060408385031215611c0957600080fd5b611c1283611952565b915060208301356bffffffffffffffffffffffff81168114611c3357600080fd5b809150509250929050565b6101208101611c8982896001600160a01b03808251168352806020830151166020840152506bffffffffffffffffffffffff6040820151166040830152606081015160608301525050565b6bffffffffffffffffffffffff96909616608082015293151560a085015291151560c084015260e083015261010090910152919050565b600060208284031215611cd257600080fd5b813567ffffffffffffffff811115611ce957600080fd5b611cf584828501611b22565b949350505050565b608081016103b982846001600160a01b03808251168352806020830151166020840152506bffffffffffffffffffffffff6040820151166040830152606081015160608301525050565b60408183375050565b6101a08101611d5f828561198b565b604083604084013760408301356080830152606083013560a0830152608083013560c08301526001600160a01b03611d9960a08501611952565b1660e0830152610100604060c08501828501376101406040828601828601378085013561018085015250509392505050565b600060208284031215611ddd57600080fd5b5051919050565b6000818b825b6002811015611e09578151835260209283019290910190600101611dea565b50505060408a60408401378860808301528760a08301528660c08301526bffffffffffffffffffffffff198660601b1660e0830152611e4b60f4830186611d47565b611e59610134830185611d47565b506101748101919091526101940198975050505050505050565b6040828237604001919050565b634e487b7160e01b600052601160045260246000fd5b6bffffffffffffffffffffffff828116828216039080821115611ebb57611ebb611e80565b5092915050565b6bffffffffffffffffffffffff818116838216019080821115611ebb57611ebb611e80565b600060208284031215611ef957600080fd5b8151801515811461198457600080fd5b60005b83811015611f24578181015183820152602001611f0c565b50506000910152565b8281526040602082015260008251806040840152611f52816060850160208701611f09565b601f01601f1916919091016060019392505050565b808201808211156103b9576103b9611e80565b818103818111156103b9576103b9611e80565b60008183825b6002811015611fb2578154835260209092019160019182019101611f93565b50505060408201905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a000000000000815260008351611ff981601a850160208801611f09565b83519083019061201081601a840160208801611f09565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fdfea264697066735822122067c7b495d597b680b9706e498e1788efea65ea59c9cf7576d9c03f2d783dd3e264736f6c63430008130033