Skip to content

Commit

Permalink
Merge pull request onflow#178 from m-Peter/properly-handle-evm-tx-result
Browse files Browse the repository at this point in the history
Properly handle tx results from `EVM.run`
  • Loading branch information
m-Peter authored Mar 26, 2024
2 parents b97076e + 36eb1cb commit cbfa7b4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions services/requester/cadence/run.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ transaction(hexEncodedTx: String) {
}

execute {
let txResult = EVM.run(tx: hexEncodedTx.decodeHex(), coinbase: self.coa.address())
// todo only temporary until we correctly handle failure events
let txResult = EVM.run(
tx: hexEncodedTx.decodeHex(),
coinbase: self.coa.address()
)
assert(
txResult.status == EVM.Status.successful,
txResult.status == EVM.Status.failed || txResult.status == EVM.Status.successful,
message: "failed to execute evm transaction: ".concat(txResult.errorCode.toString())
)
}
Expand Down

0 comments on commit cbfa7b4

Please sign in to comment.