getPoolData method
Future<({BigInt collectedToken0ProtocolFee, BigInt collectedToken1ProtocolFee, BigInt lpFee, BigInt protocolFee, InternalAddress protocolFeeAddress, BigInt refFee, BigInt reserve0, BigInt reserve1, InternalAddress token0WalletAddress, InternalAddress token1WalletAddress})>
getPoolData()
Implementation
Future<
({
BigInt reserve0,
BigInt reserve1,
InternalAddress token0WalletAddress,
InternalAddress token1WalletAddress,
BigInt lpFee,
BigInt protocolFee,
BigInt refFee,
InternalAddress protocolFeeAddress,
BigInt collectedToken0ProtocolFee,
BigInt collectedToken1ProtocolFee,
})> getPoolData() async {
final result = await provider!.get("get_pool_data", []);
return (
reserve0: result.stack.readBigInt(), //reserve0
reserve1: result.stack.readBigInt(), // reserve1
token0WalletAddress: result.stack.readAddress(), // token0WalletAddress
token1WalletAddress: result.stack.readAddress(), // token1WalletAddress
lpFee: result.stack.readBigInt(), // lpFee
protocolFee: result.stack.readBigInt(), //protocolFee
refFee: result.stack.readBigInt(), //refFee
protocolFeeAddress: result.stack.readAddress(), //protocolFeeAddress
collectedToken0ProtocolFee:
result.stack.readBigInt(), //collectedToken0ProtocolFee
collectedToken1ProtocolFee:
result.stack.readBigInt() // collectedToken1ProtocolFee
);
}