This pull request significantly changes the SystemRole, StandardController and MintableController.
SystemRole
SystemRole is now the Cerberus of EURe. The new code defines three distinct roles: owner, admin, and system.
admin and system roles use openzeppelin/AccessControl.sol, while owner role relies on an older implementation with a single internal owner variable.
To improve the organization and accessibility of our roles and access code, we have shifted the inheritance of the ownable contract from StandardController to SystemRole. Additionally, we have elevated the SystemRole inheritance level to enable its inheritance by StandardController.
In addition, we have inherited SystemRole by ClaimableSystemRole to maintain our system's method of transferring ownership.
MintAllowance
The cornerstone of this PR is MintAllowance. In regard to conciseness let's see the old and new steps to mint after upgrading the controller.
adminwill have to periodically re-set the MintAllowance of the authorized system's EOA.
Working with allowance (EMS and e-money admin)
To ensure the successful execution of a minting transaction, both the system role and valid allowances are required. If either one is missing, the transaction will fail and revert.
To avoid any disruptions to our system, we recommend querying the controller.getMintAllowance(systemAddr) returns(uint256) view function before submitting a transaction to the blockchain.
Minting big amount
To facilitate clients in transferring an amount greater than the MaxMintAllowance (i.e., the maximum minting limit set by the administrators), the following process can be implemented:
Acess of Privilleges by Role
New Roles assignment
The table indicates that the ban function of BlacklistValidator is now protected against unauthorized access by the owner, admin, and system. To ensure this protection is effective, it's crucial to register the admin and system accounts, in addition to following the configuration steps for deploying the Controller:
This pull request significantly changes the
SystemRole
,StandardController
andMintableController
.SystemRole
SystemRole is now the Cerberus of EURe. The new code defines three distinct roles:
owner
,admin
, andsystem
.admin
andsystem
roles use openzeppelin/AccessControl.sol, whileowner
role relies on an older implementation with a single internal owner variable.To improve the organization and accessibility of our roles and access code, we have shifted the inheritance of the ownable contract from
StandardController
toSystemRole
. Additionally, we have elevated theSystemRole
inheritance level to enable its inheritance byStandardController
.In addition, we have inherited
SystemRole
byClaimableSystemRole
to maintain our system's method of transferring ownership.MintAllowance
The cornerstone of this PR is MintAllowance. In regard to conciseness let's see the old and new steps to mint after upgrading the controller.
admin
will have to periodically re-set the MintAllowance of the authorized system's EOA.Working with allowance (EMS and e-money admin)
To ensure the successful execution of a minting transaction, both the
system
role and valid allowances are required. If either one is missing, the transaction will fail and revert.To avoid any disruptions to our system, we recommend querying the
controller.getMintAllowance(systemAddr) returns(uint256)
view function before submitting a transaction to the blockchain.Minting big amount
To facilitate clients in transferring an amount greater than the MaxMintAllowance (i.e., the maximum minting limit set by the administrators), the following process can be implemented:
Acess of Privilleges by Role
New Roles assignment
The table indicates that the
ban
function ofBlacklistValidator
is now protected against unauthorized access by theowner
,admin
, andsystem
. To ensure this protection is effective, it's crucial to register theadmin
andsystem
accounts, in addition to following the configuration steps for deploying theController
: