EVMSEALEDEVM
◇$●●#@╲▓~&█~%$○◆#▒█●○$&●○╳○◆*□^●◆▪◇░○■◇▫■~?*◇▫◇*▪╱^■█&??!◇█~◆&◇▓
Transaction ID
Execution Fee
0.00004523 FLOWTransaction Summary
EVMCalled EVM
EVM Hashes
Contracts
Script Arguments
0hexEncodedTxs[String]
[ "f9012e8305f1738407270e0083035f30943c2269811836af69497e5f486a85d7316753cf6280b8c43161b7f600000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000013f00000000000000000000000000000000000000000000a4873bad367e2a27a2090000000000000000000000000000000000000000000000000000000000190bc300000000000000000000000000000000000000000000000000000000000000108205faa0935878c929e037da51c2507b2d0323993d85488c2245ef51b5e1ae79cf840526a01275d5a3ca4144d447098c53432f6a5474e9d9504437603b24eddce87f3468f2" ]
Cadence Script
1import EVM from 0xe467b9dd11fa00df
2
3transaction(hexEncodedTxs: [String], coinbase: String) {
4 execute {
5 let txs: [[UInt8]] = []
6 for tx in hexEncodedTxs {
7 txs.append(tx.decodeHex())
8 }
9
10 let txResults = EVM.batchRun(
11 txs: txs,
12 coinbase: EVM.addressFromString(coinbase)
13 )
14
15 // If at least one of the EVM transactions in the batch is either
16 // failed or successful, in other words not invalid, we let the
17 // Cadence transaction succeed.
18 for txResult in txResults {
19 if txResult.status == EVM.Status.failed || txResult.status == EVM.Status.successful {
20 return
21 }
22 }
23
24 // Otherwise, all EVM transactions are invalid txs and can't be
25 // executed (such as nonce too low).
26 // In this case, we fail the Cadence transaction with the error
27 // message from the first EVM transaction.
28 for txResult in txResults {
29 assert(
30 txResult.status == EVM.Status.failed || txResult.status == EVM.Status.successful,
31 message: "evm_error=".concat(txResult.errorMessage).concat("\n")
32 )
33 }
34 }
35}