Skip to content
ClearClear
Docs
Protocol/NetworkRegistry

NetworkRegistry

Source: contracts/peripherals/NetworkRegistry.sol · Guide: credit · Upgradeable (UUPS proxy)

1 min readUpdated View source

On this page
Network
Chain id
Address
Base Sepolia
84532

Functions that change state

Function
Who can call
Also
deregisterIssuer(address issuer)
onlyRole(OPERATOR_ROLE)
enrolMember(address member, address issuer)
Anyone; acts on the caller's own account
grantRole(bytes32 role, address account)
The role's admin role (DEFAULT_ADMIN_ROLE unless set otherwise)
initialize(address admin)
Once, when the proxy is initialised
registerIssuer(address issuer, address stableCredit, address assurancePool, address assuranceOracle)
onlyRole(OPERATOR_ROLE)
renounceRole(bytes32 role, address account)
Only the account renouncing its own role
revokeRole(bytes32 role, address account)
The role's admin role (DEFAULT_ADMIN_ROLE unless set otherwise)
upgradeTo(address newImplementation)
onlyRole(DEFAULT_ADMIN_ROLE) (via _authorizeUpgrade)
upgradeToAndCall(address newImplementation, bytes data)
onlyRole(DEFAULT_ADMIN_ROLE) (via _authorizeUpgrade)
payable
withdrawMember(address member, address issuer)
Anyone; acts on the caller's own account

Read functions

Anyone can call these; they change nothing.

Function
Returns
DEFAULT_ADMIN_ROLE()
bytes32
enrolledCount(address)
uint256
enrolledCountOf(address issuer)
uint256
getRoleAdmin(bytes32 role)
bytes32
hasRole(bytes32 role, address account)
bool
isEnrolled(address member, address issuer)
bool
isIssuer(address issuer)
bool
isIssuerOf(address issuer, address stableCredit)
bool
issuerCountOf(address member)
uint256
issuersOf(address member)
address[]
networkOf(address issuer)
(address,address,address)
OPERATOR_ROLE()
bytes32
proxiableUUID()
bytes32
supportsInterface(bytes4 interfaceId)
bool

Events

Event
AdminChanged(address previousAdmin, address newAdmin)
BeaconUpgraded(address beacon indexed)
Initialized(uint8 version)
IssuerDeregistered(address issuer indexed)
IssuerRegistered(address issuer indexed, address stableCredit indexed, address assurancePool, address assuranceOracle)
MemberEnrolled(address member indexed, address issuer indexed)
MemberWithdrawn(address member indexed, address issuer indexed)
RoleAdminChanged(bytes32 role indexed, bytes32 previousAdminRole indexed, bytes32 newAdminRole indexed)
RoleGranted(bytes32 role indexed, address account indexed, address sender indexed)
RoleRevoked(bytes32 role indexed, address account indexed, address sender indexed)
Upgraded(address implementation indexed)

Errors

Error
NetworkRegistryInvalidAddress()
NetworkRegistryIssuerAlreadyRegistered(address issuer)
NetworkRegistryMemberStillEnrolled(address issuer)
NetworkRegistryUnauthorized(address caller)
NetworkRegistryUnknownIssuer(address issuer)