EVMSEALEDEVM
*%■▒◇╳■◆╲▓$*●▪~◇▪?◆╳!?▫▫&*▫^&○▓╲○█○$░%╱?╱□◇@◆!@^■%◇▓#○!◆%%□&░○?●
Transaction ID
Execution Fee
0.00302 FLOWTransaction Summary
EVMCalled EVM
EVM Hashes
Contracts
Script Arguments
0hexEncodedTxs[String]
[ "02f903b78202eb820c838503bbf075808503bbf075828307c36d94604f45ce1b8ce702597e00ff586f370ff1738a6b80b90344c303364d00000000000000000000000076f3c05a8ccddf8e2d63d19c269107a01584ee7a000000000000000000000000570679521e1a9b928431cb4ec5577cf001dd4a890000000000000000000000000000000000000000000000000000000000000003ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000001c842c43a2ed7c953ac9042f0c1eaa16b5c4f4f938b0e88e61b3b929ed88c0bc28195c0666563e6f50b27ccc8aebb2f41340238528bb349a2eff5c241a59f16238000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000003200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000004167900e55e9e4ea19738ee4b433acd26720f12cbde1ea5798ac1c5505344546e86030a7a15af55abeee70a4d9f3c892b0dcc6d4c49fdf4d74ff761480319583ad1b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000416a7a579c149db5bce276cdad56a6d2995b5cda2769740982aa017be8a9feb8b836c41b57bffab780d6af004f5d37d83055f83a2e6eeb03a34ba7d60db48c5e051b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041337995d55b0d74be78fc2624f2e2b00e183871e4b89b9beccdd9f2003e84e5e8533ae86441c791b8b97e7c9198b8594ea925a745b89350f68d2ff266cb2f5bc81b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c001a052b18330da2711cf6318cb69a2c47d7dd3561ac58726b144575121054b3d344ba01ab8aa1e5ec37420723eeb1a78ee85b6236c0dffa6816b84e1a2545eefab45f1" ]
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 // If there's only one tx, use `EVM.run`.
11 // If there are more, then use `EVM.batchRun`
12 if txs.length == 1 {
13 let txResult = EVM.run(
14 tx: txs[0],
15 coinbase: EVM.addressFromString(coinbase)
16 )
17 assert(
18 txResult.status == EVM.Status.failed || txResult.status == EVM.Status.successful,
19 message: "evm_error=\(txResult.errorMessage);evm_error_code=\(txResult.errorCode)"
20 )
21 return
22 }
23
24 let txResults = EVM.batchRun(
25 txs: txs,
26 coinbase: EVM.addressFromString(coinbase)
27 )
28
29 // If at least one of the EVM transactions in the batch is either
30 // failed or successful, in other words not invalid, we let the
31 // Cadence transaction succeed.
32 for txResult in txResults {
33 if txResult.status == EVM.Status.failed || txResult.status == EVM.Status.successful {
34 return
35 }
36 }
37
38 // Otherwise, all EVM transactions are invalid txs and can't be
39 // executed (such as nonce too low).
40 // In this case, we fail the Cadence transaction with the error
41 // message from the first EVM transaction.
42 for txResult in txResults {
43 assert(
44 txResult.status == EVM.Status.failed || txResult.status == EVM.Status.successful,
45 message: "evm_error=\(txResult.errorMessage);evm_error_code=\(txResult.errorCode)"
46 )
47 }
48 }
49}