Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion x/vm/keeper/call_evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@

resp, err := k.DerivedEVMCallWithData(ctx, from, &contract, data, commit, gasless, isModuleSender, value, gasLimit, manualNonce)
if err != nil {
return nil, errorsmod.Wrapf(err, "contract call failed: method '%s', contract '%s'", method, contract)
// Propagate resp alongside the error. On a VM failure (revert / out of gas)
// DerivedEVMCallWithData still returns a response carrying GasUsed; dropping
// it here leaves callers that charge for the gas a call actually burned with
// nothing to charge against. CallEVM above propagates for the same reason.
return resp, errorsmod.Wrapf(err, "contract call failed: method '%s', contract '%s'", method, contract)
}
return resp, nil
}
Expand Down Expand Up @@ -244,7 +248,7 @@
}

msg := core.Message{
From: from,

Check failure on line 251 in x/vm/keeper/call_evm.go

View workflow job for this annotation

GitHub Actions / Run golangci-lint

File is not properly formatted (gci)
To: contract,
Nonce: nonce,
Value: value,
Expand Down
Loading