From d8acc980a737eeaa1d285306586e0e246fb5b402 Mon Sep 17 00:00:00 2001 From: franck44 Date: Wed, 1 Feb 2023 09:49:37 +1100 Subject: [PATCH] Add account to selfDestruct See #517 --- src/dafny/bytecode.dfy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dafny/bytecode.dfy b/src/dafny/bytecode.dfy index ccfb8ba0..ced138ea 100644 --- a/src/dafny/bytecode.dfy +++ b/src/dafny/bytecode.dfy @@ -1896,7 +1896,7 @@ module Bytecode { // Determine account to send remaining any remaining funds. var r := ((st.Peek(0) as nat) % TWO_160) as u160; // Register contract deletion in substate! - var ss := st.evm.substate.AccountAccessed(r); + var ss := st.evm.substate.AccountAccessed(r).AccountDestructed(address); // Apply refund var w := if address != r && (!st.Exists(r) || st.evm.world.CanDeposit(r,balance)) // Refund balance to r