Skip to main content

EchidnaTestSupply

EchidnaTestSupply

prevRebasingCreditsPerToken

uint256 prevRebasingCreditsPerToken

testChangeSupply

function testChangeSupply(uint256 supply) public

After a changeSupply, the total supply should exactly match the target total supply. (This is needed to ensure successive rebases are correct).

Parameters

NameTypeDescription
supplyuint256New total supply

testTotalSupplyLessThanTotalBalance

function testTotalSupplyLessThanTotalBalance() public

The total supply must not be less than the sum of account balances. (The difference will go into future rebases)

testNonRebasingSupplyVsTotalSupply

function testNonRebasingSupplyVsTotalSupply() public

Non-rebasing supply should not be larger than total supply

testRebasingCreditsPerTokenNotIncreased

function testRebasingCreditsPerTokenNotIncreased() public

Global rebasingCreditsPerToken should never increase

testRebasingCreditsPerTokenAboveZero

function testRebasingCreditsPerTokenAboveZero() public

The rebasing credits per token ratio must greater than zero

testTotalNonRebasingSupplyLessThanTotalBalance

function testTotalNonRebasingSupplyLessThanTotalBalance() public

The sum of all non-rebasing balances should not be larger than non-rebasing supply

testCreditsPerTokenVsBalance

function testCreditsPerTokenVsBalance(uint8 targetAcc) public

An accounts credits / credits per token should not be larger it's balance

Parameters

NameTypeDescription
targetAccuint8The account to check