collateral_pool

package
v0.0.0-...-13dda56 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2025 License: AGPL-3.0, AGPL-3.0-or-later Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCollateralPool

func GenerateCollateralPool(optionalModifications ...CpModifierOption) *perptypes.CollateralPool

GenerateCollateralPool returns a `CollateralPool` object set to default values. Passing in `CpModifierOption` methods alters the value of the `CollateralPool` returned. It will start with the default, valid `CollateralPool` value defined within the method and make the requested modifications before returning the object.

Example usage: `GenerateLiquidityTier(WithId(7))` This will start with the default `LiquidityTier` object defined within the method and return the newly-created object after overriding the values of `Id` to 7.

Types

type CpModifierOption

type CpModifierOption func(cp *perptypes.CollateralPool)

func WithCollateralPoolId

func WithCollateralPoolId(collateralPoolId uint32) CpModifierOption

func WithMaxCumulativeInsuranceFundDeltaPerBlock

func WithMaxCumulativeInsuranceFundDeltaPerBlock(maxCumulativeInsuranceFundDeltaPerBlock uint64) CpModifierOption

func WithMultiCollateralAssets

func WithMultiCollateralAssets(multiCollateralAssets []uint32) CpModifierOption

func WithQuoteAssetId

func WithQuoteAssetId(quoteAssetId uint32) CpModifierOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL