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

Contracts should be able to deploy contracts #160

Open
ureeves opened this issue Feb 24, 2023 · 1 comment
Open

Contracts should be able to deploy contracts #160

ureeves opened this issue Feb 24, 2023 · 1 comment
Labels
team:Core Low Level Core Development Team (Rust) type:feature implementing a new feature

Comments

@ureeves
Copy link
Member

ureeves commented Feb 24, 2023

Summary

Contracts writers should be able to instantiate contracts that have already been deployed as template contracts. This will ensure that bytecode is reused for instantiating multiple versions of the same contract, but using different metadata.
Ownership should be transferred to the identifier of the current transaction.

Possible solution design or implementation

Contracts should have a host call available, so that contract writer can deploy these template modules.

Additional context

Some types of contracts, such as XSC, are built specifically to be instantiated multiple times with different parameters. Supporting this at the VM level will make this simpler, and less costly.

@ureeves ureeves added team:Core Low Level Core Development Team (Rust) mark:next Strategic issues related to next versions of Testnet and mid/long term plans labels Feb 24, 2023
@HDauven HDauven added type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc) type:feature implementing a new feature and removed mark:next Strategic issues related to next versions of Testnet and mid/long term plans type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc) labels Apr 10, 2024
@HDauven
Copy link
Member

HDauven commented Apr 10, 2024

This is a backward compatible feature which can be realized through a binary upgrade. It would expose a host function that would be functionally equivalent to Ethereum's CREATE opcode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:Core Low Level Core Development Team (Rust) type:feature implementing a new feature
Projects
None yet
Development

No branches or pull requests

2 participants