Source Code
Overview
POL Balance
POL Value
$0.00Cross-Chain Transactions
Loading...
Loading
Contract Name:
Referral2KNFT
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.21;
import "@openzeppelin/contracts/access/AccessControl.sol";
/**
* @title Referral2KNFT
* @author Mihai Lazarut
* @dev This contract is used to manage a referral program for 2KNFT promoters.
* It allows registration of promoters and provides utilities to query promoter details.
* Inherits from OpenZeppelin's AccessControl for role management.
*/
contract Referral2KNFT is AccessControl {
/**
* @dev Emitted when a new promoter is registered.
* @param referralCode The referral code assigned to the promoter.
* @param promoterName Name of the promoter.
* @param promoterAddress Ethereum address of the promoter.
*/
event PromoterRegistered(uint256 indexed referralCode, string promoterName, address promoterAddress);
/**
* @dev Counter for generating unique referral codes for each new promoter.
* Starts from 1 and increments with each new registration.
*/
uint256 private _nextReferralCode = 1;
/**
* @dev Total number of promoters registered.
*/
uint256 public totalPromoters = 0;
/**
* @dev Struct to hold promoter information.
* @param promoterName The name of the promoter.
* @param promoterAddress The address of the promoter.
*/
struct PromoterStruct {
string promoterName;
address promoterAddress;
}
/**
* @dev Mapping from referral codes to their corresponding promoter information.
* Each unique referral code is linked to a single promoter.
*/
mapping(uint256 => PromoterStruct) public promoters;
/**
* @dev Mapping from promoter addresses to their corresponding referral codes.
* Allows quick lookup of a promoter's referral code using their Ethereum address.
*/
mapping(address => uint256) public addressToReferralCode;
/**
* @dev Constructor that sets the initial admin of the contract.
* @param defaultAdmin The address to be granted the `DEFAULT_ADMIN_ROLE`.
*
* The `DEFAULT_ADMIN_ROLE` is responsible for administrative tasks such as managing promoter registrations.
*/
constructor(address defaultAdmin) {
_grantRole(DEFAULT_ADMIN_ROLE, defaultAdmin);
}
/**
* @dev Registers a new promoter in the referral program.
* @param _promoterName Name of the promoter.
* @param _promoterAddress Address of the promoter.
*
* Requirements:
* - The caller must have the `DEFAULT_ADMIN_ROLE`.
* - `_promoterAddress` must not be the zero address.
* - `_promoterAddress` must not have been used to register another promoter.
*
* A unique referral code is assigned to the promoter and stored alongside the provided details.
* Increases the total count of promoters.
* Emits a `PromoterRegistered` event upon successful registration.
*/
function registerPromoter(string memory _promoterName, address _promoterAddress) external onlyRole(DEFAULT_ADMIN_ROLE){
require(_promoterAddress != address(0), "Invalid address");
require(addressToReferralCode[_promoterAddress] == 0, "Address already used");
uint256 referralCode = _nextReferralCode++;
PromoterStruct memory promoter = PromoterStruct({
promoterName: _promoterName,
promoterAddress: _promoterAddress
});
promoters[referralCode] = promoter;
addressToReferralCode[_promoterAddress] = referralCode;
totalPromoters++;
emit PromoterRegistered(referralCode, _promoterName, _promoterAddress);
}
/**
* @dev Returns the name of the promoter associated with a specific referral code.
* @param referralCode The referral code of the promoter.
* @return The name of the promoter.
*
* Requirement:
* - `referralCode` must correspond to a registered promoter.
*/
function getPromoterName(uint256 referralCode)
public
view
returns (string memory)
{
return promoters[referralCode].promoterName;
}
/**
* @dev Returns the address of the promoter associated with a specific referral code.
* @param referralCode The referral code of the promoter.
* @return The address of the promoter.
*
* Requirement:
* - `referralCode` must correspond to a registered promoter.
*/
function getPromoterAddress(uint256 referralCode)
public
view
returns (address)
{
return promoters[referralCode].promoterAddress;
}
/**
* @dev Checks if a promoter's address is already registered.
* @param _promoterAddress Address of the promoter.
* @return `true` if the address is already registered, otherwise `false`.
*/
function isPromoterAddressRegistered(address _promoterAddress)
public
view
returns (bool)
{
return addressToReferralCode[_promoterAddress] != 0;
}
/**
* @dev Returns the referral code associated with a given promoter address.
* @param _promoterAddress Address of the promoter.
* @return The referral code associated with the given address.
*
* This function retrieves the referral code that is linked to the specified promoter address.
* If the address is not registered as a promoter, this function will return 0.
*
*/
function getReferralCode(address _promoterAddress)
public
view
returns (uint256)
{
return addressToReferralCode[_promoterAddress];
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```solidity
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address account => bool) hasRole;
bytes32 adminRole;
}
mapping(bytes32 role => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with an {AccessControlUnauthorizedAccount} error including the required role.
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual returns (bool) {
return _roles[role].hasRole[account];
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
* is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
* is missing `role`.
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert AccessControlUnauthorizedAccount(account, role);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address callerConfirmation) public virtual {
if (callerConfirmation != _msgSender()) {
revert AccessControlBadConfirmation();
}
_revokeRole(role, callerConfirmation);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
if (!hasRole(role, account)) {
_roles[role].hasRole[account] = true;
emit RoleGranted(role, account, _msgSender());
return true;
} else {
return false;
}
}
/**
* @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
if (hasRole(role, account)) {
_roles[role].hasRole[account] = false;
emit RoleRevoked(role, account, _msgSender());
return true;
} else {
return false;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)
pragma solidity ^0.8.20;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev The `account` is missing a role.
*/
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);
/**
* @dev The caller of a function is not the expected one.
*
* NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
*/
error AccessControlBadConfirmation();
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*/
function renounceRole(bytes32 role, address callerConfirmation) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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 v5.0.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @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);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"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":"defaultAdmin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"referralCode","type":"uint256"},{"indexed":false,"internalType":"string","name":"promoterName","type":"string"},{"indexed":false,"internalType":"address","name":"promoterAddress","type":"address"}],"name":"PromoterRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressToReferralCode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"referralCode","type":"uint256"}],"name":"getPromoterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"referralCode","type":"uint256"}],"name":"getPromoterName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_promoterAddress","type":"address"}],"name":"getReferralCode","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_promoterAddress","type":"address"}],"name":"isPromoterAddressRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"promoters","outputs":[{"internalType":"string","name":"promoterName","type":"string"},{"internalType":"address","name":"promoterAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_promoterName","type":"string"},{"internalType":"address","name":"_promoterAddress","type":"address"}],"name":"registerPromoter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPromoters","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405260018055600060025534801561001957600080fd5b50604051610cb0380380610cb0833981016040819052610038916100f6565b61004360008261004a565b5050610126565b6000828152602081815260408083206001600160a01b038516845290915281205460ff166100ec576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556100a43390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016100f0565b5060005b92915050565b60006020828403121561010857600080fd5b81516001600160a01b038116811461011f57600080fd5b9392505050565b610b7b806101356000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80633f0bee321161009757806392c403441161006657806392c403441461025a578063a217fddf14610283578063b868e7a11461028b578063d547741f146102ab57600080fd5b80633f0bee32146101fd57806345908d8d1461021e5780637f6f5e081461022757806391d148541461024757600080fd5b80632f2ff15d116100d35780632f2ff15d146101685780632f662e271461017b57806336568abe146101bf578063389ca332146101d257600080fd5b806301ffc9a7146100fa578063248a9ca3146101225780632e4981b914610153575b600080fd5b61010d6101083660046107d7565b6102be565b60405190151581526020015b60405180910390f35b610145610130366004610808565b60009081526020819052604090206001015490565b604051908152602001610119565b610166610161366004610853565b6102f5565b005b610166610176366004610915565b610490565b6101a7610189366004610808565b6000908152600360205260409020600101546001600160a01b031690565b6040516001600160a01b039091168152602001610119565b6101666101cd366004610915565b6104bb565b61010d6101e0366004610938565b6001600160a01b0316600090815260046020526040902054151590565b61021061020b366004610808565b6104f3565b604051610119929190610999565b61014560025481565b61023a610235366004610808565b6105a0565b60405161011991906109c3565b61010d610255366004610915565b610642565b610145610268366004610938565b6001600160a01b031660009081526004602052604090205490565b610145600081565b610145610299366004610938565b60046020526000908152604090205481565b6101666102b9366004610915565b61066b565b60006001600160e01b03198216637965db0b60e01b14806102ef57506301ffc9a760e01b6001600160e01b03198316145b92915050565b600061030081610690565b6001600160a01b03821661034d5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064015b60405180910390fd5b6001600160a01b038216600090815260046020526040902054156103aa5760405162461bcd60e51b81526020600482015260146024820152731059191c995cdcc8185b1c9958591e481d5cd95960621b6044820152606401610344565b60018054600091826103bb836109d6565b909155506040805180820182528681526001600160a01b03861660208083019190915260008481526003909152919091208151929350909182919081906104029082610a85565b5060209182015160019190910180546001600160a01b0319166001600160a01b0392831617905585166000908152600490915260408120839055600280549161044a836109d6565b9190505550817f410c5dc7781e813c0585eb6726f0684e8ffb9c45a95f4e5fef88303da3bdf5908686604051610481929190610999565b60405180910390a25050505050565b6000828152602081905260409020600101546104ab81610690565b6104b5838361069d565b50505050565b6001600160a01b03811633146104e45760405163334bd91960e11b815260040160405180910390fd5b6104ee828261072f565b505050565b60036020526000908152604090208054819061050e906109fd565b80601f016020809104026020016040519081016040528092919081815260200182805461053a906109fd565b80156105875780601f1061055c57610100808354040283529160200191610587565b820191906000526020600020905b81548152906001019060200180831161056a57829003601f168201915b505050600190930154919250506001600160a01b031682565b60008181526003602052604090208054606091906105bd906109fd565b80601f01602080910402602001604051908101604052809291908181526020018280546105e9906109fd565b80156106365780601f1061060b57610100808354040283529160200191610636565b820191906000526020600020905b81548152906001019060200180831161061957829003601f168201915b50505050509050919050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008281526020819052604090206001015461068681610690565b6104b5838361072f565b61069a813361079a565b50565b60006106a98383610642565b610727576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556106df3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016102ef565b5060006102ef565b600061073b8383610642565b15610727576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016102ef565b6107a48282610642565b6107d35760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610344565b5050565b6000602082840312156107e957600080fd5b81356001600160e01b03198116811461080157600080fd5b9392505050565b60006020828403121561081a57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b80356001600160a01b038116811461084e57600080fd5b919050565b6000806040838503121561086657600080fd5b823567ffffffffffffffff8082111561087e57600080fd5b818501915085601f83011261089257600080fd5b8135818111156108a4576108a4610821565b604051601f8201601f19908116603f011681019083821181831017156108cc576108cc610821565b816040528281528860208487010111156108e557600080fd5b82602086016020830137600060208483010152809650505050505061090c60208401610837565b90509250929050565b6000806040838503121561092857600080fd5b8235915061090c60208401610837565b60006020828403121561094a57600080fd5b61080182610837565b6000815180845260005b818110156109795760208185018101518683018201520161095d565b506000602082860101526020601f19601f83011685010191505092915050565b6040815260006109ac6040830185610953565b905060018060a01b03831660208301529392505050565b6020815260006108016020830184610953565b6000600182016109f657634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c90821680610a1157607f821691505b602082108103610a3157634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104ee57600081815260208120601f850160051c81016020861015610a5e5750805b601f850160051c820191505b81811015610a7d57828155600101610a6a565b505050505050565b815167ffffffffffffffff811115610a9f57610a9f610821565b610ab381610aad84546109fd565b84610a37565b602080601f831160018114610ae85760008415610ad05750858301515b600019600386901b1c1916600185901b178555610a7d565b600085815260208120601f198616915b82811015610b1757888601518255948401946001909101908401610af8565b5085821015610b355787850151600019600388901b60f8161c191681555b5050505050600190811b0190555056fea26469706673582212207d822d21c3429a57ed99c85b7ca1b78bec166d17c020c73be8556c99bcf5e09e64736f6c6343000815003300000000000000000000000072ef0c846ba6fd481968bd2ba49c4a70ab4ae392
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80633f0bee321161009757806392c403441161006657806392c403441461025a578063a217fddf14610283578063b868e7a11461028b578063d547741f146102ab57600080fd5b80633f0bee32146101fd57806345908d8d1461021e5780637f6f5e081461022757806391d148541461024757600080fd5b80632f2ff15d116100d35780632f2ff15d146101685780632f662e271461017b57806336568abe146101bf578063389ca332146101d257600080fd5b806301ffc9a7146100fa578063248a9ca3146101225780632e4981b914610153575b600080fd5b61010d6101083660046107d7565b6102be565b60405190151581526020015b60405180910390f35b610145610130366004610808565b60009081526020819052604090206001015490565b604051908152602001610119565b610166610161366004610853565b6102f5565b005b610166610176366004610915565b610490565b6101a7610189366004610808565b6000908152600360205260409020600101546001600160a01b031690565b6040516001600160a01b039091168152602001610119565b6101666101cd366004610915565b6104bb565b61010d6101e0366004610938565b6001600160a01b0316600090815260046020526040902054151590565b61021061020b366004610808565b6104f3565b604051610119929190610999565b61014560025481565b61023a610235366004610808565b6105a0565b60405161011991906109c3565b61010d610255366004610915565b610642565b610145610268366004610938565b6001600160a01b031660009081526004602052604090205490565b610145600081565b610145610299366004610938565b60046020526000908152604090205481565b6101666102b9366004610915565b61066b565b60006001600160e01b03198216637965db0b60e01b14806102ef57506301ffc9a760e01b6001600160e01b03198316145b92915050565b600061030081610690565b6001600160a01b03821661034d5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064015b60405180910390fd5b6001600160a01b038216600090815260046020526040902054156103aa5760405162461bcd60e51b81526020600482015260146024820152731059191c995cdcc8185b1c9958591e481d5cd95960621b6044820152606401610344565b60018054600091826103bb836109d6565b909155506040805180820182528681526001600160a01b03861660208083019190915260008481526003909152919091208151929350909182919081906104029082610a85565b5060209182015160019190910180546001600160a01b0319166001600160a01b0392831617905585166000908152600490915260408120839055600280549161044a836109d6565b9190505550817f410c5dc7781e813c0585eb6726f0684e8ffb9c45a95f4e5fef88303da3bdf5908686604051610481929190610999565b60405180910390a25050505050565b6000828152602081905260409020600101546104ab81610690565b6104b5838361069d565b50505050565b6001600160a01b03811633146104e45760405163334bd91960e11b815260040160405180910390fd5b6104ee828261072f565b505050565b60036020526000908152604090208054819061050e906109fd565b80601f016020809104026020016040519081016040528092919081815260200182805461053a906109fd565b80156105875780601f1061055c57610100808354040283529160200191610587565b820191906000526020600020905b81548152906001019060200180831161056a57829003601f168201915b505050600190930154919250506001600160a01b031682565b60008181526003602052604090208054606091906105bd906109fd565b80601f01602080910402602001604051908101604052809291908181526020018280546105e9906109fd565b80156106365780601f1061060b57610100808354040283529160200191610636565b820191906000526020600020905b81548152906001019060200180831161061957829003601f168201915b50505050509050919050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60008281526020819052604090206001015461068681610690565b6104b5838361072f565b61069a813361079a565b50565b60006106a98383610642565b610727576000838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556106df3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016102ef565b5060006102ef565b600061073b8383610642565b15610727576000838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016102ef565b6107a48282610642565b6107d35760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610344565b5050565b6000602082840312156107e957600080fd5b81356001600160e01b03198116811461080157600080fd5b9392505050565b60006020828403121561081a57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b80356001600160a01b038116811461084e57600080fd5b919050565b6000806040838503121561086657600080fd5b823567ffffffffffffffff8082111561087e57600080fd5b818501915085601f83011261089257600080fd5b8135818111156108a4576108a4610821565b604051601f8201601f19908116603f011681019083821181831017156108cc576108cc610821565b816040528281528860208487010111156108e557600080fd5b82602086016020830137600060208483010152809650505050505061090c60208401610837565b90509250929050565b6000806040838503121561092857600080fd5b8235915061090c60208401610837565b60006020828403121561094a57600080fd5b61080182610837565b6000815180845260005b818110156109795760208185018101518683018201520161095d565b506000602082860101526020601f19601f83011685010191505092915050565b6040815260006109ac6040830185610953565b905060018060a01b03831660208301529392505050565b6020815260006108016020830184610953565b6000600182016109f657634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c90821680610a1157607f821691505b602082108103610a3157634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156104ee57600081815260208120601f850160051c81016020861015610a5e5750805b601f850160051c820191505b81811015610a7d57828155600101610a6a565b505050505050565b815167ffffffffffffffff811115610a9f57610a9f610821565b610ab381610aad84546109fd565b84610a37565b602080601f831160018114610ae85760008415610ad05750858301515b600019600386901b1c1916600185901b178555610a7d565b600085815260208120601f198616915b82811015610b1757888601518255948401946001909101908401610af8565b5085821015610b355787850151600019600388901b60f8161c191681555b5050505050600190811b0190555056fea26469706673582212207d822d21c3429a57ed99c85b7ca1b78bec166d17c020c73be8556c99bcf5e09e64736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000072ef0c846ba6fd481968bd2ba49c4a70ab4ae392
-----Decoded View---------------
Arg [0] : defaultAdmin (address): 0x72Ef0c846Ba6fd481968bd2Ba49C4a70Ab4ae392
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000072ef0c846ba6fd481968bd2ba49c4a70ab4ae392
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in POL
Multichain Portfolio | 32 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.