Skip to main content

CloberPriceBookDeployer

CloberPriceBookDeployer

deployArithmeticPriceBook

function deployArithmeticPriceBook(uint128 a, uint128 d) external returns (address)

Deploys an arithmetic price book.

Parameters

NameTypeDescription
auint128The starting price point.
duint128The common difference between price points.

Return Values

NameTypeDescription
[0]addressThe address of the deployed arithmetic price book.

deployGeometricPriceBook

function deployGeometricPriceBook(uint128 a, uint128 r) external returns (address)

Deploys a geometric price book.

Parameters

NameTypeDescription
auint128The scale factor of the price points.
ruint128The common ratio between price points.

Return Values

NameTypeDescription
[0]addressThe address of the deployed geometric price book.

computeArithmeticPriceBookAddress

function computeArithmeticPriceBookAddress(uint128 a, uint128 d) external view returns (address)

Computes the address of an arithmetic price book.

Parameters

NameTypeDescription
auint128The starting price point.
duint128The common difference between price points.

Return Values

NameTypeDescription
[0]addressThe address of where the arithmetic price book is or would be deployed.

computeGeometricPriceBookAddress

function computeGeometricPriceBookAddress(uint128 a, uint128 r) external view returns (address)

Computes the address of a geometric price book.

Parameters

NameTypeDescription
auint128The scale factor of the price points.
ruint128The common ratio between price points.

Return Values

NameTypeDescription
[0]addressThe address of where the geometric price book is or would be deployed.