From 5c0e2e44abc39fd2499e1e2ca58c35f159aad0e3 Mon Sep 17 00:00:00 2001 From: pdobacz <5735525+pdobacz@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:34:27 +0200 Subject: [PATCH] Disallow being referenced by both RETURNCONTRACT and EOFCREATE --- spec/eof.md | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/eof.md b/spec/eof.md index 2b82804..da078c0 100644 --- a/spec/eof.md +++ b/spec/eof.md @@ -299,6 +299,7 @@ The following instructions are introduced in EOF code: - no unreachable code sections are allowed, i.e. every code section can be reached from the 0th code section with a series of CALLF / JUMPF instructions, and section 0 is implicitly reachable. - it is an error for a container to contain both `RETURNCONTRACT` and either of `RETURN` or `STOP`. - it is an error for a subcontainer to never be referenced in code sections of its parent container +- it is an error for a given subcontainer to be referenced by both `RETURNCONTRACT` and `EOFCREATE` - for terminology purposes, the following concepts are defined: - an "initcode" container is one which does not contain `RETURN` or `STOP` - a "runtime" container is one which does not contain `RETURNCONTRACT`