AvoSignersList

AvoSignersList_V1

Tracks allowed signers for Avocados, making available a list of all signers linked to an Avocado or all Avocados for a certain signer address.

If trackInStorage flag is set to false, then only an event will be emitted for off-chain tracking. The contract itself will not track avocados per signer!

Upgradeable through AvoSignersListProxy

@dev Notes: In off-chain tracking, make sure to check for duplicates (i.e. mapping already exists). This should not happen but when not tracking the data on-chain there is no way to be sure.

AvoSignersListErrors

AvoSignersList__InvalidParams

error AvoSignersList__InvalidParams()

thrown when a method is called with invalid params (e.g. zero address)

AvoSignersList__NotTracked

error AvoSignersList__NotTracked()

thrown when a view method is called that would require storage mapping data, but the flag trackInStorage is set to false and thus data is not available.

AvoSignersListConstants

avoFactory

contract IAvoFactory avoFactory

AvoFactory used to confirm that an address is an Avocado smart wallet

trackInStorage

bool trackInStorage

flag to signal if tracking should happen in storage or only events should be emitted (for off-chain). This can be set to false to reduce gas cost on expensive chains

AvoSignersListVariables

AvoSignersListEvents

SignerMappingAdded

event SignerMappingAdded(address signer, address avocado)

emitted when a new signer <> Avocado mapping is added

SignerMappingRemoved

event SignerMappingRemoved(address signer, address avocado)

emitted when a signer <> Avocado mapping is removed

AvoSignersListViews

isSignerOf

function isSignerOf(address avocado_, address signer_) public view returns (bool)

returns true if signer_ is an allowed signer of avocado_

signers

function signers(address avocado_) public view returns (address[])

returns all signers for a certain avocado_

avocados

function avocados(address signer_) public view returns (address[])

returns all Avocados for a certain signer_'. reverts with AvoSignersList__NotTracked()iftrackInStorage` is set to false (data not available)

signersCount

function signersCount(address avocado_) public view returns (uint256)

returns the number of mapped signers for a certain `avocado_'

avocadosCount

function avocadosCount(address signer_) public view returns (uint256)

returns the number of mapped avocados for a certain signer_' reverts with AvoSignersList__NotTracked()iftrackInStorage` is set to false (data not available)

AvoSignersList

constructor

constructor(contract IAvoFactory avoFactory_, contract IAvoConfigV1 avoConfigV1_) public

constructor sets the immutable avoFactory (proxy) address and the trackInStorage flag

syncAddAvoSignerMappings

function syncAddAvoSignerMappings(address avocado_, address[] addSigners_) external

adds mappings of addSigners_ to an Avocado avocado_. checks the data present at the Avocado to validate input data.

If trackInStorage flag is set to false, then only an event will be emitted for off-chain tracking. The contract itself will not track avocados per signer on-chain!

Silently ignores addSigners_ that are already added

There is expectedly no need for this method to be called by anyone other than the Avocado itself.

syncRemoveAvoSignerMappings

function syncRemoveAvoSignerMappings(address avocado_, address[] removeSigners_) external

removes mappings of removeSigners_ from an Avocado avocado_. checks the data present at the Avocado to validate input data.

If trackInStorage flag is set to false, then only an event will be emitted for off-chain tracking. The contract itself will not track avocados per signer on-chain!

Silently ignores removeSigners_ that are already removed

There is expectedly no need for this method to be called by anyone other than the Avocado itself.