Skip to main content

INSTRv1

Git Source

Inherits: Module

Caches and executes batched instructions for protocol upgrades in the Kernel.

State Variables​

totalInstructions​

Counter of total instructions

uint256 public totalInstructions;

storedInstructions​

All stored instructions per count in totalInstructions

mapping(uint256 => Instruction[]) public storedInstructions;

Functions​

getInstructions​

View function for retrieving a list of Instructions in an outside contract.

function getInstructions(
uint256 instructionsId_
) external virtual returns (Instruction[] memory);

Parameters

NameTypeDescription
instructionsId_uint256

Returns

NameTypeDescription
<none>Instruction[]

store​

Store a list of Instructions to be executed in the future.

function store(Instruction[] calldata instructions_) external virtual returns (uint256);

Parameters

NameTypeDescription
instructions_Instruction[]

Returns

NameTypeDescription
<none>uint256

Events​

InstructionsStored​

event InstructionsStored(uint256 instructionsId);

Parameters

NameTypeDescription
instructionsIduint256

Errors​

INSTR_InstructionsCannotBeEmpty​

error INSTR_InstructionsCannotBeEmpty();

INSTR_InvalidAction​

error INSTR_InvalidAction();