github.com/diadata-org/diadata@v1.4.593/pkg/dia/helpers/hydration-helper/model.go (about)

     1  package hydrationhelper
     2  
     3  const (
     4  	DefaultRefreshDelay              = 400 // millisec
     5  	DefaultSleepBetweenContractCalls = 300 // millisec
     6  	DefaultEventsLimit               = 100
     7  	DefaultSwapContractsLimit        = 100
     8  )
     9  
    10  type HydrationAssetMetadata struct {
    11  	Id                 string `json:"id"`
    12  	Name               string `json:"name"`
    13  	Symbol             string `json:"symbol"`
    14  	Decimals           uint   `json:"decimals"`
    15  	Icon               string `json:"icon"`
    16  	Type               string `json:"type"`
    17  	IsSufficient       bool   `json:"isSufficient"`
    18  	ExistentialDeposit string `json:"existentialDeposit"`
    19  	Origin             int    `json:"origin"`
    20  }
    21  
    22  type HydrationPoolTokenMetada struct {
    23  	ID                 string `json:"id"`
    24  	Balance            string `json:"balance"`
    25  	Name               string `json:"name"`
    26  	Symbol             string `json:"symbol"`
    27  	Decimals           int    `json:"decimals"`
    28  	Icon               string `json:"icon"`
    29  	Type               string `json:"type"`
    30  	IsSufficient       bool   `json:"isSufficient"`
    31  	ExistentialDeposit string `json:"existentialDeposit"`
    32  	Origin             int    `json:"origin,omitempty"`
    33  	UsdBalance         string `json:"usdBalance"`
    34  	Index              int    `json:"index"`
    35  }
    36  
    37  type HydrationPoolUsdBalanceMetadata struct {
    38  	Amount   string `json:"amount"`
    39  	Decimals int    `json:"decimals"`
    40  }
    41  
    42  type HydrationPoolMetada struct {
    43  	Address         string                     `json:"address"`
    44  	Type            string                     `json:"type"`
    45  	Tokens          []HydrationPoolTokenMetada `json:"tokens"`
    46  	MaxInRatio      int                        `json:"maxInRatio"`
    47  	MaxOutRatio     int                        `json:"maxOutRatio"`
    48  	MinTradingLimit int                        `json:"minTradingLimit"`
    49  }
    50  
    51  type HydrationSwapEvent struct {
    52  	TxID      string `json:"txId"`
    53  	Timestamp int64  `json:"timestamp"`
    54  	BlockHash string `json:"blockHash"`
    55  	AssetIn   string `json:"assetIn"`
    56  	AssetOut  string `json:"assetOut"`
    57  	AmountIn  string `json:"amountIn"`
    58  	AmountOut string `json:"amountOut"`
    59  }