Weave
Search…
⌃K

Deposit/withdraw with BscScan (staking using Bscscan)

To perform emergency withdraw or deposit with smart contract directly
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.

Introduction

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.
Code
Read contract
Write contract
You will be able to see the code if the contract is shown as verified.
You can read the content from the smart contract without connecting to the smart contract. For example, your balance in the smart contract.
Once you are connected to the smart contract, you can write data into the smart contract. For example, depositing, withdrawing or approving your spend limit.

Read Contract

  1. 1.
    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.

Write contract to stake your $Weave single token

  1. 1.
    Similarly, you can write the contract in this section. Please make sure you wallet is connected to the BscScan.
Connecting to 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.

Write contract to withdraw your $Weave single token

Make sure your wallet is connected to BscScan.
  1. 1.
    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.