Skip to content

[Revive]: Reassess the restriction blocking Root origin from creating contracts #279

@sphamjoli

Description

@sphamjoli

Context

pallet-revive's exec stack currently blocks Origin::Root from instantiating
contracts:

if entry_point == ExportedFunction::Constructor {
    // Root origin can't be used to instantiate a contract.
    ensure!(matches!(self.origin, Origin::Signed(_)), DispatchError::RootNotAllowed);
    ...
}

This forbids any call path that enters revive under bare_call(RuntimeOrigin::root(), ...)
from reaching a CREATE opcode, even when the inner contract semantically wants to
deploy a sub-contrac.

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions