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

Blueprint Source Code Directive Proposal #4498

Open
Rollp0x opened this issue Feb 26, 2025 · 0 comments
Open

Blueprint Source Code Directive Proposal #4498

Rollp0x opened this issue Feb 26, 2025 · 0 comments
Labels
needs triage needs triage

Comments

@Rollp0x
Copy link

Rollp0x commented Feb 26, 2025

Simple Summary

While the Vyper compiler supports blueprint mode for contract deployment, it currently lacks direct source code level support. When using Hardhat/Foundry to develop and debug contracts with blueprint functionality, developers must resort to manually concatenating bytecode to deploy blueprint contracts. This not only increases development complexity but also hinders the adoption of industry standards.

I propose adding a # @blue_print directive in Vyper source code that would instruct the compiler to automatically generate bytecode with the EIP-5202 blueprint prefix. This would allow the Vyper compiler to work seamlessly with Hardhat/Foundry without requiring manual bytecode manipulation.

As proof of concept, I've developed a wrapper program that replaces the native Vyper compiler. When this wrapper detects the # @blue_print directive in source code, it compiles the contract to blueprint mode bytecode, enabling seamless integration with Hardhat/Foundry development workflows. The wrapper essentially functions as middleware between the source code and compiler to process blueprint mode requirements and handle different framework scenarios appropriately.

The implementation is available at: https://github.com/Rollp0x/vyper-wrapper

Native source code support for this directive would eliminate the need for manual bytecode concatenation or custom wrapper programs, significantly improving developer experience when working with blueprint contracts.

Dependencies

None

Copyright

Copyright and related rights waived via CC0

@Rollp0x Rollp0x added the needs triage needs triage label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage needs triage
Projects
None yet
Development

No branches or pull requests

1 participant