Skip to main content

EchidnaTestTransfer

EchidnaTestTransfer

testTransferBalanceReceivedLess

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

The receiving account's balance after a transfer must not increase by less than the amount transferred

Parameters

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

testTransferBalanceReceivedMore

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

The receiving account's balance after a transfer must not increase by more than the amount transferred

Parameters

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

testTransferBalanceSentLess

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

The sending account's balance after a transfer must not decrease by less than the amount transferred

Parameters

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

testTransferBalanceSentMore

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

The sending account's balance after a transfer must not decrease by more than the amount transferred

Parameters

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

testTransferBalanceReceivedLessRounding

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

The receiving account's balance after a transfer must not increase by less than the amount transferred (minus rounding error)

Parameters

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

testTransferBalanceSentLessRounding

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

The sending account's balance after a transfer must not decrease by less than the amount transferred (minus rounding error)

Parameters

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

testTransferWithinBalanceDoesNotRevert

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

An account should always be able to successfully transfer an amount within its balance.

Parameters

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

testTransferExceedingBalanceReverts

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

An account should never be able to successfully transfer an amount greater than their balance.

Parameters

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

testTransferSelf

function testTransferSelf(uint8 targetAcc, uint256 amount) public

A transfer to the same account should not change that account's balance

Parameters

NameTypeDescription
targetAccuint8Account to transfer to
amountuint256Amount to transfer

testTransferToZeroAddress

function testTransferToZeroAddress(uint8 fromAcc, uint256 amount) public

Transfers to the zero account revert

Parameters

NameTypeDescription
fromAccuint8Account to transfer from
amountuint256Amount to transfer