Client Contract Boost Dashboard #659
hammertoe
started this conversation in
Developers
Replies: 1 comment 1 reply
-
The given link |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi folks, one of the problems that developers (especially during hackathons) were facing when trying to use the Deal Client Contract in the Hardhat starter kit was seeing where things were going wrong.
This contract emits an event that can be listened to by Boost instances to instruct them to start a new storage deal with some data at a particular URL. The problem being that there are a number of parameters needed to be set, e.g. start epoch, duration, price, etc. and if any are incorrect then the Boost instance will reject the deal and the developer (and smart contract) have no visibility of why it was rejected.
PikNik, a storage provider that is running a miner on the Calibration testnet has created a dashboard allowing visibility into Boost logs to enable developers to diagnose why their deals might not be being accepted.
This dashboard is at: http://38.70.220.87:8123/ and allows you to search by the client address (e.g. the address of the smart contract) and see the Boost log entires for it.
Here is a step by step example of using it to debug deals using the client contract.
Install the FEVM Hardhat starter kit. Once installed you can deploy the contracts as per the README in the starter kit.
Note down the address the
DealClient
contract is deployed at. In my case it is0xd91e5c247d4A450bAa83a4FBEE7691fF956491DF
.Fund the contact from the Calibration net tFIL faucet enter the contract address from above.
Make a deal using the
make-deal-proposal
task in the kit. Put in the contract address, and the other fields you can get from uploading a file to the Lighthouse Data Depot, which will create a CAR file for you and give you all the details needed e.g.Convert the contract address from
0x
format tot410
format. The easiest way to do this is look the0x
address up in the Filfox calibration block explorer.Enter the
t410
contract address into the PikNik Boost looking glass. See the results. E.g.In the case of a successful deal, you will see that shown in the logs, e.g.
If you get something wrong in the parameters you sent, you should see the error in the logs when the deal is rejected by Boost. e.g. in this case I got the duration slightly too short:
In the following case, I had not funded the smart contract, so it couldn't pay for the deal:
Hopefully this helps you if you are building using the Deal Client contract as a based.
Beta Was this translation helpful? Give feedback.
All reactions