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