Skip to main content

EchidnaHelper

EchidnaHelper​

mint​

function mint(uint8 toAcc, uint256 amount) public returns (uint256)

Mint tokens to an account

Parameters​

NameTypeDescription
toAccuint8Account to mint to
amountuint256Amount to mint

Return Values​

NameTypeDescription
[0]uint256Amount minted (in case of capped mint with modulo)

burn​

function burn(uint8 fromAcc, uint256 amount) public

Burn tokens from an account

Parameters​

NameTypeDescription
fromAccuint8Account to burn from
amountuint256Amount to burn

changeSupply​

function changeSupply(uint256 amount) public

Change the total supply of OUSD (rebase)

Parameters​

NameTypeDescription
amountuint256New total supply

transfer​

function transfer(uint8 fromAcc, uint8 toAcc, uint256 amount) public

Transfer tokens between accounts

Parameters​

NameTypeDescription
fromAccuint8Account to transfer from
toAccuint8Account to transfer to
amountuint256Amount to transfer

transferFrom​

function transferFrom(uint8 authorizedAcc, uint8 fromAcc, uint8 toAcc, uint256 amount) public

Transfer approved tokens between accounts

Parameters​

NameTypeDescription
authorizedAccuint8Account that is authorized to transfer
fromAccuint8Account to transfer from
toAccuint8Account to transfer to
amountuint256Amount to transfer

optIn​

function optIn(uint8 targetAcc) public

Opt in to rebasing

Parameters​

NameTypeDescription
targetAccuint8Account to opt in

optOut​

function optOut(uint8 targetAcc) public

Opt out of rebasing

Parameters​

NameTypeDescription
targetAccuint8Account to opt out

approve​

function approve(uint8 ownerAcc, uint8 spenderAcc, uint256 amount) public

Approve an account to spend OUSD

Parameters​

NameTypeDescription
ownerAccuint8Account that owns the OUSD
spenderAccuint8Account that is approved to spend the OUSD
amountuint256Amount to approve

increaseAllowance​

function increaseAllowance(uint8 ownerAcc, uint8 spenderAcc, uint256 amount) public

Increase the allowance of an account to spend OUSD

Parameters​

NameTypeDescription
ownerAccuint8Account that owns the OUSD
spenderAccuint8Account that is approved to spend the OUSD
amountuint256Amount to increase the allowance by

decreaseAllowance​

function decreaseAllowance(uint8 ownerAcc, uint8 spenderAcc, uint256 amount) public

Decrease the allowance of an account to spend OUSD

Parameters​

NameTypeDescription
ownerAccuint8Account that owns the OUSD
spenderAccuint8Account that is approved to spend the OUSD
amountuint256Amount to decrease the allowance by

getTotalBalance​

function getTotalBalance() public view returns (uint256 total)

Get the sum of all OUSD balances

Return Values​

NameTypeDescription
totaluint256Total balance

getTotalNonRebasingBalance​

function getTotalNonRebasingBalance() public returns (uint256 total)

Get the sum of all non-rebasing OUSD balances

Return Values​

NameTypeDescription
totaluint256Total balance