State Variables
_VOLUME_MULTIPLIER
_BASIS_POINT
Functions
checkTokenMinTxSize
Check if transaction passes Token Min Tx Size rule.Name | Type | Description |
---|---|---|
_ruleId | uint32 | Rule Identifier for rule arguments |
amountToTransfer | uint256 | total number of tokens to be transferred |
getTokenMinTxSize
Function to get Token Min Tx Size rules by indexName | Type | Description |
---|---|---|
_index | uint32 | position of rule in array |
Name | Type | Description |
---|---|---|
<none> | NonTaggedRules.TokenMinTxSize | Rule at index |
getTotalTokenMinTxSize
Function to get total Token Min Tx Size rulesName | Type | Description |
---|---|---|
<none> | uint32 | Total length of array |
checkAccountApproveDenyOracles
This function receives an array of rule ids, which it uses to get the oracle details, then calls the oracle to determine permissions.Name | Type | Description |
---|---|---|
_rules | Rule[] | Rule Id Array |
_address | address | user address to be checked |
checkAccountApproveDenyOracle
This function receives a rule id, which it uses to get the oracle details, then calls the oracle to determine permissions.Name | Type | Description |
---|---|---|
_ruleId | uint32 | Rule Id |
_address | address | user address to be checked |
getAccountApproveDenyOracle
If Approve List Oracle rule active, address(0) is exempt to allow for burning Function get Account Approve Deny Oracle Rule by indexName | Type | Description |
---|---|---|
_index | uint32 | Position of rule in storage |
Name | Type | Description |
---|---|---|
<none> | NonTaggedRules.AccountApproveDenyOracle | AccountApproveDenyOracle at index |
getTotalAccountApproveDenyOracle
Function get total Account Approve Deny Oracle rulesName | Type | Description |
---|---|---|
<none> | uint32 | total accountApproveDenyOracleRules array length |
checkAccountApproveDenyOraclesFlexible
This function receives an array of rule ids, which it uses to get the oracle details, then calls the oracle to determine permissions.Name | Type | Description |
---|---|---|
_rules | Rule[] | Rule Id Array |
_toAddress | address | user address to be checked |
_fromAddress | address | user address to be checked |
checkAccountApproveDenyOracleFlexible
This function receives a rule id, which it uses to get the oracle details, then calls the oracle to determine permissions.Name | Type | Description |
---|---|---|
_ruleId | uint32 | Rule Id |
_toAddress | address | to address to be checked |
_fromAddress | address | to address to be checked |
_isAddressApproved
Function to check if the address(es) is in the approve oracleName | Type | Description |
---|---|---|
_oracleAddress | address | address of the approve oracle |
_toAddress | address | to address to be checked |
_fromAddress | address | to address to be checked |
_addressCheckToggle | uint8 | toggle the address to be checked: 0 = Both to and from Address, 1 = to address only, 2 = from address only, 3 = Either to or from address. |
_isAddressDenied
Function to check if the address(es) is in the denied oracleName | Type | Description |
---|---|---|
_oracleAddress | address | address of the denied oracle |
_toAddress | address | to address to be checked |
_fromAddress | address | to address to be checked |
_addressCheckToggle | uint8 | toggle the address to be checked: 0 = Both to and from Address, 1 = to address only, 2 = from address only, 3 = Either to or from address. |
getAccountApproveDenyOracleFlexible
Function get Account Approve Deny Oracle Flexible Rule by indexName | Type | Description |
---|---|---|
_index | uint32 | Position of rule in storage |
Name | Type | Description |
---|---|---|
<none> | NonTaggedRules.AccountApproveDenyOracleFlexible | AccountApproveDenyOracleFlexible at index |
getTotalAccountApproveDenyOracleFlexible
Function get total Account Approve Deny Oracle Flexible rulesName | Type | Description |
---|---|---|
<none> | uint32 | total accountApproveDenyOracleFlexibleRules array length |
checkTokenMaxTradingVolume
If the totalSupply value is set in the rule, it is set as the circulating supply. Otherwise, this function uses the ERC20 totalSupply sent from handler. Rule checks if the Token Max Trading Volume rule will be violated.Name | Type | Description |
---|---|---|
_ruleId | uint32 | Rule identifier for rule arguments |
_volume | uint256 | token’s trading volume thus far |
_supply | uint256 | Number of tokens in supply |
_amount | uint256 | Number of tokens to be transferred from this account |
_lastTransferTime | uint64 | the time of the last transfer |
Name | Type | Description |
---|---|---|
<none> | uint256 | _volume new accumulated volume |
getTokenMaxTradingVolume
if the totalSupply value is set in the rule, use that as the circulating supply. Otherwise, use the ERC20 totalSupply(sent from handler) Function get Token Max Trading Volume by indexName | Type | Description |
---|---|---|
_index | uint32 | position of rule in array |
Name | Type | Description |
---|---|---|
<none> | NonTaggedRules.TokenMaxTradingVolume | TokenMaxTradingVolume rule at index position |
getTotalTokenMaxTradingVolume
Function to get total Token Max Trading Volume rulesName | Type | Description |
---|---|---|
<none> | uint32 | Total length of array |
checkTokenMaxSupplyVolatility
If the totalSupply value is set in the rule, it is set as the circulating supply. Otherwise, this function uses the ERC20 totalSupply sent from handler. Rule checks if the Token Max Supply Volatility rule will be violated.Name | Type | Description |
---|---|---|
_ruleId | uint32 | Rule identifier for rule arguments |
_volumeTotalForPeriod | int256 | token’s trading volume for the period |
_tokenTotalSupply | uint256 | the total supply from token tallies |
_supply | uint256 | token total supply value |
_amount | int256 | amount in the current transfer |
_lastSupplyUpdateTime | uint64 | the last timestamp the supply was updated |
Name | Type | Description |
---|---|---|
<none> | int256 | _volumeTotalForPeriod properly adjusted total for the current period |
<none> | uint256 | _tokenTotalSupply properly adjusted token total supply. This is necessary because if the token’s total supply is used it skews results within the period |
getTokenMaxSupplyVolatility
Account for the very first period The _tokenTotalSupply is not modified during the rule period. It needs to stay the same value as what it was at the beginning of the period to keep consistent results since mints/burns change totalSupply in the token. Update total supply of token when outside of rule period Function to get Token Max Supply Volatility rule by indexName | Type | Description |
---|---|---|
_index | uint32 | position of rule in array |
Name | Type | Description |
---|---|---|
<none> | NonTaggedRules.TokenMaxSupplyVolatility | tokenMaxSupplyVolatility Rule |
getTotalTokenMaxSupplyVolatility
Function to get total Token Max Supply Volatility rulesName | Type | Description |
---|---|---|
<none> | uint32 | tokenMaxSupplyVolatility Rules total length of array |
checkTokenMaxBuySellVolume
Function receives a rule id, retrieves the rule data and checks if the Token Max Buy Sell Volume Rule passesName | Type | Description |
---|---|---|
ruleId | uint32 | id of the rule to be checked |
currentTotalSupply | uint256 | total supply value passed in by the handler. This is for ERC20 tokens with a fixed total supply. |
amountToTransfer | uint256 | total number of tokens to be transferred in transaction. |
lastTransactionTime | uint64 | time of the most recent purchase from AMM. This starts the check if current transaction is within a purchase window. |
totalWithinPeriod | uint256 | total amount of tokens sold within current period |
getTokenMaxBuySellVolume
Function get Token Max Buy Sell Volume by indexName | Type | Description |
---|---|---|
_index | uint32 | position of rule in array |
Name | Type | Description |
---|---|---|
<none> | NonTaggedRules.TokenMaxBuySellVolume | tokenMaxSellVolumeRules rule at index position |
getTotalTokenMaxBuySellVolume
Function to get total Token Max Buy Sell Volume rulesName | Type | Description |
---|---|---|
<none> | uint32 | Total length of array |