Closed thcrnk closed 6 years ago
What is the _calldata
variable your assembly code is using? I suspect it refers to an array that you created via bytes _calldata = msg.data
. This compiles down to a calldatacopy
. We're using the opcode directly as an optimization. See https://github.com/zeppelinos/zos-lib/pull/13 where we introduced this change.
Thanks, now is all clear!
From few months we are using the same pattern for upgradability with proxy, only difference is we do not have this line:
calldatacopy(ptr, 0, calldatasize)
Here is the code we are using and currently is working fine, how calldatacopy is improving it:Just asking to be sure and if we need to implement it.