API Reference

Security

This package provides the API for all Security modules.

For an overview of the module, read the Security guide.

import "./compact-contracts/node_modules/@openzeppelin-compact/contracts/src/security/Initializable";

Ledger

_isInitialized: Boolean

ledger

#

Boolean indicating if initialized.

Witnesses

None.

Circuits

initialize() → []

circuit

#

Initializes the state thus ensuring the calling circuit can only be called once.

Requirements:

  • Contract must not be initialized.
k=10, rows=38

assertInitialized() → []

circuit

#

Asserts that the contract has been initialized, throwing an error if not.

Requirements:

  • Contract must not be initialized.
k=10, rows=31

assertNotInitialized() → []

circuit

#

Asserts that the contract has not been initialized, throwing an error if it has.

Requirements:

  • Contract must not be initialized.
k=10, rows=35

import "./compact-contracts/node_modules/@openzeppelin-compact/contracts/src/security/Pausable";

Ledger

_isPaused: Boolean

ledger

#

Boolean indicating if paused.

Witnesses

None.

Circuits

isPaused() → Boolean

circuit

#

Returns true if the contract is paused, and false otherwise.

k=10, rows=32

assertPaused() → []

circuit

#

Makes a circuit only callable when the contract is paused.

Requirements:

  • Contract must be paused.
k=10, rows=31

assertNotPaused() → []

circuit

#

Makes a circuit only callable when the contract is not paused.

Requirements:

  • Contract must not be paused.
k=10, rows=35

_pause() → []

circuit

#

Triggers a stopped state.

Requirements:

  • Contract must not be paused.
k=10, rows=38

_unpause() → []

circuit

#

Lifts the pause on the contract.

Requirements:

  • Contract must be paused.
k=10, rows=34