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