Skip to content
New issue

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

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

Already on GitHub? # to your account

[ink_e2e] move building of contracts from macro codegen to runtime #1832

Closed
ascjones opened this issue Jul 3, 2023 · 0 comments · Fixed by #1881
Closed

[ink_e2e] move building of contracts from macro codegen to runtime #1832

ascjones opened this issue Jul 3, 2023 · 0 comments · Fixed by #1881
Labels
A-ink_e2e [ink_e2e] Work item

Comments

@ascjones
Copy link
Collaborator

ascjones commented Jul 3, 2023

Originally the contracts needed to be build during codegen in order that the resulting metadata could be used to generate the API for invoking the contract. However since the change to use the contract as a depencency in #1518, it is no longer required to do this at the macro expansion test.

I believe it would be much cleaner and clearer to build the contracts at the runtime stage.

As part of this we can refactor how the contracts are built, for example we may no longer need to have the global static ALREADY_BUILT_CONTRACTS, and instead rely on the cargo file locking to prevent races. Now that cargo contract build returns also immediately if there are no changes in the contract I believe this may be sufficient, although it needs testing.

Extraced from #1830

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-ink_e2e [ink_e2e] Work item
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant