Class: BiatecPoolProviderClient
A client to make calls to the BiatecPoolProvider smart contract
Constructors
Constructor
new BiatecPoolProviderClient(
appClient):BiatecPoolProviderClient
Creates a new instance of BiatecPoolProviderClient
Parameters
appClient
_AppClient
An AppClient instance which has been created with the BiatecPoolProvider app spec
Returns
BiatecPoolProviderClient
Constructor
new BiatecPoolProviderClient(
params):BiatecPoolProviderClient
Creates a new instance of BiatecPoolProviderClient
Parameters
params
Omit<AppClientParams, "appSpec">
The parameters to initialise the app client with
Returns
BiatecPoolProviderClient
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 BiatecPoolProvider 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 BiatecPoolProvider smart contract.
Parameters
params?
any
The params for the bare (raw) call
Returns
any
The clearState result
bootstrap()
bootstrap: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the bootstrap(uint64)void ABI method.
Biatec deploys single pool provider smart contract
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call params
getCurrentStatus()
getCurrentStatus: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the getCurrentStatus(uint64)(uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,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.
Returns current status
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call params: Pool info statistics
setNativeTokenName()
setNativeTokenName: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the setNativeTokenName(uint64,byte[])void ABI method.
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call params
loadClammContractData()
loadClammContractData: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the loadCLAMMContractData(uint64,uint64,uint64,byte[])void ABI method.
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call params
noop()
noop: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the noop(uint64)void ABI method.
No op tx to increase the app call and box size limits
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call params
deployPool()
deployPool: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the deployPool(uint64,uint64,uint64,uint64,pay,uint64,uint64,uint64,uint64,uint64)uint64 ABI method.
Anybody can call this method to bootstrap new clamm pool
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call params: LP token ID
registerPool()
registerPool: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the registerPool()void ABI method.
This method is called by constructor of the luquidity pool
Parameters
params
object & object = ...
The params for the smart contract call
Returns
any
The call params
registerTrade()
registerTrade: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the registerTrade(uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void ABI method.
This metod registers the trade and calculates and store the trade statistics
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call params
sendOnlineKeyRegistration()
sendOnlineKeyRegistration: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the sendOnlineKeyRegistration(uint64,byte[],byte[],byte[],uint64,uint64,uint64,uint64)void ABI method.
addressExecutiveFee can perfom key registration for this LP pool
Only addressExecutiveFee is allowed to execute this method.
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call params
withdrawExcessAssets()
withdrawExcessAssets: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the withdrawExcessAssets(uint64,uint64,uint64)uint64 ABI method.
If someone deposits excess assets to this smart contract biatec can use them.
Only addressExecutiveFee is allowed to execute this method.
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call params
getPrice()
getPrice: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the getPrice(uint64,uint64,uint64)(uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,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.
Retuns the full price info for the asset pair. If app pool is defined, then it returns the pool info.
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call params: AppPoolInfo with the price info for the asset pair
calculateAssetBWithdrawOnLpDeposit()
calculateAssetBWithdrawOnLpDeposit: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the calculateAssetBWithdrawOnLpDeposit(uint256,uint256,uint256)uint256 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.
Calculates how much asset B will be taken from the smart contract on LP asset deposit
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call params: Amount of asset B to be given to the caller before fees. The result is in Base decimals (9)
createTransaction
readonlycreateTransaction:object
Create transactions for the current app
update
update:
object
Gets available update methods
update.updateApplication()
updateApplication: (
params) =>any
Updates an existing instance of the BiatecPoolProvider 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 transaction
clearState()
clearState: (
params?) =>any
Makes a clear_state call to an existing instance of the BiatecPoolProvider smart contract.
Parameters
params?
any
The params for the bare (raw) call
Returns
any
The clearState result
bootstrap()
bootstrap: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the bootstrap(uint64)void ABI method.
Biatec deploys single pool provider smart contract
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call transaction
getCurrentStatus()
getCurrentStatus: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the getCurrentStatus(uint64)(uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,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.
Returns current status
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call transaction: Pool info statistics
setNativeTokenName()
setNativeTokenName: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the setNativeTokenName(uint64,byte[])void ABI method.
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call transaction
loadClammContractData()
loadClammContractData: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the loadCLAMMContractData(uint64,uint64,uint64,byte[])void ABI method.
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call transaction
noop()
noop: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the noop(uint64)void ABI method.
No op tx to increase the app call and box size limits
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call transaction
deployPool()
deployPool: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the deployPool(uint64,uint64,uint64,uint64,pay,uint64,uint64,uint64,uint64,uint64)uint64 ABI method.
Anybody can call this method to bootstrap new clamm pool
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call transaction: LP token ID
registerPool()
registerPool: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the registerPool()void ABI method.
This method is called by constructor of the luquidity pool
Parameters
params
object & object = ...
The params for the smart contract call
Returns
any
The call transaction
registerTrade()
registerTrade: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the registerTrade(uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void ABI method.
This metod registers the trade and calculates and store the trade statistics
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call transaction
sendOnlineKeyRegistration()
sendOnlineKeyRegistration: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the sendOnlineKeyRegistration(uint64,byte[],byte[],byte[],uint64,uint64,uint64,uint64)void ABI method.
addressExecutiveFee can perfom key registration for this LP pool
Only addressExecutiveFee is allowed to execute this method.
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call transaction
withdrawExcessAssets()
withdrawExcessAssets: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the withdrawExcessAssets(uint64,uint64,uint64)uint64 ABI method.
If someone deposits excess assets to this smart contract biatec can use them.
Only addressExecutiveFee is allowed to execute this method.
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call transaction
getPrice()
getPrice: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the getPrice(uint64,uint64,uint64)(uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,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.
Retuns the full price info for the asset pair. If app pool is defined, then it returns the pool info.
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call transaction: AppPoolInfo with the price info for the asset pair
calculateAssetBWithdrawOnLpDeposit()
calculateAssetBWithdrawOnLpDeposit: (
params) =>any
Makes a call to the BiatecPoolProvider smart contract using the calculateAssetBWithdrawOnLpDeposit(uint256,uint256,uint256)uint256 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.
Calculates how much asset B will be taken from the smart contract on LP asset deposit
Parameters
params
object & object
The params for the smart contract call
Returns
any
The call transaction: Amount of asset B to be given to the caller before fees. The result is in Base decimals (9)
send
readonlysend:object
Send calls to the current app
update
update:
object
Gets available update methods
update.updateApplication()
updateApplication: (
params) =>Promise<any>
Updates an existing instance of the BiatecPoolProvider 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
Promise<any>
The update result
clearState()
clearState: (
params?) =>any
Makes a clear_state call to an existing instance of the BiatecPoolProvider smart contract.
Parameters
params?
any
The params for the bare (raw) call
Returns
any
The clearState result
bootstrap()
bootstrap: (
params) =>Promise<any>
Makes a call to the BiatecPoolProvider smart contract using the bootstrap(uint64)void ABI method.
Biatec deploys single pool provider smart contract
Parameters
params
any
The params for the smart contract call
Returns
Promise<any>
The call result
getCurrentStatus()
getCurrentStatus: (
params) =>Promise<any>
Makes a call to the BiatecPoolProvider smart contract using the getCurrentStatus(uint64)(uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,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.
Returns current status
Parameters
params
any
The params for the smart contract call
Returns
Promise<any>
The call result: Pool info statistics
setNativeTokenName()
setNativeTokenName: (
params) =>Promise<any>
Makes a call to the BiatecPoolProvider smart contract using the setNativeTokenName(uint64,byte[])void ABI method.
Parameters
params
any
The params for the smart contract call
Returns
Promise<any>
The call result
loadClammContractData()
loadClammContractData: (
params) =>Promise<any>
Makes a call to the BiatecPoolProvider smart contract using the loadCLAMMContractData(uint64,uint64,uint64,byte[])void ABI method.
Parameters
params
any
The params for the smart contract call
Returns
Promise<any>
The call result
noop()
noop: (
params) =>Promise<any>
Makes a call to the BiatecPoolProvider smart contract using the noop(uint64)void ABI method.
No op tx to increase the app call and box size limits
Parameters
params
any
The params for the smart contract call
Returns
Promise<any>
The call result
deployPool()
deployPool: (
params) =>Promise<any>
Makes a call to the BiatecPoolProvider smart contract using the deployPool(uint64,uint64,uint64,uint64,pay,uint64,uint64,uint64,uint64,uint64)uint64 ABI method.
Anybody can call this method to bootstrap new clamm pool
Parameters
params
any
The params for the smart contract call
Returns
Promise<any>
The call result: LP token ID
registerPool()
registerPool: (
params) =>Promise<any>
Makes a call to the BiatecPoolProvider smart contract using the registerPool()void ABI method.
This method is called by constructor of the luquidity pool
Parameters
params
any = ...
The params for the smart contract call
Returns
Promise<any>
The call result
registerTrade()
registerTrade: (
params) =>Promise<any>
Makes a call to the BiatecPoolProvider smart contract using the registerTrade(uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64,uint64)void ABI method.
This metod registers the trade and calculates and store the trade statistics