Attestations

Celo

0xdc553892cdeeed9f575aa0fba099e5847fd88d20

Proxy 實作合約: 0xf65903343712820ef19090c15051687b9363758c

Solidity v0.5.13+commit.5b0b510c

🤖
透過你的 AI 查詢此合約
參考: 0xdc553892cdeeed9f575aa0fba099e5847fd88d20
範例提示詞: "Tell me the current state of celo/0xdc553892cdeeed9f575aa0fba099e5847fd88d20"
還沒有接入 AI?→ mcp.smarts.md
Celo 在 Smarts 上是僅文件鏈:原始碼和 ABI 已索引,但目前不提供即時鏈上資料(狀態、最新事件、管理員概覽)。AI 代理仍可透過 MCP 呼叫 get_contract_info 和 get_contract_source。

概覽

讀取函式
22
寫入函式
10
事件
12

讀取函式

attestationExpiryBlocks() view

Returns the number of blocks after which attestations expire.✨ AI

回傳值

名稱 類型 描述
uint256 The attestation expiry expressed as a block count (number of blocks until an attestation is considered expired).✨ AI
attestationRequestFees(address) view

Returns the current attestation request fee for the specified address.✨ AI

參數

名稱 類型 描述
address

回傳值

名稱 類型 描述
uint256 The fee amount (uint256) required to submit an attestation request for the address.✨ AI
batchGetAttestationStats(identifiersToLookup: bytes32[]) view

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

參數

名稱 類型 描述
identifiersToLookup bytes32[] Array of n identifiers.

回傳值

名稱 類型 描述
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.

參數

名稱 類型 描述
identifier bytes32 Hash of the identifier.
account address Address of the account.

回傳值

名稱 類型 描述
address[] Addresses of the selected attestation issuers.
getAttestationRequestFee(token: address) view

Returns the fee set for a particular token.

參數

名稱 類型 描述
token address Address of the attestationRequestFeeToken.

回傳值

名稱 類型 描述
uint256 The fee.
getAttestationState(identifier: bytes32, account: address, issuer: address) view

Returns the state of a specific attestation.

參數

名稱 類型 描述
identifier bytes32 Hash of the identifier.
account address Address of the account.
issuer address Address of the issuer.

回傳值

名稱 類型 描述
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.

參數

名稱 類型 描述
identifier bytes32 Hash of the identifier.
account address Address of the account.

回傳值

名稱 類型 描述
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

參數

名稱 類型 描述
identifier bytes32 Hash of the identifier.
account address Address of the account.

回傳值

名稱 類型 描述
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'

回傳值

名稱 類型 描述
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.

參數

名稱 類型 描述
identifier bytes32 Hash of the identifier.
account address Address of the account.

回傳值

名稱 類型 描述
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.

回傳值

名稱 類型 描述
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 true if the contract has been initialized.✨ AI

回傳值

名稱 類型 描述
bool True if the contract has been initialized, false otherwise.✨ AI
isOwner() view

Checks whether the caller is the contract owner.✨ AI

開發者: Returns true if the caller is the current owner.

回傳值

名稱 類型 描述
bool True if the caller (msg.sender) is the contract owner, otherwise false.✨ AI
lookupAccountsForIdentifier(identifier: bytes32) view

Returns all account addresses associated with the given identifier.✨ AI

參數

名稱 類型 描述
identifier bytes32 Identifier hash used to look up linked account addresses.✨ AI

回傳值

名稱 類型 描述
address[] Array of account addresses associated with the identifier; empty if none are linked.✨ AI
maxAttestations() view

Get the current maximum number of attestations allowed.✨ AI

回傳值

名稱 類型 描述
uint256 The maximum number of attestations permitted, as a uint256.✨ AI
owner() view

Get the current contract owner's address.✨ AI

開發者: Returns the address of the current owner.

回傳值

名稱 類型 描述
address The address of the account that currently owns and can administer the contract.✨ AI
pendingWithdrawals(address, address) view

Return the pending withdrawal amount for a given account and asset.✨ AI

參數

名稱 類型 描述
address
address

回傳值

