This guide will walk you through using the Farms contract directly through BscScan.
Please understand that using BscScan to interact with contracts is not recommended for beginners. If you're not feeling confident, we suggest using the How to Use Farms guide instead.
To interact correctly with the farming smart contract, youโll need to find the farm/pool address. They can be found from the farm deployer contract or on the front-end.
1. Open https://bscscan.com/address/0x210dbf538ef70750e0eb6149005bf2d40d49d5b2#events
2. Look for the farm that was deployed.
3. Click on the farm address.
There are a few things involved in depositing LP Tokens using BscScan. We've broken it down into steps to make it easier to follow along.
You'll need to approve the smart contract for the LP Token you wish to commit to a farm before you can spend it.
1. First, visit the BabyDogeSwap Farms page and search for your chosen pair using the "SEARCH" field in the top right or find the farm on bscscan. We're using BabyDoge-BUSD for this example.
2. Click Details to expand the row to show more information.
3. Click View Contract to open the smart contract on BscScan.
Now that you have your LP Token's contract open on BscScan, you're going to approve the spending of your LP Tokens into the Farm.
1. On the LP Token's contract page, go to Contract, and then Write Contract.
2. Click Connect to Web3 to connect MetaMask.
Confirm the connection.
3. Under function 1, โapproveโ, youโll see โspender:addressโ. Paste in the farm contract address you copied to clipboard earlier.
5. Youโre also going to need to approve the amount of LP Tokens the contract can spend. In the value field, youโll need to enter the amount in Wei. You can use the BscScan Unit Converter to easily change your amount into Wei. Here we'll use 5 BabyDoge-BUSD LP Tokens.
You can also use -1
as the value to give unlimited spend approval. This does not mean you will spend everything by default, but only that a transaction of any size using this contract will be allowed by your wallet.
6. Click Write and accept the action in your MetaMask wallet. Youโre now able to commit LP Tokens to the Farm up to the amount youโve approved.
With the Contract now approved to spend your LP Tokens, it's time to make a deposit.
1. Back on the farm contract BscScan page, go to Contract, and then Write Contract.
2. Click Connect to Web3 to connect MetaMask.
3. Scroll to function, "deposit",
4. Enter the amount for the LP contract to spend that you approved earlier.
5. Check the information and click Write. Confirm your action in MetaMask.
6. You can confirm your deposit worked by clicking View your transaction.
Withdrawing your LP Tokens from a Pool is very similar to making a deposit. The difference is which function you'll interact with.
1. Back on the Farm Contract BscScan page, go to Contract, and then Read Contract.
2. Click Connect to Web3 to connect MetaMask.
3. Scroll all the way down to function 20, "userInfo", and type your address to get the amount of shares.
Copy the amount of shares.
5. Go to Write Contract.
6. Scroll all the way down to function 16 "withdraw" and enter paste the shares amount
7. You can confirm your withdrawal worked by clicking View your transaction.
โUsing the emergency withdraw function allows you to draw all your funds out of a pool when no other way is working.
Using the emergency withdraw function will forfeit your BabyDoge rewards!
The BabyDogeSwap team strongly suggests avoiding this function unless advised to do so officially by the BabyDogeSwap team, or if you are very comfortable interacting with smart contracts and understand the underlying code.
โ1. On the farming Contract BscScan page, go to Contract, and then Write Contract.
2. Click Connect to Web3 to connect MetaMask.
โ3. Scroll down to function 3, "emergencyWithdraw"
5. Check the information and click Write. Confirm your action in MetaMask.
6. You can confirm your withdrawal worked by clicking View your transaction.