Deposit/withdraw with BscScan (staking using Bscscan)
To perform emergency withdraw or deposit with smart contract directly
Last updated
To perform emergency withdraw or deposit with smart contract directly
Last updated
Here we will give you an example how to interact with smart contract directly rather then through website. We will be using $WEAVE single staking contract as example.
For every smart contracts on the blockchain, you will see different tabs on the block explorer. If a β appears on the "contract", it means the contract code is verified by the developer compared to what's running on the blockchain. Therefore, it can be "Read" or "Write" through the interface. You need to use customized ABI if contract is not verified.
You will be able to see the code if the contract is shown as verified.
Go to the contract address on the link above or you can go to BscScan and search the staking contract while Weave staking contract address is at 0x66683e3Ba87fd80772bE2A11cc0f4E47B3964813 . Go to "Read contract" and paste the "address" that you want to check balance of then hit "Query" to get respective info.
It's usually a 18 decimal system in a smart contract. The result we read below is "8000000000000000000", which is in reality "8". We had 8 BUSD as our staking balance in the smart contract. You can click the balance to see further elaboration
The result of 21 "user current deposits" identify your current deposits counts. "3" means there are currently 3 deposits.
The result of 22 "User deposit ID identify your total deposit ID(counts)
2. You can also read a different function of the smart contract. For example, you can read the "23rd" function of the "read contract" to get the info of each deposit ID.
Similarly, you can write the contract in this section. Please make sure you wallet is connected to the BscScan.
2. Find the function you want to implement, then enter the parameter then hit "write". You will need to make sure you had approved the contract already in order to proceed to send transaction in the blockchain. Here we will proceed a deposit. Go to item3, deposit and paste your address as recipient (address) and input quantity you want to deposit following by eighteen 0.
When we hit stake function in the example, we also need to put 18 decimals behind our numbers otherwise it will be recognized as wrong order.
3. The Metamask will popup a message to request you sign the transaction, you can approve the transaction then the staking(or the function you called) will be performed.
Make sure your wallet is connected to BscScan.
Go to "17 withdraw" function. Assign the deposit ID you want to withdraw. Choose to "write" the contract then approve the transaction in your Metamask. The contract will withdraw the amount of your "5th" deposit. You can do so until all your deposit IDs were withdraw.
Not all function can be called by users. Some function might designed for a testing purpose of is restricted by the contract creator.