Attestations

Celo

0xdc553892cdeeed9f575aa0fba099e5847fd88d20

Proxy implementation: 0xf65903343712820ef19090c15051687b9363758c

Solidity v0.5.13+commit.5b0b510c

🤖
Query this contract from your AI
Reference: 0xdc553892cdeeed9f575aa0fba099e5847fd88d20
Sample prompt: "Tell me the current state of celo/0xdc553892cdeeed9f575aa0fba099e5847fd88d20"
No AI wired up yet? → mcp.smarts.md
Celo is a docs-only chain on Smarts: source code and ABI are indexed, but live on-chain data (state, recent events, admin profile) is not currently available. AI agents can still query get_contract_info and get_contract_source via MCP.

Overview

Read Functions
22
Write Functions
10
Events
12

Read Functions

attestationExpiryBlocks() view

Returns

Name Type Description
uint256
attestationRequestFees(address) view

Parameters

Name Type Description
address

Returns

Name Type Description
uint256
batchGetAttestationStats(identifiersToLookup: bytes32[]) view

Batch lookup function to determine attestation stats for a list of identifiers.

Parameters

Name Type Description
identifiersToLookup bytes32[] Array of n identifiers.

Returns

Name Type Description
uint256[] [0] Array of number of matching accounts per identifier.
address[] [1] Array of sum([0]) matching walletAddresses.
uint64[] [2] Array of sum([0]) numbers indicating the completions for each account.
uint64[] [3] Array of sum([0]) numbers indicating the total number of requested attestations for each account.
getAttestationIssuers(identifier: bytes32, account: address) view

Returns selected attestation issuers for a identifier/account pair.

Parameters

Name Type Description
identifier bytes32 Hash of the identifier.
account address Address of the account.

Returns

Name Type Description
address[] Addresses of the selected attestation issuers.
getAttestationRequestFee(token: address) view

Returns the fee set for a particular token.

Parameters

Name Type Description
token address Address of the attestationRequestFeeToken.

Returns

Name Type Description
uint256 The fee.
getAttestationState(identifier: bytes32, account: address, issuer: address) view

Returns the state of a specific attestation.

Parameters

Name Type Description
identifier bytes32 Hash of the identifier.
account address Address of the account.
issuer address Address of the issuer.

Returns

Name Type Description
uint8 status Status of the attestation.
uint32 block Block number of request/completion the attestation.
address address Address of the token with which this attestation request was paid for.
getAttestationStats(identifier: bytes32, account: address) view

Returns attestation stats for a identifier/account pair.

Parameters

Name Type Description
identifier bytes32 Hash of the identifier.
account address Address of the account.

Returns

Name Type Description
uint32 completed Number of completed attestations.
uint32 requested Number of total requested attestations.
getCompletableAttestations(identifier: bytes32, account: address) view

Returns the state of all attestations that are completable

Parameters

Name Type Description
identifier bytes32 Hash of the identifier.
account address Address of the account.

Returns

Name Type Description
uint32[] Block number of request/completion the attestation.
address[] Address of the issuer.
uint256[] The length of each metadataURL string for each issuer.
bytes All strings concatenated.
getMaxAttestations() view

Query 'maxAttestations'

Returns

Name Type Description
uint256 Maximum number of attestations that can be requested.
getUnselectedRequest(identifier: bytes32, account: address) view

Returns the unselected attestation request for an identifier/account pair, if any.

Parameters

Name Type Description
identifier bytes32 Hash of the identifier.
account address Address of the account.

Returns

Name Type Description
uint32 block Block number at which was requested.
uint32 number Number of unselected requests.
address address Address of the token with which this attestation request was paid for.
getVersionNumber() pure

Returns the storage, major, minor, and patch version of the contract.

Returns

Name Type Description
uint256 Storage version of the contract.
uint256 Major version of the contract.
uint256 Minor version of the contract.
uint256 Patch version of the contract.
initialized() view

Returns

Name Type Description
bool
isOwner() view
dev: Returns true if the caller is the current owner.

Returns

Name Type Description
bool
lookupAccountsForIdentifier(identifier: bytes32) view

Parameters

Name Type Description
identifier bytes32

Returns

Name Type Description
address[]
maxAttestations() view

Returns

Name Type Description
uint256
owner() view
dev: Returns the address of the current owner.

Returns

Name Type Description
address
pendingWithdrawals(address, address) view

Parameters

Name Type Description
address
address

Returns

Name Type Description
uint256
registry() view

Returns

Name Type Description
address
requireNAttestationsRequested(identifier: bytes32, account: address, expected: uint32) view

Require that a given identifier/address pair has requested a specific number of attestations.

dev: It can be used when batching meta-transactions to validate attestation are requested as expected in untrusted scenarios

Parameters

Name Type Description
identifier bytes32 Hash of the identifier.
account address Address of the account.
expected uint32 Number of expected attestations
selectIssuersWaitBlocks() view

Returns

