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

refactor: Error from primitives to contract library #93

Closed
Daanvdplas opened this issue Jul 5, 2024 · 2 comments
Closed

refactor: Error from primitives to contract library #93

Daanvdplas opened this issue Jul 5, 2024 · 2 comments

Comments

@Daanvdplas
Copy link
Collaborator

Daanvdplas commented Jul 5, 2024

The Error type is only used in runtime via tests, and the fact that a primitives crate is referring to pop api on line 16 makes it seem off.

I think the tests that use this error should probably live in pop-api/integration-tests, especially as it already takes a dev-dependency on the runtime. Then this error should only need to be defined in the pop-api crate, where it probably belongs as it is a contract-side only representation of the errors which exist in the runtime.

If a type isnt being used by both a contract AND the runtime, it probably doesnt need to be in this crate.

@evilrobot-01
Copy link
Collaborator

Should also be checked in terms of runtime size, as you might effectively be compiling stuff into the runtime which is unnecessary, just for the convenience.

@Daanvdplas Daanvdplas changed the title refactor: define types used both in pop api as in chain extension in primitives refactor: Error from primitives to contract library Jul 24, 2024
@Daanvdplas
Copy link
Collaborator Author

Closing in favour of #91

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