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

feat: add deploy_as_blueprint to VVMDeployer #311

Merged
merged 16 commits into from
Oct 2, 2024
Merged

Conversation

DanielSchiavini
Copy link
Collaborator

What I did

  • Add deploy_as_blueprint to VVMDeployer

How I did it

  • Extracted the blueprint code from the VyperBlueprint
  • Generate a new VVM contract without ABI and changed bytecode

How to verify it

  • WIP

Description for the changelog

Cute Animal Picture

image

@DanielSchiavini DanielSchiavini marked this pull request as ready for review September 13, 2024 11:47
Comment on lines 197 to 199
bytecode=generate_blueprint_bytecode(
compiler_data.bytecode, blueprint_preamble
),
Copy link
Member

Choose a reason for hiding this comment

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

do we really need this much nesting?

if env is None:
env = Env.get_singleton()
bytecode = generate_blueprint_bytecode(self.bytecode)
address, _ = env.deploy_code(bytecode=bytecode)
Copy link
Member

Choose a reason for hiding this comment

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

need to register the blueprint

"""
if env is None:
env = Env.get_singleton()
bytecode = generate_blueprint_bytecode(self.bytecode)
Copy link
Member

Choose a reason for hiding this comment

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

best to cache this

@charles-cooper charles-cooper changed the title feat: Add deploy_as_blueprint to VVMDeployer feat: add deploy_as_blueprint to VVMDeployer Oct 2, 2024
@charles-cooper charles-cooper merged commit 7f1c700 into master Oct 2, 2024
13 of 14 checks passed
@charles-cooper charles-cooper deleted the vvm-blueprint branch October 2, 2024 23:35
# TODO: add filename
return ABIContractFactory.from_abi_dict([])

def deploy_as_blueprint(self, env=None, blueprint_preamble=None, **kwargs):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

blueprint_preamble=None, **kwargs are unused now

Copy link
Member

Choose a reason for hiding this comment

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

nice catch, thanks

Copy link
Member

Choose a reason for hiding this comment

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

Leminkay pushed a commit to Leminkay/titanoboa that referenced this pull request Oct 28, 2024

---------

Co-authored-by: Charles Cooper <cooper.charles.m@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants