PxEth.sol
General Overview
The PxEth.sol
contract is the token contract within the Pirex ETH system. It is a derivative of the DineroERC20 contract, inheriting its standard features. A notable addition in this contract is the introduction of an OPERATOR_ROLE
. This role grants designated addresses the ability to execute specific actions, such as approving token allowances between certain accounts, thereby enhancing operational flexibility and control within the system.
Technical Overview
Inherits: DineroERC20
Author: redactedcartel.finance
State Variables
OPERATOR_ROLE
bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");
Functions
constructor
constructor(address _admin, uint48 _initialDelay) DineroERC20("Pirex Ether", "pxETH", 18, _admin, _initialDelay);
Parameters
Name | Type | Description |
---|---|---|
_admin | address | Admin address |
_initialDelay | uint48 | Delay required to schedule the acceptance of a access control transfer started |
operatorApprove
Approve allowances by operator with specified accounts and amount
function operatorApprove(address _from, address _to, uint256 _amount) external onlyRole(OPERATOR_ROLE);
Parameters
Name | Type | Description |
---|---|---|
_from | address | Owner of the tokens |
_to | address | Account to be approved |
_amount | uint256 | Amount to be approved |