You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(rpc-types-trace): add 0x prefix to storage keys and values in StructLog
The opcode tracer spec (ethereum/execution-apis#762) requires storage
keys and values to be 0x-prefixed bytes32. The serializer was
explicitly stripping the prefix with [2..].
let s = r#"{"pc":3349,"op":"SLOAD","gas":23959,"gasCost":2100,"depth":1,"stack":[],"memory":[],"storage":{"6693dabf5ec7ab1a0d1c5bc58451f85d5e44d504c9ffeb75799bfdb61aa2997a":"0000000000000000000000000000000000000000000000000000000000000000"}}"#;
874
+
let s = r#"{"pc":3349,"op":"SLOAD","gas":23959,"gasCost":2100,"depth":1,"stack":[],"memory":[],"storage":{"0x6693dabf5ec7ab1a0d1c5bc58451f85d5e44d504c9ffeb75799bfdb61aa2997a":"0x0000000000000000000000000000000000000000000000000000000000000000"}}"#;
876
875
let log:StructLog = serde_json::from_str(s).unwrap();
877
876
let val = serde_json::to_value(&log).unwrap();
878
877
let input = serde_json::from_str::<serde_json::Value>(s).unwrap();
0 commit comments