Closed trianglesphere closed 2 years ago
Are you running the latest staging branch or another thing? Nvm, I see input-deriv-test-cleanup
, that should be good, hmm
We added the mint
param to the deposit log later on, so maybe it's failing to parse it because that code change is missing
Found the off by one: 6*32 = 192
, 7*32=224
Here it increments the offset 6 times with 32 bytes to get to the dynamic remainder of the log data. It starts at 0, not at 32 though, so it should be 6*32
.
Will fix, thanks for the bug report!
Ok. I'm going to double check the contract version. Skimming the L1 contract, it seems like it hasn't been updated in over a week (other than some solc changes)
FYI there are 7 fields, but I'm less familiar with how dynamic length fields / bools are packed in
Example log split at 32 byte intervals
address to
address from
u256 mint
u256 value
u256 gasLimit
bool creation
bytes data
0000000000000000000000000000000000000000000000000000000000000000 - to?
0000000000000000000000000000000000000000000000000de0b6b3a7640000 - from?
00000000000000000000000000000000000000000000000000000000000f4240 - 1000000 (mint/value)
0000000000000000000000000000000000000000000000000000000000000000 - value?
00000000000000000000000000000000000000000000000000000000000000a0 - ??
0000000000000000000000000000000000000000000000000000000000000000 - empty data
Updated input-deriv-test-cleanup
and cherry-picked to staging
0000000000000000000000000000000000000000000000000000000000000000 # value: 0 (transfer 0 on L2)
0000000000000000000000000000000000000000000000000de0b6b3a7640000 # mint: 0xde0b6b3a7640000 = 1000000000000000000 = 1 ETH (move 1 ETH from L1 to L2)
00000000000000000000000000000000000000000000000000000000000f4240 # gas: 0xf4240 = 1000000
0000000000000000000000000000000000000000000000000000000000000000 # isCreation (boolean set to false)
00000000000000000000000000000000000000000000000000000000000000a0 # data offset: 0xa0 = 160 = 32*5 bytes
0000000000000000000000000000000000000000000000000000000000000000 # data length: 0
# no data contents since length was 0
The to
and from
are separate from that data, since those are indexed log fields
Ok. I got it. I used the new version and was able to see the balance of the account increase on L2
Setup
proto/bellatrix-api-fixes
origin/optimism-prototype
input-deriv-test-cleanup
Sending a deposit Tx in the following way (want to mint L2 eth, no contracts or data).
Result: