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