State Variables
MAX_TOKEN_PERCENTAGE
MAX_PERCENTAGE
MAX_VOLUME_PERCENTAGE
MAX_ACCESSLEVELS
Functions
addTokenMaxBuySellVolume
Note that no update method is implemented for rules. Since reutilization of rules is encouraged, it is preferred to add an extra rule to the set instead of modifying an existing one. Function to add a Token Max Buy Sell Volume ruleName | Type | Description |
---|---|---|
_appManagerAddr | address | Address of App Manager |
_supplyPercentage | uint16 | Percentage of Tokens allowed for transaction |
_period | uint16 | Time period that transactions are accumulated (in hours) |
_totalSupply | uint256 | total supply of tokens (0 if using total supply from the token contract) |
_startTime | uint64 | start timestamp for the rule |
Name | Type | Description |
---|---|---|
<none> | uint32 | ruleId position of new rule in array |
addPurchaseFeeByVolumeRule
Function to add a Token Purchase Fee By Volume ruleName | Type | Description |
---|---|---|
_appManagerAddr | address | Address of App Manager |
_volume | uint256 | Maximum allowed volume |
_rateIncreased | uint16 | Amount rate increased |
Name | Type | Description |
---|---|---|
<none> | uint32 | ruleId position of new rule in array |
getPurchaseFeeByVolumeRule
Function get Token PurchaseFeeByVolume Rule by indexName | Type | Description |
---|---|---|
_index | uint32 | position of rule in array |
Name | Type | Description |
---|---|---|
<none> | NonTaggedRules.TokenPurchaseFeeByVolume | TokenPurchaseFeeByVolume rule at index position |
getTotalTokenPurchaseFeeByVolumeRules
Function to get total Token Purchase PercentageName | Type | Description |
---|---|---|
<none> | uint32 | Total length of array |
addTokenMaxPriceVolatility
Function to add a Token Max Price Volatility ruleName | Type | Description |
---|---|---|
_appManagerAddr | address | Address of App Manager |
_max | uint16 | Maximum allowed volume |
_period | uint16 | period in hours for the rule |
_hoursFrozen | uint16 | freeze period hours |
_totalSupply | uint256 |
Name | Type | Description |
---|---|---|
<none> | uint32 | ruleId position of new rule in array |
getTokenMaxPriceVolatility
Function get Token Volatility Rule by indexName | Type | Description |
---|---|---|
_index | uint32 | position of rule in array |
Name | Type | Description |
---|---|---|
<none> | NonTaggedRules.TokenMaxPriceVolatility | tokenMaxPriceVolatilityRules rule at index position |
getTotalTokenMaxPriceVolatility
Function to get total Volatility rulesName | Type | Description |
---|---|---|
<none> | uint32 | Total length of array |
addTokenMaxTradingVolume
Function to add a Token max trading Volume rulesName | Type | Description |
---|---|---|
_appManagerAddr | address | Address of App Manager |
_maxPercentage | uint24 | Maximum allowed volume percentage (this is 4 digits to allow 2 decimal places) |
_hoursPerPeriod | uint16 | hours that define a period |
_startTime | uint64 | Timestamp to start the rule |
_totalSupply | uint256 | Circulating supply value to use in calculations. If not specified, defaults to ERC20 totalSupply |
Name | Type | Description |
---|---|---|
<none> | uint32 | ruleId position of new rule in array |
addTokenMinTxSize
Function to add Token Min Tx Size rulesName | Type | Description |
---|---|---|
_appManagerAddr | address | Address of App Manager |
_minSize | uint256 | Mimimum amount of tokens required for transfer |
Name | Type | Description |
---|---|---|
<none> | uint32 | ruleId position of new rule in array |
addTokenMaxSupplyVolatility
Function Token Max Supply Volatility rulesName | Type | Description |
---|---|---|
_appManagerAddr | address | Address of App Manager |
_maxPercentage | uint16 | Maximum amount of change allowed. This is not capped and will allow for values greater than 100%. Since there is no cap for _maxPercentage this could allow burning of full totalSupply() if over 100% (10000). |
_period | uint16 | Allowed hours per period |
_startTime | uint64 | Unix timestamp for the _period to start counting. |
_totalSupply | uint256 | this is an optional parameter. If 0, the toalSupply will be calculated dyamically. If not zero, this is going to be the locked value to calculate the rule |
Name | Type | Description |
---|---|---|
<none> | uint32 | ruleId position of new rule in array |
addAccountApproveDenyOracle
Function add an Account Approve/Deny Oracle ruleName | Type | Description |
---|---|---|
_appManagerAddr | address | Address of App Manager |
_type | uint8 | type of Oracle Rule —> 0 = restricted; 1 = allowed |
_oracleAddress | address | Address of Oracle |
Name | Type | Description |
---|---|---|
<none> | uint32 | ruleId position of rule in storage |
addAccountApproveDenyOracleFlexible
Function add an Account Approve Deny Oracle Flexible ruleName | Type | Description |
---|---|---|
_appManagerAddr | address | Address of App Manager |
_type | uint8 | type of Oracle Rule —> 0 = restricted; 1 = allowed |
_addressToggle | 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. |
_oracleAddress | address | Address of Oracle |
Name | Type | Description |
---|---|---|
<none> | uint32 | ruleId position of rule in storage |
addTokenMinHoldTime
Function add an Min Hold Time ruleName | Type | Description |
---|---|---|
_appManagerAddr | address | Address of App Manager |
_minHoldtime | uint32 | minimum number of full hours a token must be held. |
Name | Type | Description |
---|---|---|
<none> | uint32 | ruleId position of rule in storage |