名稱 類型 描述
uint256 Pending withdrawal amount as a uint256 (denominated in the asset's smallest unit).✨ AI
registry() view

Returns the address of the registry contract associated with this Attestations contract.✨ AI

回傳值

名稱 類型 描述
address Address of the registry contract that this Attestations contract references.✨ AI
requireNAttestationsRequested(identifier: bytes32, account: address, expected: uint32) view

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

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

參數

名稱 類型 描述
identifier bytes32 Hash of the identifier.
account address Address of the account.
expected uint32 Number of expected attestations
selectIssuersWaitBlocks() view

Returns the configured number of blocks to wait before selecting issuers.✨ AI

回傳值

名稱 類型 描述
uint256 Number of blocks to wait before running the issuer selection process.✨ AI
transferApprovals(address, bytes32) view

Returns whether an account has approved transfers for the specified schema identifier.✨ AI

參數

名稱 類型 描述
address
bytes32

回傳值

名稱 類型 描述
bool True if the account has approved transfers for the given schemaId, false otherwise.✨ AI
validateAttestationCode(identifier: bytes32, account: address, v: uint8, r: bytes32, s: bytes32) view

Validates the given attestation code.

開發者: Throws if the attestation window has passed.

參數

名稱 類型 描述
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.

回傳值

名稱 類型 描述
address The issuer of the corresponding attestation.

寫入函式

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.

參數

名稱 類型 描述
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

Renounces ownership, setting the owner to the zero address and leaving the contract without an owner.✨ AI

開發者: 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.

參數

名稱 類型 描述
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'.

參數

名稱 類型 描述
_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.

參數

名稱 類型 描述
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'.

參數

名稱 類型 描述
_maxAttestations uint256 Maximum number of attestations that can be requested.
setRegistry(registryAddress: address) nonpayable

Updates the address pointing to a Registry contract.

參數

名稱 類型 描述
registryAddress address The address of a registry contract for routing to other contracts.
setSelectIssuersWaitBlocks(_selectIssuersWaitBlocks: uint256) nonpayable

Updates 'selectIssuersWaitBlocks'.

參數

名稱 類型 描述
_selectIssuersWaitBlocks uint256 The wait period in blocks to call selectIssuers on attestation requests.
transferOwnership(newOwner: address) nonpayable

Transfer ownership of the contract to a new owner address.✨ AI

開發者: Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.

參數

名稱 類型 描述
newOwner address Address to set as the new owner.✨ AI
withdraw(token: address) nonpayable

Allows issuers to withdraw accumulated attestation rewards.

開發者: Throws if msg.sender does not have any rewards to withdraw.

參數

名稱 類型 描述
token address The address of the token that will be withdrawn.

事件

AttestationCompleted(identifier: bytes32, account: address, issuer: address)
名稱 類型 已索引 描述
identifier bytes32
account address
issuer address
AttestationExpiryBlocksSet(value: uint256)
名稱 類型 已索引 描述
value uint256
AttestationIssuerSelected(identifier: bytes32, account: address, issuer: address, attestationRequestFeeToken: address)
名稱 類型 已索引 描述
identifier bytes32
account address
issuer address
attestationRequestFeeToken address
AttestationRequestFeeSet(token: address, value: uint256)
名稱 類型 已索引 描述
token address
value uint256
AttestationsRequested(identifier: bytes32, account: address, attestationsRequested: uint256, attestationRequestFeeToken: address)
名稱 類型 已索引 描述
identifier bytes32
account address
attestationsRequested uint256
attestationRequestFeeToken address
AttestationsTransferred(identifier: bytes32, fromAccount: address, toAccount: address)
名稱 類型 已索引 描述
identifier bytes32
fromAccount address
toAccount address
MaxAttestationsSet(value: uint256)
名稱 類型 已索引 描述
value uint256
OwnershipTransferred(previousOwner: address, newOwner: address)
名稱 類型 已索引 描述
previousOwner address
newOwner address
RegistrySet(registryAddress: address)
名稱 類型 已索引 描述
registryAddress address
SelectIssuersWaitBlocksSet(value: uint256)
名稱 類型 已索引 描述
value uint256
TransferApproval(approver: address, indentifier: bytes32, from: address, to: address, approved: bool)
名稱 類型 已索引 描述
approver address
indentifier bytes32
from address
to address
approved bool
Withdrawal(account: address, token: address, amount: uint256)
名稱 類型 已索引 描述
account address
token address
amount uint256