Skip to main content

Delegation

A Delegation allows his owner to execute calls on behalf of the contract.

This contract is intended to be counterfactually instantiated via CREATE2 through the LowLevelDelegator contract. This contract will hold tickets that will be delegated to a chosen delegatee.

Structs

Call

  • address to
  • bytes data

Functions

initialize

  function initialize(
uint96 _lockUntil
) external

Initializes the delegation.

Parameters:

NameTypeDescription
_lockUntiluint96Timestamp until which the delegation is locked

executeCalls

  function executeCalls(
struct Delegation.Call[] calls
) external returns (bytes[])

Executes calls on behalf of this contract.

Parameters:

NameTypeDescription
callsstruct Delegation.Call[]The array of calls to be executed

Return Values:

TypeDescription
bytes[]An array of the return values for each of the calls

setLockUntil

  function setLockUntil(
uint96 _lockUntil
) external

Set the timestamp until which the delegation is locked.

Parameters:

NameTypeDescription
_lockUntiluint96The timestamp until which the delegation is locked