Name Type Description
uint256
transferApprovals(address, bytes32) view

Parameters

Name Type Description
address
bytes32

Returns

Name Type Description
bool
validateAttestationCode(identifier: bytes32, account: address, v: uint8, r: bytes32, s: bytes32) view

Validates the given attestation code.

dev: Throws if the attestation window has passed.

Parameters

Name Type Description
identifier bytes32 The hash of the identifier to be attested.
account address Address of the account.
v uint8 The recovery id of the incoming ECDSA signature.
r bytes32 Output value r of the ECDSA signature.
s bytes32 Output value s of the ECDSA signature.

Returns

Name Type Description
address The issuer of the corresponding attestation.

Write Functions

initialize(registryAddress: address, _attestationExpiryBlocks: uint256, _selectIssuersWaitBlocks: uint256, _maxAttestations: uint256, attestationRequestFeeTokens: address[], attestationRequestFeeValues: uint256[]) nonpayable

Used in place of the constructor to allow the contract to be upgradable via proxy.

Parameters

Name Type Description
registryAddress address The address of the registry core smart contract.
_attestationExpiryBlocks uint256 The new limit on blocks allowed to come between requesting an attestation and completing it.
_selectIssuersWaitBlocks uint256 The wait period in blocks to call selectIssuers on attestation requests.
_maxAttestations uint256
attestationRequestFeeTokens address[] The address of tokens that fees should be payable in.
attestationRequestFeeValues uint256[] The corresponding fee values.
renounceOwnership() nonpayable
dev: Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
revoke(identifier: bytes32, index: uint256) nonpayable

Revokes an account for an identifier.

Parameters

Name Type Description
identifier bytes32 The identifier for which to revoke.
index uint256 The index of the account in the accounts array.
setAttestationExpiryBlocks(_attestationExpiryBlocks: uint256) nonpayable

Updates 'attestationExpiryBlocks'.

Parameters

Name Type Description
_attestationExpiryBlocks uint256 The new limit on blocks allowed to come between requesting an attestation and completing it.
setAttestationRequestFee(token: address, fee: uint256) nonpayable

Updates the fee for a particular token.

Parameters

Name Type Description
token address The address of the attestationRequestFeeToken.
fee uint256 The fee in 'token' that is required for each attestation.
setMaxAttestations(_maxAttestations: uint256) nonpayable

Updates 'maxAttestations'.

Parameters

Name Type Description
_maxAttestations uint256 Maximum number of attestations that can be requested.
setRegistry(registryAddress: address) nonpayable

Updates the address pointing to a Registry contract.

Parameters

Name Type Description
registryAddress address The address of a registry contract for routing to other contracts.
setSelectIssuersWaitBlocks(_selectIssuersWaitBlocks: uint256) nonpayable

Updates 'selectIssuersWaitBlocks'.

Parameters

Name Type Description
_selectIssuersWaitBlocks uint256 The wait period in blocks to call selectIssuers on attestation requests.
transferOwnership(newOwner: address) nonpayable
dev: Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.

Parameters

Name Type Description
newOwner address
withdraw(token: address) nonpayable

Allows issuers to withdraw accumulated attestation rewards.

dev: Throws if msg.sender does not have any rewards to withdraw.

Parameters

Name Type Description
token address The address of the token that will be withdrawn.

Events

AttestationCompleted(identifier: bytes32, account: address, issuer: address)
Name Type Indexed Description
identifier bytes32
account address
issuer address
AttestationExpiryBlocksSet(value: uint256)
Name Type Indexed Description
value uint256
AttestationIssuerSelected(identifier: bytes32, account: address, issuer: address, attestationRequestFeeToken: address)
Name Type Indexed Description
identifier bytes32
account address
issuer address
attestationRequestFeeToken address
AttestationRequestFeeSet(token: address, value: uint256)
Name Type Indexed Description
token address
value uint256
AttestationsRequested(identifier: bytes32, account: address, attestationsRequested: uint256, attestationRequestFeeToken: address)
Name Type Indexed Description
identifier bytes32
account address
attestationsRequested uint256
attestationRequestFeeToken address
AttestationsTransferred(identifier: bytes32, fromAccount: address, toAccount: address)
Name Type Indexed Description
identifier bytes32
fromAccount address
toAccount address
MaxAttestationsSet(value: uint256)
Name Type Indexed Description
value uint256
OwnershipTransferred(previousOwner: address, newOwner: address)
Name Type Indexed Description
previousOwner address
newOwner address
RegistrySet(registryAddress: address)
Name Type Indexed Description
registryAddress address
SelectIssuersWaitBlocksSet(value: uint256)
Name Type Indexed Description
value uint256
TransferApproval(approver: address, indentifier: bytes32, from: address, to: address, approved: bool)
Name Type Indexed Description
approver address
indentifier bytes32
from address
to address
approved bool
Withdrawal(account: address, token: address, amount: uint256)
Name Type Indexed Description
account address
token address
amount uint256