Comment on page
9. Check Funds on Private Pool
Check detailed information on funds deposited in private public liquidity pool.
TBD: Narratives
Could not load image
Liquidity Info Panel
Item | Description |
Contract Address | Private pool contract (referenced by Smart Contract Overview section) |
Contract Name | SLDDAIPools2.sol |
Function | function getLPAmountInfo() public view returns(uint256 deposit,uint256 availabe,uint256 locked) |
Function Selector | 0x53ac2d24 |
Invocation Type | Ethereum Call |
Passing Parameters | None |
Return Value | Total deposited amount; available amount; locked amount |
{
"inputs": [],
"name": "getLPAmountInfo",
"outputs": [{
"internalType": "uint256",
"name": "deposit",
"type": "uint256"
}, {
"internalType": "uint256",
"name": "availabe",
"type": "uint256"
}, {
"internalType": "uint256",
"name": "locked",
"type": "uint256"
}],
"stateMutability": "view",
"type": "function"
}
JavaScript
Python
// This example is written by using Web3.js
// More details on Web3.js could be found here - https://web3js.readthedocs.io/
var Web3 = require('web3');
const BigNumber = require('bignumber.js');
// BSC Mainnet: https://bsc-dataseed.binance.org
// BSC Testnet: https://data-seed-prebsc-1-s1.binance.org:8545
const web3 = new Web3("https://data-seed-prebsc-1-s1.binance.org:8545");
const CONTRACT_ADDRESS = "Replace with private pool contract address";
const ABI = [{
"inputs": [],
"name": "getLPAmountInfo",
"outputs": [{
"internalType": "uint256",
"name": "deposit",
"type": "uint256"
}, {
"internalType": "uint256",
"name": "availabe",
"type": "uint256"
}, {
"internalType": "uint256",
"name": "locked",
"type": "uint256"
}],
"stateMutability": "view",
"type": "function"
}];
var contract = new web3.eth.Contract(ABI, CONTRACT_ADDRESS);
contract.methods.getLPAmountInfo().call({
}, function(error, result){
if(!error) {
console.log('Response:', result);
} else {
console.log(error);
}
});
# This example is written by using Web3.py
# More details on Web3.py could be found here - https://web3py.readthedocs.io/
post
(BSC Mainnet) https://bsc-dataseed.binance.org
/
Send a call request to get private pool info
Request Body Example:
{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x60e2be64528dbe4e5892254d3dad83809a3f6f3a",
"data": "0x53ac2d24"
},
"latest"
],
"id": 1234
}
CURL Example:
curl --location --request POST 'https://data-seed-prebsc-1-s1.binance.org:8545' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"from": "0x0000000000000000000000000000000000000000",
"to": "0x60e2be64528dbe4e5892254d3dad83809a3f6f3a",
"data": "0x53ac2d24"
},
"latest"
],
"id": 1234
}'
Last modified 8mo ago