You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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
The text was updated successfully, but these errors were encountered: