EVMSEALEDEVM
▪$&~▒*◇~█%◆!●◆▓╳#?╳○▪▓░%&*╱@!▪▒●■%%█■^&●░&*▓&▫^&□&○○□▪●~~╱▪○░╲○○
Transaction ID
Execution Fee
0.00037513 FLOWTransaction Summary
EVMCalled EVM
EVM Hashes
Contracts
Script Arguments
0hexEncodedTxs[String]
[ "f8ee83125e4c8405f5e100835b7eb9947e8dd69f0675e61efaefe3403f2037f85cc669dd80b884cb67d7ac00000000000000000000000000000000000000000000006c6b935b8bbd4000000000000000000000000000000000000000000000000000000000000000000378000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000008205f9a0ca64812dbc74d2fc679bd5e793884c0aa93c0a1c9ac8459e6682af7e3dd3d8e9a0338b3bda51fe9bfac860ea0943c445c5abe3270ad0de53e4d513f6dc2a355a8e", "f8ee83125e4d8405f5e100835b7eb9947e8dd69f0675e61efaefe3403f2037f85cc669dd80b884cb67d7ac00000000000000000000000000000000000000000000006c6b935b8bbd4000000000000000000000000000000000000000000000000000000000000000000378000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000008205faa048d1e255a4bacd65a5d67033ae7917f7703bb2c15de201963f95d4f369e7e3bda0184cf00d44d4f3482721b5b3c82fa8b37e8f377d2ea55f72c9a8d3701a7c82ca" ]
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}