Skip to content

Commit 8d5de64

Browse files
committed
fix: invalid SStore gas computation
1 parent e5658fb commit 8d5de64

File tree

1 file changed

+4
-1
lines changed
  • arithmetization/src/main/java/net/consensys/linea/zktracer/opcode/gas/projector

1 file changed

+4
-1
lines changed

arithmetization/src/main/java/net/consensys/linea/zktracer/opcode/gas/projector/SStore.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ public final class SStore implements GasProjection {
3030
public SStore(MessageFrame frame) {
3131
this.frame = frame;
3232
if (frame.stackSize() > 1) {
33+
this.key = UInt256.fromBytes(frame.getStackItem(0));
3334
final Account account = frame.getWorldUpdater().getAccount(frame.getRecipientAddress());
35+
if (account == null) {
36+
return;
37+
}
3438

35-
this.key = UInt256.fromBytes(frame.getStackItem(0));
3639
this.originalValue = account.getOriginalStorageValue(key);
3740
this.currentValue = account.getStorageValue(key);
3841
this.newValue = UInt256.fromBytes(frame.getStackItem(1));

0 commit comments

Comments
 (0)