Solidity API
SaplingContext
Provides reference to protocol level access control, and basic pause functionality by extending OpenZeppelin’s Pausable contract.
accessControl
address accessControl
Protocol access control
onlyRole
modifier onlyRole(bytes32 role)
Modifier to limit function access to a specific role
__SaplingContext_init
function __SaplingContext_init(address _accessControl) internal
Creates a new SaplingContext.
Addresses must not be 0.
Name | Type | Description |
---|---|---|
_accessControl | address | Protocol level access control contract address |
pause
function pause() external
Pause the contract.
Only the functions using whenPaused and whenNotPaused modifiers will be affected by pause. Caller must have the PAUSER_ROLE.
unpause
function unpause() external
Unpause the contract.
Only the functions using whenPaused and whenNotPaused modifiers will be affected by unpause. Caller must have the PAUSER_ROLE.
isNonUserAddress
function isNonUserAddress(address party) internal view virtual returns (bool)
Verify if an address has any non-user roles.
When overriding, return “contract local verification result” AND super.isNonUserAddress(party).
Name | Type | Description |
---|---|---|
party | address | Address to verify |
Name | Type | Description |
---|---|---|
[0] | bool | True if the address has any roles, false otherwise |
hasRole
function hasRole(bytes32 role, address party) internal view returns (bool)
Verify if an address has a specific role.
Name | Type | Description |
---|---|---|
role | bytes32 | Role to check against |
party | address | Address to verify |
Name | Type | Description |
---|---|---|
[0] | bool | True if the address has the specified role, false otherwise |
__gap
uint256[49] __gap
Slots reserved for future state variables