Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommendation: Include Interfaces In Implementation Contracts #54

Open
rheaplex opened this issue Sep 28, 2021 · 1 comment
Open

Recommendation: Include Interfaces In Implementation Contracts #54

rheaplex opened this issue Sep 28, 2021 · 1 comment

Comments

@rheaplex
Copy link

rheaplex commented Sep 28, 2021

I recommend including the interfaces from the I* contracts directly in the contracts that implement them, rather than having them in separate files.

This would be bad practice in other languages, but I believe that in Cadence it helps with security, by simplifying capability descriptions and discouraging using other implementations of the interfaces.

@rheaplex rheaplex changed the title Include Interfaces In Implementation Contracts Recommendation: Include Interfaces In Implementation Contracts Sep 28, 2021
@whalelephant
Copy link
Contributor

Hi @rheaplex,
Do you mean IPackNFT? We have separated the interface because, IIUC, it should be specified so other issuers can use it in the future to interface with PDS.
From the requirements

Provides a Capability that references the Issuer’s own Pack NFT implementation, to allow for the creation of Pack instances. (The Pack NFT will have a well-defined interface specification.)

Please let me know if I have misunderstood it or it is still ok for now to not provide a contract interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants