Rigoblock Documentation
  • Welcome
  • Introduction to RigoBlock
  • Contracts
    • Protocol
      • RigoblockPoolExtended
      • Core
        • constants
        • immutables
        • storage
        • actions
        • owner actions
        • abstract
        • fallback
        • initializer
        • state
        • storage accessible
      • Deps
        • Authority
          • authority docs
        • PoolRegistry
          • pool registry docs
      • Extensions
        • AGovernance
          • Solidity API
        • AMulticall
          • aMulticall docs
        • AStaking
          • aStaking docs
        • AUniswap
          • aUniswap docs
        • EUpgrade
          • eUpgrade docs
        • EWhitelist
          • eWhitelist docs
      • Proxies
        • proxy
          • proxy docs
        • proxy factory
          • proxyFactory docs
    • GRG Token
      • RigoToken
        • rigoToken docs
      • Inflation
        • inflation docs
      • ProofOfPerformance
        • pop docs
    • GRG Staking
      • GrgVault
        • grgVault docs
      • StakingProxy
        • stakingProxy docs
      • Staking
        • staking docs
    • Governance
      • Solidity API
  • Deployments
    • deployed contracts - V4
    • deployed contracts
    • v1.5.0
    • v1.4.2
    • v1.4.1
    • v1.3.0
    • v1.1.1
    • v1.1.0
  • Governance
    • Rigoblock Governance
    • Supported Applications
    • Token Whitelists
    • Supported Methods
      • Selectors - V4
      • Selectors - V3
  • Bug Bounty
    • Known Issues
  • Oracles and Price Feeds
Powered by GitBook
On this page
  • Authority
  • _adapterBySelector
  • _permission
  • _roleToList
  • onlyWhitelister
  • constructor
  • addMethod
  • removeMethod
  • setWhitelister
  • setAdapter
  • setFactory
  • isWhitelistedFactory
  • getApplicationAdapter
  • isWhitelister
  • _changePermission
  1. Contracts
  2. Protocol
  3. Deps
  4. Authority

authority docs

Authority

_adapterBySelector

mapping(bytes4 => address) _adapterBySelector

_permission

mapping(address => struct IAuthority.Permission) _permission

_roleToList

mapping(enum IAuthority.Role => address[]) _roleToList

onlyWhitelister

modifier onlyWhitelister()

constructor

constructor(address newOwner) public

addMethod

function addMethod(bytes4 selector, address adapter) external

Allows a whitelister to whitelist a method. We do not save list of approved as better queried by events.

Parameters

Name
Type
Description

selector

bytes4

Bytes4 hex of the method selector.

adapter

address

Address of the adapter implementing the method.

removeMethod

function removeMethod(bytes4 selector, address adapter) external

Allows a whitelister to remove a method.

Parameters

Name
Type
Description

selector

bytes4

Bytes4 hex of the method selector.

adapter

address

Address of the adapter implementing the method.

setWhitelister

function setWhitelister(address whitelister, bool isWhitelisted) external

Allows the owner to set whitelister permission. Whitelister permission is required to approve methods in extensions adapter.

Parameters

Name
Type
Description

whitelister

address

Address of the whitelister.

isWhitelisted

bool

Bool whitelisted.

setAdapter

function setAdapter(address adapter, bool isWhitelisted) external

Allows owner to set extension adapter address.

Parameters

Name
Type
Description

adapter

address

Address of the target adapter.

isWhitelisted

bool

Bool whitelisted.

setFactory

function setFactory(address factory, bool isWhitelisted) external

Allows an admin to set factory permission.

Parameters

Name
Type
Description

factory

address

Address of the target factory.

isWhitelisted

bool

Bool whitelisted.

isWhitelistedFactory

function isWhitelistedFactory(address target) external view returns (bool)

Provides whether a factory is whitelisted.

Parameters

Name
Type
Description

target

address

Address of the target factory.

Return Values

Name
Type
Description

[0]

bool

Bool is whitelisted.

getApplicationAdapter

function getApplicationAdapter(bytes4 selector) external view returns (address)

Returns the address of the adapter associated to the signature.

Parameters

Name
Type
Description

selector

bytes4

Hex of the method signature.

Return Values

Name
Type
Description

[0]

address

Address of the adapter.

isWhitelister

function isWhitelister(address target) public view returns (bool)

Provides whether an address is whitelister.

Parameters

Name
Type
Description

target

address

Address of the target whitelister.

Return Values

Name
Type
Description

[0]

bool

Bool is whitelisted.

_changePermission

function _changePermission(address target, bool isWhitelisted, enum IAuthority.Role role) private
PreviousAuthorityNextPoolRegistry

Last updated 2 years ago