More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,100 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Stake | 16114605 | 749 days ago | IN | 0 ETH | 0.00074184 | ||||
Unstake | 15825708 | 790 days ago | IN | 0 ETH | 0.00200401 | ||||
Unstake | 14291113 | 1029 days ago | IN | 0 ETH | 0.00348471 | ||||
Stake | 14247962 | 1036 days ago | IN | 0 ETH | 0.00390365 | ||||
Unstake | 13749360 | 1113 days ago | IN | 0 ETH | 0.00692524 | ||||
Unstake | 13721339 | 1118 days ago | IN | 0 ETH | 0.00850352 | ||||
Unstake | 13721307 | 1118 days ago | IN | 0 ETH | 0.00574267 | ||||
Unstake | 13708432 | 1120 days ago | IN | 0 ETH | 0.0070628 | ||||
Get Random Numbe... | 13567802 | 1142 days ago | IN | 0 ETH | 0.01038791 | ||||
Unstake | 13563933 | 1143 days ago | IN | 0 ETH | 0.00536256 | ||||
Unstake | 13536915 | 1147 days ago | IN | 0 ETH | 0.00909359 | ||||
Unstake | 13497272 | 1153 days ago | IN | 0 ETH | 0.01017706 | ||||
Unstake | 13491651 | 1154 days ago | IN | 0 ETH | 0.00554557 | ||||
Unstake | 13487144 | 1155 days ago | IN | 0 ETH | 0.00704795 | ||||
Unstake | 13487132 | 1155 days ago | IN | 0 ETH | 0.00562831 | ||||
Unstake | 13476155 | 1156 days ago | IN | 0 ETH | 0.00491758 | ||||
Unstake | 13459455 | 1159 days ago | IN | 0 ETH | 0.00455203 | ||||
Unstake | 13459362 | 1159 days ago | IN | 0 ETH | 0.0043991 | ||||
Unstake | 13406566 | 1167 days ago | IN | 0 ETH | 0.00677471 | ||||
Unstake | 13342895 | 1177 days ago | IN | 0 ETH | 0.00436432 | ||||
Stake | 13329899 | 1179 days ago | IN | 0 ETH | 0.00403232 | ||||
Unstake | 13316774 | 1181 days ago | IN | 0 ETH | 0.00343235 | ||||
Unstake | 13307717 | 1183 days ago | IN | 0 ETH | 0.00508961 | ||||
Unstake | 13305046 | 1183 days ago | IN | 0 ETH | 0.00468534 | ||||
Unstake | 13305016 | 1183 days ago | IN | 0 ETH | 0.00442354 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Raffle
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 2000 runs
Other Settings:
byzantium EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.6.12; import "@openzeppelin/contracts/GSN/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol"; contract Raffle is Ownable, VRFConsumerBase { // using SafeMath for uint256; using Address for address; IERC20 _token; mapping (address => uint256) _balances; uint256 unstakeFee = 500; // 5% bool halted; bool locked; address deadAdd = 0x000000000000000000000000000000000000dEaD; mapping (uint256 => uint256) randomNums; uint256 curRaffle; bytes32 private keyHash; uint256 private fee; event Stake(address indexed account, uint256 timestamp, uint256 value); event Unstake(address indexed account, uint256 timestamp, uint256 value); event Lock(address indexed account, uint256 timestamp); event Unlock(address indexed account, uint256 timestamp); constructor(address _tokenAdd) VRFConsumerBase(0xf0d54349aDdcf704F77AE15b96510dEA15cb7952, 0x514910771AF9Ca656af840dff83E8264EcF986CA) public { _token = IERC20(_tokenAdd); keyHash = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445; fee = 2 * 10 ** 18; } function stakedBalance(address account) external view returns (uint256) { return _balances[account]; } function stake(uint256 value) external notHalted { require(value > 0, "Raffle: stake value should be greater than 0"); _token.transferFrom(_msgSender(), address(this), value); _balances[_msgSender()] = _balances[_msgSender()].add(value); emit Stake(_msgSender(),now,value); } function unstake(uint256 value) external lockable { require(_balances[_msgSender()] >= value, 'Raffle: insufficient staked balance'); _balances[_msgSender()] = _balances[_msgSender()].sub(value); uint256 toBurn = value.mul(unstakeFee).div(10000); _token.transfer(deadAdd, toBurn); _token.transfer(_msgSender(), value.sub(toBurn)); emit Unstake(_msgSender(),now,value); } function lockForRaffle() external onlyOwner() lockable { locked = true; emit Lock(owner(), now); } function raffleUnlock() external onlyOwner() { require(locked, "Raffle: Stakes are unlocked"); locked = false; emit Unlock(owner(), now); } function getRandomNumber(uint256 _raffleIter) external returns (bytes32 requestId) { require(_msgSender() == owner(), "Raffle: Only Owner"); require(_raffleIter > curRaffle, "Raffle: Can only get random for the next raffle"); curRaffle = _raffleIter; require(LINK.balanceOf(address(this)) >= fee, "Not enough LINK"); return requestRandomness(keyHash, fee); } function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { randomNums[curRaffle] = randomness; } function getRandom(uint256 raffleIter) public view returns (uint256) { return randomNums[raffleIter]; } function getPositionRandom(uint56 raffleIter, uint256 position) public view returns (uint256) { uint256 positionRandom = uint256(keccak256(abi.encode(randomNums[raffleIter], position))); return positionRandom; } function getPositionWinner(uint256 raffleIter, uint256 position, uint256 totalTickets) public view returns (uint256) { uint256 positionRandom = uint256(keccak256(abi.encode(randomNums[raffleIter], position))); uint256 winnerTicket = positionRandom % totalTickets; return winnerTicket; } function withdrawLink() external onlyOwner() { LINK.transfer(owner(), LINK.balanceOf(address(this))); } function setUnstakeFee(uint256 _fee) external onlyOwner() { unstakeFee = _fee; } function halt(bool status) external onlyOwner { halted = status; } modifier lockable() { require(!locked, "Raffle: Stakes locked for Raffle"); _; } modifier notHalted() { require(!halted, "Raffle: Deposits are paused"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "./vendor/SafeMathChainlink.sol"; import "./interfaces/LinkTokenInterface.sol"; import "./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; /** * @dev In order to keep backwards compatibility we have kept the user * seed field around. We remove the use of it because given that the blockhash * enters later, it overrides whatever randomness the used seed provides. * Given that it adds no security, and can easily lead to misunderstandings, * we have removed it from usage and can now provide a simpler API. */ uint256 constant private USER_SEED_PLACEHOLDER = 0; /** * @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 * * @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) internal returns (bytes32 requestId) { LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER)); // 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, USER_SEED_PLACEHOLDER, 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); } }
// SPDX-License-Identifier: MIT 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)); } }
// SPDX-License-Identifier: MIT 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); }
// 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; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol";
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual 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; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.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); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @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) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // 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"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { 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); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with 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; } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 2000 }, "evmVersion": "byzantium", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_tokenAdd","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Lock","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":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Stake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Unlock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Unstake","type":"event"},{"inputs":[{"internalType":"uint56","name":"raffleIter","type":"uint56"},{"internalType":"uint256","name":"position","type":"uint256"}],"name":"getPositionRandom","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"raffleIter","type":"uint256"},{"internalType":"uint256","name":"position","type":"uint256"},{"internalType":"uint256","name":"totalTickets","type":"uint256"}],"name":"getPositionWinner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"raffleIter","type":"uint256"}],"name":"getRandom","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_raffleIter","type":"uint256"}],"name":"getRandomNumber","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"halt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockForRaffle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raffleUnlock","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"_fee","type":"uint256"}],"name":"setUnstakeFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"stakedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawLink","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040526101f4600455600580546201000060b060020a03191663dead000017905534801561002e57600080fd5b50604051611c1e380380611c1e8339818101604052602081101561005157600080fd5b505173f0d54349addcf704f77ae15b96510dea15cb795273514910771af9ca656af840dff83e8264ecf986ca600061009064010000000061014d810204565b60008054600160a060020a031916600160a060020a0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600160a060020a039182166c0100000000000000000000000090810260a0529082160260805260028054600160a060020a031916929091169190911790557faa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445600855671bc16d674ec80000600955610151565b3390565b6080516c01000000000000000000000000900460a0516c010000000000000000000000009004611a766101a860003980610b5452806117305250806109a15280610a29528061116b52806116f45250611a766000f3fe608060405234801561001057600080fd5b506004361061011c576000357c01000000000000000000000000000000000000000000000000000000009004806394985ddd116100b4578063b37217a411610083578063b37217a41461029f578063cd4b6914146102bc578063f2fde38b146102d9578063f6f698f91461030c5761011c565b806394985ddd1461023857806396a38d221461025b578063a694fc3a1461027a578063a72e970f146102975761011c565b8063715018a6116100f0578063715018a6146101cb57806374c1f990146101d35780638da5cb5b146101ff5780638dc654a2146102305761011c565b806218a1161461012157806312eecc2c146101405780632e17de781461017b5780636021726714610198575b600080fd5b61013e6004803603602081101561013757600080fd5b5035610314565b005b6101696004803603606081101561015657600080fd5b50803590602081013590604001356103af565b60408051918252519081900360200190f35b61013e6004803603602081101561019157600080fd5b50356103fb565b610169600480360360208110156101ae57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610777565b61013e61079f565b610169600480360360408110156101e957600080fd5b5066ffffffffffffff81351690602001356108a4565b6102076108ed565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61013e610909565b61013e6004803603604081101561024e57600080fd5b5080359060200135610b3c565b61013e6004803603602081101561027157600080fd5b50351515610bd8565b61013e6004803603602081101561029057600080fd5b5035610c9f565b61013e610ee1565b610169600480360360208110156102b557600080fd5b503561103d565b610169600480360360208110156102d257600080fd5b5035611246565b61013e600480360360208110156102ef57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611258565b61013e6113d5565b61031c611536565b73ffffffffffffffffffffffffffffffffffffffff1661033a6108ed565b73ffffffffffffffffffffffffffffffffffffffff16146103aa5760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600455565b60008381526006602090815260408083205481518084019190915280820186905281518082038301815260609091019091528051910120818382816103f057fe5b069695505050505050565b600554610100900460ff16156104605760408051600080516020611a00833981519152815260206004820181905260248201527f526166666c653a205374616b6573206c6f636b656420666f7220526166666c65604482015290519081900360640190fd5b806003600061046d611536565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156104ed57604051600080516020611a0083398151915281526004018080602001828103825260238152602001806119ae6023913960400191505060405180910390fd5b61052a81600360006104fd611536565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549061153a565b60036000610536611536565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060006105976127106105916004548561159f90919063ffffffff16565b90611607565b600254600554604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff620100009093048316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561061e57600080fd5b505af1158015610632573d6000803e3d6000fd5b505050506040513d602081101561064857600080fd5b505060025473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb610670611536565b61067a858561153a565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156106e957600080fd5b505af11580156106fd573d6000803e3d6000fd5b505050506040513d602081101561071357600080fd5b5061071e9050611536565b73ffffffffffffffffffffffffffffffffffffffff167ff960dbf9e5d0682f7a298ed974e33a28b4464914b7a2bfac12ae419a9afeb2804284604051808381526020018281526020019250505060405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b6107a7611536565b73ffffffffffffffffffffffffffffffffffffffff166107c56108ed565b73ffffffffffffffffffffffffffffffffffffffff16146108355760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b66ffffffffffffff821660009081526006602090815260409182902054825180830191909152808301849052825180820384018152606090910190925281519101205b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b610911611536565b73ffffffffffffffffffffffffffffffffffffffff1661092f6108ed565b73ffffffffffffffffffffffffffffffffffffffff161461099f5760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6109e36108ed565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b158015610a6f57600080fd5b505afa158015610a83573d6000803e3d6000fd5b505050506040513d6020811015610a9957600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff861602815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091525160448083019260209291908290030181600087803b158015610b0e57600080fd5b505af1158015610b22573d6000803e3d6000fd5b505050506040513d6020811015610b3857600080fd5b5050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610bce5760408051600080516020611a00833981519152815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015290519081900360640190fd5b610b388282611679565b610be0611536565b73ffffffffffffffffffffffffffffffffffffffff16610bfe6108ed565b73ffffffffffffffffffffffffffffffffffffffff1614610c6e5760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60055460ff1615610cff5760408051600080516020611a00833981519152815260206004820152601b60248201527f526166666c653a204465706f7369747320617265207061757365640000000000604482015290519081900360640190fd5b60008111610d4657604051600080516020611a00833981519152815260040180806020018281038252602c81526020018061195c602c913960400191505060405180910390fd5b60025473ffffffffffffffffffffffffffffffffffffffff166323b872dd610d6c611536565b604080517c010000000000000000000000000000000000000000000000000000000063ffffffff851602815273ffffffffffffffffffffffffffffffffffffffff9092166004830152306024830152604482018590525160648083019260209291908290030181600087803b158015610de457600080fd5b505af1158015610df8573d6000803e3d6000fd5b505050506040513d6020811015610e0e57600080fd5b50610e4e90508160036000610e21611536565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549061168e565b60036000610e5a611536565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002055610e89611536565b73ffffffffffffffffffffffffffffffffffffffff167f5af417134f72a9d41143ace85b0a26dce6f550f894f2cbc1eeee8810603d91b64283604051808381526020018281526020019250505060405180910390a250565b610ee9611536565b73ffffffffffffffffffffffffffffffffffffffff16610f076108ed565b73ffffffffffffffffffffffffffffffffffffffff1614610f775760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600554610100900460ff16610fdb5760408051600080516020611a00833981519152815260206004820152601b60248201527f526166666c653a205374616b65732061726520756e6c6f636b65640000000000604482015290519081900360640190fd5b6005805461ff0019169055610fee6108ed565b73ffffffffffffffffffffffffffffffffffffffff167f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1426040518082815260200191505060405180910390a2565b60006110476108ed565b73ffffffffffffffffffffffffffffffffffffffff16611065611536565b73ffffffffffffffffffffffffffffffffffffffff16146110d55760408051600080516020611a00833981519152815260206004820152601260248201527f526166666c653a204f6e6c79204f776e65720000000000000000000000000000604482015290519081900360640190fd5b600754821161111d57604051600080516020611a00833981519152815260040180806020018281038252602f8152602001806119d1602f913960400191505060405180910390fd5b6007829055600954604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016916370a08231916024808301926020929190829003018186803b1580156111b157600080fd5b505afa1580156111c5573d6000803e3d6000fd5b505050506040513d60208110156111db57600080fd5b505110156112385760408051600080516020611a00833981519152815260206004820152600f60248201527f4e6f7420656e6f756768204c494e4b0000000000000000000000000000000000604482015290519081900360640190fd5b6108e76008546009546116f0565b60009081526006602052604090205490565b611260611536565b73ffffffffffffffffffffffffffffffffffffffff1661127e6108ed565b73ffffffffffffffffffffffffffffffffffffffff16146112ee5760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811661134857604051600080516020611a0083398151915281526004018080602001828103825260268152602001806119886026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6113dd611536565b73ffffffffffffffffffffffffffffffffffffffff166113fb6108ed565b73ffffffffffffffffffffffffffffffffffffffff161461146b5760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600554610100900460ff16156114d05760408051600080516020611a00833981519152815260206004820181905260248201527f526166666c653a205374616b6573206c6f636b656420666f7220526166666c65604482015290519081900360640190fd5b6005805461ff0019166101001790556114e76108ed565b73ffffffffffffffffffffffffffffffffffffffff167f625fed9875dada8643f2418b838ae0bc78d9a148a18eee4ee1979ff0f3f5d427426040518082815260200191505060405180910390a2565b3390565b6000828211156115995760408051600080516020611a00833981519152815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826115ae575060006108e7565b828202828482816115bb57fe5b041461160057604051600080516020611a008339815191528152600401808060200182810382526021815260200180611a206021913960400191505060405180910390fd5b9392505050565b60008082116116655760408051600080516020611a00833981519152815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b600082848161167057fe5b04949350505050565b60075460009081526006602052604090205550565b6000828201838110156116005760408051600080516020611a00833981519152815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea07f00000000000000000000000000000000000000000000000000000000000000008486600060405160200180838152602001828152602001925050506040516020818303038152906040526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156118035781810151838201526020016117eb565b50505050905090810190601f1680156118305780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561185157600080fd5b505af1158015611865573d6000803e3d6000fd5b505050506040513d602081101561187b57600080fd5b505060008381526001602052604081205461189b908590839030906118db565b6000858152600160208190526040909120549192506118ba919061168e565b6000858152600160205260409020556118d3848261192f565b949350505050565b604080516020808201969096528082019490945273ffffffffffffffffffffffffffffffffffffffff9290921660608401526080808401919091528151808403909101815260a09092019052805191012090565b60408051602080820194909452808201929092528051808303820181526060909201905280519101209056fe526166666c653a207374616b652076616c75652073686f756c642062652067726561746572207468616e20304f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373526166666c653a20696e73756666696369656e74207374616b65642062616c616e6365526166666c653a2043616e206f6e6c79206765742072616e646f6d20666f7220746865206e65787420726166666c6508c379a000000000000000000000000000000000000000000000000000000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f552c65034edf06d69a61bcce3772c2f7e05868965a2966d8986a6a69700bb9f64736f6c634300060c00330000000000000000000000008c9d0e9d27fb15a96cd8ad714929502f4f1995bf
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061011c576000357c01000000000000000000000000000000000000000000000000000000009004806394985ddd116100b4578063b37217a411610083578063b37217a41461029f578063cd4b6914146102bc578063f2fde38b146102d9578063f6f698f91461030c5761011c565b806394985ddd1461023857806396a38d221461025b578063a694fc3a1461027a578063a72e970f146102975761011c565b8063715018a6116100f0578063715018a6146101cb57806374c1f990146101d35780638da5cb5b146101ff5780638dc654a2146102305761011c565b806218a1161461012157806312eecc2c146101405780632e17de781461017b5780636021726714610198575b600080fd5b61013e6004803603602081101561013757600080fd5b5035610314565b005b6101696004803603606081101561015657600080fd5b50803590602081013590604001356103af565b60408051918252519081900360200190f35b61013e6004803603602081101561019157600080fd5b50356103fb565b610169600480360360208110156101ae57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610777565b61013e61079f565b610169600480360360408110156101e957600080fd5b5066ffffffffffffff81351690602001356108a4565b6102076108ed565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61013e610909565b61013e6004803603604081101561024e57600080fd5b5080359060200135610b3c565b61013e6004803603602081101561027157600080fd5b50351515610bd8565b61013e6004803603602081101561029057600080fd5b5035610c9f565b61013e610ee1565b610169600480360360208110156102b557600080fd5b503561103d565b610169600480360360208110156102d257600080fd5b5035611246565b61013e600480360360208110156102ef57600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16611258565b61013e6113d5565b61031c611536565b73ffffffffffffffffffffffffffffffffffffffff1661033a6108ed565b73ffffffffffffffffffffffffffffffffffffffff16146103aa5760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600455565b60008381526006602090815260408083205481518084019190915280820186905281518082038301815260609091019091528051910120818382816103f057fe5b069695505050505050565b600554610100900460ff16156104605760408051600080516020611a00833981519152815260206004820181905260248201527f526166666c653a205374616b6573206c6f636b656420666f7220526166666c65604482015290519081900360640190fd5b806003600061046d611536565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156104ed57604051600080516020611a0083398151915281526004018080602001828103825260238152602001806119ae6023913960400191505060405180910390fd5b61052a81600360006104fd611536565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549061153a565b60036000610536611536565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060006105976127106105916004548561159f90919063ffffffff16565b90611607565b600254600554604080517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff620100009093048316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561061e57600080fd5b505af1158015610632573d6000803e3d6000fd5b505050506040513d602081101561064857600080fd5b505060025473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb610670611536565b61067a858561153a565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156106e957600080fd5b505af11580156106fd573d6000803e3d6000fd5b505050506040513d602081101561071357600080fd5b5061071e9050611536565b73ffffffffffffffffffffffffffffffffffffffff167ff960dbf9e5d0682f7a298ed974e33a28b4464914b7a2bfac12ae419a9afeb2804284604051808381526020018281526020019250505060405180910390a25050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b6107a7611536565b73ffffffffffffffffffffffffffffffffffffffff166107c56108ed565b73ffffffffffffffffffffffffffffffffffffffff16146108355760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b66ffffffffffffff821660009081526006602090815260409182902054825180830191909152808301849052825180820384018152606090910190925281519101205b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b610911611536565b73ffffffffffffffffffffffffffffffffffffffff1661092f6108ed565b73ffffffffffffffffffffffffffffffffffffffff161461099f5760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b7f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6109e36108ed565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca16916370a08231916024808301926020929190829003018186803b158015610a6f57600080fd5b505afa158015610a83573d6000803e3d6000fd5b505050506040513d6020811015610a9957600080fd5b5051604080517c010000000000000000000000000000000000000000000000000000000063ffffffff861602815273ffffffffffffffffffffffffffffffffffffffff909316600484015260248301919091525160448083019260209291908290030181600087803b158015610b0e57600080fd5b505af1158015610b22573d6000803e3d6000fd5b505050506040513d6020811015610b3857600080fd5b5050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614610bce5760408051600080516020611a00833981519152815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c00604482015290519081900360640190fd5b610b388282611679565b610be0611536565b73ffffffffffffffffffffffffffffffffffffffff16610bfe6108ed565b73ffffffffffffffffffffffffffffffffffffffff1614610c6e5760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b60055460ff1615610cff5760408051600080516020611a00833981519152815260206004820152601b60248201527f526166666c653a204465706f7369747320617265207061757365640000000000604482015290519081900360640190fd5b60008111610d4657604051600080516020611a00833981519152815260040180806020018281038252602c81526020018061195c602c913960400191505060405180910390fd5b60025473ffffffffffffffffffffffffffffffffffffffff166323b872dd610d6c611536565b604080517c010000000000000000000000000000000000000000000000000000000063ffffffff851602815273ffffffffffffffffffffffffffffffffffffffff9092166004830152306024830152604482018590525160648083019260209291908290030181600087803b158015610de457600080fd5b505af1158015610df8573d6000803e3d6000fd5b505050506040513d6020811015610e0e57600080fd5b50610e4e90508160036000610e21611536565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549061168e565b60036000610e5a611536565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002055610e89611536565b73ffffffffffffffffffffffffffffffffffffffff167f5af417134f72a9d41143ace85b0a26dce6f550f894f2cbc1eeee8810603d91b64283604051808381526020018281526020019250505060405180910390a250565b610ee9611536565b73ffffffffffffffffffffffffffffffffffffffff16610f076108ed565b73ffffffffffffffffffffffffffffffffffffffff1614610f775760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600554610100900460ff16610fdb5760408051600080516020611a00833981519152815260206004820152601b60248201527f526166666c653a205374616b65732061726520756e6c6f636b65640000000000604482015290519081900360640190fd5b6005805461ff0019169055610fee6108ed565b73ffffffffffffffffffffffffffffffffffffffff167f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1426040518082815260200191505060405180910390a2565b60006110476108ed565b73ffffffffffffffffffffffffffffffffffffffff16611065611536565b73ffffffffffffffffffffffffffffffffffffffff16146110d55760408051600080516020611a00833981519152815260206004820152601260248201527f526166666c653a204f6e6c79204f776e65720000000000000000000000000000604482015290519081900360640190fd5b600754821161111d57604051600080516020611a00833981519152815260040180806020018281038252602f8152602001806119d1602f913960400191505060405180910390fd5b6007829055600954604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca16916370a08231916024808301926020929190829003018186803b1580156111b157600080fd5b505afa1580156111c5573d6000803e3d6000fd5b505050506040513d60208110156111db57600080fd5b505110156112385760408051600080516020611a00833981519152815260206004820152600f60248201527f4e6f7420656e6f756768204c494e4b0000000000000000000000000000000000604482015290519081900360640190fd5b6108e76008546009546116f0565b60009081526006602052604090205490565b611260611536565b73ffffffffffffffffffffffffffffffffffffffff1661127e6108ed565b73ffffffffffffffffffffffffffffffffffffffff16146112ee5760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811661134857604051600080516020611a0083398151915281526004018080602001828103825260268152602001806119886026913960400191505060405180910390fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6113dd611536565b73ffffffffffffffffffffffffffffffffffffffff166113fb6108ed565b73ffffffffffffffffffffffffffffffffffffffff161461146b5760408051600080516020611a00833981519152815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600554610100900460ff16156114d05760408051600080516020611a00833981519152815260206004820181905260248201527f526166666c653a205374616b6573206c6f636b656420666f7220526166666c65604482015290519081900360640190fd5b6005805461ff0019166101001790556114e76108ed565b73ffffffffffffffffffffffffffffffffffffffff167f625fed9875dada8643f2418b838ae0bc78d9a148a18eee4ee1979ff0f3f5d427426040518082815260200191505060405180910390a2565b3390565b6000828211156115995760408051600080516020611a00833981519152815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000826115ae575060006108e7565b828202828482816115bb57fe5b041461160057604051600080516020611a008339815191528152600401808060200182810382526021815260200180611a206021913960400191505060405180910390fd5b9392505050565b60008082116116655760408051600080516020611a00833981519152815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b600082848161167057fe5b04949350505050565b60075460009081526006602052604090205550565b6000828201838110156116005760408051600080516020611a00833981519152815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca73ffffffffffffffffffffffffffffffffffffffff16634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79528486600060405160200180838152602001828152602001925050506040516020818303038152906040526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156118035781810151838201526020016117eb565b50505050905090810190601f1680156118305780820380516001836020036101000a031916815260200191505b50945050505050602060405180830381600087803b15801561185157600080fd5b505af1158015611865573d6000803e3d6000fd5b505050506040513d602081101561187b57600080fd5b505060008381526001602052604081205461189b908590839030906118db565b6000858152600160208190526040909120549192506118ba919061168e565b6000858152600160205260409020556118d3848261192f565b949350505050565b604080516020808201969096528082019490945273ffffffffffffffffffffffffffffffffffffffff9290921660608401526080808401919091528151808403909101815260a09092019052805191012090565b60408051602080820194909452808201929092528051808303820181526060909201905280519101209056fe526166666c653a207374616b652076616c75652073686f756c642062652067726561746572207468616e20304f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373526166666c653a20696e73756666696369656e74207374616b65642062616c616e6365526166666c653a2043616e206f6e6c79206765742072616e646f6d20666f7220746865206e65787420726166666c6508c379a000000000000000000000000000000000000000000000000000000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220f552c65034edf06d69a61bcce3772c2f7e05868965a2966d8986a6a69700bb9f64736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008c9d0e9d27fb15a96cd8ad714929502f4f1995bf
-----Decoded View---------------
Arg [0] : _tokenAdd (address): 0x8c9d0e9d27fB15a96Cd8Ad714929502F4f1995Bf
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000008c9d0e9d27fb15a96cd8ad714929502f4f1995bf
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.