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

NameTypeDescription
_adminaddressAdmin address
_initialDelayuint48Delay 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

NameTypeDescription
_fromaddressOwner of the tokens
_toaddressAccount to be approved
_amountuint256Amount to be approved