Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 19 from a total of 19 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Bonus | 18945526 | 379 days ago | IN | 0 ETH | 0.00131467 | ||||
Set Contract | 18922556 | 382 days ago | IN | 0 ETH | 0.00117214 | ||||
Set Bonus | 18314018 | 467 days ago | IN | 0 ETH | 0.00159353 | ||||
Set Bonus | 18313188 | 467 days ago | IN | 0 ETH | 0.00135642 | ||||
Set Contract | 18292213 | 470 days ago | IN | 0 ETH | 0.00059565 | ||||
Set Contract | 18036186 | 506 days ago | IN | 0 ETH | 0.00204174 | ||||
Set Contract | 17724961 | 550 days ago | IN | 0 ETH | 0.00102834 | ||||
Set Contract | 17680676 | 556 days ago | IN | 0 ETH | 0.00086512 | ||||
Set Contract | 17628465 | 563 days ago | IN | 0 ETH | 0.00262752 | ||||
Set Bonus | 17423131 | 592 days ago | IN | 0 ETH | 0.00281372 | ||||
Set Bonus | 17417753 | 593 days ago | IN | 0 ETH | 0.00302355 | ||||
Set Contract | 17402901 | 595 days ago | IN | 0 ETH | 0.00115708 | ||||
Set Contract | 16780625 | 683 days ago | IN | 0 ETH | 0.00125984 | ||||
Set Contract | 16612529 | 706 days ago | IN | 0 ETH | 0.00045951 | ||||
Set Contract | 16553811 | 715 days ago | IN | 0 ETH | 0.00090884 | ||||
Set Contract | 16485890 | 724 days ago | IN | 0 ETH | 0.00163013 | ||||
Set Contract | 16485786 | 724 days ago | IN | 0 ETH | 0.00123826 | ||||
Set Contract | 16249829 | 757 days ago | IN | 0 ETH | 0.00072093 | ||||
Set Contract | 16246832 | 757 days ago | IN | 0 ETH | 0.00069385 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
19257139 | 335 days ago | 0.00125 ETH | ||||
19257139 | 335 days ago | 0.0125 ETH | ||||
19257139 | 335 days ago | 0.01375 ETH | ||||
19246419 | 336 days ago | 0.0025 ETH | ||||
19246419 | 336 days ago | 0.025 ETH | ||||
19246419 | 336 days ago | 0.0275 ETH | ||||
19208161 | 342 days ago | 0.00025 ETH | ||||
19208161 | 342 days ago | 0.0025 ETH | ||||
19208161 | 342 days ago | 0.00275 ETH | ||||
19178868 | 346 days ago | 0.0003 ETH | ||||
19178868 | 346 days ago | 0.003 ETH | ||||
19178868 | 346 days ago | 0.0033 ETH | ||||
19137368 | 352 days ago | 0.00025 ETH | ||||
19137368 | 352 days ago | 0.0025 ETH | ||||
19137368 | 352 days ago | 0.00275 ETH | ||||
19108003 | 356 days ago | 0.0005 ETH | ||||
19108003 | 356 days ago | 0.005 ETH | ||||
19108003 | 356 days ago | 0.0055 ETH | ||||
19107901 | 356 days ago | 0.0005 ETH | ||||
19107901 | 356 days ago | 0.005 ETH | ||||
19107901 | 356 days ago | 0.0055 ETH | ||||
19107139 | 356 days ago | 0.0005 ETH | ||||
19107139 | 356 days ago | 0.005 ETH | ||||
19107139 | 356 days ago | 0.0055 ETH | ||||
19106117 | 356 days ago | 0.0003 ETH |
Loading...
Loading
Contract Name:
Refer2Earn
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 10 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract Refer2Earn is Ownable, ReentrancyGuard { using EnumerableSet for EnumerableSet.AddressSet; uint8 public fee = 1; // 1% fee, hard-coded event Referral(address indexed _contract, address indexed _referrer, uint256 _quantity, uint256 _commission); address payable public treasuryAddress; mapping(address => uint256) public commissions; mapping(address => EnumerableSet.AddressSet) private referrers; mapping(address => mapping(address => uint256)) public bonuses; modifier onlyContractOwner(address _contract) { require(Ownable(_contract).owner() == msg.sender, "Unauthorized"); _; } modifier onlyContract() { require(commissions[msg.sender] > 0, "Unauthorized"); _; } constructor(address payable _treasuryAddress) { treasuryAddress = _treasuryAddress; } function setTreasuryAddress(address payable _treasuryAddress) external onlyOwner { treasuryAddress = _treasuryAddress; } function setContract(address _contract, uint8 _percent) external onlyContractOwner(_contract) { require(_contract != address(0), "Bad contract"); require(_percent <= 100, "Bad commission"); if (_percent == 0) { delete commissions[_contract]; } else { commissions[_contract] = _percent; } } function setBonus(address _contract, uint8 _percent, address _referrer) external onlyContractOwner(_contract) { require(_contract != address(0), "Bad contract"); if (referrers[_contract].contains(_referrer)) { if (_percent == 0) { referrers[_contract].remove(_referrer); delete bonuses[_contract][_referrer]; } else { bonuses[_contract][_referrer] = _percent; } } else { require(_percent + commissions[_contract] <= 100, "Bad bonus"); referrers[_contract].add(_referrer); bonuses[_contract][_referrer] = _percent; } } function getCommission(address _contract, address _recipient, address _referrer, uint256 _value) public view returns (uint256, uint256) { uint256 _commission = commissions[_contract]; if (_referrer != address(0) && _referrer != _recipient && _commission > 0) { if (referrers[_contract].contains(_referrer)) { _commission += bonuses[_contract][_referrer]; } return ((_value * _commission) / 100, (_value * fee) / 100); } else { return (0, 0); } } function bonusesOf(address _contract) public view returns (address[] memory, uint256[] memory) { EnumerableSet.AddressSet storage _addressSet = referrers[_contract]; address[] memory _referrers = new address[](_addressSet.length()); uint256[] memory _bonuses = new uint256[](_addressSet.length()); for (uint256 i; i < _addressSet.length(); i++) { _referrers[i] = _addressSet.at(i); _bonuses[i] = bonuses[_contract][_referrers[i]]; } return (_referrers, _bonuses); } function payReferral(address _recipient, address payable _referrer, uint256 _quantity, uint256 _value) external payable nonReentrant onlyContract { (uint256 _commission, uint256 _fee) = getCommission(msg.sender, _recipient, _referrer, _value); require(msg.value >= _commission + _fee, "Invalid ETH"); emit Referral(msg.sender, _referrer, _quantity, _commission); (bool sentCommisson,) = _referrer.call{value: _commission}(""); (bool sentFee,) = treasuryAddress.call{value: _fee}(""); require(sentCommisson, "Commission failed"); require(sentFee, "Fee failed"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^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() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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 { _transferOwnership(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"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 10 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address payable","name":"_treasuryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"_contract","type":"address"},{"indexed":true,"internalType":"address","name":"_referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"_quantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_commission","type":"uint256"}],"name":"Referral","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"bonuses","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"bonusesOf","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"commissions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"address","name":"_referrer","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"getCommission","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"address payable","name":"_referrer","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"payReferral","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint8","name":"_percent","type":"uint8"},{"internalType":"address","name":"_referrer","type":"address"}],"name":"setBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint8","name":"_percent","type":"uint8"}],"name":"setContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_treasuryAddress","type":"address"}],"name":"setTreasuryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526002805460ff1916600117905534801561001d57600080fd5b5060405161131738038061131783398101604081905261003c916100c4565b61004533610074565b60018055600280546001600160a01b0390921661010002610100600160a81b03199092169190911790556100f4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100d657600080fd5b81516001600160a01b03811681146100ed57600080fd5b9392505050565b611214806101036000396000f3fe6080604052600436106100a25760003560e01c806337559c89146100a75780636605bfda146100bc578063715018a6146100dc57806379a410a7146100f15780637b05afb51461012857806380d70194146101635780638da5cb5b1461019b57806395fe2bed146101c85780639f33d881146101e8578063c5f956af14610208578063ddca3f431461022d578063f216ec8d14610259578063f2fde38b1461028e575b600080fd5b6100ba6100b5366004610ea0565b6102ae565b005b3480156100c857600080fd5b506100ba6100d7366004610ee6565b6104cd565b3480156100e857600080fd5b506100ba6104fd565b3480156100fd57600080fd5b5061011161010c366004610ee6565b610511565b60405161011f929190610f03565b60405180910390f35b34801561013457600080fd5b50610155610143366004610ee6565b60036020526000908152604090205481565b60405190815260200161011f565b34801561016f57600080fd5b5061015561017e366004610f87565b600560209081526000928352604080842090915290825290205481565b3480156101a757600080fd5b506101b06106b5565b6040516001600160a01b03909116815260200161011f565b3480156101d457600080fd5b506100ba6101e3366004610fd6565b6106c4565b3480156101f457600080fd5b506100ba61020336600461101f565b6108e6565b34801561021457600080fd5b506002546101b09061010090046001600160a01b031681565b34801561023957600080fd5b506002546102479060ff1681565b60405160ff909116815260200161011f565b34801561026557600080fd5b50610279610274366004611054565b610a2e565b6040805192835260208301919091520161011f565b34801561029a57600080fd5b506100ba6102a9366004610ee6565b610b29565b6102b6610ba2565b336000908152600360205260409020546102eb5760405162461bcd60e51b81526004016102e2906110a5565b60405180910390fd5b6000806102fa33878786610a2e565b909250905061030981836110e1565b3410156103465760405162461bcd60e51b815260206004820152600b60248201526a092dcecc2d8d2c8408aa8960ab1b60448201526064016102e2565b60408051858152602081018490526001600160a01b0387169133917f90f46099733ed637df811df4fcc5cae4961192ca04f36da9ab64b4dd8dc9b7f5910160405180910390a36000856001600160a01b03168360405160006040518083038185875af1925050503d80600081146103d9576040519150601f19603f3d011682016040523d82523d6000602084013e6103de565b606091505b50506002546040519192506000916101009091046001600160a01b03169084908381818185875af1925050503d8060008114610436576040519150601f19603f3d011682016040523d82523d6000602084013e61043b565b606091505b50509050816104805760405162461bcd60e51b815260206004820152601160248201527010dbdb5b5a5cdcda5bdb8819985a5b1959607a1b60448201526064016102e2565b806104ba5760405162461bcd60e51b815260206004820152600a6024820152691199594819985a5b195960b21b60448201526064016102e2565b505050506104c760018055565b50505050565b6104d5610bfb565b600280546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b610505610bfb565b61050f6000610c5a565b565b6001600160a01b038116600090815260046020526040812060609182919061053882610caa565b6001600160401b0381111561054f5761054f6110f4565b604051908082528060200260200182016040528015610578578160200160208202803683370190505b509050600061058683610caa565b6001600160401b0381111561059d5761059d6110f4565b6040519080825280602002602001820160405280156105c6578160200160208202803683370190505b50905060005b6105d584610caa565b8110156106a9576105e68482610cba565b8382815181106105f8576105f861110a565b60200260200101906001600160a01b031690816001600160a01b03168152505060056000886001600160a01b03166001600160a01b0316815260200190815260200160002060008483815181106106515761065161110a565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205482828151811061068c5761068c61110a565b6020908102919091010152806106a181611120565b9150506105cc565b50909590945092505050565b6000546001600160a01b031690565b82336001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561070d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107319190611139565b6001600160a01b0316146107575760405162461bcd60e51b81526004016102e2906110a5565b6001600160a01b03841661077d5760405162461bcd60e51b81526004016102e290611156565b6001600160a01b038416600090815260046020526040902061079f9083610ccd565b1561082f578260ff166000036107ff576001600160a01b03841660009081526004602052604090206107d19083610ce2565b506001600160a01b0380851660009081526005602090815260408083209386168352929052908120556104c7565b6001600160a01b03808516600090815260056020908152604080832093861683529290522060ff841690556104c7565b6001600160a01b0384166000908152600360205260409020546064906108589060ff86166110e1565b11156108925760405162461bcd60e51b815260206004820152600960248201526842616420626f6e757360b81b60448201526064016102e2565b6001600160a01b03841660009081526004602052604090206108b49083610cf7565b506001600160a01b03808516600090815260056020908152604080832093861683529290522060ff8416905550505050565b81336001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561092f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109539190611139565b6001600160a01b0316146109795760405162461bcd60e51b81526004016102e2906110a5565b6001600160a01b03831661099f5760405162461bcd60e51b81526004016102e290611156565b60648260ff1611156109e45760405162461bcd60e51b815260206004820152600e60248201526d2130b21031b7b6b6b4b9b9b4b7b760911b60448201526064016102e2565b8160ff16600003610a0b5750506001600160a01b0316600090815260036020526040812055565b6001600160a01b038316600090815260036020526040902060ff83169055505050565b6001600160a01b038085166000908152600360205260408120549091829190851615801590610a6f5750856001600160a01b0316856001600160a01b031614155b8015610a7b5750600081115b15610b17576001600160a01b0387166000908152600460205260409020610aa29086610ccd565b15610ada576001600160a01b03808816600090815260056020908152604080832093891683529290522054610ad790826110e1565b90505b6064610ae6828661117c565b610af09190611193565b600254606490610b039060ff168761117c565b610b0d9190611193565b9250925050610b20565b60008092509250505b94509492505050565b610b31610bfb565b6001600160a01b038116610b965760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102e2565b610b9f81610c5a565b50565b600260015403610bf45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102e2565b6002600155565b33610c046106b5565b6001600160a01b03161461050f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610cb4825490565b92915050565b6000610cc68383610d0c565b9392505050565b6000610cc6836001600160a01b038416610d36565b6000610cc6836001600160a01b038416610d4e565b6000610cc6836001600160a01b038416610e41565b6000826000018281548110610d2357610d2361110a565b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015610e37576000610d726001836111b5565b8554909150600090610d86906001906111b5565b9050818114610deb576000866000018281548110610da657610da661110a565b9060005260206000200154905080876000018481548110610dc957610dc961110a565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dfc57610dfc6111c8565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610cb4565b6000915050610cb4565b6000610e4d8383610d36565b610e8357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610cb4565b506000610cb4565b6001600160a01b0381168114610b9f57600080fd5b60008060008060808587031215610eb657600080fd5b8435610ec181610e8b565b93506020850135610ed181610e8b565b93969395505050506040820135916060013590565b600060208284031215610ef857600080fd5b8135610cc681610e8b565b604080825283519082018190526000906020906060840190828701845b82811015610f455781516001600160a01b031684529284019290840190600101610f20565b5050508381038285015284518082528583019183019060005b81811015610f7a57835183529284019291840191600101610f5e565b5090979650505050505050565b60008060408385031215610f9a57600080fd5b8235610fa581610e8b565b91506020830135610fb581610e8b565b809150509250929050565b803560ff81168114610fd157600080fd5b919050565b600080600060608486031215610feb57600080fd5b8335610ff681610e8b565b925061100460208501610fc0565b9150604084013561101481610e8b565b809150509250925092565b6000806040838503121561103257600080fd5b823561103d81610e8b565b915061104b60208401610fc0565b90509250929050565b6000806000806080858703121561106a57600080fd5b843561107581610e8b565b9350602085013561108581610e8b565b9250604085013561109581610e8b565b9396929550929360600135925050565b6020808252600c908201526b155b985d5d1a1bdc9a5e995960a21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610cb457610cb46110cb565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060018201611132576111326110cb565b5060010190565b60006020828403121561114b57600080fd5b8151610cc681610e8b565b6020808252600c908201526b1098590818dbdb9d1c9858dd60a21b604082015260600190565b8082028115828204841417610cb457610cb46110cb565b6000826111b057634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610cb457610cb46110cb565b634e487b7160e01b600052603160045260246000fdfea264697066735822122037fb78ec6ed1a3c41966d6a51843bc59cc1fa447082f82a8707ed544cffecc2264736f6c6343000811003300000000000000000000000098ee85e7cc2665261d9fd3ea53f2db4491c547e3
Deployed Bytecode
0x6080604052600436106100a25760003560e01c806337559c89146100a75780636605bfda146100bc578063715018a6146100dc57806379a410a7146100f15780637b05afb51461012857806380d70194146101635780638da5cb5b1461019b57806395fe2bed146101c85780639f33d881146101e8578063c5f956af14610208578063ddca3f431461022d578063f216ec8d14610259578063f2fde38b1461028e575b600080fd5b6100ba6100b5366004610ea0565b6102ae565b005b3480156100c857600080fd5b506100ba6100d7366004610ee6565b6104cd565b3480156100e857600080fd5b506100ba6104fd565b3480156100fd57600080fd5b5061011161010c366004610ee6565b610511565b60405161011f929190610f03565b60405180910390f35b34801561013457600080fd5b50610155610143366004610ee6565b60036020526000908152604090205481565b60405190815260200161011f565b34801561016f57600080fd5b5061015561017e366004610f87565b600560209081526000928352604080842090915290825290205481565b3480156101a757600080fd5b506101b06106b5565b6040516001600160a01b03909116815260200161011f565b3480156101d457600080fd5b506100ba6101e3366004610fd6565b6106c4565b3480156101f457600080fd5b506100ba61020336600461101f565b6108e6565b34801561021457600080fd5b506002546101b09061010090046001600160a01b031681565b34801561023957600080fd5b506002546102479060ff1681565b60405160ff909116815260200161011f565b34801561026557600080fd5b50610279610274366004611054565b610a2e565b6040805192835260208301919091520161011f565b34801561029a57600080fd5b506100ba6102a9366004610ee6565b610b29565b6102b6610ba2565b336000908152600360205260409020546102eb5760405162461bcd60e51b81526004016102e2906110a5565b60405180910390fd5b6000806102fa33878786610a2e565b909250905061030981836110e1565b3410156103465760405162461bcd60e51b815260206004820152600b60248201526a092dcecc2d8d2c8408aa8960ab1b60448201526064016102e2565b60408051858152602081018490526001600160a01b0387169133917f90f46099733ed637df811df4fcc5cae4961192ca04f36da9ab64b4dd8dc9b7f5910160405180910390a36000856001600160a01b03168360405160006040518083038185875af1925050503d80600081146103d9576040519150601f19603f3d011682016040523d82523d6000602084013e6103de565b606091505b50506002546040519192506000916101009091046001600160a01b03169084908381818185875af1925050503d8060008114610436576040519150601f19603f3d011682016040523d82523d6000602084013e61043b565b606091505b50509050816104805760405162461bcd60e51b815260206004820152601160248201527010dbdb5b5a5cdcda5bdb8819985a5b1959607a1b60448201526064016102e2565b806104ba5760405162461bcd60e51b815260206004820152600a6024820152691199594819985a5b195960b21b60448201526064016102e2565b505050506104c760018055565b50505050565b6104d5610bfb565b600280546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b610505610bfb565b61050f6000610c5a565b565b6001600160a01b038116600090815260046020526040812060609182919061053882610caa565b6001600160401b0381111561054f5761054f6110f4565b604051908082528060200260200182016040528015610578578160200160208202803683370190505b509050600061058683610caa565b6001600160401b0381111561059d5761059d6110f4565b6040519080825280602002602001820160405280156105c6578160200160208202803683370190505b50905060005b6105d584610caa565b8110156106a9576105e68482610cba565b8382815181106105f8576105f861110a565b60200260200101906001600160a01b031690816001600160a01b03168152505060056000886001600160a01b03166001600160a01b0316815260200190815260200160002060008483815181106106515761065161110a565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205482828151811061068c5761068c61110a565b6020908102919091010152806106a181611120565b9150506105cc565b50909590945092505050565b6000546001600160a01b031690565b82336001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561070d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107319190611139565b6001600160a01b0316146107575760405162461bcd60e51b81526004016102e2906110a5565b6001600160a01b03841661077d5760405162461bcd60e51b81526004016102e290611156565b6001600160a01b038416600090815260046020526040902061079f9083610ccd565b1561082f578260ff166000036107ff576001600160a01b03841660009081526004602052604090206107d19083610ce2565b506001600160a01b0380851660009081526005602090815260408083209386168352929052908120556104c7565b6001600160a01b03808516600090815260056020908152604080832093861683529290522060ff841690556104c7565b6001600160a01b0384166000908152600360205260409020546064906108589060ff86166110e1565b11156108925760405162461bcd60e51b815260206004820152600960248201526842616420626f6e757360b81b60448201526064016102e2565b6001600160a01b03841660009081526004602052604090206108b49083610cf7565b506001600160a01b03808516600090815260056020908152604080832093861683529290522060ff8416905550505050565b81336001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561092f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109539190611139565b6001600160a01b0316146109795760405162461bcd60e51b81526004016102e2906110a5565b6001600160a01b03831661099f5760405162461bcd60e51b81526004016102e290611156565b60648260ff1611156109e45760405162461bcd60e51b815260206004820152600e60248201526d2130b21031b7b6b6b4b9b9b4b7b760911b60448201526064016102e2565b8160ff16600003610a0b5750506001600160a01b0316600090815260036020526040812055565b6001600160a01b038316600090815260036020526040902060ff83169055505050565b6001600160a01b038085166000908152600360205260408120549091829190851615801590610a6f5750856001600160a01b0316856001600160a01b031614155b8015610a7b5750600081115b15610b17576001600160a01b0387166000908152600460205260409020610aa29086610ccd565b15610ada576001600160a01b03808816600090815260056020908152604080832093891683529290522054610ad790826110e1565b90505b6064610ae6828661117c565b610af09190611193565b600254606490610b039060ff168761117c565b610b0d9190611193565b9250925050610b20565b60008092509250505b94509492505050565b610b31610bfb565b6001600160a01b038116610b965760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102e2565b610b9f81610c5a565b50565b600260015403610bf45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102e2565b6002600155565b33610c046106b5565b6001600160a01b03161461050f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610cb4825490565b92915050565b6000610cc68383610d0c565b9392505050565b6000610cc6836001600160a01b038416610d36565b6000610cc6836001600160a01b038416610d4e565b6000610cc6836001600160a01b038416610e41565b6000826000018281548110610d2357610d2361110a565b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b60008181526001830160205260408120548015610e37576000610d726001836111b5565b8554909150600090610d86906001906111b5565b9050818114610deb576000866000018281548110610da657610da661110a565b9060005260206000200154905080876000018481548110610dc957610dc961110a565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610dfc57610dfc6111c8565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610cb4565b6000915050610cb4565b6000610e4d8383610d36565b610e8357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610cb4565b506000610cb4565b6001600160a01b0381168114610b9f57600080fd5b60008060008060808587031215610eb657600080fd5b8435610ec181610e8b565b93506020850135610ed181610e8b565b93969395505050506040820135916060013590565b600060208284031215610ef857600080fd5b8135610cc681610e8b565b604080825283519082018190526000906020906060840190828701845b82811015610f455781516001600160a01b031684529284019290840190600101610f20565b5050508381038285015284518082528583019183019060005b81811015610f7a57835183529284019291840191600101610f5e565b5090979650505050505050565b60008060408385031215610f9a57600080fd5b8235610fa581610e8b565b91506020830135610fb581610e8b565b809150509250929050565b803560ff81168114610fd157600080fd5b919050565b600080600060608486031215610feb57600080fd5b8335610ff681610e8b565b925061100460208501610fc0565b9150604084013561101481610e8b565b809150509250925092565b6000806040838503121561103257600080fd5b823561103d81610e8b565b915061104b60208401610fc0565b90509250929050565b6000806000806080858703121561106a57600080fd5b843561107581610e8b565b9350602085013561108581610e8b565b9250604085013561109581610e8b565b9396929550929360600135925050565b6020808252600c908201526b155b985d5d1a1bdc9a5e995960a21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610cb457610cb46110cb565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060018201611132576111326110cb565b5060010190565b60006020828403121561114b57600080fd5b8151610cc681610e8b565b6020808252600c908201526b1098590818dbdb9d1c9858dd60a21b604082015260600190565b8082028115828204841417610cb457610cb46110cb565b6000826111b057634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610cb457610cb46110cb565b634e487b7160e01b600052603160045260246000fdfea264697066735822122037fb78ec6ed1a3c41966d6a51843bc59cc1fa447082f82a8707ed544cffecc2264736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000098ee85e7cc2665261d9fd3ea53f2db4491c547e3
-----Decoded View---------------
Arg [0] : _treasuryAddress (address): 0x98ee85e7cc2665261D9fd3ea53f2Db4491C547E3
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000098ee85e7cc2665261d9fd3ea53f2db4491c547e3
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.