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

Added assets CE test contracts #4

Merged
merged 3 commits into from
Jan 8, 2024
Merged

Added assets CE test contracts #4

merged 3 commits into from
Jan 8, 2024

Conversation

PierreOssun
Copy link
Member

No description provided.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error and outcome can be imported from ce types crate directly so no need to copy them here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

types crate use sp_runtime that depends on sp_io that will be in conflict with ink allocator. So the solution is to add a conditional compilation on types with a feature flag for ink! in the types crate but I don't want that to keep the runtime part clean.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should not be a problem as far as I remember.
See the UA CE contract example, it imports the types directly, here -

unified-accounts-chain-extension-types = { git = "https://github.com/AstarNetwork/Astar", branch = "feat/au-storage-fee-and-ce", version = "0.1.0", default-features = false }

Also the types has sp-runtime but still works fine without any feature gate - https://github.com/AstarNetwork/Astar/blob/be5bec1226a0f4655fd5ea78a228f4dedc4e3569/chain-extensions/types/unified-accounts/Cargo.toml#L17

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding sp-io with disabled allocator made it work

@PierreOssun PierreOssun merged commit e4878fb into main Jan 8, 2024
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

Successfully merging this pull request may close these issues.

2 participants