github.com/InjectiveLabs/sdk-go@v1.53.0/proto/injective/exchange/v1beta1/genesis.proto (about)

     1  syntax = "proto3";
     2  package injective.exchange.v1beta1;
     3  
     4  import "injective/exchange/v1beta1/exchange.proto";
     5  import "injective/exchange/v1beta1/tx.proto";
     6  import "gogoproto/gogo.proto";
     7  
     8  option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/exchange/types";
     9  
    10  // GenesisState defines the exchange module's genesis state.
    11  message GenesisState {
    12    // params defines all the parameters of related to exchange.
    13    Params params = 1 [ (gogoproto.nullable) = false ];
    14  
    15    // spot_markets is an array containing the genesis trade pairs
    16    repeated SpotMarket spot_markets = 2;
    17  
    18    // derivative_markets is an array containing the genesis derivative markets
    19    repeated DerivativeMarket derivative_markets = 3;
    20  
    21    // spot_orderbook defines the spot exchange limit orderbook active at genesis.
    22    repeated SpotOrderBook spot_orderbook = 4 [ (gogoproto.nullable) = false ];
    23  
    24    // derivative_orderbook defines the derivative exchange limit orderbook active
    25    // at genesis.
    26    repeated DerivativeOrderBook derivative_orderbook = 5
    27        [ (gogoproto.nullable) = false ];
    28  
    29    // balances defines the exchange users balances active at genesis.
    30    repeated Balance balances = 6 [ (gogoproto.nullable) = false ];
    31  
    32    // positions defines the exchange derivative positions at genesis
    33    repeated DerivativePosition positions = 7 [ (gogoproto.nullable) = false ];
    34  
    35    // subaccount_trade_nonces defines the subaccount trade nonces for the
    36    // subaccounts at genesis
    37    repeated SubaccountNonce subaccount_trade_nonces = 8
    38        [ (gogoproto.nullable) = false ];
    39  
    40    // expiry_futures_market_info defines the market info for the expiry futures
    41    // markets at genesis
    42    repeated ExpiryFuturesMarketInfoState expiry_futures_market_info_state = 9
    43        [ (gogoproto.nullable) = false ];
    44  
    45    // perpetual_market_info defines the market info for the perpetual derivative
    46    // markets at genesis
    47    repeated PerpetualMarketInfo perpetual_market_info = 10
    48        [ (gogoproto.nullable) = false ];
    49  
    50    // perpetual_market_funding_state defines the funding state for the perpetual
    51    // derivative markets at genesis
    52    repeated PerpetualMarketFundingState perpetual_market_funding_state = 11
    53        [ (gogoproto.nullable) = false ];
    54  
    55    // derivative_market_settlement_scheduled defines the scheduled markets for
    56    // settlement at genesis
    57    repeated DerivativeMarketSettlementInfo
    58        derivative_market_settlement_scheduled = 12
    59        [ (gogoproto.nullable) = false ];
    60  
    61    // sets spot markets as enabled
    62    bool is_spot_exchange_enabled = 13;
    63  
    64    // sets derivative markets as enabled
    65    bool is_derivatives_exchange_enabled = 14;
    66  
    67    // the current trading reward campaign info
    68    TradingRewardCampaignInfo trading_reward_campaign_info = 15;
    69  
    70    // the current and upcoming trading reward campaign pools
    71    repeated CampaignRewardPool trading_reward_pool_campaign_schedule = 16;
    72  
    73    // the current trading reward account points
    74    repeated TradingRewardCampaignAccountPoints
    75        trading_reward_campaign_account_points = 17;
    76  
    77    // the fee discount schedule
    78    FeeDiscountSchedule fee_discount_schedule = 18;
    79  
    80    // the cached fee discount account tiers with TTL
    81    repeated FeeDiscountAccountTierTTL fee_discount_account_tier_ttl = 19;
    82  
    83    // the fee discount paid by accounts in all buckets
    84    repeated FeeDiscountBucketVolumeAccounts fee_discount_bucket_volume_accounts =
    85        20;
    86  
    87    // sets the first fee cycle as finished
    88    bool is_first_fee_cycle_finished = 21;
    89  
    90    // the current and upcoming trading reward campaign pending pools
    91    repeated CampaignRewardPool pending_trading_reward_pool_campaign_schedule =
    92        22;
    93  
    94    // the pending trading reward account points
    95    repeated TradingRewardCampaignAccountPendingPoints
    96        pending_trading_reward_campaign_account_points = 23;
    97  
    98    // the addresses opting out of trading rewards
    99    repeated string rewards_opt_out_addresses = 24;
   100  
   101    repeated TradeRecords historical_trade_records = 25;
   102  
   103    // binary_options_markets is an array containing the genesis binary options
   104    // markets
   105    repeated BinaryOptionsMarket binary_options_markets = 26;
   106  
   107    // binary_options_markets_scheduled_for_settlement contains the marketIDs of
   108    // binary options markets scheduled for next-block settlement
   109    repeated string binary_options_market_ids_scheduled_for_settlement = 27;
   110  
   111    // spot_market_ids_scheduled_to_force_close defines the scheduled markets for
   112    // forced closings at genesis
   113    repeated string spot_market_ids_scheduled_to_force_close = 28;
   114  
   115    // denom_decimals defines the denom decimals for the exchange.
   116    repeated DenomDecimals denom_decimals = 29 [ (gogoproto.nullable) = false ];
   117  
   118    // conditional_derivative_orderbook contains conditional orderbooks for all
   119    // markets (both lmit and market conditional orders)
   120    repeated ConditionalDerivativeOrderBook conditional_derivative_orderbooks =
   121        30;
   122  
   123    // market_fee_multipliers contains any non-default atomic order fee
   124    // multipliers
   125    repeated MarketFeeMultiplier market_fee_multipliers = 31;
   126  
   127    repeated OrderbookSequence orderbook_sequences = 32;
   128  
   129    repeated AggregateSubaccountVolumeRecord subaccount_volumes = 33;
   130  
   131    repeated MarketVolume market_volumes = 34;
   132  
   133    repeated FullGrantAuthorizations grant_authorizations = 35;
   134  
   135    repeated FullActiveGrant active_grants = 36;
   136  }
   137  
   138  message OrderbookSequence {
   139    uint64 sequence = 1;
   140    string market_id = 2;
   141  }
   142  
   143  message FeeDiscountAccountTierTTL {
   144    string account = 1;
   145    FeeDiscountTierTTL tier_ttl = 2;
   146  }
   147  
   148  message FeeDiscountBucketVolumeAccounts {
   149    int64 bucket_start_timestamp = 1;
   150    repeated AccountVolume account_volume = 2;
   151  }
   152  
   153  message AccountVolume {
   154    string account = 1;
   155    string volume = 2 [
   156      (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
   157      (gogoproto.nullable) = false
   158    ];
   159  }
   160  
   161  message TradingRewardCampaignAccountPoints {
   162    string account = 1;
   163    string points = 2 [
   164      (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
   165      (gogoproto.nullable) = false
   166    ];
   167  }
   168  
   169  message TradingRewardCampaignAccountPendingPoints {
   170    int64 reward_pool_start_timestamp = 1;
   171    repeated TradingRewardCampaignAccountPoints account_points = 2;
   172  }
   173  
   174  // Spot Exchange Limit Orderbook
   175  message SpotOrderBook {
   176    option (gogoproto.equal) = false;
   177    option (gogoproto.goproto_getters) = false;
   178  
   179    string market_id = 1;
   180    bool isBuySide = 2;
   181    repeated SpotLimitOrder orders = 3;
   182  }
   183  
   184  // Derivative Exchange Limit Orderbook
   185  message DerivativeOrderBook {
   186    option (gogoproto.equal) = false;
   187    option (gogoproto.goproto_getters) = false;
   188  
   189    string market_id = 1;
   190    bool isBuySide = 2;
   191    repeated DerivativeLimitOrder orders = 3;
   192  }
   193  
   194  // Orderbook containing limit & market conditional orders
   195  message ConditionalDerivativeOrderBook {
   196    option (gogoproto.equal) = false;
   197    option (gogoproto.goproto_getters) = false;
   198  
   199    string market_id = 1;
   200    repeated DerivativeLimitOrder limit_buy_orders = 2;
   201    repeated DerivativeMarketOrder market_buy_orders = 3;
   202    repeated DerivativeLimitOrder limit_sell_orders = 4;
   203    repeated DerivativeMarketOrder market_sell_orders = 5;
   204  }
   205  
   206  message Balance {
   207    option (gogoproto.equal) = false;
   208    option (gogoproto.goproto_getters) = false;
   209  
   210    string subaccount_id = 1;
   211    string denom = 2;
   212    Deposit deposits = 3;
   213  }
   214  
   215  message DerivativePosition {
   216    option (gogoproto.equal) = false;
   217    option (gogoproto.goproto_getters) = false;
   218  
   219    string subaccount_id = 1;
   220    string market_id = 2;
   221    Position position = 3;
   222  }
   223  
   224  message SubaccountNonce {
   225    option (gogoproto.equal) = false;
   226    option (gogoproto.goproto_getters) = false;
   227  
   228    string subaccount_id = 1;
   229    SubaccountTradeNonce subaccount_trade_nonce = 2
   230        [ (gogoproto.nullable) = false ];
   231  }
   232  
   233  message ExpiryFuturesMarketInfoState {
   234    string market_id = 1;
   235    ExpiryFuturesMarketInfo market_info = 2;
   236  }
   237  
   238  message PerpetualMarketFundingState {
   239    string market_id = 1;
   240    PerpetualMarketFunding funding = 2;
   241  }
   242  
   243  message FullGrantAuthorizations {
   244    string granter = 1;
   245    string total_grant_amount = 2 [
   246      (gogoproto.customtype) = "cosmossdk.io/math.Int",
   247      (gogoproto.nullable) = false
   248    ];
   249    int64 last_delegations_checked_time = 3;
   250    repeated GrantAuthorization grants = 4;
   251  }
   252  
   253  message FullActiveGrant {
   254    string grantee = 1;
   255    ActiveGrant active_grant = 2;
   256  }