MCPcopy Create free account
hub / github.com/argotorg/solidity / newTransactionFrame

Method newTransactionFrame

test/EVMHost.cpp:204–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204void EVMHost::newTransactionFrame()
205{
206 // Clear EIP-2929 account access indicator
207 recorded_account_accesses.clear();
208
209 for (auto& [address, account]: accounts)
210 {
211 for (auto& [slot, value]: account.storage)
212 {
213 value.access_status = EVMC_ACCESS_COLD; // Clear EIP-2929 storage access indicator
214 value.original = value.current; // Clear EIP-2200 dirty slot
215 }
216
217 // Clear transient storage according to EIP 1153
218 account.transient_storage.clear();
219 }
220 // Process selfdestruct list
221 for (auto& [address, _]: recorded_selfdestructs)
222 if (m_evmVersion < langutil::EVMVersion::cancun() || m_newlyCreatedAccounts.count(address))
223 // EIP-6780: If SELFDESTRUCT is executed in a transaction different from the one
224 // in which it was created, we do NOT record it or clear any data.
225 // Otherwise, the previous behavior (pre-Cancun) is maintained.
226 accounts.erase(address);
227 m_newlyCreatedAccounts.clear();
228 m_totalCodeDepositGas = 0;
229 recorded_selfdestructs.clear();
230}
231
232void EVMHost::transfer(evmc::MockedAccount& _sender, evmc::MockedAccount& _recipient, u256 const& _value) noexcept
233{

Callers

nothing calls this directly

Calls 3

eraseMethod · 0.80
clearMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected