Class: BiatecClammPoolClient
A client to make calls to the BiatecClammPool smart contract
Constructors
Constructor
new BiatecClammPoolClient(
appClient):BiatecClammPoolClient
Creates a new instance of BiatecClammPoolClient
Parameters
appClient
_AppClient
An AppClient instance which has been created with the BiatecClammPool app spec
Returns
BiatecClammPoolClient
Constructor
new BiatecClammPoolClient(
params):BiatecClammPoolClient
Creates a new instance of BiatecClammPoolClient
Parameters
params
Omit<AppClientParams, "appSpec">
The parameters to initialise the app client with
Returns
BiatecClammPoolClient
Properties
appClient
readonlyappClient:_AppClient
The underlying AppClient for when you want to have more flexibility
params
readonlyparams:object
Get parameters to create transactions for the current app. A good mental model for this is that these parameters represent a deferred transaction creation.
update
update:
object
Gets available update methods
update.updateApplication()
updateApplication: (
params) =>any
Updates an existing instance of the BiatecClammPool smart contract using the updateApplication(uint64,byte[])void ABI method.
addressUdpater from global biatec configuration is allowed to update application
Parameters
params
any
The params for the smart contract call
Returns
any
The update params
clearState()
clearState: (
params?) =>any
Makes a clear_state call to an existing instance of the BiatecClammPool smart contract.
Parameters
params?
any
The params for the bare (raw) call
Returns
any
The clearState result
getCurrentPrice()
getCurrentPrice: (
params) =>any
Makes a call to the BiatecClammPool smart contract using the getCurrentPrice()uint64 ABI method.
This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
Parameters
params
object & object = ...
The params for the smart contract call
Returns
any
The call params
getPriceDivider()
getPriceDivider: (
params) =>any
Makes a call to the BiatecClammPool smart contract using the getPriceDivider()uint64 ABI method.
This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
Parameters
params
object & object = ...
The params for the smart contract call
Returns
any
The call params
getLpTokenId()
getLpTokenId: (
params) =>any
Makes a call to the BiatecClammPool smart contract using the getLPTokenId()uint64 ABI method.
This method is a readonly method; calling it with onComplete of NoOp will result in a simulated transaction rather than a real transaction.
Parameters
params
object & object = ...
The params for the smart contract call
Returns
any
The call params
bootstrap()
bootstrap: (
params) =>any
Makes a call to the BiatecClammPool smart contract using the bootstrap(uint64,uint64,uint64,uint64,pay,uint64,uint64,uint64,uint64,uint64)uint64 ABI method.
Only Biatec Pool Provider can deploy and bootsrap this smart contract
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call params: LP token ID
bootstrapStep2()
bootstrapStep2: (
params) =>any
Makes a call to the BiatecClammPool smart contract using the bootstrapStep2()void ABI method.
When we know the app id of this pool, we can register it properly at the pool provider
Parameters
params
object & object = ...
The params for the smart contract call
Returns
any
The call params
addLiquidity()
addLiquidity: (
params) =>any
Makes a call to the BiatecClammPool smart contract using the addLiquidity(uint64,uint64,txn,txn,uint64,uint64,uint64)uint64 ABI method.
This method adds Asset A and Asset B to the Automated Market Maker Concentrated Liqudidity Pool and send to the liqudidty provider the liquidity token