updated img links for tenderly

This commit is contained in:
Aditya Sharma 2020-06-09 17:04:50 +05:30 committed by GitHub
parent 920f4260bd
commit bc83ebb6ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ Create an account on [tenderly](https://dashboard.tenderly.co/register?utm_sourc
Select `Simulator` from the side bar
![alt text]()
![alt text](https://github.com/InstaDApp/dsa-developers/blob/master/img/tenderly/simulator.png)
**Step 3:**
@ -22,15 +22,18 @@ Create a new simulation using `New Simulation` button present on the right side
Now, We will take a scenario from DSA which will throw an error of `gas required exceeds allowance` which is quite common.
We will try to cast the oasis sell spell and makers borrow spell with amount 0.2 DAI and slippage 1%.
![alt text]()
![alt text](https://github.com/InstaDApp/dsa-developers/blob/master/img/tenderly/spells.png)
Now, If we will cast the above spells, then it will thrown an error of `gas required exceeds allowance`. But it doesnt give any clue why it is throwing this error.
So, now we can use the DSAs estimateCastGas() function which provide us the amount of gasLimit we need to provide to the spells and in its Catch section we will print the error which will give us the data variable in case any error occurs.
![alt text]()
![alt text](https://github.com/InstaDApp/dsa-developers/blob/master/img/tenderly/estimate.png)
Now, after executing the dsa.estimateCastGas() function, it will return us error along with the data variable which we will use at tenderly.
![alt text]()
![alt text](https://github.com/InstaDApp/dsa-developers/blob/master/img/tenderly/dataVariable.png)
**Step: 4**
@ -42,26 +45,26 @@ Now, take the value of `data` key from the data object in terminal and provide i
In the Transaction Parameters change the `From` variable to your address which has DSA setup already.
![alt text]()
![alt text](https://github.com/InstaDApp/dsa-developers/blob/master/img/tenderly/newSimulation.png)
Now, When we simulate the transaction it will tell us with the whole call stack and if the transaction will go through or not.
![alt text]()
![alt text](https://github.com/InstaDApp/dsa-developers/blob/master/img/tenderly/tenderlyError.png)
In our case, it is showing that the transaction has failed along with an error `execution reverted`.
But this time the error is quite understandable as it is providing us the condition which caused the error which in our case is `require(managerContract.count(address(this)) > 0, "no-vault-opened");`. Now, we can understand the error and work on solving it.
![alt text]()
![alt text](https://github.com/InstaDApp/dsa-developers/blob/master/img/tenderly/callStack.png)
You can also take a look at the whole Stack Trace which your transaction went through.
![alt text]()
![alt text](https://github.com/InstaDApp/dsa-developers/blob/master/img/tenderly/contracts.png)
If you want to know about the contracts that were involved in the transaction you can navigate to the `Contracts` section and take a look.
![alt text]()
![alt text](https://github.com/InstaDApp/dsa-developers/blob/master/img/tenderly/gasProfiler.png)
There is also a feature of `Gas Profiler` which provides you with a gas usage breakdown by the function call.