Zondax / filecoin-solidity

Filecoin Solidity API Library
Apache License 2.0
95 stars 43 forks source link

fix: error duplicate defination #357

Closed kylidboy closed 1 year ago

kylidboy commented 1 year ago

` const H = await ethers.getContractFactory("PeanutHull")

duplicate definition - FailToCallActor()

undefined

.exit `

When importing both 'PrecompilesAPI.sol' and 'MinerAPI.sol' in the same contract file, you will get a warning message in the terminal.

:link: zboto Link

CLAassistant commented 1 year ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Kyli Bing seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

rllola commented 1 year ago

Looks ok to me.

emmanuelm41 commented 1 year ago

@rllola This change is not backward compatible as the signature will change for that error. I think we need to think about this very carefully

rllola commented 1 year ago

@emmanuelm41 I think the modification is ok. It will change the error signature but it is acceptable and it is an error for precompile which are differents than actor calls so it will help debug too.

However I will change the name @kylidboy to remove the reference to actor in the error name. It is just a precompile call error.

emmanuelm41 commented 1 year ago

@kylidboy please, propose this change on the Protocol Labs new repository as their are the new maintainer for this library. Thank you for your contribution! The link is here.