casper-network / casper-network/casper-node

Support factory pattern in the core

Open
#2,064 1 comment 0 reactions 1 assignee Claimed by @mpapierski View on GitHub
Epic execution engine
Dominant language
Rust
Stars
399
Forks
224
Avg merge
15h 44m
Merged PRs (30d)
2

Description

There's feedback coming from the contract developers that the factory pattern is something they want to use. For example, a common scenario might be that a contract could own an ERC20 token with additional custom logic.

Technically we do support it on the EE, but we never introduced necessary tests, and it was never introduced into the core as a supported feature.

At a minimum, we need to implement tests for a session code that will deploy contract A (aka factory contract) with entrypoints marked as `group(vec![])` (essentially can't be called) and a contract entry point that creates a contract B (new contract) with the same set of entrypoints but different entry point access.

It will be worthwhile to discuss the possibility if the factory contract needs to have symbols in the WASM present, or we can somehow create those reserved entrypoints on the fly without the burden on developers to remember to create all possible symbols in advance.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.