Source Code
Latest 25 from a total of 73 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Enter Pool Eth | 12705730 | 1711 days ago | IN | 0.10526315 ETH | 0.00225479 | ||||
| Collect Rewards | 12675487 | 1716 days ago | IN | 0 ETH | 0.00776116 | ||||
| Settle Pool | 12675485 | 1716 days ago | IN | 0 ETH | 0.01271611 | ||||
| Enter Pool Eth | 12675452 | 1716 days ago | IN | 0.10526315 ETH | 0.00410789 | ||||
| Enter Pool Eth | 12674868 | 1716 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12674050 | 1716 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12672660 | 1716 days ago | IN | 0.10526315 ETH | 0.00166981 | ||||
| Enter Pool Eth | 12672558 | 1716 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12672086 | 1716 days ago | IN | 0.10526315 ETH | 0.00105462 | ||||
| Enter Pool Eth | 12671693 | 1716 days ago | IN | 0.10526315 ETH | 0.00166981 | ||||
| Enter Pool Eth | 12669224 | 1717 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12668934 | 1717 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12667998 | 1717 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12667973 | 1717 days ago | IN | 0.10526315 ETH | 0.00096673 | ||||
| Enter Pool Eth | 12667737 | 1717 days ago | IN | 0.10526315 ETH | 0.00070308 | ||||
| Enter Pool Eth | 12667669 | 1717 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12667609 | 1717 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12667580 | 1717 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12667576 | 1717 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12667575 | 1717 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12667558 | 1717 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12667489 | 1717 days ago | IN | 0.10526315 ETH | 0.00087885 | ||||
| Enter Pool Eth | 12667469 | 1717 days ago | IN | 0.10526315 ETH | 0.00125266 | ||||
| Collect Rewards | 12667454 | 1717 days ago | IN | 0 ETH | 0.0035138 | ||||
| Settle Pool | 12667452 | 1717 days ago | IN | 0 ETH | 0.00487838 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| - | 12705730 | 1711 days ago | 0.10526315 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH | ||||
| - | 12675487 | 1716 days ago | 0.12499999 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ProphetPool
Compiler Version
v0.6.10+commit.00c0fcaf
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2021-06-11
*/
// Dependency file: @chainlink/contracts/src/v0.6/vendor/SafeMathChainlink.sol
// SPDX-License-Identifier: MIT
// pragma solidity ^0.6.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMathChainlink {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, "SafeMath: division by zero");
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
}
}
// Dependency file: @chainlink/contracts/src/v0.6/interfaces/LinkTokenInterface.sol
// pragma solidity ^0.6.0;
interface LinkTokenInterface {
function allowance(address owner, address spender) external view returns (uint256 remaining);
function approve(address spender, uint256 value) external returns (bool success);
function balanceOf(address owner) external view returns (uint256 balance);
function decimals() external view returns (uint8 decimalPlaces);
function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);
function increaseApproval(address spender, uint256 subtractedValue) external;
function name() external view returns (string memory tokenName);
function symbol() external view returns (string memory tokenSymbol);
function totalSupply() external view returns (uint256 totalTokensIssued);
function transfer(address to, uint256 value) external returns (bool success);
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success);
function transferFrom(address from, address to, uint256 value) external returns (bool success);
}
// Dependency file: @chainlink/contracts/src/v0.6/VRFRequestIDBase.sol
// pragma solidity ^0.6.0;
contract VRFRequestIDBase {
/**
* @notice returns the seed which is actually input to the VRF coordinator
*
* @dev To prevent repetition of VRF output due to repetition of the
* @dev user-supplied seed, that seed is combined in a hash with the
* @dev user-specific nonce, and the address of the consuming contract. The
* @dev risk of repetition is mostly mitigated by inclusion of a blockhash in
* @dev the final seed, but the nonce does protect against repetition in
* @dev requests which are included in a single block.
*
* @param _userSeed VRF seed input provided by user
* @param _requester Address of the requesting contract
* @param _nonce User-specific nonce at the time of the request
*/
function makeVRFInputSeed(bytes32 _keyHash, uint256 _userSeed,
address _requester, uint256 _nonce)
internal pure returns (uint256)
{
return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce)));
}
/**
* @notice Returns the id for this request
* @param _keyHash The serviceAgreement ID to be used for this request
* @param _vRFInputSeed The seed to be passed directly to the VRF
* @return The id for this request
*
* @dev Note that _vRFInputSeed is not the seed passed by the consuming
* @dev contract, but the one generated by makeVRFInputSeed
*/
function makeRequestId(
bytes32 _keyHash, uint256 _vRFInputSeed) internal pure returns (bytes32) {
return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed));
}
}
// Dependency file: @chainlink/contracts/src/v0.6/VRFConsumerBase.sol
// pragma solidity ^0.6.0;
// import "@chainlink/contracts/src/v0.6/vendor/SafeMathChainlink.sol";
// import "@chainlink/contracts/src/v0.6/interfaces/LinkTokenInterface.sol";
// import "@chainlink/contracts/src/v0.6/VRFRequestIDBase.sol";
/** ****************************************************************************
* @notice Interface for contracts using VRF randomness
* *****************************************************************************
* @dev PURPOSE
*
* @dev Reggie the Random Oracle (not his real job) wants to provide randomness
* @dev to Vera the verifier in such a way that Vera can be sure he's not
* @dev making his output up to suit himself. Reggie provides Vera a public key
* @dev to which he knows the secret key. Each time Vera provides a seed to
* @dev Reggie, he gives back a value which is computed completely
* @dev deterministically from the seed and the secret key.
*
* @dev Reggie provides a proof by which Vera can verify that the output was
* @dev correctly computed once Reggie tells it to her, but without that proof,
* @dev the output is indistinguishable to her from a uniform random sample
* @dev from the output space.
*
* @dev The purpose of this contract is to make it easy for unrelated contracts
* @dev to talk to Vera the verifier about the work Reggie is doing, to provide
* @dev simple access to a verifiable source of randomness.
* *****************************************************************************
* @dev USAGE
*
* @dev Calling contracts must inherit from VRFConsumerBase, and can
* @dev initialize VRFConsumerBase's attributes in their constructor as
* @dev shown:
*
* @dev contract VRFConsumer {
* @dev constuctor(<other arguments>, address _vrfCoordinator, address _link)
* @dev VRFConsumerBase(_vrfCoordinator, _link) public {
* @dev <initialization with other arguments goes here>
* @dev }
* @dev }
*
* @dev The oracle will have given you an ID for the VRF keypair they have
* @dev committed to (let's call it keyHash), and have told you the minimum LINK
* @dev price for VRF service. Make sure your contract has sufficient LINK, and
* @dev call requestRandomness(keyHash, fee, seed), where seed is the input you
* @dev want to generate randomness from.
*
* @dev Once the VRFCoordinator has received and validated the oracle's response
* @dev to your request, it will call your contract's fulfillRandomness method.
*
* @dev The randomness argument to fulfillRandomness is the actual random value
* @dev generated from your seed.
*
* @dev The requestId argument is generated from the keyHash and the seed by
* @dev makeRequestId(keyHash, seed). If your contract could have concurrent
* @dev requests open, you can use the requestId to track which seed is
* @dev associated with which randomness. See VRFRequestIDBase.sol for more
* @dev details. (See "SECURITY CONSIDERATIONS" for principles to keep in mind,
* @dev if your contract could have multiple requests in flight simultaneously.)
*
* @dev Colliding `requestId`s are cryptographically impossible as long as seeds
* @dev differ. (Which is critical to making unpredictable randomness! See the
* @dev next section.)
*
* *****************************************************************************
* @dev SECURITY CONSIDERATIONS
*
* @dev A method with the ability to call your fulfillRandomness method directly
* @dev could spoof a VRF response with any random value, so it's critical that
* @dev it cannot be directly called by anything other than this base contract
* @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
*
* @dev For your users to trust that your contract's random behavior is free
* @dev from malicious interference, it's best if you can write it so that all
* @dev behaviors implied by a VRF response are executed *during* your
* @dev fulfillRandomness method. If your contract must store the response (or
* @dev anything derived from it) and use it later, you must ensure that any
* @dev user-significant behavior which depends on that stored value cannot be
* @dev manipulated by a subsequent VRF request.
*
* @dev Similarly, both miners and the VRF oracle itself have some influence
* @dev over the order in which VRF responses appear on the blockchain, so if
* @dev your contract could have multiple VRF requests in flight simultaneously,
* @dev you must ensure that the order in which the VRF responses arrive cannot
* @dev be used to manipulate your contract's user-significant behavior.
*
* @dev Since the ultimate input to the VRF is mixed with the block hash of the
* @dev block in which the request is made, user-provided seeds have no impact
* @dev on its economic security properties. They are only included for API
* @dev compatability with previous versions of this contract.
*
* @dev Since the block hash of the block which contains the requestRandomness
* @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
* @dev miner could, in principle, fork the blockchain to evict the block
* @dev containing the request, forcing the request to be included in a
* @dev different block with a different hash, and therefore a different input
* @dev to the VRF. However, such an attack would incur a substantial economic
* @dev cost. This cost scales with the number of blocks the VRF oracle waits
* @dev until it calls responds to a request.
*/
abstract contract VRFConsumerBase is VRFRequestIDBase {
using SafeMathChainlink for uint256;
/**
* @notice fulfillRandomness handles the VRF response. Your contract must
* @notice implement it. See "SECURITY CONSIDERATIONS" above for important
* @notice principles to keep in mind when implementing your fulfillRandomness
* @notice method.
*
* @dev VRFConsumerBase expects its subcontracts to have a method with this
* @dev signature, and will call it once it has verified the proof
* @dev associated with the randomness. (It is triggered via a call to
* @dev rawFulfillRandomness, below.)
*
* @param requestId The Id initially returned by requestRandomness
* @param randomness the VRF output
*/
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal virtual;
/**
* @notice requestRandomness initiates a request for VRF output given _seed
*
* @dev The fulfillRandomness method receives the output, once it's provided
* @dev by the Oracle, and verified by the vrfCoordinator.
*
* @dev The _keyHash must already be registered with the VRFCoordinator, and
* @dev the _fee must exceed the fee specified during registration of the
* @dev _keyHash.
*
* @dev The _seed parameter is vestigial, and is kept only for API
* @dev compatibility with older versions. It can't *hurt* to mix in some of
* @dev your own randomness, here, but it's not necessary because the VRF
* @dev oracle will mix the hash of the block containing your request into the
* @dev VRF seed it ultimately uses.
*
* @param _keyHash ID of public key against which randomness is generated
* @param _fee The amount of LINK to send with the request
* @param _seed seed mixed into the input of the VRF.
*
* @return requestId unique ID for this request
*
* @dev The returned requestId can be used to distinguish responses to
* @dev concurrent requests. It is passed as the first argument to
* @dev fulfillRandomness.
*/
function requestRandomness(bytes32 _keyHash, uint256 _fee, uint256 _seed)
internal returns (bytes32 requestId)
{
LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, _seed));
// This is the seed passed to VRFCoordinator. The oracle will mix this with
// the hash of the block containing this request to obtain the seed/input
// which is finally passed to the VRF cryptographic machinery.
uint256 vRFSeed = makeVRFInputSeed(_keyHash, _seed, address(this), nonces[_keyHash]);
// nonces[_keyHash] must stay in sync with
// VRFCoordinator.nonces[_keyHash][this], which was incremented by the above
// successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest).
// This provides protection against the user repeating their input seed,
// which would result in a predictable/duplicate output, if multiple such
// requests appeared in the same block.
nonces[_keyHash] = nonces[_keyHash].add(1);
return makeRequestId(_keyHash, vRFSeed);
}
LinkTokenInterface immutable internal LINK;
address immutable private vrfCoordinator;
// Nonces for each VRF key from which randomness has been requested.
//
// Must stay in sync with VRFCoordinator[_keyHash][this]
mapping(bytes32 /* keyHash */ => uint256 /* nonce */) private nonces;
/**
* @param _vrfCoordinator address of VRFCoordinator contract
* @param _link address of LINK token contract
*
* @dev https://docs.chain.link/docs/link-token-contracts
*/
constructor(address _vrfCoordinator, address _link) public {
vrfCoordinator = _vrfCoordinator;
LINK = LinkTokenInterface(_link);
}
// rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
// proof. rawFulfillRandomness then calls fulfillRandomness, after validating
// the origin of the call
function rawFulfillRandomness(bytes32 requestId, uint256 randomness) external {
require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill");
fulfillRandomness(requestId, randomness);
}
}
// Dependency file: @openzeppelin/contracts/token/ERC20/IERC20.sol
// pragma solidity ^0.6.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}
// Dependency file: @openzeppelin/contracts/utils/Address.sol
// pragma solidity ^0.6.2;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// Dependency file: @openzeppelin/contracts/utils/ReentrancyGuard.sol
// pragma solidity ^0.6.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;
constructor () internal {
_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 make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
// Dependency file: @openzeppelin/contracts/GSN/Context.sol
// pragma solidity ^0.6.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 GSN 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 payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
// Dependency file: @openzeppelin/contracts/access/Ownable.sol
// pragma solidity ^0.6.0;
// import "@openzeppelin/contracts/GSN/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.
*/
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.
*/
constructor () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
// Dependency file: contracts/lib/Uint256ArrayUtils.sol
// pragma solidity 0.6.10;
/**
* @title Uint256ArrayUtils
* @author Prophecy
*
* Utility functions to handle uint256 Arrays
*/
library Uint256ArrayUtils {
/**
* Finds the index of the first occurrence of the given element.
* @param A The input array to search
* @param a The value to find
* @return Returns (index and isIn) for the first occurrence starting from index 0
*/
function indexOf(uint256[] memory A, uint256 a) internal pure returns (uint256, bool) {
uint256 length = A.length;
for (uint256 i = 0; i < length; i++) {
if (A[i] == a) {
return (i, true);
}
}
return (uint256(-1), false);
}
/**
* Returns true if the value is present in the list. Uses indexOf internally.
* @param A The input array to search
* @param a The value to find
* @return Returns isIn for the first occurrence starting from index 0
*/
function contains(uint256[] memory A, uint256 a) internal pure returns (bool) {
(, bool isIn) = indexOf(A, a);
return isIn;
}
/**
* Returns true if there are 2 elements that are the same in an array
* @param A The input array to search
* @return Returns boolean for the first occurrence of a duplicate
*/
function hasDuplicate(uint256[] memory A) internal pure returns(bool) {
require(A.length > 0, "A is empty");
for (uint256 i = 0; i < A.length - 1; i++) {
uint256 current = A[i];
for (uint256 j = i + 1; j < A.length; j++) {
if (current == A[j]) {
return true;
}
}
}
return false;
}
/**
* @param A The input array to search
* @param a The uint256 to remove
* @return Returns the array with the object removed.
*/
function remove(uint256[] memory A, uint256 a)
internal
pure
returns (uint256[] memory)
{
(uint256 index, bool isIn) = indexOf(A, a);
if (!isIn) {
revert("uint256 not in array.");
} else {
(uint256[] memory _A,) = pop(A, index);
return _A;
}
}
/**
* @param A The input array to search
* @param a The uint256 to remove
*/
function removeStorage(uint256[] storage A, uint256 a)
internal
{
(uint256 index, bool isIn) = indexOf(A, a);
if (!isIn) {
revert("uint256 not in array.");
} else {
uint256 lastIndex = A.length - 1; // If the array would be empty, the previous line would throw, so no underflow here
if (index != lastIndex) { A[index] = A[lastIndex]; }
A.pop();
}
}
/**
* Removes specified index from array
* @param A The input array to search
* @param index The index to remove
* @return Returns the new array and the removed entry
*/
function pop(uint256[] memory A, uint256 index)
internal
pure
returns (uint256[] memory, uint256)
{
uint256 length = A.length;
require(index < A.length, "Index must be < A length");
uint256[] memory newUint256s = new uint256[](length - 1);
for (uint256 i = 0; i < index; i++) {
newUint256s[i] = A[i];
}
for (uint256 j = index + 1; j < length; j++) {
newUint256s[j - 1] = A[j];
}
return (newUint256s, A[index]);
}
/**
* Returns the combination of the two arrays
* @param A The first array
* @param B The second array
* @return Returns A extended by B
*/
function extend(uint256[] memory A, uint256[] memory B) internal pure returns (uint256[] memory) {
uint256 aLength = A.length;
uint256 bLength = B.length;
uint256[] memory newUint256s = new uint256[](aLength + bLength);
for (uint256 i = 0; i < aLength; i++) {
newUint256s[i] = A[i];
}
for (uint256 j = 0; j < bLength; j++) {
newUint256s[aLength + j] = B[j];
}
return newUint256s;
}
/**
* Validate uint256 array is not empty and contains no duplicate elements.
*
* @param A Array of uint256
*/
function _validateLengthAndUniqueness(uint256[] memory A) internal pure {
require(A.length > 0, "Array length must be > 0");
require(!hasDuplicate(A), "Cannot duplicate uint256");
}
}
// Dependency file: contracts/lib/AddressArrayUtils.sol
// pragma solidity 0.6.10;
/**
* @title AddressArrayUtils
* @author Prophecy
*
* Utility functions to handle uint256 Arrays
*/
library AddressArrayUtils {
/**
* Finds the index of the first occurrence of the given element.
* @param A The input array to search
* @param a The value to find
* @return Returns (index and isIn) for the first occurrence starting from index 0
*/
function indexOf(address[] memory A, address a) internal pure returns (uint256, bool) {
uint256 length = A.length;
for (uint256 i = 0; i < length; i++) {
if (A[i] == a) {
return (i, true);
}
}
return (uint256(-1), false);
}
/**
* Returns true if the value is present in the list. Uses indexOf internally.
* @param A The input array to search
* @param a The value to find
* @return Returns isIn for the first occurrence starting from index 0
*/
function contains(address[] memory A, address a) internal pure returns (bool) {
(, bool isIn) = indexOf(A, a);
return isIn;
}
/**
* Returns true if there are 2 elements that are the same in an array
* @param A The input array to search
* @return Returns boolean for the first occurrence of a duplicate
*/
function hasDuplicate(address[] memory A) internal pure returns(bool) {
require(A.length > 0, "A is empty");
for (uint256 i = 0; i < A.length - 1; i++) {
address current = A[i];
for (uint256 j = i + 1; j < A.length; j++) {
if (current == A[j]) {
return true;
}
}
}
return false;
}
/**
* @param A The input array to search
* @param a The address to remove
* @return Returns the array with the object removed.
*/
function remove(address[] memory A, address a)
internal
pure
returns (address[] memory)
{
(uint256 index, bool isIn) = indexOf(A, a);
if (!isIn) {
revert("Address not in array.");
} else {
(address[] memory _A,) = pop(A, index);
return _A;
}
}
/**
* @param A The input array to search
* @param a The address to remove
*/
function removeStorage(address[] storage A, address a)
internal
{
(uint256 index, bool isIn) = indexOf(A, a);
if (!isIn) {
revert("Address not in array.");
} else {
uint256 lastIndex = A.length - 1; // If the array would be empty, the previous line would throw, so no underflow here
if (index != lastIndex) { A[index] = A[lastIndex]; }
A.pop();
}
}
/**
* Removes specified index from array
* @param A The input array to search
* @param index The index to remove
* @return Returns the new array and the removed entry
*/
function pop(address[] memory A, uint256 index)
internal
pure
returns (address[] memory, address)
{
uint256 length = A.length;
require(index < A.length, "Index must be < A length");
address[] memory newAddresses = new address[](length - 1);
for (uint256 i = 0; i < index; i++) {
newAddresses[i] = A[i];
}
for (uint256 j = index + 1; j < length; j++) {
newAddresses[j - 1] = A[j];
}
return (newAddresses, A[index]);
}
/**
* Returns the combination of the two arrays
* @param A The first array
* @param B The second array
* @return Returns A extended by B
*/
function extend(address[] memory A, address[] memory B) internal pure returns (address[] memory) {
uint256 aLength = A.length;
uint256 bLength = B.length;
address[] memory newAddresses = new address[](aLength + bLength);
for (uint256 i = 0; i < aLength; i++) {
newAddresses[i] = A[i];
}
for (uint256 j = 0; j < bLength; j++) {
newAddresses[aLength + j] = B[j];
}
return newAddresses;
}
/**
* Validate that address and uint array lengths match. Validate address array is not empty
* and contains no duplicate elements.
*
* @param A Array of addresses
* @param B Array of uint
*/
function validatePairsWithArray(address[] memory A, uint[] memory B) internal pure {
require(A.length == B.length, "Array length mismatch");
_validateLengthAndUniqueness(A);
}
/**
* Validate that address and bool array lengths match. Validate address array is not empty
* and contains no duplicate elements.
*
* @param A Array of addresses
* @param B Array of bool
*/
function validatePairsWithArray(address[] memory A, bool[] memory B) internal pure {
require(A.length == B.length, "Array length mismatch");
_validateLengthAndUniqueness(A);
}
/**
* Validate that address and string array lengths match. Validate address array is not empty
* and contains no duplicate elements.
*
* @param A Array of addresses
* @param B Array of strings
*/
function validatePairsWithArray(address[] memory A, string[] memory B) internal pure {
require(A.length == B.length, "Array length mismatch");
_validateLengthAndUniqueness(A);
}
/**
* Validate that address array lengths match, and calling address array are not empty
* and contain no duplicate elements.
*
* @param A Array of addresses
* @param B Array of addresses
*/
function validatePairsWithArray(address[] memory A, address[] memory B) internal pure {
require(A.length == B.length, "Array length mismatch");
_validateLengthAndUniqueness(A);
}
/**
* Validate that address and bytes array lengths match. Validate address array is not empty
* and contains no duplicate elements.
*
* @param A Array of addresses
* @param B Array of bytes
*/
function validatePairsWithArray(address[] memory A, bytes[] memory B) internal pure {
require(A.length == B.length, "Array length mismatch");
_validateLengthAndUniqueness(A);
}
/**
* Validate address array is not empty and contains no duplicate elements.
*
* @param A Array of addresses
*/
function _validateLengthAndUniqueness(address[] memory A) internal pure {
require(A.length > 0, "Array length must be > 0");
require(!hasDuplicate(A), "Cannot duplicate addresses");
}
}
// Dependency file: contracts/interfaces/IWETH.sol
// pragma solidity 0.6.10;
// import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
/**
* @title IWETH
* @author Prophecy
*
* Interface for Wrapped Ether. This interface allows for interaction for wrapped ether's deposit and withdrawal
* functionality.
*/
interface IWETH is IERC20{
function deposit() external payable;
function withdraw(uint256 wad) external;
}
// Dependency file: contracts/interfaces/IProphetPoolFactory.sol
// pragma solidity ^0.6.10;
/**
* @title IProphetPoolFactory
* @author Prophecy
*/
interface IProphetPoolFactory {
/**
* Creates a ProphetPool smart contract set the manager(owner) of the pool.
*/
function create(string memory, address, address, address) external returns (address);
/**
* Return WETH address.
*/
function getWeth() external view returns (address);
/**
* Return VRF Key Hash.
*/
function getVrfKeyHash() external view returns (bytes32);
/**
* Return VRF Fee.
*/
function getVrfFee() external view returns (uint256);
/**
* Return Link Token address for VRF.
*/
function getLinkToken() external view returns (address);
/**
* Return VRF coordinator.
*/
function getVrfCoordinator() external view returns (address);
/**
* Return all pools addreses
*/
function getAllPools() external view returns (address[] memory);
}
// Root file: contracts/ProphetPool.sol
pragma solidity ^0.6.10;
pragma experimental ABIEncoderV2;
// import { VRFConsumerBase } from "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol";
// import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// import { Address } from "@openzeppelin/contracts/utils/Address.sol";
// import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
// import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
// import { Uint256ArrayUtils } from "contracts/lib/Uint256ArrayUtils.sol";
// import { AddressArrayUtils } from "contracts/lib/AddressArrayUtils.sol";
// import { IWETH } from "contracts/interfaces/IWETH.sol";
// import { IProphetPoolFactory } from "contracts/interfaces/IProphetPoolFactory.sol";
/**
* @title ProphetPool
* @author Prophecy
*
* Smart contract that facilitates that draws lucky winners in the pool and distribut rewards to the winners.
*/
contract ProphetPool is VRFConsumerBase, ReentrancyGuard, Ownable {
using Address for address;
using Uint256ArrayUtils for uint256[];
using AddressArrayUtils for address[];
/* ============ Structs ============ */
struct PoolConfig {
uint256 numOfWinners;
uint256 participantLimit;
uint256 enterAmount;
uint256 feePercentage;
uint256 randomSeed;
uint256 startedAt;
}
/* ============ Enums ============ */
enum PoolStatus { NOTSTARTED, INPROGRESS, CLOSED }
/* ============ Events ============ */
event FeeRecipientSet(address indexed _feeRecipient);
event MaxParticipationCompleted(address indexed _from);
event RandomNumberGenerated(uint256 indexed randomness);
event WinnersGenerated(uint256[] winnerIndexes);
event PoolSettled();
event PoolStarted(
uint256 participantLimit,
uint256 numOfWinners,
uint256 enterAmount,
uint256 feePercentage,
uint256 startedAt
);
event PoolReset();
event EnteredPool(address indexed _participant, uint256 _amount, uint256 indexed _participantIndex);
/* ============ State Variables ============ */
IProphetPoolFactory private factory;
address private feeRecipient;
string private poolName;
IERC20 private enterToken;
PoolStatus private poolStatus;
PoolConfig private poolConfig;
address[] private participants;
uint256[] private winnerIndexes;
uint256 private totalEnteredAmount;
uint256 private rewardPerParticipant;
uint256 internal randomResult;
bool internal areWinnersGenerated;
/* ============ Modifiers ============ */
modifier onlyValidPool() {
require(participants.length < poolConfig.participantLimit, "Max Participation for the Pool Reached");
require(poolStatus == PoolStatus.INPROGRESS, "The Pool is not started or closed");
_;
}
modifier onlyEOA() {
require(tx.origin == msg.sender, "Only EOA allowed");
_;
}
/* ============ Constructor ============ */
/**
* Create the ProphetPool with Chainlink VRF configuration for Random number generation.
*
* @param _poolName Pool name
* @param _enterToken ERC20 token to enter the pool. If it's ETH pool, it should be WETH address
* @param _factory ProphetPoolFactory
* @param _feeRecipient Where the fee go
*/
constructor(
string memory _poolName,
address _enterToken,
address _factory,
address _feeRecipient
)
public
VRFConsumerBase(IProphetPoolFactory(_factory).getVrfCoordinator(), IProphetPoolFactory(_factory).getLinkToken())
{
poolName = _poolName;
enterToken = IERC20(_enterToken);
factory = IProphetPoolFactory(_factory);
feeRecipient = _feeRecipient;
poolStatus = PoolStatus.NOTSTARTED;
}
/* ============ External/Public Functions ============ */
/**
* Set the Pool Config, initializes an instance of and start the pool.
*
* @param _numOfWinners Number of winners in the pool
* @param _participantLimit Maximum number of paricipants
* @param _enterAmount Exact amount to enter this pool
* @param _feePercentage Manager fee of this pool
* @param _randomSeed Seed for Random Number Generation
*/
function setPoolRules(
uint256 _numOfWinners,
uint256 _participantLimit,
uint256 _enterAmount,
uint256 _feePercentage,
uint256 _randomSeed
) external onlyOwner {
require(poolStatus == PoolStatus.NOTSTARTED, "A Pool is in progress");
require(_numOfWinners != 0, "Number of winner must not be 0");
require(_numOfWinners < _participantLimit, "Too much number of winners");
poolConfig = PoolConfig(
_numOfWinners,
_participantLimit,
_enterAmount,
_feePercentage,
_randomSeed,
block.timestamp
);
poolStatus = PoolStatus.INPROGRESS;
emit PoolStarted(
_participantLimit,
_numOfWinners,
_enterAmount,
_feePercentage,
block.timestamp
);
}
/**
* Set the Pool Config, initializes an instance of and start the pool.
*
* @param _feeRecipient Number of winners in the pool
*/
function setFeeRecipient(address _feeRecipient) external onlyOwner {
require(_feeRecipient != address(0), "Invalid address");
feeRecipient = _feeRecipient;
emit FeeRecipientSet(feeRecipient);
}
/**
* Enter pool with ETH
*/
function enterPoolEth() external payable onlyValidPool onlyEOA returns (uint256) {
require(msg.value == poolConfig.enterAmount, "Insufficent registration amount provided");
if (!_isEthPool()) {
revert("ETH isn't accepted");
}
// wrap ETH to WETH
IWETH(factory.getWeth()).deposit{ value: msg.value }();
return _enterPool();
}
/**
* Enter pool with ERC20 token
*/
function enterPool() external onlyValidPool onlyEOA returns (uint256) {
enterToken.transferFrom(
msg.sender,
address(this),
poolConfig.enterAmount
);
return _enterPool();
}
/**
* Settle the pool, the winners are selected randomly and fee is transfer to the manager.
*/
function settlePool() external {
require(randomResult > 0, "RND in progress");
require(poolStatus == PoolStatus.INPROGRESS, "The Pool is in progress");
// generate winnerIndexes until the numOfWinners reach
uint256 newRandom = randomResult;
uint256 offset = 0;
while(winnerIndexes.length < poolConfig.numOfWinners) {
uint256 winningIndex = newRandom.mod(poolConfig.participantLimit);
if (!winnerIndexes.contains(winningIndex)) {
winnerIndexes.push(winningIndex);
}
offset.add(1);
newRandom = _getRandomNumberBlockchain(offset, newRandom);
}
areWinnersGenerated = true;
emit WinnersGenerated(winnerIndexes);
// set pool CLOSED status
poolStatus = PoolStatus.CLOSED;
// transfer fees
uint256 feeAmount = totalEnteredAmount.mul(poolConfig.feePercentage).div(100);
rewardPerParticipant = (totalEnteredAmount.sub(feeAmount)).div(poolConfig.numOfWinners);
_transferEnterToken(feeRecipient, feeAmount);
// collectRewards();
emit PoolSettled();
}
/**
* The winners of the pool can call this function to transfer their winnings
* from the pool contract to their own address.
*/
function collectRewards() external nonReentrant {
require(poolStatus == PoolStatus.CLOSED, "The Pool is not settled.");
for (uint256 i = 0; i < poolConfig.participantLimit; i = i.add(1)) {
address player = participants[i];
if (winnerIndexes.contains(i)) {
// if winner
_transferEnterToken(player, rewardPerParticipant);
}
}
_resetPool();
}
/**
* The contract will receive Ether
*/
receive() external payable {}
/**
* Getter for factory
*/
function getFactory() external view returns (address) {
return address(factory);
}
/**
* Getter for fee recipient
*/
function getFeeRecipient() external view returns (address) {
return feeRecipient;
}
/**
* Getter for poolName
*/
function getPoolName() external view returns (string memory) {
return poolName;
}
/**
* Getter for enterToken
*/
function getEnterToken() external view returns (address) {
return address(enterToken);
}
/**
* Getter for poolStatus
*/
function getPoolStatus() external view returns (PoolStatus) {
return poolStatus;
}
/**
* Getter for poolConfig
*/
function getPoolConfig() external view returns (PoolConfig memory) {
return poolConfig;
}
/**
* Getter for totalEnteredAmount
*/
function getTotalEnteredAmount() external view returns (uint256) {
return totalEnteredAmount;
}
/**
* Getter for rewardPerParticipant
*/
function getRewardPerParticipant() external view returns (uint256) {
return rewardPerParticipant;
}
/**
* Get all participants
*/
function getParticipants() external view returns(address[] memory) {
return participants;
}
/**
* Get one participant by index
* @param _index Index of the participants array
*/
function getParticipant(uint256 _index) external view returns(address) {
return participants[_index];
}
/**
* Getter for winnerIndexes
*/
function getWinnerIndexes() external view returns(uint256[] memory) {
return winnerIndexes;
}
/**
* Get if the account is winner
*/
function isWinner(address _account) external view returns(bool) {
(uint256 index, bool isExist) = participants.indexOf(_account);
if (isExist) {
return winnerIndexes.contains(index);
} else {
return false;
}
}
/* ============ Private/Internal Functions ============ */
/**
* Participant enters the pool and enter amount is transferred from the user to the pool.
*/
function _enterPool() internal returns(uint256 _participantIndex) {
participants.push(msg.sender);
totalEnteredAmount = totalEnteredAmount.add(poolConfig.enterAmount);
if (participants.length == poolConfig.participantLimit) {
emit MaxParticipationCompleted(msg.sender);
_getRandomNumber(poolConfig.randomSeed);
}
_participantIndex = (participants.length).sub(1);
emit EnteredPool(msg.sender, poolConfig.enterAmount, _participantIndex);
}
/**
* Reset the pool, clears the existing state variable values and the pool can be initialized again.
*/
function _resetPool() internal {
poolStatus = PoolStatus.INPROGRESS;
delete totalEnteredAmount;
delete rewardPerParticipant;
randomResult = 0;
areWinnersGenerated = false;
delete winnerIndexes;
delete participants;
emit PoolReset();
uint256 tokenBalance = enterToken.balanceOf(address(this));
if (tokenBalance > 0) {
enterToken.transfer(feeRecipient, tokenBalance);
}
}
/**
* Transfer enterToken even it's ETH or ERC20.
*
* @param _to Offset to generate the random number
* @param _amount Random number to generate the other random number
*/
function _transferEnterToken(address _to, uint256 _amount) internal {
if (_isEthPool()) {
IWETH(factory.getWeth()).withdraw(_amount);
(bool status, ) = payable(_to).call{value: _amount}("");
require(status, "ETH not transferred");
} else {
enterToken.transfer(address(_to), _amount);
}
}
/**
* Check pool is ETH pool or not
*/
function _isEthPool() internal view returns (bool) {
return address(enterToken) == factory.getWeth();
}
/**
* Generate a random number based on the blockHash and random offset
*
* @param _offset Offset to generate the random number
* @param _randomness Random number to generate the other random number
*/
function _getRandomNumberBlockchain(uint256 _offset, uint256 _randomness)
internal
view
returns (uint256)
{
bytes32 baseHash = keccak256(
abi.encodePacked(
blockhash(block.number),
bytes32(_offset),
bytes32(_randomness)
)
);
return uint256(baseHash);
}
/**
* Calls ChainLink Oracle's inherited function for Random Number Generation.
* The contract must have enough LINK required for VRF.
*
* @param _userProvidedSeed Seed to generate the random number
*/
function _getRandomNumber(uint256 _userProvidedSeed)
internal
returns (bytes32 requestId)
{
require(
IERC20(factory.getLinkToken()).balanceOf(address(this)) >= factory.getVrfFee(),
"Not enough LINK for VRF"
);
randomResult = 0;
return
requestRandomness(
factory.getVrfKeyHash(),
factory.getVrfFee(),
_userProvidedSeed
);
}
/**
* Callback function used by VRF Coordinator.
*
* @param _randomness Generated random number
*/
function fulfillRandomness(bytes32, uint256 _randomness) internal override {
randomResult = _randomness;
emit RandomNumberGenerated(_randomness);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"_poolName","type":"string"},{"internalType":"address","name":"_enterToken","type":"address"},{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_feeRecipient","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_participant","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_participantIndex","type":"uint256"}],"name":"EnteredPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_feeRecipient","type":"address"}],"name":"FeeRecipientSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"}],"name":"MaxParticipationCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"PoolReset","type":"event"},{"anonymous":false,"inputs":[],"name":"PoolSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"participantLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numOfWinners","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"enterAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feePercentage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"}],"name":"PoolStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"RandomNumberGenerated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"winnerIndexes","type":"uint256[]"}],"name":"WinnersGenerated","type":"event"},{"inputs":[],"name":"collectRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enterPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enterPoolEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getEnterToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getParticipant","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getParticipants","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPoolConfig","outputs":[{"components":[{"internalType":"uint256","name":"numOfWinners","type":"uint256"},{"internalType":"uint256","name":"participantLimit","type":"uint256"},{"internalType":"uint256","name":"enterAmount","type":"uint256"},{"internalType":"uint256","name":"feePercentage","type":"uint256"},{"internalType":"uint256","name":"randomSeed","type":"uint256"},{"internalType":"uint256","name":"startedAt","type":"uint256"}],"internalType":"struct ProphetPool.PoolConfig","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPoolName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPoolStatus","outputs":[{"internalType":"enum ProphetPool.PoolStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRewardPerParticipant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalEnteredAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWinnerIndexes","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"isWinner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeRecipient","type":"address"}],"name":"setFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numOfWinners","type":"uint256"},{"internalType":"uint256","name":"_participantLimit","type":"uint256"},{"internalType":"uint256","name":"_enterAmount","type":"uint256"},{"internalType":"uint256","name":"_feePercentage","type":"uint256"},{"internalType":"uint256","name":"_randomSeed","type":"uint256"}],"name":"setPoolRules","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"settlePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60c06040523480156200001157600080fd5b50604051620028e9380380620028e98339810160408190526200003491620002ec565b816001600160a01b0316630cb4a29d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200006e57600080fd5b505afa15801562000083573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000a99190620002c7565b826001600160a01b031663e76d51686040518163ffffffff1660e01b815260040160206040518083038186803b158015620000e357600080fd5b505afa158015620000f8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200011e9190620002c7565b6001600160601b0319606092831b811660a052911b16608052600180556000620001506001600160e01b036200020216565b600280546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508351620001b390600590602087019062000207565b5060068054600380546001600160a01b039586166001600160a01b03199182161790915560048054948616948216949094179093559390921692169190911760ff60a01b1916905550620003ec565b335b90565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200024a57805160ff19168380011785556200027a565b828001600101855582156200027a579182015b828111156200027a5782518255916020019190600101906200025d565b50620002889291506200028c565b5090565b6200020491905b8082111562000288576000815560010162000293565b80516001600160a01b0381168114620002c157600080fd5b92915050565b600060208284031215620002d9578081fd5b620002e58383620002a9565b9392505050565b6000806000806080858703121562000302578283fd5b84516001600160401b038082111562000319578485fd5b81870188601f8201126200032b578586fd5b80519250818311156200033c578586fd5b6040516020601f8501601f19168201810184811183821017156200035e578889fd5b60405284825282850181018b101562000375578788fd5b8793505b8484101562000398578284018101518285018201529283019262000379565b84841115620003a957878186840101525b819850620003ba8b828c01620002a9565b97505050505050620003d08660408701620002a9565b9150620003e18660608701620002a9565b905092959194509250565b60805160601c60a05160601c6124ce6200041b60003980610ad35280611a5e525080611a2f52506124ce6000f3fe6080604052600436106101395760003560e01c80638da5cb5b116100ab578063b0d965801161006f578063b0d9658014610300578063b8801e7014610322578063c75334ab14610337578063d299398314610359578063e74b981b1461037b578063f2fde38b1461039b57610140565b80638da5cb5b1461028157806394985ddd146102965780639d9ca28d146102b6578063a74a6977146102e3578063ac16cc2f146102f857610140565b80635aa68ac0116100fd5780635aa68ac0146101de57806369c970c71461020057806370bb45b314610220578063715018a6146102355780637f79496c1461024a57806388cc58e41461026c57610140565b80631b9db2ef14610145578063287cd3681461017b5780633b1bc3191461019d5780634ccb20c0146101b457806350a3bd39146101c957610140565b3661014057005b600080fd5b34801561015157600080fd5b50610165610160366004611cd8565b6103bb565b6040516101729190611d99565b60405180910390f35b34801561018757600080fd5b506101906103e7565b6040516101729190612457565b3480156101a957600080fd5b506101b26103ee565b005b3480156101c057600080fd5b5061016561061f565b3480156101d557600080fd5b5061019061062e565b3480156101ea57600080fd5b506101f361073f565b6040516101729190611e11565b34801561020c57600080fd5b506101b261021b366004611cf0565b6107a1565b34801561022c57600080fd5b506101b26108ef565b34801561024157600080fd5b506101b2610a1b565b34801561025657600080fd5b5061025f610a9a565b6040516101729190611f00565b34801561027857600080fd5b50610165610aaa565b34801561028d57600080fd5b50610165610ab9565b3480156102a257600080fd5b506101b26102b1366004611cb7565b610ac8565b3480156102c257600080fd5b506102d66102d1366004611c47565b610b1e565b6040516101729190611ed1565b3480156102ef57600080fd5b50610165610c0f565b610190610c1e565b34801561030c57600080fd5b50610315610dc0565b6040516101729190612413565b34801561032e57600080fd5b50610190610e05565b34801561034357600080fd5b5061034c610e0b565b6040516101729190611e5e565b34801561036557600080fd5b5061036e610e62565b6040516101729190611f14565b34801561038757600080fd5b506101b2610396366004611c47565b610eef565b3480156103a757600080fd5b506101b26103b6366004611c47565b610f9a565b6000600d82815481106103ca57fe5b6000918252602090912001546001600160a01b031690505b919050565b6010545b90565b6000601154116104195760405162461bcd60e51b8152600401610410906122d1565b60405180910390fd5b6001600654600160a01b900460ff16600281111561043357fe5b146104505760405162461bcd60e51b8152600401610410906123dc565b60115460005b600754600e54101561053c5760085460009061047990849063ffffffff61105116565b90506104de81600e8054806020026020016040519081016040528092919081815260200182805480156104cb57602002820191906000526020600020905b8154815260200190600101908083116104b7575b505050505061108390919063ffffffff16565b61051857600e80546001810182556000919091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd018190555b61052982600163ffffffff61109916565b5061053482846110c5565b925050610456565b6012805460ff191660011790556040517fa13f7b4dbc201a7d6c6a72975f8f690748efea2d6504de79984ffeee6973c6059061057a90600e90611e96565b60405180910390a16006805460ff60a01b1916600160a11b179055600a54600f546000916105bb916064916105af9190611100565b9063ffffffff61113a16565b600754600f549192506105d8916105af908463ffffffff61116f16565b6010556004546105f1906001600160a01b031682611197565b6040517fe32eda2bfb0af5854d16540d7cb55ec4c1aeae0becc60b04c05524af4dc49b5690600090a1505050565b6004546001600160a01b031690565b600854600d54600091116106545760405162461bcd60e51b8152600401610410906121f2565b6001600654600160a01b900460ff16600281111561066e57fe5b1461068b5760405162461bcd60e51b815260040161041090611ff7565b3233146106aa5760405162461bcd60e51b815260040161041090611fcd565b6006546009546040516323b872dd60e01b81526001600160a01b03909216916323b872dd916106df9133913091600401611dad565b602060405180830381600087803b1580156106f957600080fd5b505af115801561070d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107319190611c7f565b5061073a611392565b905090565b6060600d80548060200260200160405190810160405280929190818152602001828054801561079757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610779575b5050505050905090565b6107a9611490565b6002546001600160a01b039081169116146107d65760405162461bcd60e51b815260040161041090612238565b6000600654600160a01b900460ff1660028111156107f057fe5b1461080d5760405162461bcd60e51b81526004016104109061214b565b8461082a5760405162461bcd60e51b81526004016104109061236e565b8385106108495760405162461bcd60e51b815260040161041090612038565b6040805160c0810182528681526020810186905280820185905260608101849052608081018390524260a0909101819052600787905560088690556009859055600a849055600b839055600c8190556006805460ff60a01b1916600160a01b17905590517f67d6d22f100fbcd57b31b12acc877b82e653405d5a4f5a0e3a7efa64a9e3ff1d916108e0918791899188918891612460565b60405180910390a15050505050565b600260015414156109125760405162461bcd60e51b8152600401610410906123a5565b60026001819055600654600160a01b900460ff16600281111561093157fe5b1461094e5760405162461bcd60e51b81526004016104109061217a565b60005b600854811015610a0c576000600d828154811061096a57fe5b60009182526020918290200154600e805460408051828602810186019091528181526001600160a01b0390931694506109e29386939291908301828280156104cb57602002820191906000526020600020908154815260200190600101908083116104b757505050505061108390919063ffffffff16565b156109f3576109f381601054611197565b50610a0581600163ffffffff61109916565b9050610951565b50610a15611494565b60018055565b610a23611490565b6002546001600160a01b03908116911614610a505760405162461bcd60e51b815260040161041090612238565b6002546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600280546001600160a01b0319169055565b600654600160a01b900460ff1690565b6003546001600160a01b031690565b6002546001600160a01b031690565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b105760405162461bcd60e51b81526004016104109061226d565b610b1a8282611617565b5050565b6000806000610b9084600d805480602002602001604051908101604052809291908181526020018280548015610b7d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b5f575b505050505061164b90919063ffffffff16565b915091508015610c0457610bfb82600e8054806020026020016040519081016040528092919081815260200182805480156104cb57602002820191906000526020600020908154815260200190600101908083116104b757505050505061108390919063ffffffff16565b925050506103e2565b6000925050506103e2565b6006546001600160a01b031690565b600854600d5460009111610c445760405162461bcd60e51b8152600401610410906121f2565b6001600654600160a01b900460ff166002811115610c5e57fe5b14610c7b5760405162461bcd60e51b815260040161041090611ff7565b323314610c9a5760405162461bcd60e51b815260040161041090611fcd565b6009543414610cbb5760405162461bcd60e51b815260040161041090612326565b610cc36116b1565b610cdf5760405162461bcd60e51b8152600401610410906122fa565b600360009054906101000a90046001600160a01b03166001600160a01b031663107c279f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2d57600080fd5b505afa158015610d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d659190611c63565b6001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610d9f57600080fd5b505af1158015610db3573d6000803e3d6000fd5b505050505061073a611392565b610dc8611bda565b506040805160c0810182526007548152600854602082015260095491810191909152600a546060820152600b546080820152600c5460a082015290565b600f5490565b6060600e80548060200260200160405190810160405280929190818152602001828054801561079757602002820191906000526020600020905b815481526020019060010190808311610e45575050505050905090565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107975780601f10610ec357610100808354040283529160200191610797565b820191906000526020600020905b815481529060010190602001808311610ed157509395945050505050565b610ef7611490565b6002546001600160a01b03908116911614610f245760405162461bcd60e51b815260040161041090612238565b6001600160a01b038116610f4a5760405162461bcd60e51b815260040161041090611f27565b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fbf9a9534339a9d6b81696e05dcfb614b7dc518a31d48be3cfb757988381fb32390600090a250565b610fa2611490565b6002546001600160a01b03908116911614610fcf5760405162461bcd60e51b815260040161041090612238565b6001600160a01b038116610ff55760405162461bcd60e51b815260040161041090611f50565b6002546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000816110705760405162461bcd60e51b815260040161041090612114565b81838161107957fe5b0690505b92915050565b6000806110908484611744565b95945050505050565b6000828201838110156110be5760405162461bcd60e51b815260040161041090611f96565b9392505050565b60405160009081906110e09043409086908690602001611d75565b60408051808303601f190181529190528051602090910120949350505050565b60008261110f5750600061107d565b8282028284828161111c57fe5b04146110be5760405162461bcd60e51b8152600401610410906121b1565b600080821161115b5760405162461bcd60e51b8152600401610410906120dd565b600082848161116657fe5b04949350505050565b6000828211156111915760405162461bcd60e51b8152600401610410906120a6565b50900390565b61119f6116b1565b1561130957600360009054906101000a90046001600160a01b03166001600160a01b031663107c279f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f257600080fd5b505afa158015611206573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122a9190611c63565b6001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b81526004016112559190612457565b600060405180830381600087803b15801561126f57600080fd5b505af1158015611283573d6000803e3d6000fd5b505050506000826001600160a01b0316826040516112a0906103eb565b60006040518083038185875af1925050503d80600081146112dd576040519150601f19603f3d011682016040523d82523d6000602084013e6112e2565b606091505b50509050806113035760405162461bcd60e51b8152600401610410906122a4565b50610b1a565b60065460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061133b9085908590600401611dd1565b602060405180830381600087803b15801561135557600080fd5b505af1158015611369573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138d9190611c7f565b505050565b600d805460018101825560009182527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b03191633179055600954600f546113e89163ffffffff61109916565b600f55600854600d5414156114305760405133907f176a0af3bf0cb5427d014b58c70781c718cc8890129cc6ef23e9289fd12b62f590600090a2600b5461142e90611785565b505b600d5461144490600163ffffffff61116f16565b905080336001600160a01b03167fff4e218e6b525fa5585399e4b3422307b6ba461db80663a93e3b05123c5ec2fd6007600201546040516114859190612457565b60405180910390a390565b3390565b6006805460ff60a01b1916600160a01b1790556000600f819055601081905560118190556012805460ff191690556114ce90600e90611c10565b6114da600d6000611c10565b6040517f171541b53bd4795b7bad6fdb59c6484482246e5a641a56257143cd33cd91e25e90600090a16006546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611534903090600401611d99565b60206040518083038186803b15801561154c57600080fd5b505afa158015611560573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115849190611c9f565b90508015611614576006546004805460405163a9059cbb60e01b81526001600160a01b039384169363a9059cbb936115c29390911691869101611dd1565b602060405180830381600087803b1580156115dc57600080fd5b505af11580156115f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1a9190611c7f565b50565b601181905560405181907facb85192b17e57cdd6ffdc2af021cc70c3a2269771b37b82dd36695fec903af590600090a25050565b81516000908190815b8181101561169e57846001600160a01b031686828151811061167257fe5b60200260200101516001600160a01b03161415611696579250600191506116aa9050565b600101611654565b50600019600092509250505b9250929050565b6003546040805163107c279f60e01b815290516000926001600160a01b03169163107c279f916004808301926020929190829003018186803b1580156116f657600080fd5b505afa15801561170a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172e9190611c63565b6006546001600160a01b03908116911614905090565b81516000908190815b8181101561169e578486828151811061176257fe5b6020026020010151141561177d579250600191506116aa9050565b60010161174d565b60035460408051630bc628c160e41b815290516000926001600160a01b03169163bc628c10916004808301926020929190829003018186803b1580156117ca57600080fd5b505afa1580156117de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118029190611c9f565b600360009054906101000a90046001600160a01b03166001600160a01b031663e76d51686040518163ffffffff1660e01b815260040160206040518083038186803b15801561185057600080fd5b505afa158015611864573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118889190611c63565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016118b39190611d99565b60206040518083038186803b1580156118cb57600080fd5b505afa1580156118df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119039190611c9f565b10156119215760405162461bcd60e51b81526004016104109061206f565b6000601155600354604080516361c9b82360e01b8152905161107d926001600160a01b0316916361c9b823916004808301926020929190829003018186803b15801561196c57600080fd5b505afa158015611980573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a49190611c9f565b600360009054906101000a90046001600160a01b03166001600160a01b031663bc628c106040518163ffffffff1660e01b815260040160206040518083038186803b1580156119f257600080fd5b505afa158015611a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2a9190611c9f565b8460007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f0000000000000000000000000000000000000000000000000000000000000000858786604051602001611a91929190611d8b565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611abe93929190611dea565b602060405180830381600087803b158015611ad857600080fd5b505af1158015611aec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b109190611c7f565b506000611b318584306000808a815260200190815260200160002054611b6d565b600086815260208190526040902054909150611b5490600163ffffffff61109916565b6000868152602081905260409020556110908582611ba7565b600084848484604051602001611b869493929190611edc565b60408051601f19818403018152919052805160209091012095945050505050565b60008282604051602001611bbc929190611d8b565b60405160208183030381529060405280519060200120905092915050565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b508054600082559060005260206000209081019061161491906103eb91905b80821115611c435760008155600101611c2f565b5090565b600060208284031215611c58578081fd5b81356110be81612483565b600060208284031215611c74578081fd5b81516110be81612483565b600060208284031215611c90578081fd5b815180151581146110be578182fd5b600060208284031215611cb0578081fd5b5051919050565b60008060408385031215611cc9578081fd5b50508035926020909101359150565b600060208284031215611ce9578081fd5b5035919050565b600080600080600060a08688031215611d07578081fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008151808452815b81811015611d4f57602081850181015186830182015201611d33565b81811115611d605782602083870101525b50601f01601f19169290920160200192915050565b9283526020830191909152604082015260600190565b918252602082015260400190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b0385168252836020830152606060408301526110906060830184611d2a565b6020808252825182820181905260009190848201906040850190845b81811015611e525783516001600160a01b031683529284019291840191600101611e2d565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611e5257835183529284019291840191600101611e7a565b6020808252825482820181905260008481528281209092916040850190845b81811015611e5257835483526001938401939285019201611eb5565b901515815260200190565b93845260208401929092526001600160a01b03166040830152606082015260800190565b6020810160038310611f0e57fe5b91905290565b6000602082526110be6020830184611d2a565b6020808252600f908201526e496e76616c6964206164647265737360881b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526010908201526f13db9b1e481153d048185b1b1bddd95960821b604082015260600190565b60208082526021908201527f54686520506f6f6c206973206e6f742073746172746564206f7220636c6f73656040820152601960fa1b606082015260800190565b6020808252601a908201527f546f6f206d756368206e756d626572206f662077696e6e657273000000000000604082015260600190565b60208082526017908201527f4e6f7420656e6f756768204c494e4b20666f7220565246000000000000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526018908201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604082015260600190565b6020808252601590820152744120506f6f6c20697320696e2070726f677265737360581b604082015260600190565b60208082526018908201527f54686520506f6f6c206973206e6f7420736574746c65642e0000000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526026908201527f4d61782050617274696369706174696f6e20666f722074686520506f6f6c2052604082015265195858da195960d21b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604082015260600190565b602080825260139082015272115512081b9bdd081d1c985b9cd9995c9c9959606a1b604082015260600190565b6020808252600f908201526e524e4420696e2070726f677265737360881b604082015260600190565b602080825260129082015271115512081a5cdb89dd081858d8d95c1d195960721b604082015260600190565b60208082526028908201527f496e737566666963656e7420726567697374726174696f6e20616d6f756e74206040820152671c1c9bdd9a59195960c21b606082015260800190565b6020808252601e908201527f4e756d626572206f662077696e6e6572206d757374206e6f7420626520300000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526017908201527f54686520506f6f6c20697320696e2070726f6772657373000000000000000000604082015260600190565b600060c082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015292915050565b90815260200190565b948552602085019390935260408401919091526060830152608082015260a00190565b6001600160a01b038116811461161457600080fdfea26469706673582212205f15a99fc15260e0714e7a6896bf8fbc8fd2b86d0c10e604d331376bcbddce9a64736f6c634300060a00330000000000000000000000000000000000000000000000000000000000000080000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000cd973580154afcd896884a8c1360ea984aadc9f00000000000000000000000002f019c9d9bd71f684ecd1885af540fdb3e508f1000000000000000000000000000000000000000000000000000000000000000c45544820426567696e6e65720000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101395760003560e01c80638da5cb5b116100ab578063b0d965801161006f578063b0d9658014610300578063b8801e7014610322578063c75334ab14610337578063d299398314610359578063e74b981b1461037b578063f2fde38b1461039b57610140565b80638da5cb5b1461028157806394985ddd146102965780639d9ca28d146102b6578063a74a6977146102e3578063ac16cc2f146102f857610140565b80635aa68ac0116100fd5780635aa68ac0146101de57806369c970c71461020057806370bb45b314610220578063715018a6146102355780637f79496c1461024a57806388cc58e41461026c57610140565b80631b9db2ef14610145578063287cd3681461017b5780633b1bc3191461019d5780634ccb20c0146101b457806350a3bd39146101c957610140565b3661014057005b600080fd5b34801561015157600080fd5b50610165610160366004611cd8565b6103bb565b6040516101729190611d99565b60405180910390f35b34801561018757600080fd5b506101906103e7565b6040516101729190612457565b3480156101a957600080fd5b506101b26103ee565b005b3480156101c057600080fd5b5061016561061f565b3480156101d557600080fd5b5061019061062e565b3480156101ea57600080fd5b506101f361073f565b6040516101729190611e11565b34801561020c57600080fd5b506101b261021b366004611cf0565b6107a1565b34801561022c57600080fd5b506101b26108ef565b34801561024157600080fd5b506101b2610a1b565b34801561025657600080fd5b5061025f610a9a565b6040516101729190611f00565b34801561027857600080fd5b50610165610aaa565b34801561028d57600080fd5b50610165610ab9565b3480156102a257600080fd5b506101b26102b1366004611cb7565b610ac8565b3480156102c257600080fd5b506102d66102d1366004611c47565b610b1e565b6040516101729190611ed1565b3480156102ef57600080fd5b50610165610c0f565b610190610c1e565b34801561030c57600080fd5b50610315610dc0565b6040516101729190612413565b34801561032e57600080fd5b50610190610e05565b34801561034357600080fd5b5061034c610e0b565b6040516101729190611e5e565b34801561036557600080fd5b5061036e610e62565b6040516101729190611f14565b34801561038757600080fd5b506101b2610396366004611c47565b610eef565b3480156103a757600080fd5b506101b26103b6366004611c47565b610f9a565b6000600d82815481106103ca57fe5b6000918252602090912001546001600160a01b031690505b919050565b6010545b90565b6000601154116104195760405162461bcd60e51b8152600401610410906122d1565b60405180910390fd5b6001600654600160a01b900460ff16600281111561043357fe5b146104505760405162461bcd60e51b8152600401610410906123dc565b60115460005b600754600e54101561053c5760085460009061047990849063ffffffff61105116565b90506104de81600e8054806020026020016040519081016040528092919081815260200182805480156104cb57602002820191906000526020600020905b8154815260200190600101908083116104b7575b505050505061108390919063ffffffff16565b61051857600e80546001810182556000919091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd018190555b61052982600163ffffffff61109916565b5061053482846110c5565b925050610456565b6012805460ff191660011790556040517fa13f7b4dbc201a7d6c6a72975f8f690748efea2d6504de79984ffeee6973c6059061057a90600e90611e96565b60405180910390a16006805460ff60a01b1916600160a11b179055600a54600f546000916105bb916064916105af9190611100565b9063ffffffff61113a16565b600754600f549192506105d8916105af908463ffffffff61116f16565b6010556004546105f1906001600160a01b031682611197565b6040517fe32eda2bfb0af5854d16540d7cb55ec4c1aeae0becc60b04c05524af4dc49b5690600090a1505050565b6004546001600160a01b031690565b600854600d54600091116106545760405162461bcd60e51b8152600401610410906121f2565b6001600654600160a01b900460ff16600281111561066e57fe5b1461068b5760405162461bcd60e51b815260040161041090611ff7565b3233146106aa5760405162461bcd60e51b815260040161041090611fcd565b6006546009546040516323b872dd60e01b81526001600160a01b03909216916323b872dd916106df9133913091600401611dad565b602060405180830381600087803b1580156106f957600080fd5b505af115801561070d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107319190611c7f565b5061073a611392565b905090565b6060600d80548060200260200160405190810160405280929190818152602001828054801561079757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610779575b5050505050905090565b6107a9611490565b6002546001600160a01b039081169116146107d65760405162461bcd60e51b815260040161041090612238565b6000600654600160a01b900460ff1660028111156107f057fe5b1461080d5760405162461bcd60e51b81526004016104109061214b565b8461082a5760405162461bcd60e51b81526004016104109061236e565b8385106108495760405162461bcd60e51b815260040161041090612038565b6040805160c0810182528681526020810186905280820185905260608101849052608081018390524260a0909101819052600787905560088690556009859055600a849055600b839055600c8190556006805460ff60a01b1916600160a01b17905590517f67d6d22f100fbcd57b31b12acc877b82e653405d5a4f5a0e3a7efa64a9e3ff1d916108e0918791899188918891612460565b60405180910390a15050505050565b600260015414156109125760405162461bcd60e51b8152600401610410906123a5565b60026001819055600654600160a01b900460ff16600281111561093157fe5b1461094e5760405162461bcd60e51b81526004016104109061217a565b60005b600854811015610a0c576000600d828154811061096a57fe5b60009182526020918290200154600e805460408051828602810186019091528181526001600160a01b0390931694506109e29386939291908301828280156104cb57602002820191906000526020600020908154815260200190600101908083116104b757505050505061108390919063ffffffff16565b156109f3576109f381601054611197565b50610a0581600163ffffffff61109916565b9050610951565b50610a15611494565b60018055565b610a23611490565b6002546001600160a01b03908116911614610a505760405162461bcd60e51b815260040161041090612238565b6002546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600280546001600160a01b0319169055565b600654600160a01b900460ff1690565b6003546001600160a01b031690565b6002546001600160a01b031690565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614610b105760405162461bcd60e51b81526004016104109061226d565b610b1a8282611617565b5050565b6000806000610b9084600d805480602002602001604051908101604052809291908181526020018280548015610b7d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b5f575b505050505061164b90919063ffffffff16565b915091508015610c0457610bfb82600e8054806020026020016040519081016040528092919081815260200182805480156104cb57602002820191906000526020600020908154815260200190600101908083116104b757505050505061108390919063ffffffff16565b925050506103e2565b6000925050506103e2565b6006546001600160a01b031690565b600854600d5460009111610c445760405162461bcd60e51b8152600401610410906121f2565b6001600654600160a01b900460ff166002811115610c5e57fe5b14610c7b5760405162461bcd60e51b815260040161041090611ff7565b323314610c9a5760405162461bcd60e51b815260040161041090611fcd565b6009543414610cbb5760405162461bcd60e51b815260040161041090612326565b610cc36116b1565b610cdf5760405162461bcd60e51b8152600401610410906122fa565b600360009054906101000a90046001600160a01b03166001600160a01b031663107c279f6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2d57600080fd5b505afa158015610d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d659190611c63565b6001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610d9f57600080fd5b505af1158015610db3573d6000803e3d6000fd5b505050505061073a611392565b610dc8611bda565b506040805160c0810182526007548152600854602082015260095491810191909152600a546060820152600b546080820152600c5460a082015290565b600f5490565b6060600e80548060200260200160405190810160405280929190818152602001828054801561079757602002820191906000526020600020905b815481526020019060010190808311610e45575050505050905090565b60058054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107975780601f10610ec357610100808354040283529160200191610797565b820191906000526020600020905b815481529060010190602001808311610ed157509395945050505050565b610ef7611490565b6002546001600160a01b03908116911614610f245760405162461bcd60e51b815260040161041090612238565b6001600160a01b038116610f4a5760405162461bcd60e51b815260040161041090611f27565b600480546001600160a01b0319166001600160a01b0383811691909117918290556040519116907fbf9a9534339a9d6b81696e05dcfb614b7dc518a31d48be3cfb757988381fb32390600090a250565b610fa2611490565b6002546001600160a01b03908116911614610fcf5760405162461bcd60e51b815260040161041090612238565b6001600160a01b038116610ff55760405162461bcd60e51b815260040161041090611f50565b6002546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000816110705760405162461bcd60e51b815260040161041090612114565b81838161107957fe5b0690505b92915050565b6000806110908484611744565b95945050505050565b6000828201838110156110be5760405162461bcd60e51b815260040161041090611f96565b9392505050565b60405160009081906110e09043409086908690602001611d75565b60408051808303601f190181529190528051602090910120949350505050565b60008261110f5750600061107d565b8282028284828161111c57fe5b04146110be5760405162461bcd60e51b8152600401610410906121b1565b600080821161115b5760405162461bcd60e51b8152600401610410906120dd565b600082848161116657fe5b04949350505050565b6000828211156111915760405162461bcd60e51b8152600401610410906120a6565b50900390565b61119f6116b1565b1561130957600360009054906101000a90046001600160a01b03166001600160a01b031663107c279f6040518163ffffffff1660e01b815260040160206040518083038186803b1580156111f257600080fd5b505afa158015611206573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122a9190611c63565b6001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b81526004016112559190612457565b600060405180830381600087803b15801561126f57600080fd5b505af1158015611283573d6000803e3d6000fd5b505050506000826001600160a01b0316826040516112a0906103eb565b60006040518083038185875af1925050503d80600081146112dd576040519150601f19603f3d011682016040523d82523d6000602084013e6112e2565b606091505b50509050806113035760405162461bcd60e51b8152600401610410906122a4565b50610b1a565b60065460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb9061133b9085908590600401611dd1565b602060405180830381600087803b15801561135557600080fd5b505af1158015611369573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138d9190611c7f565b505050565b600d805460018101825560009182527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b03191633179055600954600f546113e89163ffffffff61109916565b600f55600854600d5414156114305760405133907f176a0af3bf0cb5427d014b58c70781c718cc8890129cc6ef23e9289fd12b62f590600090a2600b5461142e90611785565b505b600d5461144490600163ffffffff61116f16565b905080336001600160a01b03167fff4e218e6b525fa5585399e4b3422307b6ba461db80663a93e3b05123c5ec2fd6007600201546040516114859190612457565b60405180910390a390565b3390565b6006805460ff60a01b1916600160a01b1790556000600f819055601081905560118190556012805460ff191690556114ce90600e90611c10565b6114da600d6000611c10565b6040517f171541b53bd4795b7bad6fdb59c6484482246e5a641a56257143cd33cd91e25e90600090a16006546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611534903090600401611d99565b60206040518083038186803b15801561154c57600080fd5b505afa158015611560573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115849190611c9f565b90508015611614576006546004805460405163a9059cbb60e01b81526001600160a01b039384169363a9059cbb936115c29390911691869101611dd1565b602060405180830381600087803b1580156115dc57600080fd5b505af11580156115f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1a9190611c7f565b50565b601181905560405181907facb85192b17e57cdd6ffdc2af021cc70c3a2269771b37b82dd36695fec903af590600090a25050565b81516000908190815b8181101561169e57846001600160a01b031686828151811061167257fe5b60200260200101516001600160a01b03161415611696579250600191506116aa9050565b600101611654565b50600019600092509250505b9250929050565b6003546040805163107c279f60e01b815290516000926001600160a01b03169163107c279f916004808301926020929190829003018186803b1580156116f657600080fd5b505afa15801561170a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172e9190611c63565b6006546001600160a01b03908116911614905090565b81516000908190815b8181101561169e578486828151811061176257fe5b6020026020010151141561177d579250600191506116aa9050565b60010161174d565b60035460408051630bc628c160e41b815290516000926001600160a01b03169163bc628c10916004808301926020929190829003018186803b1580156117ca57600080fd5b505afa1580156117de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118029190611c9f565b600360009054906101000a90046001600160a01b03166001600160a01b031663e76d51686040518163ffffffff1660e01b815260040160206040518083038186803b15801561185057600080fd5b505afa158015611864573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118889190611c63565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016118b39190611d99565b60206040518083038186803b1580156118cb57600080fd5b505afa1580156118df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119039190611c9f565b10156119215760405162461bcd60e51b81526004016104109061206f565b6000601155600354604080516361c9b82360e01b8152905161107d926001600160a01b0316916361c9b823916004808301926020929190829003018186803b15801561196c57600080fd5b505afa158015611980573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a49190611c9f565b600360009054906101000a90046001600160a01b03166001600160a01b031663bc628c106040518163ffffffff1660e01b815260040160206040518083038186803b1580156119f257600080fd5b505afa158015611a06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2a9190611c9f565b8460007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952858786604051602001611a91929190611d8b565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611abe93929190611dea565b602060405180830381600087803b158015611ad857600080fd5b505af1158015611aec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b109190611c7f565b506000611b318584306000808a815260200190815260200160002054611b6d565b600086815260208190526040902054909150611b5490600163ffffffff61109916565b6000868152602081905260409020556110908582611ba7565b600084848484604051602001611b869493929190611edc565b60408051601f19818403018152919052805160209091012095945050505050565b60008282604051602001611bbc929190611d8b565b60405160208183030381529060405280519060200120905092915050565b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b508054600082559060005260206000209081019061161491906103eb91905b80821115611c435760008155600101611c2f565b5090565b600060208284031215611c58578081fd5b81356110be81612483565b600060208284031215611c74578081fd5b81516110be81612483565b600060208284031215611c90578081fd5b815180151581146110be578182fd5b600060208284031215611cb0578081fd5b5051919050565b60008060408385031215611cc9578081fd5b50508035926020909101359150565b600060208284031215611ce9578081fd5b5035919050565b600080600080600060a08688031215611d07578081fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008151808452815b81811015611d4f57602081850181015186830182015201611d33565b81811115611d605782602083870101525b50601f01601f19169290920160200192915050565b9283526020830191909152604082015260600190565b918252602082015260400190565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b0385168252836020830152606060408301526110906060830184611d2a565b6020808252825182820181905260009190848201906040850190845b81811015611e525783516001600160a01b031683529284019291840191600101611e2d565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611e5257835183529284019291840191600101611e7a565b6020808252825482820181905260008481528281209092916040850190845b81811015611e5257835483526001938401939285019201611eb5565b901515815260200190565b93845260208401929092526001600160a01b03166040830152606082015260800190565b6020810160038310611f0e57fe5b91905290565b6000602082526110be6020830184611d2a565b6020808252600f908201526e496e76616c6964206164647265737360881b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526010908201526f13db9b1e481153d048185b1b1bddd95960821b604082015260600190565b60208082526021908201527f54686520506f6f6c206973206e6f742073746172746564206f7220636c6f73656040820152601960fa1b606082015260800190565b6020808252601a908201527f546f6f206d756368206e756d626572206f662077696e6e657273000000000000604082015260600190565b60208082526017908201527f4e6f7420656e6f756768204c494e4b20666f7220565246000000000000000000604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b60208082526018908201527f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000604082015260600190565b6020808252601590820152744120506f6f6c20697320696e2070726f677265737360581b604082015260600190565b60208082526018908201527f54686520506f6f6c206973206e6f7420736574746c65642e0000000000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b60208082526026908201527f4d61782050617274696369706174696f6e20666f722074686520506f6f6c2052604082015265195858da195960d21b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604082015260600190565b602080825260139082015272115512081b9bdd081d1c985b9cd9995c9c9959606a1b604082015260600190565b6020808252600f908201526e524e4420696e2070726f677265737360881b604082015260600190565b602080825260129082015271115512081a5cdb89dd081858d8d95c1d195960721b604082015260600190565b60208082526028908201527f496e737566666963656e7420726567697374726174696f6e20616d6f756e74206040820152671c1c9bdd9a59195960c21b606082015260800190565b6020808252601e908201527f4e756d626572206f662077696e6e6572206d757374206e6f7420626520300000604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526017908201527f54686520506f6f6c20697320696e2070726f6772657373000000000000000000604082015260600190565b600060c082019050825182526020830151602083015260408301516040830152606083015160608301526080830151608083015260a083015160a083015292915050565b90815260200190565b948552602085019390935260408401919091526060830152608082015260a00190565b6001600160a01b038116811461161457600080fdfea26469706673582212205f15a99fc15260e0714e7a6896bf8fbc8fd2b86d0c10e604d331376bcbddce9a64736f6c634300060a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000cd973580154afcd896884a8c1360ea984aadc9f00000000000000000000000002f019c9d9bd71f684ecd1885af540fdb3e508f1000000000000000000000000000000000000000000000000000000000000000c45544820426567696e6e65720000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _poolName (string): ETH Beginner
Arg [1] : _enterToken (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [2] : _factory (address): 0x0cd973580154AFcD896884a8C1360ea984AADc9f
Arg [3] : _feeRecipient (address): 0x02F019C9D9bD71f684ecD1885Af540Fdb3e508F1
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [2] : 0000000000000000000000000cd973580154afcd896884a8c1360ea984aadc9f
Arg [3] : 00000000000000000000000002f019c9d9bd71f684ecd1885af540fdb3e508f1
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [5] : 45544820426567696e6e65720000000000000000000000000000000000000000
Deployed Bytecode Sourcemap
45640:13701:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54873:117;;;;;;;;;;-1:-1:-1;54873:117:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;54467:113;;;;;;;;;;;;;:::i;:::-;;;;;;;;51408:1186;;;;;;;;;;;;;:::i;:::-;;53513:97;;;;;;;;;;;;;:::i;51026:261::-;;;;;;;;;;;;;:::i;54635:105::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;49207:901;;;;;;;;;;-1:-1:-1;49207:901:0;;;;;;;;:::i;52755:455::-;;;;;;;;;;;;;:::i;30829:148::-;;;;;;;;;;;;;:::i;53973:96::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;53358;;;;;;;;;;;;;:::i;30187:79::-;;;;;;;;;;;;;:::i;16035:210::-;;;;;;;;;;-1:-1:-1;16035:210:0;;;;;;;;:::i;55219:276::-;;;;;;;;;;-1:-1:-1;55219:276:0;;;;;;;;:::i;:::-;;;;;;;;53815:102;;;;;;;;;;;;;:::i;50566:398::-;;;:::i;54125:103::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;54292:109;;;;;;;;;;;;;:::i;55049:107::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;53664:95;;;;;;;;;;;;;:::i;:::-;;;;;;;;50285:227;;;;;;;;;;-1:-1:-1;50285:227:0;;;;;;;;:::i;31132:244::-;;;;;;;;;;-1:-1:-1;31132:244:0;;;;;;;;:::i;54873:117::-;54935:7;54962:12;54975:6;54962:20;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;54962:20:0;;-1:-1:-1;54873:117:0;;;;:::o;54467:113::-;54552:20;;54467:113;;:::o;51408:1186::-;51473:1;51458:12;;:16;51450:44;;;;-1:-1:-1;;;51450:44:0;;;;;;;;;;;;;;;;;51527:21;51513:10;;-1:-1:-1;;;51513:10:0;;;;:35;;;;;;;;;51505:71;;;;-1:-1:-1;;;51505:71:0;;;;;;;;;51673:12;;51653:17;51725:370;51754:10;:23;51731:13;:20;:46;51725:370;;;51831:27;;51794:20;;51817:42;;:9;;:42;:13;:42;:::i;:::-;51794:65;;51879:36;51902:12;51879:13;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:36;;;;:::i;:::-;51874:110;;51936:13;:32;;;;;;;-1:-1:-1;51936:32:0;;;;;;;;;51874:110;51998:13;:6;52009:1;51998:13;:10;:13;:::i;:::-;;52038:45;52065:6;52073:9;52038:26;:45::i;:::-;52026:57;;51725:370;;;;52105:19;:26;;-1:-1:-1;;52105:26:0;52127:4;52105:26;;;52147:31;;;;;;52164:13;;52147:31;;;;;;;;;;52226:10;:30;;-1:-1:-1;;;;52226:30:0;-1:-1:-1;;;52226:30:0;;;52338:24;;52315:18;;-1:-1:-1;;52315:57:0;;52368:3;;52315:48;;:18;:22;:48::i;:::-;:52;:57;:52;:57;:::i;:::-;52446:10;:23;52407:18;;52295:77;;-1:-1:-1;52406:64:0;;52407:33;;52295:77;52407:33;:22;:33;:::i;52406:64::-;52383:20;:87;52501:12;;52481:44;;-1:-1:-1;;;;;52501:12:0;52515:9;52481:19;:44::i;:::-;52573:13;;;;;;;51408:1186;;;:::o;53513:97::-;53590:12;;-1:-1:-1;;;;;53590:12:0;53513:97;:::o;51026:261::-;47453:27;;47431:12;:19;51087:7;;-1:-1:-1;47423:100:0;;;;-1:-1:-1;;;47423:100:0;;;;;;;;;47556:21;47542:10;;-1:-1:-1;;;47542:10:0;;;;:35;;;;;;;;;47534:81;;;;-1:-1:-1;;;47534:81:0;;;;;;;;;47681:9:::1;47694:10;47681:23;47673:52;;;;-1:-1:-1::0;;;47673:52:0::1;;;;;;;;;51107:10:::2;::::0;51210:22;;51107:140:::2;::::0;-1:-1:-1;;;51107:140:0;;-1:-1:-1;;;;;51107:10:0;;::::2;::::0;:23:::2;::::0;:140:::2;::::0;51149:10:::2;::::0;51186:4:::2;::::0;51107:140:::2;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;51267:12;:10;:12::i;:::-;51260:19;;51026:261:::0;:::o;54635:105::-;54684:16;54720:12;54713:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;54713:19:0;;;;;;;;;;;;;;;;;;;;;;;54635:105;:::o;49207:901::-;30409:12;:10;:12::i;:::-;30399:6;;-1:-1:-1;;;;;30399:6:0;;;:22;;;30391:67;;;;-1:-1:-1;;;30391:67:0;;;;;;;;;49450:21:::1;49436:10;::::0;-1:-1:-1;;;49436:10:0;::::1;;;:35;::::0;::::1;;;;;;;49428:69;;;;-1:-1:-1::0;;;49428:69:0::1;;;;;;;;;49516:18:::0;49508:61:::1;;;;-1:-1:-1::0;;;49508:61:0::1;;;;;;;;;49604:17;49588:13;:33;49580:72;;;;-1:-1:-1::0;;;49580:72:0::1;;;;;;;;;49678:193;::::0;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;;;;49845:15:::1;49678:193:::0;;;;;;;49665:10:::1;:206:::0;;;;;;;;;;;;;;;;;;;;;;;49882:10:::1;:34:::0;;-1:-1:-1;;;;49882:34:0::1;-1:-1:-1::0;;;49882:34:0::1;::::0;;49932:168;;::::1;::::0;::::1;::::0;49678:193;;;;;;;;49932:168:::1;;;;;;;;;;49207:901:::0;;;;;:::o;52755:455::-;27076:1;27682:7;;:19;;27674:63;;;;-1:-1:-1;;;27674:63:0;;;;;;;;;27076:1;27815:7;:18;;;52822:10:::1;::::0;-1:-1:-1;;;52822:10:0;::::1;;;:31;::::0;::::1;;;;;;;52814:68;;;;-1:-1:-1::0;;;52814:68:0::1;;;;;;;;;52900:9;52895:285;52919:27:::0;;52915:31;::::1;52895:285;;;52977:14;52994:12;53007:1;52994:15;;;;;;;;;::::0;;;::::1;::::0;;;;::::1;::::0;53028:13:::1;:22:::0;;::::1;::::0;;;;::::1;::::0;;;;;;;;;;-1:-1:-1;;;;;52994:15:0;;::::1;::::0;-1:-1:-1;53028:25:0::1;::::0;53051:1;;53028:22;:13;:22;;::::1;:13:::0;:22;;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:25;;;;:::i;:::-;53024:145;;;53104:49;53124:6;53132:20;;53104:19;:49::i;:::-;-1:-1:-1::0;52952:8:0::1;:1:::0;52958::::1;52952:8;:5;:8;:::i;:::-;52948:12;;52895:285;;;;53190:12;:10;:12::i;:::-;27032:1:::0;27994:22;;52755:455::o;30829:148::-;30409:12;:10;:12::i;:::-;30399:6;;-1:-1:-1;;;;;30399:6:0;;;:22;;;30391:67;;;;-1:-1:-1;;;30391:67:0;;;;;;;;;30920:6:::1;::::0;30899:40:::1;::::0;30936:1:::1;::::0;-1:-1:-1;;;;;30920:6:0::1;::::0;30899:40:::1;::::0;30936:1;;30899:40:::1;30950:6;:19:::0;;-1:-1:-1;;;;;;30950:19:0::1;::::0;;30829:148::o;53973:96::-;54051:10;;-1:-1:-1;;;54051:10:0;;;;;53973:96::o;53358:::-;53438:7;;-1:-1:-1;;;;;53438:7:0;53358:96;:::o;30187:79::-;30252:6;;-1:-1:-1;;;;;30252:6:0;30187:79;:::o;16035:210::-;16128:10;-1:-1:-1;;;;;16142:14:0;16128:28;;16120:72;;;;-1:-1:-1;;;16120:72:0;;;;;;;;;16199:40;16217:9;16228:10;16199:17;:40::i;:::-;16035:210;;:::o;55219:276::-;55277:4;55295:13;55310:12;55326:30;55347:8;55326:12;:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;55326:20:0;;;;;;;;;;;;;;;;;;;;;;;:30;;;;:::i;:::-;55294:62;;;;55371:7;55367:121;;;55402:29;55425:5;55402:13;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:29;;;;:::i;:::-;55395:36;;;;;;55367:121;55471:5;55464:12;;;;;;53815:102;53898:10;;-1:-1:-1;;;;;53898:10:0;53815:102;:::o;50566:398::-;47453:27;;47431:12;:19;50638:7;;-1:-1:-1;47423:100:0;;;;-1:-1:-1;;;47423:100:0;;;;;;;;;47556:21;47542:10;;-1:-1:-1;;;47542:10:0;;;;:35;;;;;;;;;47534:81;;;;-1:-1:-1;;;47534:81:0;;;;;;;;;47681:9:::1;47694:10;47681:23;47673:52;;;;-1:-1:-1::0;;;47673:52:0::1;;;;;;;;;50679:22:::0;;50666:9:::2;:35;50658:88;;;;-1:-1:-1::0;;;50658:88:0::2;;;;;;;;;50762:12;:10;:12::i;:::-;50757:74;;50791:28;;-1:-1:-1::0;;;50791:28:0::2;;;;;;;;50757:74;50876:7;;;;;;;;;-1:-1:-1::0;;;;;50876:7:0::2;-1:-1:-1::0;;;;;50876:15:0::2;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;50870:32:0::2;;50911:9;50870:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;;50944:12;:10;:12::i;54125:103::-:0;54173:17;;:::i;:::-;-1:-1:-1;54203:17:0;;;;;;;;54210:10;54203:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54125:103;:::o;54292:109::-;54375:18;;54292:109;:::o;55049:107::-;55099:16;55135:13;55128:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55049:107;:::o;53664:95::-;53743:8;53736:15;;;;;;;;-1:-1:-1;;53736:15:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;53710:13;;53736:15;;53743:8;;53736:15;;53743:8;53736:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;53736:15:0;;53664:95;-1:-1:-1;;;;;53664:95:0:o;50285:227::-;30409:12;:10;:12::i;:::-;30399:6;;-1:-1:-1;;;;;30399:6:0;;;:22;;;30391:67;;;;-1:-1:-1;;;30391:67:0;;;;;;;;;-1:-1:-1;;;;;50371:27:0;::::1;50363:55;;;;-1:-1:-1::0;;;50363:55:0::1;;;;;;;;;50429:12;:28:::0;;-1:-1:-1;;;;;;50429:28:0::1;-1:-1:-1::0;;;;;50429:28:0;;::::1;::::0;;;::::1;::::0;;;;50475:29:::1;::::0;50491:12;::::1;::::0;50475:29:::1;::::0;-1:-1:-1;;50475:29:0::1;50285:227:::0;:::o;31132:244::-;30409:12;:10;:12::i;:::-;30399:6;;-1:-1:-1;;;;;30399:6:0;;;:22;;;30391:67;;;;-1:-1:-1;;;30391:67:0;;;;;;;;;-1:-1:-1;;;;;31221:22:0;::::1;31213:73;;;;-1:-1:-1::0;;;31213:73:0::1;;;;;;;;;31323:6;::::0;31302:38:::1;::::0;-1:-1:-1;;;;;31302:38:0;;::::1;::::0;31323:6:::1;::::0;31302:38:::1;::::0;31323:6:::1;::::0;31302:38:::1;31351:6;:17:::0;;-1:-1:-1;;;;;;31351:17:0::1;-1:-1:-1::0;;;;;31351:17:0;;;::::1;::::0;;;::::1;::::0;;31132:244::o;3451:142::-;3509:7;3533:6;3525:43;;;;-1:-1:-1;;;3525:43:0;;;;;;;;;3586:1;3582;:5;;;;;;3575:12;;3451:142;;;;;:::o;32439:148::-;32511:4;32531:9;32544:13;32552:1;32555;32544:7;:13::i;:::-;32528:29;32439:148;-1:-1:-1;;;;;32439:148:0:o;974:167::-;1032:7;1060:5;;;1080:6;;;;1072:46;;;;-1:-1:-1;;;1072:46:0;;;;;;;;;1134:1;974:167;-1:-1:-1;;;974:167:0:o;57897:393::-;58089:147;;58021:7;;;;58089:147;;58134:12;58124:23;;58174:7;;58209:11;;58089:147;;;;;;;;;;;-1:-1:-1;;58089:147:0;;;;;;58065:182;;58089:147;58065:182;;;;;57897:393;-1:-1:-1;;;;57897:393:0:o;1813:430::-;1871:7;2099:6;2095:37;;-1:-1:-1;2123:1:0;2116:8;;2095:37;2152:5;;;2156:1;2152;:5;:1;2172:5;;;;;:10;2164:56;;;;-1:-1:-1;;;2164:56:0;;;;;;;;2697:311;2755:7;2846:1;2842;:5;2834:44;;;;-1:-1:-1;;;2834:44:0;;;;;;;;;2885:9;2901:1;2897;:5;;;;;;;2697:311;-1:-1:-1;;;;2697:311:0:o;1404:170::-;1462:7;1491:1;1486;:6;;1478:49;;;;-1:-1:-1;;;1478:49:0;;;;;;;;;-1:-1:-1;1546:5:0;;;1404:170::o;57076:371::-;57159:12;:10;:12::i;:::-;57155:285;;;57194:7;;;;;;;;;-1:-1:-1;;;;;57194:7:0;-1:-1:-1;;;;;57194:15:0;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;57188:33:0;;57222:7;57188:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;57246:11;57271:3;-1:-1:-1;;;;;57263:17:0;57288:7;57263:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;57245:55;;;57323:6;57315:38;;;;-1:-1:-1;;;57315:38:0;;;;;;;;;57155:285;;;;57386:10;;:42;;-1:-1:-1;;;57386:42:0;;-1:-1:-1;;;;;57386:10:0;;;;:19;;:42;;57414:3;;57420:7;;57386:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;57076:371;;:::o;55682:528::-;55759:12;:29;;;;;;;55721:25;55759:29;;;;;;;-1:-1:-1;;;;;;55759:29:0;55777:10;55759:29;;;55845:22;;55822:18;;:46;;;:22;:46;:::i;:::-;55801:18;:67;55908:27;;55885:12;:19;:50;55881:179;;;55957:37;;55983:10;;55957:37;;;;;56026:21;;56009:39;;:16;:39::i;:::-;;55881:179;56093:12;:19;56092:28;;56118:1;56092:28;:25;:28;:::i;:::-;56072:48;;56184:17;56148:10;-1:-1:-1;;;;;56136:66:0;;56160:10;:22;;;56136:66;;;;;;;;;;;;;;;55682:528;:::o;28671:106::-;28759:10;28671:106;:::o;56341:488::-;56383:10;:34;;-1:-1:-1;;;;56383:34:0;-1:-1:-1;;;56383:34:0;;;-1:-1:-1;56435:18:0;56428:25;;;56471:20;56464:27;;;56502:12;:16;;;56529:19;:27;;-1:-1:-1;;56529:27:0;;;56567:20;;56574:13;;56567:20;:::i;:::-;56598:19;56605:12;;56598:19;:::i;:::-;56633:11;;;;;;;56680:10;;:35;;-1:-1:-1;;;56680:35:0;;56657:20;;-1:-1:-1;;;;;56680:10:0;;:20;;:35;;56709:4;;56680:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56657:58;-1:-1:-1;56730:16:0;;56726:96;;56763:10;;56783:12;;;56763:47;;-1:-1:-1;;;56763:47:0;;-1:-1:-1;;;;;56763:10:0;;;;:19;;:47;;56783:12;;;;56797;;56763:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56726:96;56341:488;:::o;59168:170::-;59254:12;:26;;;59296:34;;59269:11;;59296:34;;;;;59168:170;;:::o;36585:307::-;36699:8;;36656:7;;;;;36718:129;36742:6;36738:1;:10;36718:129;;;36782:1;-1:-1:-1;;;;;36774:9:0;:1;36776;36774:4;;;;;;;;;;;;;;-1:-1:-1;;;;;36774:9:0;;36770:66;;;36812:1;-1:-1:-1;36815:4:0;;-1:-1:-1;36804:16:0;;-1:-1:-1;36804:16:0;36770:66;36750:3;;36718:129;;;;-1:-1:-1;;36878:5:0;36857:27;;;;;36585:307;;;;;;:::o;57511:117::-;57603:7;;:17;;;-1:-1:-1;;;57603:17:0;;;;57556:4;;-1:-1:-1;;;;;57603:7:0;;:15;;:17;;;;;;;;;;;;;;:7;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;57588:10;;-1:-1:-1;;;;;57588:10:0;;;57580:40;;;;-1:-1:-1;57511:117:0;:::o;31874:307::-;31988:8;;31945:7;;;;;32007:129;32031:6;32027:1;:10;32007:129;;;32071:1;32063;32065;32063:4;;;;;;;;;;;;;;:9;32059:66;;;32101:1;-1:-1:-1;32104:4:0;;-1:-1:-1;32093:16:0;;-1:-1:-1;32093:16:0;32059:66;32039:3;;32007:129;;58539:489;58744:7;;:19;;;-1:-1:-1;;;58744:19:0;;;;58628:17;;-1:-1:-1;;;;;58744:7:0;;:17;;:19;;;;;;;;;;;;;;:7;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58692:7;;;;;;;;;-1:-1:-1;;;;;58692:7:0;-1:-1:-1;;;;;58692:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;58685:40:0;;58734:4;58685:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:78;;58663:151;;;;-1:-1:-1;;;58663:151:0;;;;;;;;;58840:1;58825:12;:16;58908:7;;:23;;;-1:-1:-1;;;58908:23:0;;;;58872:148;;-1:-1:-1;;;;;58908:7:0;;:21;;:23;;;;;;;;;;;;;;:7;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58950:7;;;;;;;;;-1:-1:-1;;;;;58950:7:0;-1:-1:-1;;;;;58950:17:0;;:19;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58988:17;14252;14281:4;-1:-1:-1;;;;;14281:20:0;;14302:14;14318:4;14335:8;14345:5;14324:27;;;;;;;;;;;;;;;;;;;;;;;14281:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14587:15;14606:66;14623:8;14633:5;14648:4;14655:6;:16;14662:8;14655:16;;;;;;;;;;;;14606;:66::i;:::-;15109:6;:16;;;;;;;;;;;14587:85;;-1:-1:-1;15109:23:0;;15130:1;15109:23;:20;:23;:::i;:::-;15090:6;:16;;;;;;;;;;:42;15146:32;15097:8;15170:7;15146:13;:32::i;5632:236::-;5764:7;5820:8;5830:9;5841:10;5853:6;5809:51;;;;;;;;;;;;;;;;-1:-1:-1;;5809:51:0;;;;;;;;;5799:62;;5809:51;5799:62;;;;;5632:236;-1:-1:-1;;;;;5632:236:0:o;6259:174::-;6352:7;6402:8;6412:13;6385:41;;;;;;;;;;;;;;;;;;;;;;;6375:52;;;;;;6368:59;;6259:174;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;974:241;;1078:2;1066:9;1057:7;1053:23;1049:32;1046:2;;;-1:-1;;1084:12;1046:2;85:6;72:20;97:33;124:5;97:33;;1222:263;;1337:2;1325:9;1316:7;1312:23;1308:32;1305:2;;;-1:-1;;1343:12;1305:2;226:6;220:13;238:33;265:5;238:33;;1492:257;;1604:2;1592:9;1583:7;1579:23;1575:32;1572:2;;;-1:-1;;1610:12;1572:2;364:6;358:13;39555:5;37293:13;37286:21;39533:5;39530:32;39520:2;;-1:-1;;39566:12;1756:263;;1871:2;1859:9;1850:7;1846:23;1842:32;1839:2;;;-1:-1;;1877:12;1839:2;-1:-1;633:13;;1833:186;-1:-1;1833:186;2026:366;;;2147:2;2135:9;2126:7;2122:23;2118:32;2115:2;;;-1:-1;;2153:12;2115:2;-1:-1;;485:20;;;2305:2;2344:22;;;763:20;;-1:-1;2109:283;2399:241;;2503:2;2491:9;2482:7;2478:23;2474:32;2471:2;;;-1:-1;;2509:12;2471:2;-1:-1;763:20;;2465:175;-1:-1;2465:175;2917:743;;;;;;3089:3;3077:9;3068:7;3064:23;3060:33;3057:2;;;-1:-1;;3096:12;3057:2;-1:-1;;763:20;;;3248:2;3287:22;;763:20;;-1:-1;3356:2;3395:22;;763:20;;3464:2;3503:22;;763:20;;-1:-1;3572:3;3612:22;763:20;;-1:-1;3051:609;-1:-1;3051:609;7006:343;;7148:5;35235:12;36298:6;36293:3;36286:19;-1:-1;38343:101;38357:6;38354:1;38351:13;38343:101;;;36335:4;38424:11;;;;;38418:18;38405:11;;;;;38398:39;38372:10;38343:101;;;38459:6;38456:1;38453:13;38450:2;;;-1:-1;36335:4;38515:6;36330:3;38506:16;;38499:27;38450:2;-1:-1;39106:7;39090:14;-1:-1;;39086:28;7305:39;;;;36335:4;7305:39;;7096:253;-1:-1;;7096:253;17689:531;6798:37;;;17970:2;17961:12;;6798:37;;;;18072:12;;;6798:37;18183:12;;;17861:359;18227:392;6798:37;;;18480:2;18471:12;;6798:37;18582:12;;;18371:248;19012:222;-1:-1;;;;;37603:54;;;;4241:37;;19139:2;19124:18;;19110:124;19486:476;-1:-1;;;;;37603:54;;;4110:58;;37603:54;;;;19865:2;19850:18;;4110:58;19948:2;19933:18;;6798:37;;;;19685:2;19670:18;;19656:306;19969:333;-1:-1;;;;;37603:54;;;;4241:37;;20288:2;20273:18;;6798:37;20124:2;20109:18;;20095:207;20309:528;;37614:42;;;;;37607:5;37603:54;4248:3;4241:37;6828:5;20674:2;20663:9;20659:18;6798:37;20510:2;20711;20700:9;20696:18;20689:48;20751:76;20510:2;20499:9;20495:18;20813:6;20751:76;;20844:370;21021:2;21035:47;;;35235:12;;21006:18;;;36286:19;;;20844:370;;21021:2;34751:14;;;;36326;;;;20844:370;4849:260;4874:6;4871:1;4868:13;4849:260;;;4935:13;;-1:-1;;;;;37603:54;4241:37;;35914:14;;;;3821;;;;37614:42;4889:9;4849:260;;;-1:-1;21088:116;;20992:222;-1:-1;;;;;;20992:222;21221:370;21398:2;21412:47;;;35235:12;;21383:18;;;36286:19;;;21221:370;;21398:2;34751:14;;;;36326;;;;21221:370;5578:260;5603:6;5600:1;5597:13;5578:260;;;5664:13;;6798:37;;35914:14;;;;4003;;;;5625:1;5618:9;5578:260;;21598:364;21772:2;21786:47;;;35526:12;;21757:18;;;36286:19;;;21598:364;35062:14;;;35091:18;;;21598:364;;21772:2;36326:14;;;;21598:364;6298:288;6323:6;6320:1;6317:13;6298:288;;;38998:11;;6798:37;;6345:1;36141:14;;;;4003;;;;6338:9;6298:288;;21969:210;37293:13;;37286:21;6681:34;;22090:2;22075:18;;22061:118;22526:556;6798:37;;;22902:2;22887:18;;6798:37;;;;-1:-1;;;;;37603:54;22985:2;22970:18;;4241:37;23068:2;23053:18;;6798:37;22737:3;22722:19;;22708:374;23089:248;23229:2;23214:18;;39321:1;39311:12;;39301:2;;39327:9;39301:2;7440:63;;;23200:137;;23344:310;;23491:2;23512:17;23505:47;23566:78;23491:2;23480:9;23476:18;23630:6;23566:78;;23661:416;23861:2;23875:47;;;8094:2;23846:18;;;36286:19;-1:-1;;;36326:14;;;8110:38;8167:12;;;23832:245;24084:416;24284:2;24298:47;;;8418:2;24269:18;;;36286:19;8454:34;36326:14;;;8434:55;-1:-1;;;8509:12;;;8502:30;8551:12;;;24255:245;24507:416;24707:2;24721:47;;;8802:2;24692:18;;;36286:19;8838:29;36326:14;;;8818:50;8887:12;;;24678:245;24930:416;25130:2;25144:47;;;9138:2;25115:18;;;36286:19;-1:-1;;;36326:14;;;9154:39;9212:12;;;25101:245;25353:416;25553:2;25567:47;;;9463:2;25538:18;;;36286:19;9499:34;36326:14;;;9479:55;-1:-1;;;9554:12;;;9547:25;9591:12;;;25524:245;25776:416;25976:2;25990:47;;;9842:2;25961:18;;;36286:19;9878:28;36326:14;;;9858:49;9926:12;;;25947:245;26199:416;26399:2;26413:47;;;10177:2;26384:18;;;36286:19;10213:25;36326:14;;;10193:46;10258:12;;;26370:245;26622:416;26822:2;26836:47;;;10509:2;26807:18;;;36286:19;10545:32;36326:14;;;10525:53;10597:12;;;26793:245;27045:416;27245:2;27259:47;;;10848:2;27230:18;;;36286:19;10884:28;36326:14;;;10864:49;10932:12;;;27216:245;27468:416;27668:2;27682:47;;;11183:2;27653:18;;;36286:19;11219:26;36326:14;;;11199:47;11265:12;;;27639:245;27891:416;28091:2;28105:47;;;11516:2;28076:18;;;36286:19;-1:-1;;;36326:14;;;11532:44;11595:12;;;28062:245;28314:416;28514:2;28528:47;;;11846:2;28499:18;;;36286:19;11882:26;36326:14;;;11862:47;11928:12;;;28485:245;28737:416;28937:2;28951:47;;;12179:2;28922:18;;;36286:19;12215:34;36326:14;;;12195:55;-1:-1;;;12270:12;;;12263:25;12307:12;;;28908:245;29160:416;29360:2;29374:47;;;12558:2;29345:18;;;36286:19;12594:34;36326:14;;;12574:55;-1:-1;;;12649:12;;;12642:30;12691:12;;;29331:245;29583:416;29783:2;29797:47;;;29768:18;;;36286:19;12978:34;36326:14;;;12958:55;13032:12;;;29754:245;30006:416;30206:2;30220:47;;;13283:2;30191:18;;;36286:19;13319:33;36326:14;;;13299:54;13372:12;;;30177:245;30429:416;30629:2;30643:47;;;13623:2;30614:18;;;36286:19;-1:-1;;;36326:14;;;13639:42;13700:12;;;30600:245;30852:416;31052:2;31066:47;;;13951:2;31037:18;;;36286:19;-1:-1;;;36326:14;;;13967:38;14024:12;;;31023:245;31275:416;31475:2;31489:47;;;14580:2;31460:18;;;36286:19;-1:-1;;;36326:14;;;14596:41;14656:12;;;31446:245;31698:416;31898:2;31912:47;;;14907:2;31883:18;;;36286:19;14943:34;36326:14;;;14923:55;-1:-1;;;14998:12;;;14991:32;15042:12;;;31869:245;32121:416;32321:2;32335:47;;;15293:2;32306:18;;;36286:19;15329:32;36326:14;;;15309:53;15381:12;;;32292:245;32544:416;32744:2;32758:47;;;15632:2;32729:18;;;36286:19;15668:33;36326:14;;;15648:54;15721:12;;;32715:245;32967:416;33167:2;33181:47;;;15972:2;33152:18;;;36286:19;16008:25;36326:14;;;15988:46;16053:12;;;33138:245;33390:335;;33573:3;33562:9;33558:19;33550:27;;16377:16;16371:23;6805:3;6798:37;16554:4;16547:5;16543:16;16537:23;16554:4;16618:3;16614:14;6798:37;16715:4;16708:5;16704:16;16698:23;16715:4;16779:3;16775:14;6798:37;16878:4;16871:5;16867:16;16861:23;16878:4;16942:3;16938:14;6798:37;17038:4;17031:5;17027:16;17021:23;17038:4;17102:3;17098:14;6798:37;17197:4;17190:5;17186:16;17180:23;17197:4;17261:3;17257:14;6798:37;33544:181;;;;;33732:222;6798:37;;;33859:2;33844:18;;33830:124;33961:668;6798:37;;;34365:2;34350:18;;6798:37;;;;34448:2;34433:18;;6798:37;;;;34531:2;34516:18;;6798:37;34614:3;34599:19;;6798:37;34200:3;34185:19;;34171:458;39350:117;-1:-1;;;;;37603:54;;39409:35;;39399:2;;39458:1;;39448:12
Swarm Source
ipfs://5f15a99fc15260e0714e7a6896bf8fbc8fd2b86d0c10e604d331376bcbddce9a
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.