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.
assertInitialized() → []
circuit
#Asserts that the contract has been initialized, throwing an error if not.
Requirements:
- Contract must not be initialized.
assertNotInitialized() → []
circuit
#Asserts that the contract has not been initialized, throwing an error if it has.
Requirements:
- Contract must not be initialized.
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.
assertPaused() → []
circuit
#Makes a circuit only callable when the contract is paused.
Requirements:
- Contract must be paused.
assertNotPaused() → []
circuit
#Makes a circuit only callable when the contract is not paused.
Requirements:
- Contract must not be paused.
_pause() → []
circuit
#Triggers a stopped state.
Requirements:
- Contract must not be paused.
_unpause() → []
circuit
#Lifts the pause on the contract.
Requirements:
- Contract must be paused.