filecoin-project / filecoin-solidity

Filecoin Solidity API Library
Other
17 stars 11 forks source link

actor-errors #13

Closed lordshashank closed 11 months ago

lordshashank commented 1 year ago

resolving unconditional revert discussed in issue https://github.com/Zondax/filecoin-solidity/issues/363 . Defined error codes in new files and reverted them in actor.sol. Have defined actor errors only defined here. Tested it for deal expiration and non-existent deals. Any additional features and improvement in code is invited.

vonum commented 1 year ago

Hey @lordshashank looks good to me. Can we cover that with tests? Also, does it make sense to document those constants somewhere?

lordshashank commented 1 year ago

@vonum , I am not able to find any hardhat tests of library APIs in the repository, where should I add the tests?

all I can do is add a solidity file to test the errors here https://github.com/filecoin-project/filecoin-solidity/tree/master/contracts/v0.8/tests . Is that what you are asking, or we can make new tests folder in hardhat folder and do testing there.

lordshashank commented 1 year ago

Hey, the tests folder you stated is for rust tests. I would have to include solidity hardhat tests for this. There are no solidity tests in the repo. Could I make a new tests folder in ./hardhat folder for testing?

wertikalk commented 1 year ago

@lordshashank has asked a lot of good questions over slack and it is good that this information is widely known.

Most important questions in our discussion over slack: