Accounts
Celo0x7d21685c17607338b313a7174bab6620bad0aab7
Proxy implementation: 0x907f5c53c0e31db06af45bc58f076563469c525a
Solidity v0.5.13+commit.5b0b510c
Overview
Read Functions
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes32 |
Returns the account associated with `signer`.
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The address of the account or currently authorized attestation signer. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address | The associated account that the signer is authorized to attest for. |
Parameters
| Name | Type | Description |
|---|---|---|
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Getter for the metadata of multiple accounts.
Parameters
| Name | Type | Description |
|---|---|---|
| accountsToQuery | address[] | The addresses of the accounts to get the metadata for. |
Returns
| Name | Type | Description |
|---|---|---|
| — | uint256[] | The length of each string in bytes. |
| — | bytes | All strings concatenated. |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes32 |
Returns the attestation signer for the specified account.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address | The address with which the account can sign attestations. |
Getter for the data encryption key and version.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account to get the key for |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes | dataEncryptionKey secp256k1 public key for data encryption. Preferably compressed. |
Returns the default signer for the specified account and role. If no signer has been specified it will return the account itself.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account. |
| role | bytes32 | The role of the signer. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Returns the indexed signer for the specified account and role. If no signer has been specified it will return the account itself.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account. |
| role | bytes32 | The role of the signer. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Returns the legacy signer for the specified account and role. If no signer has been specified it will return the account itself.
Parameters
| Name | Type | Description |
|---|---|---|
| _account | address | The address of the account. |
| role | bytes32 | The role of the signer. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Getter for the metadata of an account.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account to get the metadata for. |
Returns
| Name | Type | Description |
|---|---|---|
| — | string | metadataURL The URL to access the metadata. |
Getter for the name of an account.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account to get the name for. |
Returns
| Name | Type | Description |
|---|---|---|
| — | string | name The name of the account. |
Returns the full list of offchain storage roots for an account.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The account whose storage roots to return. |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes | Concatenated storage root URLs. |
| — | uint256[] | Lengths of storage root URLs. |
Gets validator payment delegation settings.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | Account of the validator. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address | Beneficiary address of payment delegated. |
| — | uint256 | Fraction of payment delegated. |
Returns the address that signed the provided role authorization.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The `account` property signed over in the EIP712 signature |
| signer | address | The `signer` property signed over in the EIP712 signature |
| role | bytes32 | The `role` property signed over in the EIP712 signature |
| 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 address that signed the provided role authorization. |
Returns the validator signer for the specified account.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address | The address with which the account can register a validator or group. |
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. |
Returns the vote signer for the specified account.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address | The address with which the account can sign votes. |
Getter for the wallet address for an account
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account to get the wallet address for |
Returns
| Name | Type | Description |
|---|---|---|
| — | address | Wallet address |
Returns if account has specified a dedicated attestation signer.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account. |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | Whether the account has specified a dedicated attestation signer. |
Checks whether or not the account has a signer registered for the plaintext role.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | |
| role | string |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Returns if account has specified a dedicated validator signer.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account. |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | Whether the account has specified a dedicated validator signer. |
Returns if account has specified a dedicated vote signer.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account. |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | Whether the account has specified a dedicated vote signer. |
Checks whether or not the account has an indexed signer registered for a role
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | |
| role | bytes32 |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Checks whether or not the account has an indexed signer registered for the role
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | |
| role | bytes32 |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Checks whether or not the account has an indexed signer registered for one of the legacy roles
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | |
| role | bytes32 |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Check if an account already exists.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of the account |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | Returns `true` if account exists. Returns `false` otherwise. |
Check if an address has been an authorized signer for an account.
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The possibly authorized address. |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | Returns `true` if authorized. Returns `false` otherwise. |
Whether or not the signer has been registered as the default signer for role
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of account that authorized signing. |
| signer | address | The address of the signer. |
| role | bytes32 | The role that has been authorized. |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Whether or not the signer has been registered as an indexed signer for role
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of account that authorized signing. |
| signer | address | The address of the signer. |
| role | bytes32 | The role that has been authorized. |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Checks whether the role is one of Vote, Validator or Attestation
Parameters
| Name | Type | Description |
|---|---|---|
| role | bytes32 | The role to check |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Whether or not the signer has been registered as the legacy signer for role
Parameters
| Name | Type | Description |
|---|---|---|
| _account | address | The address of account that authorized signing. |
| signer | address | The address of the signer. |
| role | bytes32 | The role that has been authorized. |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Whether or not the signer has been registered as a signer for role
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of account that authorized signing. |
| signer | address | The address of the signer. |
| role | bytes32 | The role that has been authorized. |
Returns
| Name | Type | Description |
|---|---|---|
| — | bool |
Parameters
| Name | Type | Description |
|---|---|---|
| — | address | |
| — | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| — | bytes |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Returns
| Name | Type | Description |
|---|---|---|
| — | address |
Returns the account associated with `signer`.
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The address of the account or previously authorized signer. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address | The associated account. |
Returns the account associated with `signer`.
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The address of an account or currently authorized validator signer. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address | The associated account that signer is authorized to validate for. |
Returns the account associated with `signer`.
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The address of the account or currently authorized vote signer. |
Returns
| Name | Type | Description |
|---|---|---|
| — | address | The associated account that signer is authorized to vote for. |
Write Functions
Adds a new CIP8 storage root.
Parameters
| Name | Type | Description |
|---|---|---|
| url | bytes | The URL pointing to the offchain storage root. |
Authorizes an address to sign attestations on behalf of the account.
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The address of the signing key to authorize. |
| 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. |
Begin the process of authorizing an address to sign on behalf of the account
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The address of the signing key to authorize. |
| role | bytes32 | The role to authorize signing for. |
Authorizes an address to act as a signer, for `role`, on behalf of the account.
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The address of the signing key to authorize. |
| role | bytes32 | The role to authorize signing for. |
| 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. |
Authorizes an address to sign consensus messages on behalf of the account.
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The address of the signing key to authorize. |
| 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. |
Authorizes an address to sign consensus messages on behalf of the account.
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The address of the signing key to authorize. |
| 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. |
| ecdsaPublicKey | bytes | The ECDSA public key corresponding to `signer`. |
Authorizes an address to sign votes on behalf of the account.
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The address of the signing key to authorize. |
| 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. |
Finish the process of authorizing an address to sign on behalf of the account.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | The address of account that authorized signing. |
| role | bytes32 | The role to finish authorizing for. |
Creates an account.
Returns
| Name | Type | Description |
|---|---|---|
| — | bool | True if account creation succeeded. |
Removes a validator's payment delegation by setting benficiary and fraction to 0.
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. |
Removes the currently authorized attestation signer for the account Note that the signers cannot be reauthorized after they have been removed.
Removes the signer for a default role.
Parameters
| Name | Type | Description |
|---|---|---|
| role | bytes32 | The role that has been authorized. |
Removes the currently authorized and indexed signer for a specific role
Parameters
| Name | Type | Description |
|---|---|---|
| role | bytes32 | The role of the signer. |
Removes the currently authorized signer for a specific role and if the signer is indexed, remove that as well.
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | The address of the signer. |
| role | bytes32 | The role that has been authorized. |
Removes a CIP8 storage root.
Parameters
| Name | Type | Description |
|---|---|---|
| index | uint256 | The index of the storage root to be removed in the account's list of storage roots. |
Removes the currently authorized validator signer for the account Note that the signers cannot be reauthorized after they have been removed.
Removes the currently authorized vote signer for the account. Note that the signers cannot be reauthorized after they have been removed.
Convenience Setter for the dataEncryptionKey and wallet address for an account
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | A string to set as the name of the account |
| dataEncryptionKey | bytes | secp256k1 public key for data encryption. Preferably compressed. |
| walletAddress | address | The wallet address to set for 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. |
Setter for the data encryption key and version.
Parameters
| Name | Type | Description |
|---|---|---|
| dataEncryptionKey | bytes | secp256k1 public key for data encryption. Preferably compressed. |
Sets the EIP712 domain separator for the Celo Accounts abstraction.
Set the indexed signer for a specific role
Parameters
| Name | Type | Description |
|---|---|---|
| signer | address | the address to set as default |
| role | bytes32 | the role to register a default signer for |
Setter for the metadata of an account.
Parameters
| Name | Type | Description |
|---|---|---|
| metadataURL | string | The URL to access the metadata. |
Setter for the name of an account.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The name to set. |
Sets validator payment delegation settings.
Parameters
| Name | Type | Description |
|---|---|---|
| beneficiary | address | The address that should receive a portion of validator payments. |
| fraction | uint256 | The fraction of the validator's payment that should be diverted to `beneficiary` every epoch, given as FixidityLib value. Must not be greater than 1. |
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. |
Setter for the wallet address for an account
Parameters
| Name | Type | Description |
|---|---|---|
| walletAddress | address | The wallet address to set for 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. |
Parameters
| Name | Type | Description |
|---|---|---|
| newOwner | address |
Events
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| dataEncryptionKey | bytes |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| metadataURL | string |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| name | string |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| walletAddress | address |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| signer | address |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| oldSigner | address |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| oldSigner | address | ||
| role | bytes32 |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| signer | address | ||
| role | bytes32 |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| oldSigner | address | ||
| role | bytes32 |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| signer | address | ||
| role | bytes32 |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| oldSigner | address | ||
| role | bytes32 |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| signer | address | ||
| role | bytes32 |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| url | bytes |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| url | bytes | ||
| index | uint256 |
| Name | Type | Indexed | Description |
|---|---|---|---|
| previousOwner | address | ✓ | |
| newOwner | address | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| beneficiary | address | ✓ | |
| fraction | uint256 |
| Name | Type | Indexed | Description |
|---|---|---|---|
| registryAddress | address | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| signer | address | ||
| role | bytes32 | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| signer | address | ||
| role | bytes32 | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| signer | address | ||
| role | bytes32 | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| oldSigner | address | ||
| role | bytes32 | ✓ |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| signer | address |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| oldSigner | address |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| signer | address |
| Name | Type | Indexed | Description |
|---|---|---|---|
| account | address | ✓ | |
| oldSigner | address |