1

I currently can't deploy any contract which doesn't adhere 100% to the specified interface(s). Is there a way to mark some properties or methods as optional and, if not, is this a planned feature?

| improve this question | | | | |
2

To my knowledge, there is no plan to allow this.

The whole idea of interfaces is to ensure that implementations do conform to the interface. Non-compliant contracts can and do cause serious problems at the level of interactions with others, where "others" means other contracts, wallets and exchanges that expect a certain kind of behavior.

Possibly someone will chime in with another approach if you describe the challenge you need to address.

Hope it helps.

| improve this answer | | | | |
1

If I understood your point, I can say that, given that I prefer a different approach, like to make special interfaces customized for the purpose, formally you can add a nullifying virtual contract implementing and overloading with a almost empty code the not required functions. If you make your true contract inheriting both the said interface AND the nullifying virtual contract, you can compile and deploy the whole. It cost additional gas if compared to my preferite approach (customized interfaces), but it works.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.