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

function removeGuardian(address guardian) external;

Parameters

Name
Type
Description

guardian

address

Address of the guardian

setSubmitHooks

Set the submit hooks address

function setSubmitHooks(ISubmitHooks newSubmitHooks) external;

Parameters

Name
Type
Description

newSubmitHooks

ISubmitHooks

Address of the new submit hooks contract

pause

Pause the vault, halting the ability for guardians to submit

function pause() external;

unpause

Unpause the vault, allowing guardians to submit operations

function unpause() external;

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

function checkGuardianWhitelist(address guardian) external returns (bool isRemoved);

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

function getActiveGuardians() external view returns (address[] memory);

Returns

Name
Type
Description

<none>

address[]

Array of active guardian addresses

getGuardianRoot

Get the guardian root for a guardian

function getGuardianRoot(address guardian) external view returns (bytes32);

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

function getCurrentHookCallType() external view returns (HookCallType);

Returns

Name
Type
Description

<none>

HookCallType

The current hook call type

Events

SubmitHooksSet

Emitted when submit hooks are updated

event SubmitHooksSet(address indexed submitHooksAddress);

Parameters

Name
Type
Description

submitHooksAddress

address

The new submit hooks contract address

GuardianRootSet

Emitted when a guardian's merkle root is set

event GuardianRootSet(address indexed guardian, bytes32 indexed root);

Parameters

Name
Type
Description

guardian

address

The guardian's address

root

bytes32

The new merkle root for the guardian

Errors

Aera__ZeroAddressGuardian

error Aera__ZeroAddressGuardian();

Aera__ZeroAddressOwner

error Aera__ZeroAddressOwner();

Aera__CallerIsNotGuardian

error Aera__CallerIsNotGuardian();

Aera__CallerIsNotAuthOrGuardian

error Aera__CallerIsNotAuthOrGuardian();

Aera__SubmissionFailed

error Aera__SubmissionFailed(uint256 index, bytes result);

Aera__AllowanceIsNotZero

error Aera__AllowanceIsNotZero(address token, address spender);

Aera__ZeroAddressMerkleRoot

error Aera__ZeroAddressMerkleRoot();

Aera__BeforeSubmitHooksFailed

error Aera__BeforeSubmitHooksFailed(bytes result);

Aera__AfterSubmitHooksFailed

error Aera__AfterSubmitHooksFailed(bytes result);

Aera__BeforeOperationHooksFailed

error Aera__BeforeOperationHooksFailed(uint256 index, bytes result);

Aera__AfterOperationHooksFailed

error Aera__AfterOperationHooksFailed(uint256 index, bytes result);

Aera__BeforeOperationHooksWithConfigurableHooks

error Aera__BeforeOperationHooksWithConfigurableHooks();

Aera__ProofVerificationFailed

error Aera__ProofVerificationFailed();

Aera__InvalidBeforeOperationHooksReturnDataLength

error Aera__InvalidBeforeOperationHooksReturnDataLength();

Aera__GuardianNotWhitelisted

error Aera__GuardianNotWhitelisted();

Aera__ExpectedCallbackNotReceived

error Aera__ExpectedCallbackNotReceived();

Aera__NoResults

error Aera__NoResults();

Last updated