ConversionRatesInterface
interface ConversionRatesInterface
Source: ConversionRatesInterface.sol
INDEX
<AUTOGENERATED_TABLE_OF_CONTENTS>
REFERENCE
Functions
getRate
Gets the conversion rate of the ERC20 token depending on quantity at block height
function getRate(ERC20 token, uint currentBlockNumber, bool buy, uint qty) public view returns (uint) | Parameter | Type | Description | | -------------------- |:-----:|:------------------------------------------------------------------:| | token
| ERC20 | ERC20 token contract address | | currentBlockNumber
| uint | current block height or block number | | buy
| bool | true
if action is to buy, otherwise false
if action is to sell | | qty
| uint | wei amount of ERC20 tokens | Returns:\
Conversion rate of ERC20 token depending on quantity at block height
recordImbalance
Records the wei amount of net absolute (+/-) change for a token in a block
function recordImbalance(ERC20 token, int buyAmount, uint rateUpdateBlock, uint currentBlock) public | Parameter | Type | Description | | ----------------- |:-----:|:------------------------------------:| | token
| ERC20 | ERC20 token contract address | | buyAmount
| int | buy amount of ERC20 tokens in wei | | rateUpdateBlock
| uint | NOT SURE | | currentBlock
| uint | current block height or block number |