Source Code
Overview
ETH Balance
ETH Value
$0.00Latest 25 from a total of 79,409 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Register | 2228335 | 153 days ago | IN | 0 ETH | 0.00000442 | ||||
| Register | 2197480 | 154 days ago | IN | 0 ETH | 0.0000063 | ||||
| Register | 2197452 | 154 days ago | IN | 0 ETH | 0.0000063 | ||||
| Register | 2197420 | 154 days ago | IN | 0 ETH | 0.0000063 | ||||
| Register | 2197391 | 154 days ago | IN | 0 ETH | 0.0000063 | ||||
| Register | 2197357 | 154 days ago | IN | 0 ETH | 0.00000609 | ||||
| Register | 2197323 | 154 days ago | IN | 0 ETH | 0.00000609 | ||||
| Register | 2197165 | 154 days ago | IN | 0 ETH | 0.0000041 | ||||
| Register | 2194451 | 154 days ago | IN | 0 ETH | 0.00000425 | ||||
| Register | 2193516 | 154 days ago | IN | 0 ETH | 0.00000442 | ||||
| Register | 2191670 | 154 days ago | IN | 0 ETH | 0.00000646 | ||||
| Register | 2191653 | 154 days ago | IN | 0 ETH | 0.00000656 | ||||
| Register | 2190553 | 154 days ago | IN | 0 ETH | 0.00000656 | ||||
| Register | 2189864 | 154 days ago | IN | 0 ETH | 0.00000435 | ||||
| Register | 2189842 | 154 days ago | IN | 0 ETH | 0.00000651 | ||||
| Register | 2189796 | 154 days ago | IN | 0 ETH | 0.00000651 | ||||
| Register | 2189715 | 154 days ago | IN | 0 ETH | 0.00000651 | ||||
| Register | 2155320 | 155 days ago | IN | 0 ETH | 0.00000442 | ||||
| Register | 2151283 | 155 days ago | IN | 0 ETH | 0.00000442 | ||||
| Register | 2151200 | 155 days ago | IN | 0 ETH | 0.00000656 | ||||
| Register | 2137197 | 156 days ago | IN | 0 ETH | 0.00000882 | ||||
| Register | 2122163 | 156 days ago | IN | 0 ETH | 0.00000442 | ||||
| Register | 2102059 | 157 days ago | IN | 0 ETH | 0.00000525 | ||||
| Register | 2101651 | 157 days ago | IN | 0 ETH | 0.00000177 | ||||
| Register | 2101579 | 157 days ago | IN | 0 ETH | 0.00000088 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PhasedEventRegister
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;
import { Ownable2StepUpgradeable } from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol";
import { AccessControlUpgradeable } from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
/**
* @title PhasedEventRegister
* @notice A contract that allows authorized managers to create multi-phase events, manage user registrations per phase,
* and track whether a user participated in any or all phases using role-based access control.
* @dev Utilizes OpenZeppelin's AccessControl for role management. The contract does not hold any Ether.
*/
contract PhasedEventRegister is Ownable2StepUpgradeable, AccessControlUpgradeable {
bytes32 public constant EVENT_MANAGER_ROLE = keccak256("EVENT_MANAGER_ROLE");
struct Event {
uint256 id;
string name;
uint256 totalPhases;
}
mapping(uint256 eventId => Event) public events;
mapping(uint256 eventId => mapping(uint256 phaseId => bool isOpen)) public phaseOpen;
mapping(uint256 eventId => mapping(uint256 phaseId => mapping(address registrant => uint256 timestamp))) public registrations;
event EventCreated(uint256 indexed id, string name);
event Registered(address indexed registrant, uint256 indexed eventId, uint256 indexed phaseId);
event Unregistered(address indexed registrant, uint256 indexed eventId, uint256 indexed phaseId);
event PhaseOpened(uint256 indexed eventId, uint256 indexed phaseId);
event PhaseClosed(uint256 indexed eventId, uint256 indexed phaseId);
uint256 private nextEventId;
error PHASE_CLOSED();
error INVALID_EVENT_ID();
error INVALID_PHASE_ID();
/**
* @notice Initializes the contract and grants roles to the deployer.
* @dev Grants `DEFAULT_ADMIN_ROLE` and `EVENT_MANAGER_ROLE` to the deployer.
*/
function initialize() external initializer {
__Context_init();
_grantRole(EVENT_MANAGER_ROLE, _msgSender());
_transferOwnership(_msgSender());
}
/**
* @notice Constructor for compatibility. Grants admin role to deployer.
*/
constructor() {
_grantRole(DEFAULT_ADMIN_ROLE, _msgSender());
}
/**
* @notice Grants the EVENT_MANAGER_ROLE to a specified account.
* @param account The address to be granted the EVENT_MANAGER_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.
* @param account The address from which the EVENT_MANAGER_ROLE will be revoked.
*/
function revokeEventManagerRole(address account) external onlyRole(DEFAULT_ADMIN_ROLE) {
revokeRole(EVENT_MANAGER_ROLE, account);
}
/**
* @notice Creates a new event with the given name and number of phases.
* @param _name The name of the event to be created.
* @param _totalPhases The number of registration phases.
*
* Requirements:
* - Event IDs start from 1.
* - All phase IDs for this event will be [1.._totalPhases].
*/
function createEvent(string memory _name, uint256 _totalPhases) external onlyRole(EVENT_MANAGER_ROLE) {
nextEventId++;
uint256 eventId = nextEventId;
events[eventId] = Event({ id: eventId, name: _name, totalPhases: _totalPhases });
for (uint256 i = 1; i <= _totalPhases; i++) {
phaseOpen[eventId][i] = false;
emit PhaseOpened(eventId, i);
}
emit EventCreated(eventId, _name);
}
/**
* @notice Opens registrations for a specific phase of an event.
* @param _eventId The ID of the event.
* @param _phaseId The phase to be opened.
*/
function openPhase(uint256 _eventId, uint256 _phaseId) external onlyRole(EVENT_MANAGER_ROLE) {
_validateIds(_eventId, _phaseId);
phaseOpen[_eventId][_phaseId] = true;
emit PhaseOpened(_eventId, _phaseId);
}
/**
* @notice Closes registrations for a specific phase of an event.
* @param _eventId The ID of the event.
* @param _phaseId The phase to be closed.
*/
function closePhase(uint256 _eventId, uint256 _phaseId) external onlyRole(EVENT_MANAGER_ROLE) {
_validateIds(_eventId, _phaseId);
phaseOpen[_eventId][_phaseId] = false;
emit PhaseClosed(_eventId, _phaseId);
}
/**
* @notice Registers the caller for a specific phase of an event.
* @param _eventId The ID of the event.
* @param _phaseId The phase to register for.
*/
function register(uint256 _eventId, uint256 _phaseId) external {
_validateIds(_eventId, _phaseId);
if (!phaseOpen[_eventId][_phaseId]) revert PHASE_CLOSED();
registrations[_eventId][_phaseId][_msgSender()] = block.timestamp;
emit Registered(_msgSender(), _eventId, _phaseId);
}
/**
* @notice Unregisters a user from a specific phase.
* @param _eventId The ID of the event.
* @param _phaseId The ID of the phase.
* @param _user The address of the user to unregister.
*/
function unregister(uint256 _eventId, uint256 _phaseId, address _user) external onlyRole(EVENT_MANAGER_ROLE) {
_validateIds(_eventId, _phaseId);
registrations[_eventId][_phaseId][_user] = 0;
emit Unregistered(_user, _eventId, _phaseId);
}
/**
* @notice Retrieves the registration status for a user in all phases of an event.
* @param _eventId The ID of the event.
* @param _user The address to check.
* @return registered An array of booleans representing registration status for each phase.
*/
function getRegistrationStatus(uint256 _eventId, address _user)
external
view
returns (bool[] memory registered)
{
if (!(_eventId > 0 && _eventId <= nextEventId)) revert INVALID_EVENT_ID();
uint256 total = events[_eventId].totalPhases;
registered = new bool[](total);
for (uint256 i = 1; i <= total; i++) {
registered[i - 1] = registrations[_eventId][i][_user] > 0;
}
}
/**
* @notice Retrieves event details.
* @param _eventId The ID of the event.
* @return id Event ID.
* @return name Event name.
* @return totalPhases Total number of phases.
*/
function getEvent(uint256 _eventId)
external
view
returns (uint256 id, string memory name, uint256 totalPhases)
{
if (!(_eventId > 0 && _eventId <= nextEventId)) revert INVALID_EVENT_ID();
Event memory e = events[_eventId];
return (e.id, e.name, e.totalPhases);
}
/**
* @dev Validates event and phase IDs.
*/
function _validateIds(uint256 _eventId, uint256 _phaseId) internal view {
if (!(_eventId > 0 && _eventId <= nextEventId)) revert INVALID_EVENT_ID();
if (!(_phaseId > 0 && _phaseId <= events[_eventId].totalPhases)) revert INVALID_PHASE_ID();
}
}// 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-mono/packages/supplementary-contracts/contracts/blacklist/",
"openzeppelin-foundry-upgrades/=node_modules/openzeppelin-foundry-upgrades/src/",
"taiko-mono/=node_modules/taiko-mono/"
],
"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":"INVALID_EVENT_ID","type":"error"},{"inputs":[],"name":"INVALID_PHASE_ID","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"},{"inputs":[],"name":"PHASE_CLOSED","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"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":"uint256","name":"eventId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"phaseId","type":"uint256"}],"name":"PhaseClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"eventId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"phaseId","type":"uint256"}],"name":"PhaseOpened","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"registrant","type":"address"},{"indexed":true,"internalType":"uint256","name":"eventId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"phaseId","type":"uint256"}],"name":"Registered","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":true,"internalType":"uint256","name":"eventId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"phaseId","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"},{"internalType":"uint256","name":"_phaseId","type":"uint256"}],"name":"closePhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_totalPhases","type":"uint256"}],"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":"uint256","name":"totalPhases","type":"uint256"}],"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":"uint256","name":"totalPhases","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_eventId","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"getRegistrationStatus","outputs":[{"internalType":"bool[]","name":"registered","type":"bool[]"}],"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":"uint256","name":"_phaseId","type":"uint256"}],"name":"openPhase","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"},{"internalType":"uint256","name":"phaseId","type":"uint256"}],"name":"phaseOpen","outputs":[{"internalType":"bool","name":"isOpen","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_eventId","type":"uint256"},{"internalType":"uint256","name":"_phaseId","type":"uint256"}],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"eventId","type":"uint256"},{"internalType":"uint256","name":"phaseId","type":"uint256"},{"internalType":"address","name":"registrant","type":"address"}],"name":"registrations","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","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":"uint256","name":"_phaseId","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"unregister","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561000f575f80fd5b5061001a5f33610020565b506100ee565b5f8281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602081815260408084206001600160a01b038616855290915282205460ff166100e3575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556100993390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506100e8565b5f9150505b92915050565b6114ba806100fb5f395ff3fe608060405234801561000f575f80fd5b5060043610610187575f3560e01c80638129fc1c116100d9578063a903b49711610093578063d66d6c101161006e578063d66d6c1014610386578063da24490814610399578063e30c3978146103ac578063f2fde38b146103b4575f80fd5b8063a903b4971461034d578063b150f6fe14610360578063d547741f14610373575f80fd5b80638129fc1c146102e55780638da5cb5b146102ed57806391d148541461030d57806399eba6d4146103205780639a4d438514610333578063a217fddf14610346575f80fd5b806336568abe11610144578063594868731161011f57806359486873146102ae5780636d1884e0146102c2578063715018a6146102d557806379ba5097146102dd575f80fd5b806336568abe1461024e5780633b655aff146102615780633d6f48dd14610281575f80fd5b806301ffc9a71461018b57806305595f90146101b35780630b791430146101f15780631971bdfe14610213578063248a9ca3146102285780632f2ff15d1461023b575b5f80fd5b61019e61019936600461103b565b6103c7565b60405190151581526020015b60405180910390f35b6101e36101c1366004611084565b600260209081525f938452604080852082529284528284209052825290205481565b6040519081526020016101aa565b6102046101ff3660046110b6565b6103fd565b6040516101aa93929190611110565b610226610221366004611138565b6104a5565b005b6101e36102363660046110b6565b610519565b610226610249366004611158565b610539565b61022661025c366004611158565b61055b565b61027461026f366004611158565b610593565b6040516101aa9190611182565b61019e61028f366004611138565b600160209081525f928352604080842090915290825290205460ff1681565b6101e35f8051602061144583398151915281565b6102046102d03660046110b6565b610695565b6102266107a1565b6102266107b4565b610226610801565b6102f561092e565b6040516001600160a01b0390911681526020016101aa565b61019e61031b366004611158565b610962565b61022661032e366004611138565b610998565b6102266103413660046111db565b610a08565b6101e35f81565b61022661035b36600461128a565b610b27565b61022661036e366004611084565b610b4c565b610226610381366004611158565b610bca565b610226610394366004611138565b610be6565b6102266103a736600461128a565b610c7b565b6102f5610c9c565b6102266103c236600461128a565b610cc4565b5f6001600160e01b03198216637965db0b60e01b14806103f757506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f602081905290815260409020805460018201805491929161041e906112a3565b80601f016020809104026020016040519081016040528092919081815260200182805461044a906112a3565b80156104955780601f1061046c57610100808354040283529160200191610495565b820191905f5260205f20905b81548152906001019060200180831161047857829003601f168201915b5050505050908060020154905083565b5f805160206114458339815191526104bc81610d49565b6104c68383610d53565b5f838152600160208181526040808420868552909152808320805460ff191690921790915551839185917f5c588add5e7e61632888747e2a2ee0a519035d1bc1dde887874ba79b121361089190a3505050565b5f9081525f80516020611465833981519152602052604090206001015490565b61054282610519565b61054b81610d49565b6105558383610dbd565b50505050565b6001600160a01b03811633146105845760405163334bd91960e11b815260040160405180910390fd5b61058e8282610e5e565b505050565b60605f831180156105a657506003548311155b6105c35760405163b790ffed60e01b815260040160405180910390fd5b5f838152602081905260409020600201548067ffffffffffffffff8111156105ed576105ed6111c7565b604051908082528060200260200182016040528015610616578160200160208202803683370190505b50915060015b81811161068d575f85815260026020908152604080832084845282528083206001600160a01b038816845290915290205415158361065b6001846112ef565b8151811061066b5761066b611302565b911515602092830291909101909101528061068581611316565b91505061061c565b505092915050565b5f60605f80841180156106aa57506003548411155b6106c75760405163b790ffed60e01b815260040160405180910390fd5b5f805f8681526020019081526020015f206040518060600160405290815f82015481526020016001820180546106fc906112a3565b80601f0160208091040260200160405190810160405280929190818152602001828054610728906112a3565b80156107735780601f1061074a57610100808354040283529160200191610773565b820191905f5260205f20905b81548152906001019060200180831161075657829003601f168201915b5050509183525050600291909101546020918201528151908201516040909201519097919650945092505050565b6107a9610ed7565b6107b25f610f09565b565b33806107be610c9c565b6001600160a01b0316146107f55760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6107fe81610f09565b50565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f811580156108465750825b90505f8267ffffffffffffffff1660011480156108625750303b155b905081158015610870575080155b1561088e5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156108b857845460ff60401b1916600160401b1785555b6108c0610f41565b6108d75f8051602061144583398151915233610dbd565b506108e133610f09565b831561092757845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050565b5f807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b5f9182525f80516020611465833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f805160206114458339815191526109af81610d49565b6109b98383610d53565b5f838152600160209081526040808320858452909152808220805460ff1916905551839185917fef2e158490c6b144fca39862879b9941f80a29d0ee9b2f4cf528ca4d861a3cc09190a3505050565b5f80516020611445833981519152610a1f81610d49565b60038054905f610a2e83611316565b90915550506003546040805160608101825282815260208082018781528284018790525f858152918290529290208151815591519091906001820190610a749082611372565b506040919091015160029091015560015b838111610ae8575f828152600160209081526040808320848452909152808220805460ff1916905551829184917f5c588add5e7e61632888747e2a2ee0a519035d1bc1dde887874ba79b121361089190a380610ae081611316565b915050610a85565b50807f9ce3d6db707bca4ba0eabed8fba1e2c013a1c0bc1132a764170a7854d198c73d85604051610b199190611432565b60405180910390a250505050565b5f610b3181610d49565b610b485f8051602061144583398151915283610539565b5050565b5f80516020611445833981519152610b6381610d49565b610b6d8484610d53565b5f84815260026020908152604080832086845282528083206001600160a01b03861680855292528083208390555185928792917f743f43fbe8ff6d6517d66909307e701f949e29a6dc784e95d4ffd77150f8171e9190a450505050565b610bd382610519565b610bdc81610d49565b6105558383610e5e565b610bf08282610d53565b5f82815260016020908152604080832084845290915290205460ff16610c295760405163cc69084f60e01b815260040160405180910390fd5b5f82815260026020908152604080832084845282528083203380855292528083204290555183928592917fcda33a906ffa8a5f960826827500581f4613a5db7a84b250433e0d591a6309389190a45050565b5f610c8581610d49565b610b485f8051602061144583398151915283610bca565b5f807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610952565b610ccc610ed7565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b0383169081178255610d1061092e565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b6107fe8133610f49565b5f82118015610d6457506003548211155b610d815760405163b790ffed60e01b815260040160405180910390fd5b5f81118015610da057505f828152602081905260409020600201548111155b610b485760405163681f7e7760e01b815260040160405180910390fd5b5f5f80516020611465833981519152610dd68484610962565b610e55575f848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055610e0b3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506103f7565b5f9150506103f7565b5f5f80516020611465833981519152610e778484610962565b15610e55575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506103f7565b33610ee061092e565b6001600160a01b0316146107b25760405163118cdaa760e01b81523360048201526024016107ec565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155610b4882610f82565b6107b2610ff2565b610f538282610962565b610b485760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016107ec565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166107b257604051631afcd79f60e31b815260040160405180910390fd5b5f6020828403121561104b575f80fd5b81356001600160e01b031981168114611062575f80fd5b9392505050565b80356001600160a01b038116811461107f575f80fd5b919050565b5f805f60608486031215611096575f80fd5b83359250602084013591506110ad60408501611069565b90509250925092565b5f602082840312156110c6575f80fd5b5035919050565b5f81518084525f5b818110156110f1576020818501810151868301820152016110d5565b505f602082860101526020601f19601f83011685010191505092915050565b838152606060208201525f61112860608301856110cd565b9050826040830152949350505050565b5f8060408385031215611149575f80fd5b50508035926020909101359150565b5f8060408385031215611169575f80fd5b8235915061117960208401611069565b90509250929050565b602080825282518282018190525f9190848201906040850190845b818110156111bb57835115158352928401929184019160010161119d565b50909695505050505050565b634e487b7160e01b5f52604160045260245ffd5b5f80604083850312156111ec575f80fd5b823567ffffffffffffffff80821115611203575f80fd5b818501915085601f830112611216575f80fd5b813581811115611228576112286111c7565b604051601f8201601f19908116603f01168101908382118183101715611250576112506111c7565b81604052828152886020848701011115611268575f80fd5b826020860160208301375f602093820184015298969091013596505050505050565b5f6020828403121561129a575f80fd5b61106282611069565b600181811c908216806112b757607f821691505b6020821081036112d557634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156103f7576103f76112db565b634e487b7160e01b5f52603260045260245ffd5b5f60018201611327576113276112db565b5060010190565b601f82111561058e57805f5260205f20601f840160051c810160208510156113535750805b601f840160051c820191505b81811015610927575f815560010161135f565b815167ffffffffffffffff81111561138c5761138c6111c7565b6113a08161139a84546112a3565b8461132e565b602080601f8311600181146113d3575f84156113bc5750858301515b5f19600386901b1c1916600185901b17855561142a565b5f85815260208120601f198616915b82811015611401578886015182559484019460019091019084016113e2565b508582101561141e57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b602081525f61106260208301846110cd56fea961ef34a96635180dfffd0ae574060d6c6af619ce89175a103711bf5ce8270802dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a26469706673582212208d68f915f52bc6adfc26474d89f96aa9350e365acbe43d56e93c32edd479caa364736f6c63430008180033
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610187575f3560e01c80638129fc1c116100d9578063a903b49711610093578063d66d6c101161006e578063d66d6c1014610386578063da24490814610399578063e30c3978146103ac578063f2fde38b146103b4575f80fd5b8063a903b4971461034d578063b150f6fe14610360578063d547741f14610373575f80fd5b80638129fc1c146102e55780638da5cb5b146102ed57806391d148541461030d57806399eba6d4146103205780639a4d438514610333578063a217fddf14610346575f80fd5b806336568abe11610144578063594868731161011f57806359486873146102ae5780636d1884e0146102c2578063715018a6146102d557806379ba5097146102dd575f80fd5b806336568abe1461024e5780633b655aff146102615780633d6f48dd14610281575f80fd5b806301ffc9a71461018b57806305595f90146101b35780630b791430146101f15780631971bdfe14610213578063248a9ca3146102285780632f2ff15d1461023b575b5f80fd5b61019e61019936600461103b565b6103c7565b60405190151581526020015b60405180910390f35b6101e36101c1366004611084565b600260209081525f938452604080852082529284528284209052825290205481565b6040519081526020016101aa565b6102046101ff3660046110b6565b6103fd565b6040516101aa93929190611110565b610226610221366004611138565b6104a5565b005b6101e36102363660046110b6565b610519565b610226610249366004611158565b610539565b61022661025c366004611158565b61055b565b61027461026f366004611158565b610593565b6040516101aa9190611182565b61019e61028f366004611138565b600160209081525f928352604080842090915290825290205460ff1681565b6101e35f8051602061144583398151915281565b6102046102d03660046110b6565b610695565b6102266107a1565b6102266107b4565b610226610801565b6102f561092e565b6040516001600160a01b0390911681526020016101aa565b61019e61031b366004611158565b610962565b61022661032e366004611138565b610998565b6102266103413660046111db565b610a08565b6101e35f81565b61022661035b36600461128a565b610b27565b61022661036e366004611084565b610b4c565b610226610381366004611158565b610bca565b610226610394366004611138565b610be6565b6102266103a736600461128a565b610c7b565b6102f5610c9c565b6102266103c236600461128a565b610cc4565b5f6001600160e01b03198216637965db0b60e01b14806103f757506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f602081905290815260409020805460018201805491929161041e906112a3565b80601f016020809104026020016040519081016040528092919081815260200182805461044a906112a3565b80156104955780601f1061046c57610100808354040283529160200191610495565b820191905f5260205f20905b81548152906001019060200180831161047857829003601f168201915b5050505050908060020154905083565b5f805160206114458339815191526104bc81610d49565b6104c68383610d53565b5f838152600160208181526040808420868552909152808320805460ff191690921790915551839185917f5c588add5e7e61632888747e2a2ee0a519035d1bc1dde887874ba79b121361089190a3505050565b5f9081525f80516020611465833981519152602052604090206001015490565b61054282610519565b61054b81610d49565b6105558383610dbd565b50505050565b6001600160a01b03811633146105845760405163334bd91960e11b815260040160405180910390fd5b61058e8282610e5e565b505050565b60605f831180156105a657506003548311155b6105c35760405163b790ffed60e01b815260040160405180910390fd5b5f838152602081905260409020600201548067ffffffffffffffff8111156105ed576105ed6111c7565b604051908082528060200260200182016040528015610616578160200160208202803683370190505b50915060015b81811161068d575f85815260026020908152604080832084845282528083206001600160a01b038816845290915290205415158361065b6001846112ef565b8151811061066b5761066b611302565b911515602092830291909101909101528061068581611316565b91505061061c565b505092915050565b5f60605f80841180156106aa57506003548411155b6106c75760405163b790ffed60e01b815260040160405180910390fd5b5f805f8681526020019081526020015f206040518060600160405290815f82015481526020016001820180546106fc906112a3565b80601f0160208091040260200160405190810160405280929190818152602001828054610728906112a3565b80156107735780601f1061074a57610100808354040283529160200191610773565b820191905f5260205f20905b81548152906001019060200180831161075657829003601f168201915b5050509183525050600291909101546020918201528151908201516040909201519097919650945092505050565b6107a9610ed7565b6107b25f610f09565b565b33806107be610c9c565b6001600160a01b0316146107f55760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6107fe81610f09565b50565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff165f811580156108465750825b90505f8267ffffffffffffffff1660011480156108625750303b155b905081158015610870575080155b1561088e5760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156108b857845460ff60401b1916600160401b1785555b6108c0610f41565b6108d75f8051602061144583398151915233610dbd565b506108e133610f09565b831561092757845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050565b5f807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b5f9182525f80516020611465833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b5f805160206114458339815191526109af81610d49565b6109b98383610d53565b5f838152600160209081526040808320858452909152808220805460ff1916905551839185917fef2e158490c6b144fca39862879b9941f80a29d0ee9b2f4cf528ca4d861a3cc09190a3505050565b5f80516020611445833981519152610a1f81610d49565b60038054905f610a2e83611316565b90915550506003546040805160608101825282815260208082018781528284018790525f858152918290529290208151815591519091906001820190610a749082611372565b506040919091015160029091015560015b838111610ae8575f828152600160209081526040808320848452909152808220805460ff1916905551829184917f5c588add5e7e61632888747e2a2ee0a519035d1bc1dde887874ba79b121361089190a380610ae081611316565b915050610a85565b50807f9ce3d6db707bca4ba0eabed8fba1e2c013a1c0bc1132a764170a7854d198c73d85604051610b199190611432565b60405180910390a250505050565b5f610b3181610d49565b610b485f8051602061144583398151915283610539565b5050565b5f80516020611445833981519152610b6381610d49565b610b6d8484610d53565b5f84815260026020908152604080832086845282528083206001600160a01b03861680855292528083208390555185928792917f743f43fbe8ff6d6517d66909307e701f949e29a6dc784e95d4ffd77150f8171e9190a450505050565b610bd382610519565b610bdc81610d49565b6105558383610e5e565b610bf08282610d53565b5f82815260016020908152604080832084845290915290205460ff16610c295760405163cc69084f60e01b815260040160405180910390fd5b5f82815260026020908152604080832084845282528083203380855292528083204290555183928592917fcda33a906ffa8a5f960826827500581f4613a5db7a84b250433e0d591a6309389190a45050565b5f610c8581610d49565b610b485f8051602061144583398151915283610bca565b5f807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610952565b610ccc610ed7565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b0383169081178255610d1061092e565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b6107fe8133610f49565b5f82118015610d6457506003548211155b610d815760405163b790ffed60e01b815260040160405180910390fd5b5f81118015610da057505f828152602081905260409020600201548111155b610b485760405163681f7e7760e01b815260040160405180910390fd5b5f5f80516020611465833981519152610dd68484610962565b610e55575f848152602082815260408083206001600160a01b03871684529091529020805460ff19166001179055610e0b3390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506103f7565b5f9150506103f7565b5f5f80516020611465833981519152610e778484610962565b15610e55575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506103f7565b33610ee061092e565b6001600160a01b0316146107b25760405163118cdaa760e01b81523360048201526024016107ec565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319168155610b4882610f82565b6107b2610ff2565b610f538282610962565b610b485760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016107ec565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166107b257604051631afcd79f60e31b815260040160405180910390fd5b5f6020828403121561104b575f80fd5b81356001600160e01b031981168114611062575f80fd5b9392505050565b80356001600160a01b038116811461107f575f80fd5b919050565b5f805f60608486031215611096575f80fd5b83359250602084013591506110ad60408501611069565b90509250925092565b5f602082840312156110c6575f80fd5b5035919050565b5f81518084525f5b818110156110f1576020818501810151868301820152016110d5565b505f602082860101526020601f19601f83011685010191505092915050565b838152606060208201525f61112860608301856110cd565b9050826040830152949350505050565b5f8060408385031215611149575f80fd5b50508035926020909101359150565b5f8060408385031215611169575f80fd5b8235915061117960208401611069565b90509250929050565b602080825282518282018190525f9190848201906040850190845b818110156111bb57835115158352928401929184019160010161119d565b50909695505050505050565b634e487b7160e01b5f52604160045260245ffd5b5f80604083850312156111ec575f80fd5b823567ffffffffffffffff80821115611203575f80fd5b818501915085601f830112611216575f80fd5b813581811115611228576112286111c7565b604051601f8201601f19908116603f01168101908382118183101715611250576112506111c7565b81604052828152886020848701011115611268575f80fd5b826020860160208301375f602093820184015298969091013596505050505050565b5f6020828403121561129a575f80fd5b61106282611069565b600181811c908216806112b757607f821691505b6020821081036112d557634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156103f7576103f76112db565b634e487b7160e01b5f52603260045260245ffd5b5f60018201611327576113276112db565b5060010190565b601f82111561058e57805f5260205f20601f840160051c810160208510156113535750805b601f840160051c820191505b81811015610927575f815560010161135f565b815167ffffffffffffffff81111561138c5761138c6111c7565b6113a08161139a84546112a3565b8461132e565b602080601f8311600181146113d3575f84156113bc5750858301515b5f19600386901b1c1916600185901b17855561142a565b5f85815260208120601f198616915b82811015611401578886015182559484019460019091019084016113e2565b508582101561141e57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b602081525f61106260208301846110cd56fea961ef34a96635180dfffd0ae574060d6c6af619ce89175a103711bf5ce8270802dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a26469706673582212208d68f915f52bc6adfc26474d89f96aa9350e365acbe43d56e93c32edd479caa364736f6c63430008180033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.