LogoLogo
  • Core contracts
    • CMPVault
    • Oracle
      • FAQ
  • Pheriphery contracts
    • Operatable
      • PermissionControl
  • Deployments
    • Ethereum Mainnet
  • User Documentation
Powered by GitBook
On this page
  • Initialization
  • constructor
  • Write Methods
  • whitelistLiquidator
  • whitelistUsers
  • whitelistUser
  • View Methods
  • whitelistedUsers
  • liquidators
  • Events
  • LogWhiteListUser
  • LogWhiteListLiquidator
  1. Pheriphery contracts
  2. Operatable

PermissionControl

PreviousOperatableNextEthereum Mainnet

Last updated 1 year ago

Extends

Initialization

constructor

constructor(address to)

Description

Initializes a new PermissionControl instance.

Parameters

Name
Type
Description

to

address

The owner of the smart contract.

Emits

Write Methods

whitelistLiquidator

function whitelistLiquidator(address liquidator, bool approved)
    public onlyOperators

Description

  • add a liquidator to the whitelist.

  • remove a liquidator from the whitelist.

Parameters

Name
Type
Description

liquidator

address

The liquidator's address.

approved

bool

The status to set to liquidator.

Emits

whitelistUsers

function whitelistUsers(address[] calldata users, bool[] calldata approved) 
    public onlyOperators

Description

Parameters

Name
Type
Description

users

address[]

The user addresses.

approved

bool[]

Emits

whitelistUser

function whitelistUser(address user, bool approved) public onlyOperators

Description

  • add a user to the whitelist.

  • remove a user from the whitelist.

Parameters

Name
Type
Description

user

address

The user's address.

approved

bool

The status to set to user.

Emits

View Methods

whitelistedUsers

mapping(address => bool) public whitelistedUsers; 

Description

Maps each whitelisted user's address to true.

liquidators

mapping(address => bool) public liquidators;

Description

Maps each whitelisted liquidator's address to true.

Events

LogWhiteListUser

event LogWhiteListUser(
    address indexed user,
    address indexed operator,
    bool approved
)

Parameters

Name
Type
Index?

user

address

Yes

operator

address

Yes

approved

bool

No

LogWhiteListLiquidator

event LogWhiteListLiquidator(
    address indexed user,
    address indexed operator,
    bool approved
)

Parameters

Name
Type
Index?

user

address

Yes

operator

address

Yes

approved

bool

No

Allows to:

Calls for each entry of users and approved.

Maps each user's address to the status it should be set to (see ).

Allows to:

Operatable
OwnershipTransferred
LogWhiteListLiquidator
whitelistUser
LogWhiteListUser
LogWhiteListUser
whitelistUser
operators
operators