FeeManager.sol

View Functions

collectedFees

function collectedFees() external returns (uint256)

Fetch the total amount of collected fees yet to be distributed to the reserve.

Return Values

TypeDescription

uint256

The total amount of collected fees

calculateFee

function calculateFee(address member, uint256 amount) public view returns (uint256)

Fetch the calculated fee to be collected from a given member for a given amount of credits.

Call Params

NameTypeDescription

member

address

address of member transferring credits

amount

uint256

the amount of credits being transferred

Return Values

TypeDescription

uint256

The amount of reserve currency to collect from a given member for transferring the given amount of credits.

shouldChargeTx

function shouldChargeTx(address sender, address recipient) public view returns (bool)

Fetch whether the given transaction data should be charged a fee.

Call Params

NameTypeDescription

member

address

address of member sending credits

amount

address

address of member receiving credits

Return Values

TypeDescription

uint256

Whether the given transaction data should be charged a fee

Mutative Functions

distributeFees

function distributeFees() external

Distributes total collected fees to network's reserve pool.

collectFee

function collectFee(address sender, address recipient, uint256 amount) public

Calculates and transfers a fee for a given credit transaction amount.

pauseFees

function pauseFees() external

Enables addresses with operator level access to pause fee collection.

unpauseFees

function unpauseFees() external

Enables addresses with operator level access to unpause fee collection.

Last updated