Comment on page
7. Deposit DAI to Private Pool
Deposit DAI to private liquidity pool.
TBD: Narratives & Differences between public pool and private pool
Could not load image
Private Pool Panel
Could not load image
Confirm Deposit
Item | Description |
Contract Address | Private pool contract (referenced by Smart Contract Overview section) |
Contract Name | SLDDAIPools2.sol |
Function | function provide(uint256 mintAmount) |
Function Selector | 0x2e2ebe06 |
Invocation Type | Ethereum Transaction |
Passing Parameters | Amount of DAIs to deposit; actual number multiplied by 1E18 |
Return Value | None |
Event Emitted | event ProvideLP2(address indexed account, uint256 amount); |
Event Signature | 0x26a27ab2f158d9fe04dea4c221634a0d50bdbb2a9fcdcc1960567eefa9c2ed0a |
Transaction Sample(BSC testnet) |
{
"inputs": [{
"internalType": "uint256",
"name": "mintAmount",
"type": "uint256"
}],
"name": "provide",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
JavaScript
Python
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": [{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}],
"name": "deposit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}];
// Deposit 10 DAI to private pool.
const DEPOSIT_AMOUNT = 10e18;
var contract = new web3.eth.Contract(ABI, CONTRACT_ADDRESS);
contract.methods.provide(new BigNumber(DEPOSIT_AMOUNT).toString()).send({
from: "CALLER_ADDRESS",
}, 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 Deposit Transaction
Last modified 8mo ago