Can CREATE code access data from the parent contract

bronsonbronson Posts: 2Member
Is it possible for a contract to spawn other contracts whose initialization code has access to the parameters of the spawning contract?
For example:
{
(return 0 (lll {
[[0x0]] (create 0 0 (lll {
[[0x0]] (calldataload 0)
(return 1)
} 0))
} 0))
}

where (calldataload 0) is data passed to the parent contract.

I could always first create the child contract then immediately edit it with a msg containing relevant params but this seems a bit unnecessary.

Comments

Sign In or Register to comment.