Overview
ETH Balance
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 55,249 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Register | 987618 | 36 days ago | IN | 0 ETH | 0.00000527 | ||||
Register | 987460 | 36 days ago | IN | 0 ETH | 0.00000527 | ||||
Register | 987452 | 36 days ago | IN | 0 ETH | 0.0000079 | ||||
Register | 987447 | 36 days ago | IN | 0 ETH | 0.0000029 | ||||
Register | 987441 | 36 days ago | IN | 0 ETH | 0.00000474 | ||||
Register | 987436 | 36 days ago | IN | 0 ETH | 0.00000527 | ||||
Register | 987420 | 36 days ago | IN | 0 ETH | 0.00000159 | ||||
Register | 987420 | 36 days ago | IN | 0 ETH | 0.00000159 | ||||
Register | 987420 | 36 days ago | IN | 0 ETH | 0.00000159 | ||||
Register | 987420 | 36 days ago | IN | 0 ETH | 0.00000159 | ||||
Register | 987420 | 36 days ago | IN | 0 ETH | 0.00000159 | ||||
Register | 987420 | 36 days ago | IN | 0 ETH | 0.00000188 | ||||
Register | 987412 | 36 days ago | IN | 0 ETH | 0.00000051 | ||||
Register | 987412 | 36 days ago | IN | 0 ETH | 0.00000051 | ||||
Register | 987412 | 36 days ago | IN | 0 ETH | 0.0000003 | ||||
Register | 987412 | 36 days ago | IN | 0 ETH | 0.0000003 | ||||
Register | 987410 | 36 days ago | IN | 0 ETH | 0.00000051 | ||||
Register | 987410 | 36 days ago | IN | 0 ETH | 0.00000527 | ||||
Register | 987410 | 36 days ago | IN | 0 ETH | 0.00000573 | ||||
Register | 987405 | 36 days ago | IN | 0 ETH | 0.00000527 | ||||
Register | 987405 | 36 days ago | IN | 0 ETH | 0.00000527 | ||||
Register | 987404 | 36 days ago | IN | 0 ETH | 0.00000527 | ||||
Register | 987404 | 36 days ago | IN | 0 ETH | 0.00000527 | ||||
Register | 987404 | 36 days ago | IN | 0 ETH | 0.00000527 | ||||
Register | 987404 | 36 days ago | IN | 0 ETH | 0.00000527 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
EventRegister
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24.0; import { Ownable2StepUpgradeable } from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import { AccessControlUpgradeable } from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; /** * @title EventRegister * @notice A contract that allows authorized managers to create events, manage user registrations, * and track user participation using role-based access control. * @dev Utilizes OpenZeppelin's AccessControl for role management. The contract does not hold any * Ether. */ contract EventRegister is Ownable2StepUpgradeable, AccessControlUpgradeable { /** * @dev The role identifier for event managers. This role allows accounts to create events * and manage registrations. */ bytes32 public constant EVENT_MANAGER_ROLE = keccak256("EVENT_MANAGER_ROLE"); /** * @dev Represents an event with its associated details. */ struct Event { ///< Unique identifier for the event. uint256 id; ///< Name of the event. string name; ///< Flag indicating whether the event exists. bool exists; ///< Flag indicating whether registrations are open for the event. bool registrationOpen; } /** * @dev Mapping from event ID to Event details. */ mapping(uint256 eventId => Event eventData) public events; /** * @dev Mapping from event ID to a mapping of user addresses to their registration status. * Indicates whether a user has registered for a specific event. */ mapping(uint256 eventId => mapping(address registrant => bool isRegistered)) public isRegistered; /** * @dev Emitted when a new event is created. * @param id The unique identifier of the created event. * @param name The name of the created event. */ event EventCreated(uint256 id, string name); /** * @dev Emitted when a user registers for an event. * @param registrant The address of the user who registered. * @param eventId The unique identifier of the event for which the user registered. */ event Registered(address indexed registrant, uint256 eventId); /** * @dev Emitted when a user unregisters for an event. * @param registrant The address of the user who unregistered. * @param eventId The unique identifier of the event for which the user unregistered. */ event Unregistered(address indexed registrant, uint256 eventId); /** * @dev Emitted when registrations are opened for an event. * @param eventId The unique identifier of the event whose registrations are opened. */ event RegistrationOpened(uint256 eventId); /** * @dev Emitted when registrations are closed for an event. * @param eventId The unique identifier of the event whose registrations are closed. */ event RegistrationClosed(uint256 eventId); /** * @dev Counter for assigning unique event IDs. */ uint256 private nextEventId; /** * @notice Contract initializer * @dev Initializes the contract by granting the deployer the default admin role. * The deployer is also granted the EVENT_MANAGER_ROLE. * The deployer is set as the owner of the contract. */ function initialize() external initializer { __Context_init(); _grantRole(EVENT_MANAGER_ROLE, _msgSender()); _transferOwnership(_msgSender()); } /** * @notice Initializes the contract by granting the deployer the default admin role. * @dev The deployer of the contract is granted the DEFAULT_ADMIN_ROLE, allowing them to manage * roles. */ constructor() { _grantRole(DEFAULT_ADMIN_ROLE, _msgSender()); } /** * @notice Grants the EVENT_MANAGER_ROLE to a specified account. * @dev Only accounts with the DEFAULT_ADMIN_ROLE can call this function. * @param account The address to be granted the EVENT_MANAGER_ROLE. * * Requirements: * * - The caller must have the DEFAULT_ADMIN_ROLE. */ function grantEventManagerRole(address account) external onlyRole(DEFAULT_ADMIN_ROLE) { grantRole(EVENT_MANAGER_ROLE, account); } /** * @notice Revokes the EVENT_MANAGER_ROLE from a specified account. * @dev Only accounts with the DEFAULT_ADMIN_ROLE can call this function. * @param account The address from which the EVENT_MANAGER_ROLE will be revoked. * * Requirements: * * - The caller must have the DEFAULT_ADMIN_ROLE. */ function revokeEventManagerRole(address account) external onlyRole(DEFAULT_ADMIN_ROLE) { revokeRole(EVENT_MANAGER_ROLE, account); } /** * @notice Creates a new event with the given name. * @dev Only accounts with the EVENT_MANAGER_ROLE can call this function. * Emits EventCreated and RegistrationOpened events upon successful creation. * @param _name The name of the event to be created. * * Requirements: * * - The caller must have the EVENT_MANAGER_ROLE. */ function createEvent(string memory _name) external onlyRole(EVENT_MANAGER_ROLE) { uint256 eventId = nextEventId; events[eventId] = Event({ id: eventId, name: _name, exists: true, registrationOpen: true }); emit EventCreated(eventId, _name); emit RegistrationOpened(eventId); // Emit event indicating registrations are open nextEventId++; } /** * @notice Opens registrations for a specific event. * @dev Only accounts with the EVENT_MANAGER_ROLE can call this function. * Emits a RegistrationOpened event upon successful operation. * @param _eventId The unique identifier of the event for which to open registrations. * * Requirements: * * - The event with `_eventId` must exist. * - Registrations for the event must currently be closed. * - The caller must have the EVENT_MANAGER_ROLE. */ function openRegistration(uint256 _eventId) external onlyRole(EVENT_MANAGER_ROLE) { require(events[_eventId].exists, "Event not found"); require(!events[_eventId].registrationOpen, "Already open"); events[_eventId].registrationOpen = true; emit RegistrationOpened(_eventId); } /** * @notice Closes registrations for a specific event. * @dev Only accounts with the EVENT_MANAGER_ROLE can call this function. * Emits a RegistrationClosed event upon successful operation. * @param _eventId The unique identifier of the event for which to close registrations. * * Requirements: * * - The event with `_eventId` must exist. * - Registrations for the event must currently be open. * - The caller must have the EVENT_MANAGER_ROLE. */ function closeRegistration(uint256 _eventId) external onlyRole(EVENT_MANAGER_ROLE) { require(events[_eventId].exists, "Event not found"); require(events[_eventId].registrationOpen, "Already closed"); events[_eventId].registrationOpen = false; emit RegistrationClosed(_eventId); } /** * @notice Allows a user to register for a specific event. * @dev Emits a Registered event upon successful registration. * @param _eventId The unique identifier of the event to register for. * * Requirements: * * - The event with `_eventId` must exist. * - Registrations for the event must be open. * - The caller must not have already registered for the event. */ function register(uint256 _eventId) external { Event memory currentEvent = events[_eventId]; require(currentEvent.exists, "Event not found"); require(currentEvent.registrationOpen, "Registrations closed"); require(!isRegistered[_eventId][msg.sender], "Already registered"); isRegistered[_eventId][msg.sender] = true; emit Registered(msg.sender, _eventId); } /** * @notice Allows the event manager to unregister a user from a specific event. * @dev Emits an Unregistered event upon successful un-registration. * @param _eventId The unique identifier of the event to unregister from. * @param _user The address of the user to unregister. * * Requirements: * - The event with `_eventId` must exist. * - Registrations for the event must be open. * - The user must be registered for the event. */ function unregister(uint256 _eventId, address _user) external onlyRole(EVENT_MANAGER_ROLE) { Event memory currentEvent = events[_eventId]; require(currentEvent.exists, "Event not found"); require(currentEvent.registrationOpen, "Registrations closed"); require(isRegistered[_eventId][_user], "Not registered"); isRegistered[_eventId][_user] = false; emit Unregistered(_user, _eventId); } /** * @notice Retrieves all event IDs for which a user has registered. * @dev Iterates through all existing events to compile a list of registrations. * @param _user The address of the user whose registrations are to be retrieved. * @return An array of event IDs that the user has registered for. * */ function getRegisteredEvents(address _user) external view returns (uint256[] memory) { uint256[] memory temp = new uint256[](nextEventId); uint256 count = 0; for (uint256 i = 0; i < nextEventId; i++) { if (isRegistered[i][_user]) { temp[count] = i; count++; } } // Create a fixed-size array to return uint256[] memory registeredEvents = new uint256[](count); for (uint256 j = 0; j < count; j++) { registeredEvents[j] = temp[j]; } return registeredEvents; } /** * @notice Retrieves the details of a specific event. * @dev Returns the event's ID, name, and registration status. * @param _eventId The unique identifier of the event to retrieve. * @return id The unique identifier of the event. * @return name The name of the event. * @return registrationOpen_ A boolean indicating whether registrations are open for the event. * * Requirements: * * - The event with `_eventId` must exist. */ function getEvent(uint256 _eventId) external view returns (uint256 id, string memory name, bool registrationOpen_) { require(events[_eventId].exists, "Event not found"); Event memory e = events[_eventId]; return (e.id, e.name, e.registrationOpen); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol) pragma solidity ^0.8.20; import {OwnableUpgradeable} from "./OwnableUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable2Step struct Ownable2StepStorage { address _pendingOwner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable2Step")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant Ownable2StepStorageLocation = 0x237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00; function _getOwnable2StepStorage() private pure returns (Ownable2StepStorage storage $) { assembly { $.slot := Ownable2StepStorageLocation } } event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); function __Ownable2Step_init() internal onlyInitializing { } function __Ownable2Step_init_unchained() internal onlyInitializing { } /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { Ownable2StepStorage storage $ = _getOwnable2StepStorage(); return $._pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { Ownable2StepStorage storage $ = _getOwnable2StepStorage(); $._pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { Ownable2StepStorage storage $ = _getOwnable2StepStorage(); delete $._pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); if (pendingOwner() != sender) { revert OwnableUnauthorizedAccount(sender); } _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol"; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {ERC165Upgradeable} from "../utils/introspection/ERC165Upgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.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 AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /// @custom:storage-location erc7201:openzeppelin.storage.AccessControl struct AccessControlStorage { mapping(bytes32 role => RoleData) _roles; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800; function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) { assembly { $.slot := AccessControlStorageLocation } } /** * @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); _; } function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } /** * @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) { AccessControlStorage storage $ = _getAccessControlStorage(); 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) { AccessControlStorage storage $ = _getAccessControlStorage(); 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 { AccessControlStorage storage $ = _getAccessControlStorage(); 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) { AccessControlStorage storage $ = _getAccessControlStorage(); 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) { AccessControlStorage storage $ = _getAccessControlStorage(); 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/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.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. * * The initial owner is set to the address provided by the deployer. 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 OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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) { OwnableStorage storage $ = _getOwnableStorage(); return $._owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// 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.1) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {Initializable} from "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165 { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @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); }
{ "remappings": [ "@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/", "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/", "solady/=node_modules/solady/", "forge-std/=node_modules/forge-std/", "ds-test/=node_modules/ds-test/src/", "p256-verifier/=node_modules/p256-verifier/", "murky/=node_modules/murky/src/", "solidity-stringutils/=node_modules/solidity-stringutils/", "@taiko/blacklist/=node_modules/@taiko/supplementary-contracts/contracts/blacklist/", "openzeppelin-foundry-upgrades/=node_modules/openzeppelin-foundry-upgrades/src/", "hardhat/=node_modules/hardhat/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"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"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"}],"name":"EventCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"registrant","type":"address"},{"indexed":false,"internalType":"uint256","name":"eventId","type":"uint256"}],"name":"Registered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"eventId","type":"uint256"}],"name":"RegistrationClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"eventId","type":"uint256"}],"name":"RegistrationOpened","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"registrant","type":"address"},{"indexed":false,"internalType":"uint256","name":"eventId","type":"uint256"}],"name":"Unregistered","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EVENT_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_eventId","type":"uint256"}],"name":"closeRegistration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"createEvent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"eventId","type":"uint256"}],"name":"events","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"bool","name":"exists","type":"bool"},{"internalType":"bool","name":"registrationOpen","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_eventId","type":"uint256"}],"name":"getEvent","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"bool","name":"registrationOpen_","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getRegisteredEvents","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":"address","name":"account","type":"address"}],"name":"grantEventManagerRole","outputs":[],"stateMutability":"nonpayable","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":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"eventId","type":"uint256"},{"internalType":"address","name":"registrant","type":"address"}],"name":"isRegistered","outputs":[{"internalType":"bool","name":"isRegistered","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_eventId","type":"uint256"}],"name":"openRegistration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_eventId","type":"uint256"}],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"address","name":"account","type":"address"}],"name":"revokeEventManagerRole","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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_eventId","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"unregister","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561000f575f80fd5b5061001a5f33610020565b506100ee565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff166100e3575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556100993390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506100e8565b5f9150505b92915050565b611879806100fb5f395ff3fe608060405234801561000f575f80fd5b506004361061016d575f3560e01c806391d14854116100d9578063cca84a0c11610093578063e30c39781161006e578063e30c39781461034c578063ee69654a14610354578063f207564e14610367578063f2fde38b1461037a575f80fd5b8063cca84a0c14610313578063d547741f14610326578063da24490814610339575f80fd5b806391d14854146102865780639bc2bc7114610299578063a217fddf146102ac578063a903b497146102b3578063ab31803f146102c6578063b81f6e18146102e6575f80fd5b80635e54a1401161012a5780635e54a140146102195780636d1884e01461022c578063715018a61461024e57806379ba5097146102565780638129fc1c1461025e5780638da5cb5b14610266575f80fd5b806301ffc9a7146101715780630b79143014610199578063248a9ca3146101bc5780632f2ff15d146101dd57806336568abe146101f25780635948687314610205575b5f80fd5b61018461017f366004611404565b61038d565b60405190151581526020015b60405180910390f35b6101ac6101a7366004611432565b6103c3565b604051610190949392919061148c565b6101cf6101ca366004611432565b610477565b604051908152602001610190565b6101f06101eb3660046114d7565b610497565b005b6101f06102003660046114d7565b6104b9565b6101cf5f8051602061180483398151915281565b6101f0610227366004611432565b6104f1565b61023f61023a366004611432565b6105e7565b60405161019093929190611501565b6101f0610712565b6101f0610725565b6101f061076d565b61026e61089a565b6040516001600160a01b039091168152602001610190565b6101846102943660046114d7565b6108ce565b6101f06102a736600461153f565b610904565b6101cf5f81565b6101f06102c13660046115ea565b610a21565b6102d96102d43660046115ea565b610a46565b6040516101909190611603565b6101846102f43660046114d7565b600160209081525f928352604080842090915290825290205460ff1681565b6101f0610321366004611432565b610b94565b6101f06103343660046114d7565b610c7f565b6101f06103473660046115ea565b610c9b565b61026e610cbc565b6101f06103623660046114d7565b610ce4565b6101f0610375366004611432565b610efe565b6101f06103883660046115ea565b6110f7565b5f6001600160e01b03198216637965db0b60e01b14806103bd57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f60208190529081526040902080546001820180549192916103e490611646565b80601f016020809104026020016040519081016040528092919081815260200182805461041090611646565b801561045b5780601f106104325761010080835404028352916020019161045b565b820191905f5260205f20905b81548152906001019060200180831161043e57829003601f168201915b5050506002909301549192505060ff8082169161010090041684565b5f9081525f80516020611824833981519152602052604090206001015490565b6104a082610477565b6104a98161117c565b6104b38383611186565b50505050565b6001600160a01b03811633146104e25760405163334bd91960e11b815260040160405180910390fd5b6104ec8282611227565b505050565b5f805160206118048339815191526105088161117c565b5f8281526020819052604090206002015460ff166105415760405162461bcd60e51b81526004016105389061167e565b60405180910390fd5b5f82815260208190526040902060020154610100900460ff166105975760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e4818db1bdcd95960921b6044820152606401610538565b5f8281526020818152604091829020600201805461ff001916905590518381527f383b6ce38b867405b4f42fa404692e07842868068badd063c9bfeb0e7f263f6291015b60405180910390a15050565b5f81815260208190526040812060020154606090829060ff1661061c5760405162461bcd60e51b81526004016105389061167e565b5f805f8681526020019081526020015f206040518060800160405290815f820154815260200160018201805461065190611646565b80601f016020809104026020016040519081016040528092919081815260200182805461067d90611646565b80156106c85780601f1061069f576101008083540402835291602001916106c8565b820191905f5260205f20905b8154815290600101906020018083116106ab57829003601f168201915b50505091835250506002919091015460ff80821615156020808501919091526101009092041615156040909201919091528151908201516060909201519097919650945092505050565b61071a6112a0565b6107235f6112d2565b565b338061072f610cbc565b6001600160a01b0316146107615760405163118cdaa760e01b81526001600160a01b0382166004820152602401610538565b61076a816112d2565b50565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f811580156107b25750825b90505f8267ffffffffffffffff1660011480156107ce5750303b155b9050811580156107dc575080155b156107fa5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561082457845460ff60401b1916600160401b1785555b61082c61130a565b6108435f8051602061180483398151915233611186565b5061084d336112d2565b831561089357845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050565b5f807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b5f9182525f80516020611824833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f8051602061180483398151915261091b8161117c565b6002546040805160808101825282815260208082018681526001838501819052606084018190525f8681529283905293909120825181559051919290919082019061096690826116eb565b506040828101516002909201805460609094015115156101000261ff00199315159390931661ffff199094169390931791909117909155517f9ce3d6db707bca4ba0eabed8fba1e2c013a1c0bc1132a764170a7854d198c73d906109cd90839086906117ab565b60405180910390a16040518181527fe0a3eabfba8d6b242de244fdd6f0372ee66d472686b2cfd89420ef24c04622019060200160405180910390a160028054905f610a17836117cb565b9190505550505050565b5f610a2b8161117c565b610a425f8051602061180483398151915283610497565b5050565b60605f60025467ffffffffffffffff811115610a6457610a6461152b565b604051908082528060200260200182016040528015610a8d578160200160208202803683370190505b5090505f805b600254811015610afb575f8181526001602090815260408083206001600160a01b038916845290915290205460ff1615610af35780838381518110610ada57610ada6117ef565b602090810291909101015281610aef816117cb565b9250505b600101610a93565b505f8167ffffffffffffffff811115610b1657610b1661152b565b604051908082528060200260200182016040528015610b3f578160200160208202803683370190505b5090505f5b82811015610b8b57838181518110610b5e57610b5e6117ef565b6020026020010151828281518110610b7857610b786117ef565b6020908102919091010152600101610b44565b50949350505050565b5f80516020611804833981519152610bab8161117c565b5f8281526020819052604090206002015460ff16610bdb5760405162461bcd60e51b81526004016105389061167e565b5f82815260208190526040902060020154610100900460ff1615610c305760405162461bcd60e51b815260206004820152600c60248201526b20b63932b0b23c9037b832b760a11b6044820152606401610538565b5f8281526020819052604090819020600201805461ff001916610100179055517fe0a3eabfba8d6b242de244fdd6f0372ee66d472686b2cfd89420ef24c0462201906105db9084815260200190565b610c8882610477565b610c918161117c565b6104b38383611227565b5f610ca58161117c565b610a425f8051602061180483398151915283610c7f565b5f807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c006108be565b5f80516020611804833981519152610cfb8161117c565b5f805f8581526020019081526020015f206040518060800160405290815f8201548152602001600182018054610d3090611646565b80601f0160208091040260200160405190810160405280929190818152602001828054610d5c90611646565b8015610da75780601f10610d7e57610100808354040283529160200191610da7565b820191905f5260205f20905b815481529060010190602001808311610d8a57829003601f168201915b50505091835250506002919091015460ff80821615156020840152610100909104161515604091820152810151909150610df35760405162461bcd60e51b81526004016105389061167e565b8060600151610e3b5760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb9cc818db1bdcd95960621b6044820152606401610538565b5f8481526001602090815260408083206001600160a01b038716845290915290205460ff16610e9d5760405162461bcd60e51b815260206004820152600e60248201526d139bdd081c9959da5cdd195c995960921b6044820152606401610538565b5f8481526001602090815260408083206001600160a01b03871680855290835292819020805460ff19169055518681527f15f7469572dc44ee54c08cc4adf4e1031d7b6254626e8894015195a560039d09910160405180910390a250505050565b5f805f8381526020019081526020015f206040518060800160405290815f8201548152602001600182018054610f3390611646565b80601f0160208091040260200160405190810160405280929190818152602001828054610f5f90611646565b8015610faa5780601f10610f8157610100808354040283529160200191610faa565b820191905f5260205f20905b815481529060010190602001808311610f8d57829003601f168201915b50505091835250506002919091015460ff80821615156020840152610100909104161515604091820152810151909150610ff65760405162461bcd60e51b81526004016105389061167e565b806060015161103e5760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb9cc818db1bdcd95960621b6044820152606401610538565b5f82815260016020908152604080832033845290915290205460ff161561109c5760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e481c9959da5cdd195c995960721b6044820152606401610538565b5f8281526001602081815260408084203380865290835293819020805460ff191690931790925590518481527f6f3bf3fa84e4763a43b3d23f9d79be242d6d5c834941ff4c1111b67469e1150c910160405180910390a25050565b6110ff6112a0565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b038316908117825561114361089a565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b61076a8133611312565b5f5f8051602061182483398151915261119f84846108ce565b61121e575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556111d43390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506103bd565b5f9150506103bd565b5f5f8051602061182483398151915261124084846108ce565b1561121e575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506103bd565b336112a961089a565b6001600160a01b0316146107235760405163118cdaa760e01b8152336004820152602401610538565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155610a428261134b565b6107236113bb565b61131c82826108ce565b610a425760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610538565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661072357604051631afcd79f60e31b815260040160405180910390fd5b5f60208284031215611414575f80fd5b81356001600160e01b03198116811461142b575f80fd5b9392505050565b5f60208284031215611442575f80fd5b5035919050565b5f81518084525f5b8181101561146d57602081850181015186830182015201611451565b505f602082860101526020601f19601f83011685010191505092915050565b848152608060208201525f6114a46080830186611449565b93151560408301525090151560609091015292915050565b80356001600160a01b03811681146114d2575f80fd5b919050565b5f80604083850312156114e8575f80fd5b823591506114f8602084016114bc565b90509250929050565b838152606060208201525f6115196060830185611449565b90508215156040830152949350505050565b634e487b7160e01b5f52604160045260245ffd5b5f6020828403121561154f575f80fd5b813567ffffffffffffffff80821115611566575f80fd5b818401915084601f830112611579575f80fd5b81358181111561158b5761158b61152b565b604051601f8201601f19908116603f011681019083821181831017156115b3576115b361152b565b816040528281528760208487010111156115cb575f80fd5b826020860160208301375f928101602001929092525095945050505050565b5f602082840312156115fa575f80fd5b61142b826114bc565b602080825282518282018190525f9190848201906040850190845b8181101561163a5783518352928401929184019160010161161e565b50909695505050505050565b600181811c9082168061165a57607f821691505b60208210810361167857634e487b7160e01b5f52602260045260245ffd5b50919050565b6020808252600f908201526e115d995b9d081b9bdd08199bdd5b99608a1b604082015260600190565b601f8211156104ec57805f5260205f20601f840160051c810160208510156116cc5750805b601f840160051c820191505b81811015610893575f81556001016116d8565b815167ffffffffffffffff8111156117055761170561152b565b611719816117138454611646565b846116a7565b602080601f83116001811461174c575f84156117355750858301515b5f19600386901b1c1916600185901b1785556117a3565b5f85815260208120601f198616915b8281101561177a5788860151825594840194600190910190840161175b565b508582101561179757878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b828152604060208201525f6117c36040830184611449565b949350505050565b5f600182016117e857634e487b7160e01b5f52601160045260245ffd5b5060010190565b634e487b7160e01b5f52603260045260245ffdfea961ef34a96635180dfffd0ae574060d6c6af619ce89175a103711bf5ce8270802dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a26469706673582212208d2cf3764dae07505288d4a1f87fec1b7d2e5aaf7783350470e15bb5f190905a64736f6c63430008180033
Deployed Bytecode
0x608060405234801561000f575f80fd5b506004361061016d575f3560e01c806391d14854116100d9578063cca84a0c11610093578063e30c39781161006e578063e30c39781461034c578063ee69654a14610354578063f207564e14610367578063f2fde38b1461037a575f80fd5b8063cca84a0c14610313578063d547741f14610326578063da24490814610339575f80fd5b806391d14854146102865780639bc2bc7114610299578063a217fddf146102ac578063a903b497146102b3578063ab31803f146102c6578063b81f6e18146102e6575f80fd5b80635e54a1401161012a5780635e54a140146102195780636d1884e01461022c578063715018a61461024e57806379ba5097146102565780638129fc1c1461025e5780638da5cb5b14610266575f80fd5b806301ffc9a7146101715780630b79143014610199578063248a9ca3146101bc5780632f2ff15d146101dd57806336568abe146101f25780635948687314610205575b5f80fd5b61018461017f366004611404565b61038d565b60405190151581526020015b60405180910390f35b6101ac6101a7366004611432565b6103c3565b604051610190949392919061148c565b6101cf6101ca366004611432565b610477565b604051908152602001610190565b6101f06101eb3660046114d7565b610497565b005b6101f06102003660046114d7565b6104b9565b6101cf5f8051602061180483398151915281565b6101f0610227366004611432565b6104f1565b61023f61023a366004611432565b6105e7565b60405161019093929190611501565b6101f0610712565b6101f0610725565b6101f061076d565b61026e61089a565b6040516001600160a01b039091168152602001610190565b6101846102943660046114d7565b6108ce565b6101f06102a736600461153f565b610904565b6101cf5f81565b6101f06102c13660046115ea565b610a21565b6102d96102d43660046115ea565b610a46565b6040516101909190611603565b6101846102f43660046114d7565b600160209081525f928352604080842090915290825290205460ff1681565b6101f0610321366004611432565b610b94565b6101f06103343660046114d7565b610c7f565b6101f06103473660046115ea565b610c9b565b61026e610cbc565b6101f06103623660046114d7565b610ce4565b6101f0610375366004611432565b610efe565b6101f06103883660046115ea565b6110f7565b5f6001600160e01b03198216637965db0b60e01b14806103bd57506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f60208190529081526040902080546001820180549192916103e490611646565b80601f016020809104026020016040519081016040528092919081815260200182805461041090611646565b801561045b5780601f106104325761010080835404028352916020019161045b565b820191905f5260205f20905b81548152906001019060200180831161043e57829003601f168201915b5050506002909301549192505060ff8082169161010090041684565b5f9081525f80516020611824833981519152602052604090206001015490565b6104a082610477565b6104a98161117c565b6104b38383611186565b50505050565b6001600160a01b03811633146104e25760405163334bd91960e11b815260040160405180910390fd5b6104ec8282611227565b505050565b5f805160206118048339815191526105088161117c565b5f8281526020819052604090206002015460ff166105415760405162461bcd60e51b81526004016105389061167e565b60405180910390fd5b5f82815260208190526040902060020154610100900460ff166105975760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e4818db1bdcd95960921b6044820152606401610538565b5f8281526020818152604091829020600201805461ff001916905590518381527f383b6ce38b867405b4f42fa404692e07842868068badd063c9bfeb0e7f263f6291015b60405180910390a15050565b5f81815260208190526040812060020154606090829060ff1661061c5760405162461bcd60e51b81526004016105389061167e565b5f805f8681526020019081526020015f206040518060800160405290815f820154815260200160018201805461065190611646565b80601f016020809104026020016040519081016040528092919081815260200182805461067d90611646565b80156106c85780601f1061069f576101008083540402835291602001916106c8565b820191905f5260205f20905b8154815290600101906020018083116106ab57829003601f168201915b50505091835250506002919091015460ff80821615156020808501919091526101009092041615156040909201919091528151908201516060909201519097919650945092505050565b61071a6112a0565b6107235f6112d2565b565b338061072f610cbc565b6001600160a01b0316146107615760405163118cdaa760e01b81526001600160a01b0382166004820152602401610538565b61076a816112d2565b50565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f811580156107b25750825b90505f8267ffffffffffffffff1660011480156107ce5750303b155b9050811580156107dc575080155b156107fa5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561082457845460ff60401b1916600160401b1785555b61082c61130a565b6108435f8051602061180483398151915233611186565b5061084d336112d2565b831561089357845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050565b5f807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b5f9182525f80516020611824833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f8051602061180483398151915261091b8161117c565b6002546040805160808101825282815260208082018681526001838501819052606084018190525f8681529283905293909120825181559051919290919082019061096690826116eb565b506040828101516002909201805460609094015115156101000261ff00199315159390931661ffff199094169390931791909117909155517f9ce3d6db707bca4ba0eabed8fba1e2c013a1c0bc1132a764170a7854d198c73d906109cd90839086906117ab565b60405180910390a16040518181527fe0a3eabfba8d6b242de244fdd6f0372ee66d472686b2cfd89420ef24c04622019060200160405180910390a160028054905f610a17836117cb565b9190505550505050565b5f610a2b8161117c565b610a425f8051602061180483398151915283610497565b5050565b60605f60025467ffffffffffffffff811115610a6457610a6461152b565b604051908082528060200260200182016040528015610a8d578160200160208202803683370190505b5090505f805b600254811015610afb575f8181526001602090815260408083206001600160a01b038916845290915290205460ff1615610af35780838381518110610ada57610ada6117ef565b602090810291909101015281610aef816117cb565b9250505b600101610a93565b505f8167ffffffffffffffff811115610b1657610b1661152b565b604051908082528060200260200182016040528015610b3f578160200160208202803683370190505b5090505f5b82811015610b8b57838181518110610b5e57610b5e6117ef565b6020026020010151828281518110610b7857610b786117ef565b6020908102919091010152600101610b44565b50949350505050565b5f80516020611804833981519152610bab8161117c565b5f8281526020819052604090206002015460ff16610bdb5760405162461bcd60e51b81526004016105389061167e565b5f82815260208190526040902060020154610100900460ff1615610c305760405162461bcd60e51b815260206004820152600c60248201526b20b63932b0b23c9037b832b760a11b6044820152606401610538565b5f8281526020819052604090819020600201805461ff001916610100179055517fe0a3eabfba8d6b242de244fdd6f0372ee66d472686b2cfd89420ef24c0462201906105db9084815260200190565b610c8882610477565b610c918161117c565b6104b38383611227565b5f610ca58161117c565b610a425f8051602061180483398151915283610c7f565b5f807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c006108be565b5f80516020611804833981519152610cfb8161117c565b5f805f8581526020019081526020015f206040518060800160405290815f8201548152602001600182018054610d3090611646565b80601f0160208091040260200160405190810160405280929190818152602001828054610d5c90611646565b8015610da75780601f10610d7e57610100808354040283529160200191610da7565b820191905f5260205f20905b815481529060010190602001808311610d8a57829003601f168201915b50505091835250506002919091015460ff80821615156020840152610100909104161515604091820152810151909150610df35760405162461bcd60e51b81526004016105389061167e565b8060600151610e3b5760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb9cc818db1bdcd95960621b6044820152606401610538565b5f8481526001602090815260408083206001600160a01b038716845290915290205460ff16610e9d5760405162461bcd60e51b815260206004820152600e60248201526d139bdd081c9959da5cdd195c995960921b6044820152606401610538565b5f8481526001602090815260408083206001600160a01b03871680855290835292819020805460ff19169055518681527f15f7469572dc44ee54c08cc4adf4e1031d7b6254626e8894015195a560039d09910160405180910390a250505050565b5f805f8381526020019081526020015f206040518060800160405290815f8201548152602001600182018054610f3390611646565b80601f0160208091040260200160405190810160405280929190818152602001828054610f5f90611646565b8015610faa5780601f10610f8157610100808354040283529160200191610faa565b820191905f5260205f20905b815481529060010190602001808311610f8d57829003601f168201915b50505091835250506002919091015460ff80821615156020840152610100909104161515604091820152810151909150610ff65760405162461bcd60e51b81526004016105389061167e565b806060015161103e5760405162461bcd60e51b8152602060048201526014602482015273149959da5cdd1c985d1a5bdb9cc818db1bdcd95960621b6044820152606401610538565b5f82815260016020908152604080832033845290915290205460ff161561109c5760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e481c9959da5cdd195c995960721b6044820152606401610538565b5f8281526001602081815260408084203380865290835293819020805460ff191690931790925590518481527f6f3bf3fa84e4763a43b3d23f9d79be242d6d5c834941ff4c1111b67469e1150c910160405180910390a25050565b6110ff6112a0565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b038316908117825561114361089a565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b61076a8133611312565b5f5f8051602061182483398151915261119f84846108ce565b61121e575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556111d43390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506103bd565b5f9150506103bd565b5f5f8051602061182483398151915261124084846108ce565b1561121e575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506103bd565b336112a961089a565b6001600160a01b0316146107235760405163118cdaa760e01b8152336004820152602401610538565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155610a428261134b565b6107236113bb565b61131c82826108ce565b610a425760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610538565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff1661072357604051631afcd79f60e31b815260040160405180910390fd5b5f60208284031215611414575f80fd5b81356001600160e01b03198116811461142b575f80fd5b9392505050565b5f60208284031215611442575f80fd5b5035919050565b5f81518084525f5b8181101561146d57602081850181015186830182015201611451565b505f602082860101526020601f19601f83011685010191505092915050565b848152608060208201525f6114a46080830186611449565b93151560408301525090151560609091015292915050565b80356001600160a01b03811681146114d2575f80fd5b919050565b5f80604083850312156114e8575f80fd5b823591506114f8602084016114bc565b90509250929050565b838152606060208201525f6115196060830185611449565b90508215156040830152949350505050565b634e487b7160e01b5f52604160045260245ffd5b5f6020828403121561154f575f80fd5b813567ffffffffffffffff80821115611566575f80fd5b818401915084601f830112611579575f80fd5b81358181111561158b5761158b61152b565b604051601f8201601f19908116603f011681019083821181831017156115b3576115b361152b565b816040528281528760208487010111156115cb575f80fd5b826020860160208301375f928101602001929092525095945050505050565b5f602082840312156115fa575f80fd5b61142b826114bc565b602080825282518282018190525f9190848201906040850190845b8181101561163a5783518352928401929184019160010161161e565b50909695505050505050565b600181811c9082168061165a57607f821691505b60208210810361167857634e487b7160e01b5f52602260045260245ffd5b50919050565b6020808252600f908201526e115d995b9d081b9bdd08199bdd5b99608a1b604082015260600190565b601f8211156104ec57805f5260205f20601f840160051c810160208510156116cc5750805b601f840160051c820191505b81811015610893575f81556001016116d8565b815167ffffffffffffffff8111156117055761170561152b565b611719816117138454611646565b846116a7565b602080601f83116001811461174c575f84156117355750858301515b5f19600386901b1c1916600185901b1785556117a3565b5f85815260208120601f198616915b8281101561177a5788860151825594840194600190910190840161175b565b508582101561179757878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b828152604060208201525f6117c36040830184611449565b949350505050565b5f600182016117e857634e487b7160e01b5f52601160045260245ffd5b5060010190565b634e487b7160e01b5f52603260045260245ffdfea961ef34a96635180dfffd0ae574060d6c6af619ce89175a103711bf5ce8270802dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a26469706673582212208d2cf3764dae07505288d4a1f87fec1b7d2e5aaf7783350470e15bb5f190905a64736f6c63430008180033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.