Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00Latest 25 from a total of 42 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Set Winners | 121555764 | 912 days ago | IN | 0 ETH | 0.00008593 | ||||
| Set Winners | 121555610 | 912 days ago | IN | 0 ETH | 0.00008552 | ||||
| Set Winners | 121555309 | 912 days ago | IN | 0 ETH | 0.0000836 | ||||
| Set Winners | 121555161 | 912 days ago | IN | 0 ETH | 0.00008221 | ||||
| Set Winners | 121555043 | 912 days ago | IN | 0 ETH | 0.00008167 | ||||
| Join | 116848472 | 926 days ago | IN | 0 ETH | 0.0000594 | ||||
| Join | 116834516 | 926 days ago | IN | 0 ETH | 0.00005822 | ||||
| Join | 114095126 | 934 days ago | IN | 0 ETH | 0.00003579 | ||||
| Join | 112910124 | 938 days ago | IN | 0 ETH | 0.0000576 | ||||
| Join | 112424012 | 939 days ago | IN | 0 ETH | 0.00008422 | ||||
| Join | 112205093 | 940 days ago | IN | 0 ETH | 0.00007843 | ||||
| Join | 112097864 | 940 days ago | IN | 0 ETH | 0.00003314 | ||||
| Join | 112097754 | 940 days ago | IN | 0 ETH | 0.00004612 | ||||
| Join | 112094901 | 940 days ago | IN | 0 ETH | 0.000028 | ||||
| Join | 112094588 | 940 days ago | IN | 0 ETH | 0.00004674 | ||||
| Join | 112092691 | 940 days ago | IN | 0 ETH | 0.00005057 | ||||
| Join | 112091475 | 940 days ago | IN | 0 ETH | 0.00005102 | ||||
| Join | 112091464 | 940 days ago | IN | 0 ETH | 0.0000396 | ||||
| Join | 112091423 | 940 days ago | IN | 0 ETH | 0.0000515 | ||||
| Join | 112090230 | 940 days ago | IN | 0 ETH | 0.0000508 | ||||
| Join | 111962289 | 941 days ago | IN | 0 ETH | 0.00003723 | ||||
| Join | 110589556 | 945 days ago | IN | 0 ETH | 0.00004192 | ||||
| Join | 110588744 | 945 days ago | IN | 0 ETH | 0.00004217 | ||||
| Join | 109526932 | 948 days ago | IN | 0 ETH | 0.00004049 | ||||
| Join | 109337989 | 949 days ago | IN | 0 ETH | 0.00003565 |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Competitions
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract Competitions {
using SafeERC20 for IERC20;
using Counters for Counters.Counter;
address public restrictedAddress;
address public treasuryAddress;
Counters.Counter private _competitionIds;
struct Participant {
address user;
uint256 joinDate;
}
mapping(uint256 => Participant[]) public participants;
mapping(uint256 => mapping(address => bool)) public hasJoined;
mapping(uint256 => mapping(uint256 => address)) public winners;
mapping(uint256 => uint256) public rewards;
mapping(uint256 => mapping(uint256 => address)) public additionalRewardsAddresses;
mapping(uint256 => mapping(address => uint256)) public additionalRewardsAmounts;
mapping(uint256 => uint256) public participantCount;
mapping(uint256 => uint256) public rewardCount;
mapping(uint256 => uint256) public winnerCount;
mapping(uint256 => uint256) public rewardDistribution;
struct Competition {
uint256 id;
address owner;
string name;
uint256 entryFeeAmount;
address entryFeeToken;
uint256 endDate;
string optionsJson;
address restrictedAddress;
address treasuryAddress;
uint256 percentageForOwner;
uint256 percentageForTreasury;
}
mapping(uint256 => Competition) public competitions;
constructor(address _restrictedAddress, address _treasuryAddress) {
restrictedAddress = _restrictedAddress;
treasuryAddress = _treasuryAddress;
}
// Events
// Event when a user joined competition
event Joined(address user, uint256 competitionId, uint256 joinDate);
// Event to notify when a competition is created
event CompetitionCreated(
uint256 id,
address owner,
string name,
uint256 entryFeeAmount,
address entryFeeToken,
uint256 percentageForOwner,
uint256 percentageForTreasury,
uint256 endDate,
string optionsJson
);
function createCompetition(
string memory name,
address owner,
uint256 entryFeeAmount,
address entryFeeToken,
uint256 percentageForOwner,
uint256 percentageForTreasury,
uint256 endDate,
string memory optionsJson
) external returns (uint256) {
require(bytes(name).length <= 50, "Name too long");
require(percentageForOwner <= 90, "Owner percentage too high");
require(percentageForTreasury <= 10, "Treasury percentage too high");
require(
percentageForOwner + percentageForTreasury <= 100,
"Total percentages must be less than or equal to 100%"
);
require(endDate > block.timestamp, "End date must be in the future");
_competitionIds.increment();
uint256 newCompetitionId = _competitionIds.current();
competitions[newCompetitionId] = Competition(
newCompetitionId,
owner,
name,
entryFeeAmount,
entryFeeToken,
endDate,
optionsJson,
restrictedAddress,
treasuryAddress,
percentageForOwner,
percentageForTreasury
);
// emit event
emit CompetitionCreated(
newCompetitionId,
owner,
name,
entryFeeAmount,
entryFeeToken,
percentageForOwner,
percentageForTreasury,
endDate,
optionsJson
);
return newCompetitionId;
}
function join(uint256 competitionId) external {
Competition storage competition = competitions[competitionId];
require(block.timestamp < competition.endDate, "Competition ended");
require(!hasJoined[competitionId][msg.sender], "Already joined");
if (competition.entryFeeAmount > 0) {
uint256 balance = IERC20(competition.entryFeeToken).balanceOf(
msg.sender
);
require(
balance >= competition.entryFeeAmount,
"Insufficient balance"
);
IERC20(competition.entryFeeToken).transferFrom(
msg.sender,
address(this),
competition.entryFeeAmount
);
// Increase the rewards
rewards[competitionId] += competition.entryFeeAmount;
}
participants[competitionId].push(Participant(msg.sender, block.timestamp));
hasJoined[competitionId][msg.sender] = true;
emit Joined(msg.sender, competitionId, block.timestamp);
}
function invite(address player, uint256 competitionId) external {
Competition storage competition = competitions[competitionId];
// Require owner to invite
require(msg.sender == competition.owner, "Not authorized");
require(block.timestamp < competition.endDate, "Competition ended");
require(!hasJoined[competitionId][player], "Already joined");
participants[competitionId].push(Participant(player, block.timestamp));
hasJoined[competitionId][player] = true;
emit Joined(player, block.timestamp, competitionId);
}
function setWinners(
address[] calldata _winners,
uint256[] calldata rewardDistributionPercentages,
uint256 competitionId
) external {
Competition storage competition = competitions[competitionId];
require(
block.timestamp >= competition.endDate,
"Competition not ended"
);
require(msg.sender == restrictedAddress, "Not authorized");
require(
_winners.length == rewardDistributionPercentages.length,
"Invalid input"
);
// Validate reward distribution
uint256 totalPercentage;
for (uint256 i = 0; i < rewardDistributionPercentages.length; i++) {
totalPercentage += rewardDistributionPercentages[i];
}
require(
totalPercentage == 100,
"Total reward distribution must equal 100%"
);
for (uint256 i = 0; i < _winners.length; i++) {
require(
hasJoined[competitionId][_winners[i]],
"Winner not a participant"
);
}
uint256 balance = rewards[competitionId];
// owner amount is owner percentage of the total balance
if (balance > 0) {
uint256 ownerAmount = competition.percentageForOwner > 0
? (balance * competition.percentageForOwner) / 100
: 0;
uint256 treasuryAmount = competition.percentageForTreasury > 0
? (balance * competition.percentageForTreasury) / 100
: 0;
uint256 winnersAmount = balance - ownerAmount - treasuryAmount;
for (uint256 i = 0; i < _winners.length; i++) {
winners[competitionId][i] = _winners[i];
uint256 winnerAmount = (winnersAmount *
rewardDistributionPercentages[i]) / 100;
// Transfer fee rewards
IERC20(competition.entryFeeToken).safeTransfer(
_winners[i],
winnerAmount
);
claimRewards(
_winners[i],
rewardDistributionPercentages[i],
competitionId
);
}
// Transfer fee rewards
IERC20(competition.entryFeeToken).safeTransfer(
treasuryAddress,
treasuryAmount
);
IERC20(competition.entryFeeToken).safeTransfer(
competition.owner,
ownerAmount
);
} else {
for (uint256 i = 0; i < _winners.length; i++) {
winners[competitionId][i] = _winners[i];
claimRewards(
_winners[i],
rewardDistributionPercentages[i],
competitionId
);
}
}
}
function claimRewards(
address winner,
uint256 winnerPercentage,
uint256 competitionId
) internal {
Competition storage competition = competitions[competitionId];
// Transfer additional rewards
for (uint256 i = 0; i < rewardCount[competitionId]; i++) {
address rewardAddress = additionalRewardsAddresses[competitionId][i];
uint256 rewardAmount = additionalRewardsAmounts[competitionId][
rewardAddress
];
if (rewardAmount > 0) {
uint256 winnerRewardShare = (rewardAmount * winnerPercentage) /
100;
IERC20(rewardAddress).safeTransfer(winner, winnerRewardShare);
}
}
}
function addReward(
address _rewardAddress,
uint256 _amount,
uint256 competitionId
) external {
Competition storage competition = competitions[competitionId];
require(msg.sender == competition.owner, "Not authorized");
require(block.timestamp < competition.endDate, "Competition ended");
require(_amount > 0, "Invalid amount");
IERC20(_rewardAddress).transferFrom(msg.sender, address(this), _amount);
// If it didn't exist, add it to the list
if (additionalRewardsAmounts[competitionId][_rewardAddress] == 0) {
additionalRewardsAddresses[competitionId][
rewardCount[competitionId]
] = _rewardAddress;
rewardCount[competitionId]++;
}
additionalRewardsAmounts[competitionId][_rewardAddress] += _amount;
}
// Function to see the total rewards accumulated (subtracting the amounts for owner and treasury)
// only the ones from entry fees
function getTotalRewards(
uint256 competitionId
) external view returns (uint256) {
Competition storage competition = competitions[competitionId];
uint256 balance = rewards[competitionId];
if (balance == 0) {
return 0;
}
uint256 ownerAmount = competition.percentageForOwner > 0
? (balance * competition.percentageForOwner) / 100
: 0;
uint256 treasuryAmount = competition.percentageForTreasury > 0
? (balance * competition.percentageForTreasury) / 100
: 0;
return balance - ownerAmount - treasuryAmount;
}
// Returns the number of players that joined
function getParticipantsCount(
uint256 competitionId
) external view returns (uint256) {
Competition storage competition = competitions[competitionId];
return participants[competitionId].length;
}
// Function to withdraw ETH sent to this contract by mistake
function withdrawETH() external {
require(msg.sender == restrictedAddress, "Not authorized");
payable(msg.sender).transfer(address(this).balance);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @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
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 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");
(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 functionCallWithValue(target, data, 0, "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");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// 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-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @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) {
return a + b;
}
/**
* @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) {
return a - b;
}
/**
* @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) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting 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) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message 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,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* 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,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_restrictedAddress","type":"address"},{"internalType":"address","name":"_treasuryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"uint256","name":"entryFeeAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"entryFeeToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"percentageForOwner","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"percentageForTreasury","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endDate","type":"uint256"},{"indexed":false,"internalType":"string","name":"optionsJson","type":"string"}],"name":"CompetitionCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"competitionId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"joinDate","type":"uint256"}],"name":"Joined","type":"event"},{"inputs":[{"internalType":"address","name":"_rewardAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"competitionId","type":"uint256"}],"name":"addReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"additionalRewardsAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"additionalRewardsAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"competitions","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"entryFeeAmount","type":"uint256"},{"internalType":"address","name":"entryFeeToken","type":"address"},{"internalType":"uint256","name":"endDate","type":"uint256"},{"internalType":"string","name":"optionsJson","type":"string"},{"internalType":"address","name":"restrictedAddress","type":"address"},{"internalType":"address","name":"treasuryAddress","type":"address"},{"internalType":"uint256","name":"percentageForOwner","type":"uint256"},{"internalType":"uint256","name":"percentageForTreasury","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"entryFeeAmount","type":"uint256"},{"internalType":"address","name":"entryFeeToken","type":"address"},{"internalType":"uint256","name":"percentageForOwner","type":"uint256"},{"internalType":"uint256","name":"percentageForTreasury","type":"uint256"},{"internalType":"uint256","name":"endDate","type":"uint256"},{"internalType":"string","name":"optionsJson","type":"string"}],"name":"createCompetition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"competitionId","type":"uint256"}],"name":"getParticipantsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"competitionId","type":"uint256"}],"name":"getTotalRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"hasJoined","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"player","type":"address"},{"internalType":"uint256","name":"competitionId","type":"uint256"}],"name":"invite","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"competitionId","type":"uint256"}],"name":"join","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"participantCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"participants","outputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"joinDate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"restrictedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardDistribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_winners","type":"address[]"},{"internalType":"uint256[]","name":"rewardDistributionPercentages","type":"uint256[]"},{"internalType":"uint256","name":"competitionId","type":"uint256"}],"name":"setWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"winnerCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"winners","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b506040516200211d3803806200211d833981016040819052620000349162000083565b600080546001600160a01b039384166001600160a01b03199182161790915560018054929093169116179055620000bb565b80516001600160a01b03811681146200007e57600080fd5b919050565b600080604083850312156200009757600080fd5b620000a28362000066565b9150620000b26020840162000066565b90509250929050565b61205280620000cb6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806381fb1fb4116100b8578063c626214f1161007c578063c626214f14610368578063d08184421461037b578063e086e5ec1461038e578063e36f1d0414610396578063f301af42146103b6578063f5f48998146103d657600080fd5b806381fb1fb4146102ae578063863138fd146102e057806386a2cf931461030b5780639f6828d91461032b578063c5f956af1461035557600080fd5b8063552164ee116100ff578063552164ee146102175780636160f8621461022a578063681947191461023d5780637d36f7661461027b5780637f4ae68d1461029b57600080fd5b8063049878f31461013c5780630d1df8d0146101515780630efc886514610184578063311362cf146101d057806344ea559a14610204575b600080fd5b61014f61014a366004611917565b6103f6565b005b61017161015f366004611917565b60096020526000908152604090205481565b6040519081526020015b60405180910390f35b6101b8610192366004611930565b60056020908152600092835260408084209091529082529020546001600160a01b031681565b6040516001600160a01b03909116815260200161017b565b6101b86101de366004611930565b60076020908152600092835260408084209091529082529020546001600160a01b031681565b61014f61021236600461196e565b6106c1565b610171610225366004611917565b610890565b61014f6102383660046119a1565b61093d565b61026b61024b3660046119cb565b600460209081526000928352604080842090915290825290205460ff1681565b604051901515815260200161017b565b610171610289366004611917565b600c6020526000908152604090205481565b6000546101b8906001600160a01b031681565b6102c16102bc366004611930565b610ac5565b604080516001600160a01b03909316835260208301919091520161017b565b6101716102ee3660046119cb565b600860209081526000928352604080842090915290825290205481565b610171610319366004611917565b600b6020526000908152604090205481565b61033e610339366004611917565b610b0b565b60405161017b9b9a99989796959493929190611a47565b6001546101b8906001600160a01b031681565b61014f610376366004611b16565b610c96565b610171610389366004611c2d565b61119f565b61014f611555565b6101716103a4366004611917565b600a6020526000908152604090205481565b6101716103c4366004611917565b60066020526000908152604090205481565b6101716103e4366004611917565b60009081526003602052604090205490565b6000818152600d60205260409020600581015442106104305760405162461bcd60e51b815260040161042790611cd9565b60405180910390fd5b600082815260046020908152604080832033845290915290205460ff161561048b5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481a9bda5b995960921b6044820152606401610427565b600381015415610602576004818101546040516370a0823160e01b815233928101929092526000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105099190611d04565b905081600301548110156105565760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401610427565b60048281015460038401546040516323b872dd60e01b8152339381019390935230602484015260448301526001600160a01b0316906323b872dd906064016020604051808303816000875af11580156105b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d79190611d1d565b506003820154600084815260066020526040812080549091906105fb908490611d5c565b9091555050505b60008281526003602090815260408083208151808301835233808252428286018181528454600180820187559589528789209451600290910290940180546001600160a01b0319166001600160a01b03909516949094178455519284019290925587865260048552838620818752855294839020805460ff191690921790915581519384529183018590528201527f16a5410c80ce4d4082839ea17ff9fae01b3924da3e586c0e4ba3cdb1c9f7dae29060600160405180910390a15050565b6000818152600d6020526040902060018101546001600160a01b031633146106fb5760405162461bcd60e51b815260040161042790611d75565b8060050154421061071e5760405162461bcd60e51b815260040161042790611cd9565b6000831161075f5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606401610427565b6040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b038516906323b872dd906064016020604051808303816000875af11580156107b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d69190611d1d565b5060008281526008602090815260408083206001600160a01b03881684529091528120549003610853576000828152600760209081526040808320600a8084528285208054865291845291842080546001600160a01b0319166001600160a01b038a16179055858452915280549161084d83611d9d565b91905055505b60008281526008602090815260408083206001600160a01b038816845290915281208054859290610885908490611d5c565b909155505050505050565b6000818152600d6020908152604080832060069092528220548083036108ba575060009392505050565b6000808360090154116108ce5760006108ea565b60648360090154836108e09190611db6565b6108ea9190611dcd565b905060008084600a01541161090057600061091c565b606484600a0154846109129190611db6565b61091c9190611dcd565b9050806109298385611def565b6109339190611def565b9695505050505050565b6000818152600d6020526040902060018101546001600160a01b031633146109775760405162461bcd60e51b815260040161042790611d75565b8060050154421061099a5760405162461bcd60e51b815260040161042790611cd9565b60008281526004602090815260408083206001600160a01b038716845290915290205460ff16156109fe5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481a9bda5b995960921b6044820152606401610427565b6000828152600360209081526040808320815180830183526001600160a01b0388811680835242838701818152855460018082018855968a52888a209551600290910290950180546001600160a01b0319169590941694909417835592519184019190915587865260048552838620818752855294839020805460ff191690921790915581519384529183019190915281018390527f16a5410c80ce4d4082839ea17ff9fae01b3924da3e586c0e4ba3cdb1c9f7dae29060600160405180910390a1505050565b60036020528160005260406000208181548110610ae157600080fd5b6000918252602090912060029091020180546001909101546001600160a01b039091169250905082565b600d6020526000908152604090208054600182015460028301805492936001600160a01b0390921692610b3d90611e02565b80601f0160208091040260200160405190810160405280929190818152602001828054610b6990611e02565b8015610bb65780601f10610b8b57610100808354040283529160200191610bb6565b820191906000526020600020905b815481529060010190602001808311610b9957829003601f168201915b505050600384015460048501546005860154600687018054969793966001600160a01b03909316955090935090610bec90611e02565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1890611e02565b8015610c655780601f10610c3a57610100808354040283529160200191610c65565b820191906000526020600020905b815481529060010190602001808311610c4857829003601f168201915b50505050600783015460088401546009850154600a9095015493946001600160a01b0392831694929091169250908b565b6000818152600d602052604090206005810154421015610cf05760405162461bcd60e51b815260206004820152601560248201527410dbdb5c195d1a5d1a5bdb881b9bdd08195b991959605a1b6044820152606401610427565b6000546001600160a01b03163314610d1a5760405162461bcd60e51b815260040161042790611d75565b848314610d595760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401610427565b6000805b84811015610d9d57858582818110610d7757610d77611e3c565b9050602002013582610d899190611d5c565b915080610d9581611d9d565b915050610d5d565b5080606414610e005760405162461bcd60e51b815260206004820152602960248201527f546f74616c2072657761726420646973747269627574696f6e206d75737420656044820152687175616c203130302560b81b6064820152608401610427565b60005b86811015610ebc57600084815260046020526040812090898984818110610e2c57610e2c611e3c565b9050602002016020810190610e419190611e52565b6001600160a01b0316815260208101919091526040016000205460ff16610eaa5760405162461bcd60e51b815260206004820152601860248201527f57696e6e6572206e6f742061207061727469636970616e7400000000000000006044820152606401610427565b80610eb481611d9d565b915050610e03565b5060008381526006602052604090205480156110cf57600080846009015411610ee6576000610f02565b6064846009015483610ef89190611db6565b610f029190611dcd565b905060008085600a015411610f18576000610f34565b606485600a015484610f2a9190611db6565b610f349190611dcd565b9050600081610f438486611def565b610f4d9190611def565b905060005b8a811015611086578b8b82818110610f6c57610f6c611e3c565b9050602002016020810190610f819190611e52565b6000898152600560209081526040808320858452909152812080546001600160a01b0319166001600160a01b03939093169290921790915560648b8b84818110610fcd57610fcd611e3c565b9050602002013584610fdf9190611db6565b610fe99190611dcd565b905061102a8d8d8481811061100057611000611e3c565b90506020020160208101906110159190611e52565b60048a01546001600160a01b031690836115ae565b6110738d8d8481811061103f5761103f611e3c565b90506020020160208101906110549190611e52565b8c8c8581811061106657611066611e3c565b905060200201358b611605565b508061107e81611d9d565b915050610f52565b5060015460048701546110a6916001600160a01b039182169116846115ae565b600186015460048701546110c7916001600160a01b039182169116856115ae565b505050611195565b60005b87811015611193578888828181106110ec576110ec611e3c565b90506020020160208101906111019190611e52565b6000868152600560209081526040808320858452909152902080546001600160a01b0319166001600160a01b039290921691909117905561118189898381811061114d5761114d611e3c565b90506020020160208101906111629190611e52565b88888481811061117457611174611e3c565b9050602002013587611605565b8061118b81611d9d565b9150506110d2565b505b5050505050505050565b60006032895111156111e35760405162461bcd60e51b815260206004820152600d60248201526c4e616d6520746f6f206c6f6e6760981b6044820152606401610427565b605a8511156112345760405162461bcd60e51b815260206004820152601960248201527f4f776e65722070657263656e7461676520746f6f2068696768000000000000006044820152606401610427565b600a8411156112855760405162461bcd60e51b815260206004820152601c60248201527f54726561737572792070657263656e7461676520746f6f2068696768000000006044820152606401610427565b60646112918587611d5c565b11156112fc5760405162461bcd60e51b815260206004820152603460248201527f546f74616c2070657263656e7461676573206d757374206265206c657373207460448201527368616e206f7220657175616c20746f203130302560601b6064820152608401610427565b42831161134b5760405162461bcd60e51b815260206004820152601e60248201527f456e642064617465206d75737420626520696e207468652066757475726500006044820152606401610427565b611359600280546001019055565b600061136460025490565b90506040518061016001604052808281526020018a6001600160a01b031681526020018b8152602001898152602001886001600160a01b0316815260200185815260200184815260200160008054906101000a90046001600160a01b03166001600160a01b03168152602001600160009054906101000a90046001600160a01b03166001600160a01b0316815260200187815260200186815250600d60008381526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550604082015181600201908161145d9190611ebb565b506060820151600382015560808201516004820180546001600160a01b0319166001600160a01b0390921691909117905560a0820151600582015560c082015160068201906114ac9082611ebb565b5060e08201516007820180546001600160a01b039283166001600160a01b031991821617909155610100840151600884018054919093169116179055610120820151600982015561014090910151600a909101556040517f7e12b57fe8cba0b2806a08c93d4374a27c4b8e4f0047d8c609df7936d3a09afc906115409083908c908e908d908d908d908d908d908d90611f7b565b60405180910390a19998505050505050505050565b6000546001600160a01b0316331461157f5760405162461bcd60e51b815260040161042790611d75565b60405133904780156108fc02916000818181858888f193505050501580156115ab573d6000803e3d6000fd5b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526116009084906116b5565b505050565b6000818152600d60205260408120905b6000838152600a60205260409020548110156116ae576000838152600760209081526040808320848452825280832054868452600883528184206001600160a01b03909116808552925290912054801561169957600060646116778884611db6565b6116819190611dcd565b90506116976001600160a01b03841689836115ae565b505b505080806116a690611d9d565b915050611615565b5050505050565b600061170a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117879092919063ffffffff16565b80519091501561160057808060200190518101906117289190611d1d565b6116005760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610427565b6060611796848460008561179e565b949350505050565b6060824710156117ff5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610427565b600080866001600160a01b0316858760405161181b9190611fed565b60006040518083038185875af1925050503d8060008114611858576040519150601f19603f3d011682016040523d82523d6000602084013e61185d565b606091505b509150915061186e87838387611879565b979650505050505050565b606083156118e85782516000036118e1576001600160a01b0385163b6118e15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610427565b5081611796565b61179683838151156118fd5781518083602001fd5b8060405162461bcd60e51b81526004016104279190612009565b60006020828403121561192957600080fd5b5035919050565b6000806040838503121561194357600080fd5b50508035926020909101359150565b80356001600160a01b038116811461196957600080fd5b919050565b60008060006060848603121561198357600080fd5b61198c84611952565b95602085013595506040909401359392505050565b600080604083850312156119b457600080fd5b6119bd83611952565b946020939093013593505050565b600080604083850312156119de57600080fd5b823591506119ee60208401611952565b90509250929050565b60005b83811015611a125781810151838201526020016119fa565b50506000910152565b60008151808452611a338160208601602086016119f7565b601f01601f19169290920160200192915050565b8b81526001600160a01b038b8116602083015261016060408301819052600091611a738483018e611a1b565b91508b6060850152808b1660808501528960a085015283820360c0850152611a9b828a611a1b565b97811660e085015295909516610100830152506101208101929092526101409091015250979650505050505050565b60008083601f840112611adc57600080fd5b50813567ffffffffffffffff811115611af457600080fd5b6020830191508360208260051b8501011115611b0f57600080fd5b9250929050565b600080600080600060608688031215611b2e57600080fd5b853567ffffffffffffffff80821115611b4657600080fd5b611b5289838a01611aca565b90975095506020880135915080821115611b6b57600080fd5b50611b7888828901611aca565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112611bb157600080fd5b813567ffffffffffffffff80821115611bcc57611bcc611b8a565b604051601f8301601f19908116603f01168101908282118183101715611bf457611bf4611b8a565b81604052838152866020858801011115611c0d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600080600080610100898b031215611c4a57600080fd5b883567ffffffffffffffff80821115611c6257600080fd5b611c6e8c838d01611ba0565b9950611c7c60208c01611952565b985060408b01359750611c9160608c01611952565b965060808b0135955060a08b0135945060c08b0135935060e08b0135915080821115611cbc57600080fd5b50611cc98b828c01611ba0565b9150509295985092959890939650565b60208082526011908201527010dbdb5c195d1a5d1a5bdb88195b991959607a1b604082015260600190565b600060208284031215611d1657600080fd5b5051919050565b600060208284031215611d2f57600080fd5b81518015158114611d3f57600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115611d6f57611d6f611d46565b92915050565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b600060018201611daf57611daf611d46565b5060010190565b8082028115828204841417611d6f57611d6f611d46565b600082611dea57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611d6f57611d6f611d46565b600181811c90821680611e1657607f821691505b602082108103611e3657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611e6457600080fd5b611d3f82611952565b601f82111561160057600081815260208120601f850160051c81016020861015611e945750805b601f850160051c820191505b81811015611eb357828155600101611ea0565b505050505050565b815167ffffffffffffffff811115611ed557611ed5611b8a565b611ee981611ee38454611e02565b84611e6d565b602080601f831160018114611f1e5760008415611f065750858301515b600019600386901b1c1916600185901b178555611eb3565b600085815260208120601f198616915b82811015611f4d57888601518255948401946001909101908401611f2e565b5085821015611f6b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8981526001600160a01b03898116602083015261012060408301819052600091611fa78483018c611a1b565b91508960608501528089166080850152508660a08401528560c08401528460e0840152828103610100840152611fdd8185611a1b565b9c9b505050505050505050505050565b60008251611fff8184602087016119f7565b9190910192915050565b602081526000611d3f6020830184611a1b56fea2646970667358221220ebd1fee455705047e6cf6c162b98cf11249825bca8dd44e8631124f1840e224764736f6c63430008110033000000000000000000000000846ff49d72f4e3ca7a3d318820c6c2debe23c68a000000000000000000000000eefc874ac40bcf8a00b4484f26f599d0ce6c0f47
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101375760003560e01c806381fb1fb4116100b8578063c626214f1161007c578063c626214f14610368578063d08184421461037b578063e086e5ec1461038e578063e36f1d0414610396578063f301af42146103b6578063f5f48998146103d657600080fd5b806381fb1fb4146102ae578063863138fd146102e057806386a2cf931461030b5780639f6828d91461032b578063c5f956af1461035557600080fd5b8063552164ee116100ff578063552164ee146102175780636160f8621461022a578063681947191461023d5780637d36f7661461027b5780637f4ae68d1461029b57600080fd5b8063049878f31461013c5780630d1df8d0146101515780630efc886514610184578063311362cf146101d057806344ea559a14610204575b600080fd5b61014f61014a366004611917565b6103f6565b005b61017161015f366004611917565b60096020526000908152604090205481565b6040519081526020015b60405180910390f35b6101b8610192366004611930565b60056020908152600092835260408084209091529082529020546001600160a01b031681565b6040516001600160a01b03909116815260200161017b565b6101b86101de366004611930565b60076020908152600092835260408084209091529082529020546001600160a01b031681565b61014f61021236600461196e565b6106c1565b610171610225366004611917565b610890565b61014f6102383660046119a1565b61093d565b61026b61024b3660046119cb565b600460209081526000928352604080842090915290825290205460ff1681565b604051901515815260200161017b565b610171610289366004611917565b600c6020526000908152604090205481565b6000546101b8906001600160a01b031681565b6102c16102bc366004611930565b610ac5565b604080516001600160a01b03909316835260208301919091520161017b565b6101716102ee3660046119cb565b600860209081526000928352604080842090915290825290205481565b610171610319366004611917565b600b6020526000908152604090205481565b61033e610339366004611917565b610b0b565b60405161017b9b9a99989796959493929190611a47565b6001546101b8906001600160a01b031681565b61014f610376366004611b16565b610c96565b610171610389366004611c2d565b61119f565b61014f611555565b6101716103a4366004611917565b600a6020526000908152604090205481565b6101716103c4366004611917565b60066020526000908152604090205481565b6101716103e4366004611917565b60009081526003602052604090205490565b6000818152600d60205260409020600581015442106104305760405162461bcd60e51b815260040161042790611cd9565b60405180910390fd5b600082815260046020908152604080832033845290915290205460ff161561048b5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481a9bda5b995960921b6044820152606401610427565b600381015415610602576004818101546040516370a0823160e01b815233928101929092526000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105099190611d04565b905081600301548110156105565760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401610427565b60048281015460038401546040516323b872dd60e01b8152339381019390935230602484015260448301526001600160a01b0316906323b872dd906064016020604051808303816000875af11580156105b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d79190611d1d565b506003820154600084815260066020526040812080549091906105fb908490611d5c565b9091555050505b60008281526003602090815260408083208151808301835233808252428286018181528454600180820187559589528789209451600290910290940180546001600160a01b0319166001600160a01b03909516949094178455519284019290925587865260048552838620818752855294839020805460ff191690921790915581519384529183018590528201527f16a5410c80ce4d4082839ea17ff9fae01b3924da3e586c0e4ba3cdb1c9f7dae29060600160405180910390a15050565b6000818152600d6020526040902060018101546001600160a01b031633146106fb5760405162461bcd60e51b815260040161042790611d75565b8060050154421061071e5760405162461bcd60e51b815260040161042790611cd9565b6000831161075f5760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606401610427565b6040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b038516906323b872dd906064016020604051808303816000875af11580156107b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d69190611d1d565b5060008281526008602090815260408083206001600160a01b03881684529091528120549003610853576000828152600760209081526040808320600a8084528285208054865291845291842080546001600160a01b0319166001600160a01b038a16179055858452915280549161084d83611d9d565b91905055505b60008281526008602090815260408083206001600160a01b038816845290915281208054859290610885908490611d5c565b909155505050505050565b6000818152600d6020908152604080832060069092528220548083036108ba575060009392505050565b6000808360090154116108ce5760006108ea565b60648360090154836108e09190611db6565b6108ea9190611dcd565b905060008084600a01541161090057600061091c565b606484600a0154846109129190611db6565b61091c9190611dcd565b9050806109298385611def565b6109339190611def565b9695505050505050565b6000818152600d6020526040902060018101546001600160a01b031633146109775760405162461bcd60e51b815260040161042790611d75565b8060050154421061099a5760405162461bcd60e51b815260040161042790611cd9565b60008281526004602090815260408083206001600160a01b038716845290915290205460ff16156109fe5760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481a9bda5b995960921b6044820152606401610427565b6000828152600360209081526040808320815180830183526001600160a01b0388811680835242838701818152855460018082018855968a52888a209551600290910290950180546001600160a01b0319169590941694909417835592519184019190915587865260048552838620818752855294839020805460ff191690921790915581519384529183019190915281018390527f16a5410c80ce4d4082839ea17ff9fae01b3924da3e586c0e4ba3cdb1c9f7dae29060600160405180910390a1505050565b60036020528160005260406000208181548110610ae157600080fd5b6000918252602090912060029091020180546001909101546001600160a01b039091169250905082565b600d6020526000908152604090208054600182015460028301805492936001600160a01b0390921692610b3d90611e02565b80601f0160208091040260200160405190810160405280929190818152602001828054610b6990611e02565b8015610bb65780601f10610b8b57610100808354040283529160200191610bb6565b820191906000526020600020905b815481529060010190602001808311610b9957829003601f168201915b505050600384015460048501546005860154600687018054969793966001600160a01b03909316955090935090610bec90611e02565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1890611e02565b8015610c655780601f10610c3a57610100808354040283529160200191610c65565b820191906000526020600020905b815481529060010190602001808311610c4857829003601f168201915b50505050600783015460088401546009850154600a9095015493946001600160a01b0392831694929091169250908b565b6000818152600d602052604090206005810154421015610cf05760405162461bcd60e51b815260206004820152601560248201527410dbdb5c195d1a5d1a5bdb881b9bdd08195b991959605a1b6044820152606401610427565b6000546001600160a01b03163314610d1a5760405162461bcd60e51b815260040161042790611d75565b848314610d595760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b6044820152606401610427565b6000805b84811015610d9d57858582818110610d7757610d77611e3c565b9050602002013582610d899190611d5c565b915080610d9581611d9d565b915050610d5d565b5080606414610e005760405162461bcd60e51b815260206004820152602960248201527f546f74616c2072657761726420646973747269627574696f6e206d75737420656044820152687175616c203130302560b81b6064820152608401610427565b60005b86811015610ebc57600084815260046020526040812090898984818110610e2c57610e2c611e3c565b9050602002016020810190610e419190611e52565b6001600160a01b0316815260208101919091526040016000205460ff16610eaa5760405162461bcd60e51b815260206004820152601860248201527f57696e6e6572206e6f742061207061727469636970616e7400000000000000006044820152606401610427565b80610eb481611d9d565b915050610e03565b5060008381526006602052604090205480156110cf57600080846009015411610ee6576000610f02565b6064846009015483610ef89190611db6565b610f029190611dcd565b905060008085600a015411610f18576000610f34565b606485600a015484610f2a9190611db6565b610f349190611dcd565b9050600081610f438486611def565b610f4d9190611def565b905060005b8a811015611086578b8b82818110610f6c57610f6c611e3c565b9050602002016020810190610f819190611e52565b6000898152600560209081526040808320858452909152812080546001600160a01b0319166001600160a01b03939093169290921790915560648b8b84818110610fcd57610fcd611e3c565b9050602002013584610fdf9190611db6565b610fe99190611dcd565b905061102a8d8d8481811061100057611000611e3c565b90506020020160208101906110159190611e52565b60048a01546001600160a01b031690836115ae565b6110738d8d8481811061103f5761103f611e3c565b90506020020160208101906110549190611e52565b8c8c8581811061106657611066611e3c565b905060200201358b611605565b508061107e81611d9d565b915050610f52565b5060015460048701546110a6916001600160a01b039182169116846115ae565b600186015460048701546110c7916001600160a01b039182169116856115ae565b505050611195565b60005b87811015611193578888828181106110ec576110ec611e3c565b90506020020160208101906111019190611e52565b6000868152600560209081526040808320858452909152902080546001600160a01b0319166001600160a01b039290921691909117905561118189898381811061114d5761114d611e3c565b90506020020160208101906111629190611e52565b88888481811061117457611174611e3c565b9050602002013587611605565b8061118b81611d9d565b9150506110d2565b505b5050505050505050565b60006032895111156111e35760405162461bcd60e51b815260206004820152600d60248201526c4e616d6520746f6f206c6f6e6760981b6044820152606401610427565b605a8511156112345760405162461bcd60e51b815260206004820152601960248201527f4f776e65722070657263656e7461676520746f6f2068696768000000000000006044820152606401610427565b600a8411156112855760405162461bcd60e51b815260206004820152601c60248201527f54726561737572792070657263656e7461676520746f6f2068696768000000006044820152606401610427565b60646112918587611d5c565b11156112fc5760405162461bcd60e51b815260206004820152603460248201527f546f74616c2070657263656e7461676573206d757374206265206c657373207460448201527368616e206f7220657175616c20746f203130302560601b6064820152608401610427565b42831161134b5760405162461bcd60e51b815260206004820152601e60248201527f456e642064617465206d75737420626520696e207468652066757475726500006044820152606401610427565b611359600280546001019055565b600061136460025490565b90506040518061016001604052808281526020018a6001600160a01b031681526020018b8152602001898152602001886001600160a01b0316815260200185815260200184815260200160008054906101000a90046001600160a01b03166001600160a01b03168152602001600160009054906101000a90046001600160a01b03166001600160a01b0316815260200187815260200186815250600d60008381526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550604082015181600201908161145d9190611ebb565b506060820151600382015560808201516004820180546001600160a01b0319166001600160a01b0390921691909117905560a0820151600582015560c082015160068201906114ac9082611ebb565b5060e08201516007820180546001600160a01b039283166001600160a01b031991821617909155610100840151600884018054919093169116179055610120820151600982015561014090910151600a909101556040517f7e12b57fe8cba0b2806a08c93d4374a27c4b8e4f0047d8c609df7936d3a09afc906115409083908c908e908d908d908d908d908d908d90611f7b565b60405180910390a19998505050505050505050565b6000546001600160a01b0316331461157f5760405162461bcd60e51b815260040161042790611d75565b60405133904780156108fc02916000818181858888f193505050501580156115ab573d6000803e3d6000fd5b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526116009084906116b5565b505050565b6000818152600d60205260408120905b6000838152600a60205260409020548110156116ae576000838152600760209081526040808320848452825280832054868452600883528184206001600160a01b03909116808552925290912054801561169957600060646116778884611db6565b6116819190611dcd565b90506116976001600160a01b03841689836115ae565b505b505080806116a690611d9d565b915050611615565b5050505050565b600061170a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117879092919063ffffffff16565b80519091501561160057808060200190518101906117289190611d1d565b6116005760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610427565b6060611796848460008561179e565b949350505050565b6060824710156117ff5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610427565b600080866001600160a01b0316858760405161181b9190611fed565b60006040518083038185875af1925050503d8060008114611858576040519150601f19603f3d011682016040523d82523d6000602084013e61185d565b606091505b509150915061186e87838387611879565b979650505050505050565b606083156118e85782516000036118e1576001600160a01b0385163b6118e15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610427565b5081611796565b61179683838151156118fd5781518083602001fd5b8060405162461bcd60e51b81526004016104279190612009565b60006020828403121561192957600080fd5b5035919050565b6000806040838503121561194357600080fd5b50508035926020909101359150565b80356001600160a01b038116811461196957600080fd5b919050565b60008060006060848603121561198357600080fd5b61198c84611952565b95602085013595506040909401359392505050565b600080604083850312156119b457600080fd5b6119bd83611952565b946020939093013593505050565b600080604083850312156119de57600080fd5b823591506119ee60208401611952565b90509250929050565b60005b83811015611a125781810151838201526020016119fa565b50506000910152565b60008151808452611a338160208601602086016119f7565b601f01601f19169290920160200192915050565b8b81526001600160a01b038b8116602083015261016060408301819052600091611a738483018e611a1b565b91508b6060850152808b1660808501528960a085015283820360c0850152611a9b828a611a1b565b97811660e085015295909516610100830152506101208101929092526101409091015250979650505050505050565b60008083601f840112611adc57600080fd5b50813567ffffffffffffffff811115611af457600080fd5b6020830191508360208260051b8501011115611b0f57600080fd5b9250929050565b600080600080600060608688031215611b2e57600080fd5b853567ffffffffffffffff80821115611b4657600080fd5b611b5289838a01611aca565b90975095506020880135915080821115611b6b57600080fd5b50611b7888828901611aca565b96999598509660400135949350505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112611bb157600080fd5b813567ffffffffffffffff80821115611bcc57611bcc611b8a565b604051601f8301601f19908116603f01168101908282118183101715611bf457611bf4611b8a565b81604052838152866020858801011115611c0d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600080600080610100898b031215611c4a57600080fd5b883567ffffffffffffffff80821115611c6257600080fd5b611c6e8c838d01611ba0565b9950611c7c60208c01611952565b985060408b01359750611c9160608c01611952565b965060808b0135955060a08b0135945060c08b0135935060e08b0135915080821115611cbc57600080fd5b50611cc98b828c01611ba0565b9150509295985092959890939650565b60208082526011908201527010dbdb5c195d1a5d1a5bdb88195b991959607a1b604082015260600190565b600060208284031215611d1657600080fd5b5051919050565b600060208284031215611d2f57600080fd5b81518015158114611d3f57600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115611d6f57611d6f611d46565b92915050565b6020808252600e908201526d139bdd08185d5d1a1bdc9a5e995960921b604082015260600190565b600060018201611daf57611daf611d46565b5060010190565b8082028115828204841417611d6f57611d6f611d46565b600082611dea57634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611d6f57611d6f611d46565b600181811c90821680611e1657607f821691505b602082108103611e3657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611e6457600080fd5b611d3f82611952565b601f82111561160057600081815260208120601f850160051c81016020861015611e945750805b601f850160051c820191505b81811015611eb357828155600101611ea0565b505050505050565b815167ffffffffffffffff811115611ed557611ed5611b8a565b611ee981611ee38454611e02565b84611e6d565b602080601f831160018114611f1e5760008415611f065750858301515b600019600386901b1c1916600185901b178555611eb3565b600085815260208120601f198616915b82811015611f4d57888601518255948401946001909101908401611f2e565b5085821015611f6b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8981526001600160a01b03898116602083015261012060408301819052600091611fa78483018c611a1b565b91508960608501528089166080850152508660a08401528560c08401528460e0840152828103610100840152611fdd8185611a1b565b9c9b505050505050505050505050565b60008251611fff8184602087016119f7565b9190910192915050565b602081526000611d3f6020830184611a1b56fea2646970667358221220ebd1fee455705047e6cf6c162b98cf11249825bca8dd44e8631124f1840e224764736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000846ff49d72f4e3ca7a3d318820c6c2debe23c68a000000000000000000000000eefc874ac40bcf8a00b4484f26f599d0ce6c0f47
-----Decoded View---------------
Arg [0] : _restrictedAddress (address): 0x846FF49d72F4e3CA7a3D318820C6C2debe23c68A
Arg [1] : _treasuryAddress (address): 0xeEfC874aC40BCF8A00b4484F26F599d0CE6c0F47
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000846ff49d72f4e3ca7a3d318820c6c2debe23c68a
Arg [1] : 000000000000000000000000eefc874ac40bcf8a00b4484f26f599d0ce6c0f47
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.