Git Source

Author: @ShaneDuncan602 @oscarsernarosero @TJ-Everett

This interface outlines the storage structures for each rule stored in diamond

The data structure of each rule storage inside the diamond.

Structs

AccountMaxTradeSizeS

Note The following are market-related oppertation rules. Checks depend on the accuracy of the method to determine when a transfer is part of a trade and what direction it is taking (buy or sell). **** Account Max Trade Sizes ****

struct AccountMaxTradeSizeS {
    mapping(uint32 => mapping(bytes32 => ITaggedRules.AccountMaxTradeSize)) accountMaxTradeSizeRules;
    mapping(uint32 => uint64) startTimes;
    uint32 accountMaxTradeSizeIndex;
}

TokenMaxBuySellVolumeS

**** Token Max Buy Sell Volume ****

struct TokenMaxBuySellVolumeS {
    mapping(uint32 => INonTaggedRules.TokenMaxBuySellVolume) tokenMaxBuySellVolumeRules;
    uint32 tokenMaxBuySellVolumeIndex;
}

PurchaseFeeByVolRuleS

**** Token Purchase Fee By Volume Rules ****

struct PurchaseFeeByVolRuleS {
    mapping(uint32 => INonTaggedRules.TokenPurchaseFeeByVolume) purchaseFeeByVolumeRules;
    uint32 purchaseFeeByVolumeRuleIndex;
}

TokenMaxPriceVolatilityS

**** Token Max Price Volatility ****

struct TokenMaxPriceVolatilityS {
    mapping(uint32 => INonTaggedRules.TokenMaxPriceVolatility) tokenMaxPriceVolatilityRules;
    uint32 tokenMaxPriceVolatilityIndex;
}

TokenMaxTradingVolumeS

**** Token Max Trading Volume ****

struct TokenMaxTradingVolumeS {
    mapping(uint32 => INonTaggedRules.TokenMaxTradingVolume) tokenMaxTradingVolumeRules;
    uint32 tokenMaxTradingVolumeIndex;
}

TokenMinTxSizeS

**** Token Min Tx Size ****

struct TokenMinTxSizeS {
    mapping(uint32 => INonTaggedRules.TokenMinTxSize) tokenMinTxSizeRules;
    uint32 tokenMinTxSizeIndex;
}

AccountMinMaxTokenBalanceS

**** Account Minimum/Maximum Token Balance ****

struct AccountMinMaxTokenBalanceS {
    mapping(uint32 => mapping(bytes32 => ITaggedRules.AccountMinMaxTokenBalance)) accountMinMaxTokenBalanceRules;
    mapping(uint32 => uint64) startTimes;
    uint32 accountMinMaxTokenBalanceIndex;
}

TokenMaxSupplyVolatilityS

**** Token Max Supply Volatility ****

struct TokenMaxSupplyVolatilityS {
    mapping(uint32 => INonTaggedRules.TokenMaxSupplyVolatility) tokenMaxSupplyVolatilityRules;
    uint32 tokenMaxSupplyVolatilityIndex;
}

AccountApproveDenyOracleS

**** Account Approve/Deny Oracle ****

struct AccountApproveDenyOracleS {
    mapping(uint32 => INonTaggedRules.AccountApproveDenyOracle) accountApproveDenyOracleRules;
    uint32 accountApproveDenyOracleIndex;
}

TokenMinHoldTimeS

**** Token Min Hold Time ****

struct TokenMinHoldTimeS {
    mapping(uint32 => INonTaggedRules.TokenMinHoldTime) tokenMinHoldTimeRules;
    uint32 tokenMinHoldTimeIndex;
}

AccountMaxValueByAccessLevelS

AccessLevel Rules *** /**** **** Account Max Value by Access Level ****

struct AccountMaxValueByAccessLevelS {
    mapping(uint32 => mapping(uint8 => uint48)) accountMaxValueByAccessLevelRules;
    uint32 accountMaxValueByAccessLevelIndex;
}

AccountMaxValueOutByAccessLevelS

**** Account Max Value Out by Access Level ****

struct AccountMaxValueOutByAccessLevelS {
    mapping(uint32 => mapping(uint8 => uint48)) accountMaxValueOutByAccessLevelRules;
    uint32 accountMaxValueOutByAccessLevelIndex;
}

TokenMaxDailyTradesS

NFT Rules **** /**** **** Token Max Daily Trades ****

struct TokenMaxDailyTradesS {
    mapping(uint32 => mapping(bytes32 => ITaggedRules.TokenMaxDailyTrades)) tokenMaxDailyTradesRules;
    uint32 tokenMaxDailyTradesIndex;
}

AccountMaxValueByRiskScoreS

Risk Rules **** /**** **** Account Max Value By Risk Score Rules ****

struct AccountMaxValueByRiskScoreS {
    mapping(uint32 => IApplicationRules.AccountMaxValueByRiskScore) accountMaxValueByRiskScoreRules;
    uint32 accountMaxValueByRiskScoreIndex;
}

AccountMaxTxValueByRiskScoreS

**** Account Max Transaction Value By Period Rules ****

struct AccountMaxTxValueByRiskScoreS {
    mapping(uint32 => IApplicationRules.AccountMaxTxValueByRiskScore) accountMaxTxValueByRiskScoreRules;
    uint32 accountMaxTxValueByRiskScoreIndex;
}

AMMFeeRuleS

Fee Rules **** /**** **** AMM Fee Rule ****

struct AMMFeeRuleS {
    mapping(uint32 => IFeeRules.AMMFeeRule) ammFeeRules;
    uint32 ammFeeRuleIndex;
}

EnabledActions

**** Storage of RuleApplicationValidationFacet ****

struct EnabledActions {
    mapping(bytes32 => mapping(ActionTypes => bool)) isActionEnabled;
}