Merge pull request #13712 from Qlio/patch-2

Bug fix on Yul Object example code.
This commit is contained in:
Daniel 2022-11-17 11:16:35 +01:00 committed by GitHub
commit 0b4b1045cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1174,7 +1174,7 @@ An example Yul Object is shown below:
datacopy(offset, dataoffset("Contract2"), size)
// constructor parameter is a single number 0x1234
mstore(add(offset, size), 0x1234)
pop(create(offset, add(size, 32), 0))
pop(create(0, offset, add(size, 32)))
// now return the runtime object (the currently
// executing code is the constructor code)