MCPcopy Create free account
hub / github.com/Sifchain/sifnode / NewPool

Function NewPool

x/clp/types/types.go:12–19  ·  view source on GitHub ↗

NewPool returns a new Pool

(externalAsset *Asset, nativeAssetBalance, externalAssetBalance, poolUnits sdk.Uint)

Source from the content-addressed store, hash-verified

10
11// NewPool returns a new Pool
12func NewPool(externalAsset *Asset, nativeAssetBalance, externalAssetBalance, poolUnits sdk.Uint) Pool {
13 pool := Pool{ExternalAsset: externalAsset,
14 NativeAssetBalance: nativeAssetBalance,
15 ExternalAssetBalance: externalAssetBalance,
16 PoolUnits: poolUnits}
17
18 return pool
19}
20
21func (p *Pool) ExtractValues(to Asset) (sdk.Uint, sdk.Uint, bool, Asset) {
22 var X, Y sdk.Uint

Callers 6

CreatePoolMethod · 0.92
GenerateRandomPoolFunction · 0.92
GeneratePoolsSetLPsFunction · 0.92
GeneratePoolsAndLPsFunction · 0.92
Test_NewPoolFunction · 0.85
Test_TypesValidateFunction · 0.85

Calls

no outgoing calls

Tested by 2

Test_NewPoolFunction · 0.68
Test_TypesValidateFunction · 0.68