IBaseVault

Interface for the BaseVault

Functions

submit

Submit a series of operations to the vault

function submit(bytes calldata data) external;

Parameters

Name
Type
Description

data

bytes

Encoded array of operations to submit ┌─────────────────────────────┬─────────────────────────┬───────────────────────────────────────────────┐ │ FIELDS │ SIZE │ DESCRIPTION │ ├─────────────────────────────┴─────────────────────────┴───────────────────────────────────────────────┤ │ operationsLength 1 byte Number of operations in the array │ │ │ │ [for each operation]: │ │ │ │ SIGNATURE │ │ target 20 bytes Target contract address │ │ calldataLength 2 bytes Length of calldata │ │ calldata bytes Calldata (before pipelining) │ │ │ │ CLIPBOARD │ │ clipboardsLength 1 byte Number of clipboards │ │ [for each clipboard entry]: │ │ resultIndex 1 byte Which operation to take from │ │ copyWord 1 byte Which word to copy │ │ pasteOffset 2 bytes What offset to paste it at │ │ │ │ CALL TYPE │ │ isStaticCall 1 byte 1 if static, 0 if a regular call │ │ [if isStaticCall == 0]: │ │ │ │ CALLBACK HANDLING │ │ hasCallback 1 byte Whether to allow callbacks during operation │ │ [if hasCallback == 1]: │ │ callbackData = 26 bytes Expected callback info │ │ ┌────────────────────┬──────────────────────────┬───────────────────┐ │ │ │ selector (4 bytes) │ calldataOffset (2 bytes) │ caller (20 bytes) │ │ │ └────────────────────┴──────────────────────────┴───────────────────┘ │ │ │ │ HOOKS │ │ hookConfig = 1 byte Hook configuration │ │ ┌─────────────────┬────────────────────────────────────────┐ │ │ │ hasHook (1 bit) │ configurableHookOffsetsLength (7 bits) │ │ │ └─────────────────┴────────────────────────────────────────┘ │ │ if configurableHookOffsetsLength > 0: │ │ configurableHookOffsets 32 bytes Packed configurable hook offsets │ │ if hasHook == 1: │ │ hook 20 bytes Hook contract address │ │ │ │ MERKLE PROOF │ │ proofLength 1 byte Merkle proof length │ │ proof * 32 bytes Merkle proof data │ │ │ │ PAYABILITY │ │ hasValue 1 byte Whether to send native token with the call │ │ [if hasValue == 1]: │ │ value 32 bytes Amount of native token to send │ └───────────────────────────────────────────────────────────────────────────────────────────────────────┘

setGuardianRoot

Set the merkle root for a guardian Used to add guardians and update their permissions

function setGuardianRoot(address guardian, bytes32 root) external;

Parameters

Name
Type
Description

guardian

address

Address of the guardian

root

bytes32

Merkle root

removeGuardian

Removes a guardian from the vault

Parameters

Name
Type
Description

guardian

address

Address of the guardian

setSubmitHooks

Set the submit hooks address

Parameters

Name
Type
Description

newSubmitHooks

ISubmitHooks

Address of the new submit hooks contract

pause

Pause the vault, halting the ability for guardians to submit

unpause

Unpause the vault, allowing guardians to submit operations

checkGuardianWhitelist

Check if the guardian is whitelisted and set the root to zero if not Used to disable guardians who were removed from the whitelist after being selected as guardians

Parameters

Name
Type
Description

guardian

address

The guardian address

Returns

Name
Type
Description

isRemoved

bool

Whether the guardian was removed from the whitelist

getActiveGuardians

Get all active guardians

Returns

Name
Type
Description

<none>

address[]

Array of active guardian addresses

getGuardianRoot

Get the guardian root for a guardian

Parameters

Name
Type
Description

guardian

address

The guardian address

Returns

Name
Type
Description

<none>

bytes32

The guardian root

getCurrentHookCallType

Get the current hook call type

Returns

Name
Type
Description

<none>

HookCallType

The current hook call type

Events

SubmitHooksSet

Emitted when submit hooks are updated

Parameters

Name
Type
Description

submitHooksAddress

address

The new submit hooks contract address

GuardianRootSet

Emitted when a guardian's merkle root is set

Parameters

Name
Type
Description

guardian

address

The guardian's address

root

bytes32

The new merkle root for the guardian

Errors

Aera__ZeroAddressGuardian

Aera__ZeroAddressOwner

Aera__CallerIsNotGuardian

Aera__CallerIsNotAuthOrGuardian

Aera__SubmissionFailed

Aera__AllowanceIsNotZero

Aera__ZeroAddressMerkleRoot

Aera__BeforeSubmitHooksFailed

Aera__AfterSubmitHooksFailed

Aera__BeforeOperationHooksFailed

Aera__AfterOperationHooksFailed

Aera__BeforeOperationHooksWithConfigurableHooks

Aera__ProofVerificationFailed

Aera__InvalidBeforeOperationHooksReturnDataLength

Aera__GuardianNotWhitelisted

Aera__ExpectedCallbackNotReceived

Aera__NoResults

Last updated