diff --git a/core/state_transition.go b/core/state_transition.go index 8c01b2c28..ff3b7ba02 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -310,7 +310,7 @@ func (st *StateTransition) buyGas() error { // Arbitrum: record fee payment if tracer := st.evm.Config.Tracer; tracer != nil && tracer.CaptureArbitrumTransfer != nil { - tracer.CaptureArbitrumTransfer(&st.msg.From, nil, mgval, true, "feePayment") + tracer.CaptureArbitrumTransfer(&st.msg.From, nil, mgval, true, tracing.BalanceDecreaseGasBuy) } return nil @@ -529,7 +529,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) { // Arbitrum: record the tip if tracer := st.evm.Config.Tracer; tracer != nil && !st.evm.ProcessingHook.DropTip() && tracer.CaptureArbitrumTransfer != nil { - tracer.CaptureArbitrumTransfer(nil, &tipReceipient, tipAmount, false, "tip") + tracer.CaptureArbitrumTransfer(nil, &tipReceipient, tipAmount, false, tracing.BalanceIncreaseRewardTransactionFee) } st.evm.ProcessingHook.EndTxHook(st.gasRemaining, vmerr == nil) @@ -539,7 +539,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) { suicides := st.evm.StateDB.GetSelfDestructs() for i, address := range suicides { balance := st.evm.StateDB.GetBalance(address) - tracer.CaptureArbitrumTransfer(&suicides[i], nil, balance.ToBig(), false, "selfDestruct") + tracer.CaptureArbitrumTransfer(&suicides[i], nil, balance.ToBig(), false, tracing.BalanceDecreaseSelfdestruct) } } @@ -583,7 +583,7 @@ func (st *StateTransition) refundGas(refundQuotient uint64) uint64 { // Arbitrum: record the gas refund if tracer := st.evm.Config.Tracer; tracer != nil && tracer.CaptureArbitrumTransfer != nil { - tracer.CaptureArbitrumTransfer(nil, &st.msg.From, remaining.ToBig(), false, "gasRefund") + tracer.CaptureArbitrumTransfer(nil, &st.msg.From, remaining.ToBig(), false, tracing.BalanceIncreaseGasReturn) } // Also return remaining gas to the block gas counter so it is diff --git a/core/tracing/hooks.go b/core/tracing/hooks.go index 399d52b49..fd39bfa72 100644 --- a/core/tracing/hooks.go +++ b/core/tracing/hooks.go @@ -147,7 +147,7 @@ type ( // LogHook is called when a log is emitted. LogHook = func(log *types.Log) - CaptureArbitrumTransferHook = func(from, to *common.Address, value *big.Int, before bool, purpose string) + CaptureArbitrumTransferHook = func(from, to *common.Address, value *big.Int, before bool, reason BalanceChangeReason) CaptureArbitrumStorageGetHook = func(key common.Hash, depth int, before bool) CaptureArbitrumStorageSetHook = func(key, value common.Hash, depth int, before bool) @@ -262,67 +262,78 @@ const ( ) func (b BalanceChangeReason) String(prev, new *big.Int) string { + // When both prev and new are nil, we only return the main reason without specifying if the balance incrased or decreased + // useful for CaptureArbitrumTransfer var reason string - prependString := func() string { - if prev == nil || new == nil { - return "" - } + if prev != nil && new != nil { if new.Cmp(prev) == 1 { - return "balance increase due to a " + reason = "balance increase due to " } else if new.Cmp(prev) == -1 { - return "balance decrease due to a " + reason = "balance decrease due to " } - return "" + } else if new != nil { + reason = "balance increase due to " + } else if prev != nil { + reason = "balance decrease due to " } + // Append main reason for the balance change switch b { + case BalanceIncreaseRewardTransactionFee: + reason += "payment of transaction tip" + case BalanceDecreaseGasBuy: + reason += "purchase of gas for execution of a transaction" + case BalanceIncreaseGasReturn: + reason += "refund for unused gas at the end of execution" case BalanceChangeTransfer: - reason = prependString() + "transfer via a call" + reason += "transfer via a call" + case BalanceDecreaseSelfdestruct: + reason += "selfDestruct" case BalanceIncreaseDeposit: - reason = "balance increase via a deposit" + reason += "deposit" case BalanceDecreaseWithdrawToL1: - reason = "balance decrease via a withdrawal to L1" + reason += "withdrawal to L1" case BalanceIncreaseL1PosterFee: - reason = "balance increase via a fee collection for L1 posting" + reason += "fee collection for L1 posting" case BalanceIncreaseInfraFee: - reason = "balance increase via a fee collection by infrastructure fee account" + reason += "fee collection by infrastructure fee account" case BalanceIncreaseNetworkFee: - reason = "balance increase via a fee collection by network fee account" + reason += "fee collection by network fee account" // ArbitrumRetryTx case BalanceIncreaseRetryTxPrepaid: - reason = "balance increase by prepaid value for a tx of ArbitrumRetryTx type" + reason += "deposit of prepaid value in a tx of ArbitrumRetryTx type" case BalanceDecreaseRetryTxUndoRefund: - reason = "balance decrease by undoing Geth's refund for a tx of ArbitrumRetryTx type" + reason += "undoing of Geth's refund for a tx of ArbitrumRetryTx type" case BalanceChangeTransferRetryTxToEscrow: - reason = prependString() + "transfer to escrow in a tx of ArbitrumRetryTx type" + reason += "transfer to escrow in a tx of ArbitrumRetryTx type" case BalanceChangeTransferRetryTxFromEscrow: - reason = prependString() + "transfer from escrow in a tx of ArbitrumRetryTx type" + reason += "transfer from escrow in a tx of ArbitrumRetryTx type" // ArbitrumSubmitRetryableTx case BalanceChangeTransferRetryableToFeeRefundAddr: - reason = prependString() + "transfer to FeeRefundAddr in a tx of ArbitrumSubmitRetryableTx type" + reason += "transfer to FeeRefundAddr in a tx of ArbitrumSubmitRetryableTx type" case BalanceChangeTransferRetryableToEscrow: - reason = prependString() + "transfer to escrow in a tx of ArbitrumSubmitRetryableTx type" + reason += "transfer to escrow in a tx of ArbitrumSubmitRetryableTx type" case BalanceChangeTransferRetryableToInfra: - reason = prependString() + "transfer to infrastructure fee account in a tx of ArbitrumSubmitRetryableTx type" + reason += "transfer to infrastructure fee account in a tx of ArbitrumSubmitRetryableTx type" case BalanceChangeTransferRetryableFromInfra: - reason = prependString() + "transfer from infrastructure fee account in a tx of ArbitrumSubmitRetryableTx type" + reason += "transfer from infrastructure fee account in a tx of ArbitrumSubmitRetryableTx type" case BalanceChangeTransferRetryableToNetwork: - reason = prependString() + "transfer to network fee account in a tx of ArbitrumSubmitRetryableTx type" + reason += "transfer to network fee account in a tx of ArbitrumSubmitRetryableTx type" case BalanceChangeTransferRetryableFromNetwork: - reason = prependString() + "transfer from network fee account in a tx of ArbitrumSubmitRetryableTx type" + reason += "transfer from network fee account in a tx of ArbitrumSubmitRetryableTx type" // Batchposter case BalanceChangeTransferBatchposterReward: - reason = prependString() + "transfer from L1PricerFundsPoolAddress as batchPosterReward" + reason += "transfer from L1PricerFundsPoolAddress as batchPosterReward" case BalanceChangeTransferBatchposterRefund: - reason = prependString() + "transfer from L1PricerFundsPoolAddress as batchPosterRefund" + reason += "transfer from L1PricerFundsPoolAddress as batchPosterRefund" // Stylus case BalanceChangeTransferActivationFee: - reason = prependString() + "transfer of activation fee to network fee account" + reason += "transfer of activation fee to network fee account" case BalanceChangeTransferActivationReimburse: - reason = prependString() + "transfer of reimburse amount after charging the activation fee" + reason += "transfer of reimburse amount after charging the activation fee" default: - reason = "unspecified" + return "unspecified" } return reason diff --git a/eth/tracers/internal/tracetest/calltrace_test.go b/eth/tracers/internal/tracetest/calltrace_test.go index 3c4884ecf..af40b347f 100644 --- a/eth/tracers/internal/tracetest/calltrace_test.go +++ b/eth/tracers/internal/tracetest/calltrace_test.go @@ -309,13 +309,13 @@ func TestInternals(t *testing.T) { byte(vm.CALL), }, tracer: mkTracer("callTracer", nil), - want: fmt.Sprintf(`{"beforeEVMTransfers":[{"purpose":"feePayment","from":"%s","to":null,"value":"0x13880"}],"afterEVMTransfers":[{"purpose":"gasRefund","from":null,"to":"%s","value":"0xe3a8"},{"purpose":"tip","from":null,"to":"0x0000000000000000000000000000000000000000","value":"0x54d8"}],"balanceChanges":[{"addr":"%s","prev":"0x1c6bf52634000","new":"0x1c6bf52620780","reason":"unspecified"},{"addr":"%s","prev":"0x1c6bf52620780","new":"0x1c6bf5262eb28","reason":"unspecified"},{"addr":"0x0000000000000000000000000000000000000000","prev":"0x0","new":"0x54d8","reason":"unspecified"}],"from":"%s","gas":"0x13880","gasUsed":"0x54d8","to":"0x00000000000000000000000000000000deadbeef","input":"0x","calls":[{"from":"0x00000000000000000000000000000000deadbeef","gas":"0xe01a","gasUsed":"0x0","to":"0x00000000000000000000000000000000000000ff","input":"0x","value":"0x0","type":"CALL"}],"value":"0x0","type":"CALL"}`, origin.Hex(), origin.Hex(), origin.Hex(), origin.Hex(), originHex), + want: fmt.Sprintf(`{"beforeEVMTransfers":[{"purpose":"purchase of gas for execution of a transaction","from":"%s","to":null,"value":"0x13880"}],"afterEVMTransfers":[{"purpose":"refund for unused gas at the end of execution","from":null,"to":"%s","value":"0xe3a8"},{"purpose":"payment of transaction tip","from":null,"to":"0x0000000000000000000000000000000000000000","value":"0x54d8"}],"balanceChanges":[{"addr":"%s","prev":"0x1c6bf52634000","new":"0x1c6bf52620780","reason":"balance decrease due to purchase of gas for execution of a transaction"},{"addr":"%s","prev":"0x1c6bf52620780","new":"0x1c6bf5262eb28","reason":"balance increase due to refund for unused gas at the end of execution"},{"addr":"0x0000000000000000000000000000000000000000","prev":"0x0","new":"0x54d8","reason":"balance increase due to payment of transaction tip"}],"from":"%s","gas":"0x13880","gasUsed":"0x54d8","to":"0x00000000000000000000000000000000deadbeef","input":"0x","calls":[{"from":"0x00000000000000000000000000000000deadbeef","gas":"0xe01a","gasUsed":"0x0","to":"0x00000000000000000000000000000000000000ff","input":"0x","value":"0x0","type":"CALL"}],"value":"0x0","type":"CALL"}`, origin.Hex(), origin.Hex(), origin.Hex(), origin.Hex(), originHex), }, { name: "Stack depletion in LOG0", code: []byte{byte(vm.LOG3)}, tracer: mkTracer("callTracer", json.RawMessage(`{ "withLog": true }`)), - want: fmt.Sprintf(`{"beforeEVMTransfers":[{"purpose":"feePayment","from":"%s","to":null,"value":"0x13880"}],"afterEVMTransfers":[{"purpose":"gasRefund","from":null,"to":"%s","value":"0x0"},{"purpose":"tip","from":null,"to":"0x0000000000000000000000000000000000000000","value":"0x13880"}],"balanceChanges":[{"addr":"%s","prev":"0x1c6bf52634000","new":"0x1c6bf52620780","reason":"unspecified"},{"addr":"0x0000000000000000000000000000000000000000","prev":"0x0","new":"0x13880","reason":"unspecified"}],"from":"%s","gas":"0x13880","gasUsed":"0x13880","to":"0x00000000000000000000000000000000deadbeef","input":"0x","error":"stack underflow (0 \u003c=\u003e 5)","value":"0x0","type":"CALL"}`, origin.Hex(), origin.Hex(), origin.Hex(), originHex), + want: fmt.Sprintf(`{"beforeEVMTransfers":[{"purpose":"purchase of gas for execution of a transaction","from":"%s","to":null,"value":"0x13880"}],"afterEVMTransfers":[{"purpose":"refund for unused gas at the end of execution","from":null,"to":"%s","value":"0x0"},{"purpose":"payment of transaction tip","from":null,"to":"0x0000000000000000000000000000000000000000","value":"0x13880"}],"balanceChanges":[{"addr":"%s","prev":"0x1c6bf52634000","new":"0x1c6bf52620780","reason":"balance decrease due to purchase of gas for execution of a transaction"},{"addr":"0x0000000000000000000000000000000000000000","prev":"0x0","new":"0x13880","reason":"balance increase due to payment of transaction tip"}],"from":"%s","gas":"0x13880","gasUsed":"0x13880","to":"0x00000000000000000000000000000000deadbeef","input":"0x","error":"stack underflow (0 \u003c=\u003e 5)","value":"0x0","type":"CALL"}`, origin.Hex(), origin.Hex(), origin.Hex(), originHex), }, { name: "Mem expansion in LOG0", @@ -328,7 +328,7 @@ func TestInternals(t *testing.T) { byte(vm.LOG0), }, tracer: mkTracer("callTracer", json.RawMessage(`{ "withLog": true }`)), - want: fmt.Sprintf(`{"beforeEVMTransfers":[{"purpose":"feePayment","from":"%s","to":null,"value":"0x13880"}],"afterEVMTransfers":[{"purpose":"gasRefund","from":null,"to":"%s","value":"0xdce2"},{"purpose":"tip","from":null,"to":"0x0000000000000000000000000000000000000000","value":"0x5b9e"}],"balanceChanges":[{"addr":"%s","prev":"0x1c6bf52634000","new":"0x1c6bf52620780","reason":"unspecified"},{"addr":"%s","prev":"0x1c6bf52620780","new":"0x1c6bf5262e462","reason":"unspecified"},{"addr":"0x0000000000000000000000000000000000000000","prev":"0x0","new":"0x5b9e","reason":"unspecified"}],"from":"%s","gas":"0x13880","gasUsed":"0x5b9e","to":"0x00000000000000000000000000000000deadbeef","input":"0x","logs":[{"address":"0x00000000000000000000000000000000deadbeef","topics":[],"data":"0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","position":"0x0"}],"value":"0x0","type":"CALL"}`, origin.Hex(), origin.Hex(), origin.Hex(), origin.Hex(), originHex), + want: fmt.Sprintf(`{"beforeEVMTransfers":[{"purpose":"purchase of gas for execution of a transaction","from":"%s","to":null,"value":"0x13880"}],"afterEVMTransfers":[{"purpose":"refund for unused gas at the end of execution","from":null,"to":"%s","value":"0xdce2"},{"purpose":"payment of transaction tip","from":null,"to":"0x0000000000000000000000000000000000000000","value":"0x5b9e"}],"balanceChanges":[{"addr":"%s","prev":"0x1c6bf52634000","new":"0x1c6bf52620780","reason":"balance decrease due to purchase of gas for execution of a transaction"},{"addr":"%s","prev":"0x1c6bf52620780","new":"0x1c6bf5262e462","reason":"balance increase due to refund for unused gas at the end of execution"},{"addr":"0x0000000000000000000000000000000000000000","prev":"0x0","new":"0x5b9e","reason":"balance increase due to payment of transaction tip"}],"from":"%s","gas":"0x13880","gasUsed":"0x5b9e","to":"0x00000000000000000000000000000000deadbeef","input":"0x","logs":[{"address":"0x00000000000000000000000000000000deadbeef","topics":[],"data":"0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","position":"0x0"}],"value":"0x0","type":"CALL"}`, origin.Hex(), origin.Hex(), origin.Hex(), origin.Hex(), originHex), }, { // Leads to OOM on the prestate tracer diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/blob_tx.json b/eth/tracers/internal/tracetest/testdata/call_tracer/blob_tx.json index 9ab4b9750..e8a4c9b53 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/blob_tx.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/blob_tx.json @@ -58,7 +58,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x0c2c51a0990AeE1d73C1228de158688341557508", "to": null, "value": "0x2de364958" @@ -66,13 +66,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x0c2c51a0990AeE1d73C1228de158688341557508", "value": "0x0" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x0000000000000000000000000000000000000000", "value": "0x200b20" @@ -83,13 +83,13 @@ "addr": "0x0c2c51a0990AeE1d73C1228de158688341557508", "prev": "0xde0b6b3a7640000", "new": "0xde0b6b0c92db6a8", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x0000000000000000000000000000000000000000", "prev": "0x272e0528", "new": "0x274e1048", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0x0c2c51a0990aee1d73c1228de158688341557508", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/create.json b/eth/tracers/internal/tracetest/testdata/call_tracer/create.json index 5582ff208..1bb6eea20 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/create.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/create.json @@ -48,7 +48,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x13e4ACeFE6a6700604929946E70E6443E4E73447", "to": null, "value": "0x2a0383e2a65c00" @@ -56,13 +56,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x13e4ACeFE6a6700604929946E70E6443E4E73447", "value": "0x0" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0xD049bfd667cB46Aa3Ef5Df0dA3e57DB3Be39E511", "value": "0x2a0383e2a65c00" @@ -73,13 +73,13 @@ "addr": "0x13e4ACeFE6a6700604929946E70E6443E4E73447", "prev": "0xcf3e0938579f000", "new": "0xcc9dd0fa2d39400", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0xD049bfd667cB46Aa3Ef5Df0dA3e57DB3Be39E511", "prev": "0x0", "new": "0x2a0383e2a65c00", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0x13e4acefe6a6700604929946e70e6443e4e73447", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/deep_calls.json b/eth/tracers/internal/tracetest/testdata/call_tracer/deep_calls.json index af173c041..a99350937 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/deep_calls.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/deep_calls.json @@ -111,7 +111,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x70C9217D814985faEF62B124420F8dFbdDD96433", "to": null, "value": "0x11c37937e08000" @@ -119,13 +119,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x70C9217D814985faEF62B124420F8dFbdDD96433", "value": "0xac27a3b12e800" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x1977C248e1014Cc103929Dd7f154199C916E39Ec", "value": "0x700fefccd9800" @@ -136,19 +136,19 @@ "addr": "0x70C9217D814985faEF62B124420F8dFbdDD96433", "prev": "0x4ef436dcbda6cd4a", "new": "0x4ee2736385c64d4a", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x70C9217D814985faEF62B124420F8dFbdDD96433", "prev": "0x4ee2736385c64d4a", "new": "0x4eed35ddc0d9354a", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0x1977C248e1014Cc103929Dd7f154199C916E39Ec", "prev": "0x0", "new": "0x700fefccd9800", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "calls": [ diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/delegatecall.json b/eth/tracers/internal/tracetest/testdata/call_tracer/delegatecall.json index ba30db78e..093765e03 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/delegatecall.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/delegatecall.json @@ -64,7 +64,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0xA529806c67cc6486d4D62024471772F47F6FD672", "to": null, "value": "0xd529ae9e860000" @@ -72,13 +72,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0xA529806c67cc6486d4D62024471772F47F6FD672", "value": "0xd1b8093ff89800" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x5659922cE141EedBC2733678f9806c77b4eEBEE8", "value": "0x371a55e8d6800" @@ -89,19 +89,19 @@ "addr": "0xA529806c67cc6486d4D62024471772F47F6FD672", "prev": "0x67820e39ac8fe9800", "new": "0x6774bb9ec2a789800", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0xA529806c67cc6486d4D62024471772F47F6FD672", "prev": "0x6774bb9ec2a789800", "new": "0x6781d71f56a713000", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0x5659922cE141EedBC2733678f9806c77b4eEBEE8", "prev": "0x0", "new": "0x371a55e8d6800", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "calls": [ diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/inner_create_oog_outer_throw.json b/eth/tracers/internal/tracetest/testdata/call_tracer/inner_create_oog_outer_throw.json index e6cd118fe..8aa0104d0 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/inner_create_oog_outer_throw.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/inner_create_oog_outer_throw.json @@ -56,7 +56,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0xE4A13Bc304682a903e9472F469C33801dd18d9E8", "to": null, "value": "0x2aa1efb94e0000" @@ -64,13 +64,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0xE4A13Bc304682a903e9472F469C33801dd18d9E8", "value": "0x0" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x1585936b53834b021f68CC13eEeFdEc2EfC8e724", "value": "0x2aa1efb94e0000" @@ -81,13 +81,13 @@ "addr": "0xE4A13Bc304682a903e9472F469C33801dd18d9E8", "prev": "0x33c763c929f62c4f", "new": "0x339cc1d970a82c4f", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x1585936b53834b021f68CC13eEeFdEc2EfC8e724", "prev": "0x0", "new": "0x2aa1efb94e0000", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "calls": [ diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/inner_instafail.json b/eth/tracers/internal/tracetest/testdata/call_tracer/inner_instafail.json index 505374951..ba3dca39e 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/inner_instafail.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/inner_instafail.json @@ -52,7 +52,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x66fdfd05e46126A07465aD24e40cc0597BC1ef31", "to": null, "value": "0x931dcd31fd200" @@ -60,13 +60,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x66fdfd05e46126A07465aD24e40cc0597BC1ef31", "value": "0x71af98fe06000" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0xc822ef32e6d26E170B70Cf761e204c1806265914", "value": "0x216e3433f7200" @@ -77,19 +77,19 @@ "addr": "0x66fdfd05e46126A07465aD24e40cc0597BC1ef31", "prev": "0x229ebbb36c3e0f20", "new": "0x229589d6991e3d20", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x66fdfd05e46126A07465aD24e40cc0597BC1ef31", "prev": "0x229589d6991e3d20", "new": "0x229ca4d028fe9d20", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0xc822ef32e6d26E170B70Cf761e204c1806265914", "prev": "0x0", "new": "0x216e3433f7200", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "type": "CALL", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/inner_revert_reason.json b/eth/tracers/internal/tracetest/testdata/call_tracer/inner_revert_reason.json index f52d7875f..301271e78 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/inner_revert_reason.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/inner_revert_reason.json @@ -52,7 +52,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x3623191d4CCfBbdf09E8EBf6382A1F8257417bC1", "to": null, "value": "0x23f8a24459d000" @@ -60,13 +60,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x3623191d4CCfBbdf09E8EBf6382A1F8257417bC1", "value": "0x22231133e19400" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x0000000000000000000000000000000000000000", "value": "0x15bd3c0591000" @@ -77,19 +77,19 @@ "addr": "0x3623191d4CCfBbdf09E8EBf6382A1F8257417bC1", "prev": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7", "new": "0xffffffffffffffffffffffffffffffffffffffffffffffffffdc075dbba62ff7", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x3623191d4CCfBbdf09E8EBf6382A1F8257417bC1", "prev": "0xffffffffffffffffffffffffffffffffffffffffffffffffffdc075dbba62ff7", "new": "0xfffffffffffffffffffffffffffffffffffffffffffffffffffe2a6eef87c3f7", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0x0000000000000000000000000000000000000000", "prev": "0x0", "new": "0x15bd3c0591000", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0x3623191d4ccfbbdf09e8ebf6382a1f8257417bc1", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/inner_throw_outer_revert.json b/eth/tracers/internal/tracetest/testdata/call_tracer/inner_throw_outer_revert.json index 01b9f9e59..c7be1a700 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/inner_throw_outer_revert.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/inner_throw_outer_revert.json @@ -59,7 +59,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0xd4FCAb9f0a6DC0493Af47C864f6f17A8a5e2E826", "to": null, "value": "0x267f6630f8ac00" @@ -67,13 +67,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0xd4FCAb9f0a6DC0493Af47C864f6f17A8a5e2E826", "value": "0x9208af649c00" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x00d8Ae40D9a06d0E7a2877B62E32eB959Afbe16D", "value": "0x25ed5d81941000" @@ -84,31 +84,31 @@ "addr": "0xd4FCAb9f0a6DC0493Af47C864f6f17A8a5e2E826", "prev": "0x2a2dd979a35cf000", "new": "0x2a075a1372644400", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0xd4FCAb9f0a6DC0493Af47C864f6f17A8a5e2E826", "prev": "0x2a075a1372644400", "new": "0x1b7500a39c3b4400", - "reason": "balance decrease due to a transfer via a call" + "reason": "balance decrease due to transfer via a call" }, { "addr": "0x33056b5DcaC09a9b4BeCad0E1dcf92c19Bd0AF76", "prev": "0x0", "new": "0xe92596fd6290000", - "reason": "balance increase due to a transfer via a call" + "reason": "balance increase due to transfer via a call" }, { "addr": "0xd4FCAb9f0a6DC0493Af47C864f6f17A8a5e2E826", "prev": "0x2a075a1372644400", "new": "0x2a07ec1c21c8e000", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0x00d8Ae40D9a06d0E7a2877B62E32eB959Afbe16D", "prev": "0x0", "new": "0x25ed5d81941000", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "calls": [ diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/oog.json b/eth/tracers/internal/tracetest/testdata/call_tracer/oog.json index d3afcb2e3..838a96852 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/oog.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/oog.json @@ -50,7 +50,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x94194BC2aaF494501D7880B61274A169f6502A54", "to": null, "value": "0x49874422212000" @@ -58,13 +58,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x94194BC2aaF494501D7880B61274A169f6502A54", "value": "0x0" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0xD049bfd667cB46Aa3Ef5Df0dA3e57DB3Be39E511", "value": "0x49874422212000" @@ -75,13 +75,13 @@ "addr": "0x94194BC2aaF494501D7880B61274A169f6502A54", "prev": "0xea8c39a876d19888d", "new": "0xea87a13434af8688d", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0xD049bfd667cB46Aa3Ef5Df0dA3e57DB3Be39E511", "prev": "0x0", "new": "0x49874422212000", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "error": "out of gas", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/revert.json b/eth/tracers/internal/tracetest/testdata/call_tracer/revert.json index 9a2da5ba6..d48a412e7 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/revert.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/revert.json @@ -48,7 +48,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x0f6cEF2b7FbB504782e35AA82a2207e816a2B7a9", "to": null, "value": "0x10a741a46278000" @@ -56,13 +56,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x0f6cEF2b7FbB504782e35AA82a2207e816a2B7a9", "value": "0x107ded4ef0de200" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0xF4D8e706CfB25c0DECBbDd4D2E2Cc10C66376a3F", "value": "0x2954557199e00" @@ -73,19 +73,19 @@ "addr": "0x0f6cEF2b7FbB504782e35AA82a2207e816a2B7a9", "prev": "0x2a3fc32bcc019283", "new": "0x29354f1185da1283", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x0f6cEF2b7FbB504782e35AA82a2207e816a2B7a9", "prev": "0x29354f1185da1283", "new": "0x2a3d2de674e7f483", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0xF4D8e706CfB25c0DECBbDd4D2E2Cc10C66376a3F", "prev": "0x0", "new": "0x2954557199e00", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "error": "execution reverted", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/revert_reason.json b/eth/tracers/internal/tracetest/testdata/call_tracer/revert_reason.json index 73c2d4dc2..002b1b6b7 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/revert_reason.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/revert_reason.json @@ -53,7 +53,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0xf7579c3d8A669C89d5Ed246a22Eb6db8F6feDbf1", "to": null, "value": "0xd1c091338a000" @@ -61,13 +61,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0xf7579c3d8A669C89d5Ed246a22Eb6db8F6feDbf1", "value": "0xd0279d3814000" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x0000000000000000000000000000000000000000", "value": "0x198f3fb76000" @@ -78,19 +78,19 @@ "addr": "0xf7579c3d8A669C89d5Ed246a22Eb6db8F6feDbf1", "prev": "0x57af9d6b3df812900", "new": "0x57aecbaaacc488900", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0xf7579c3d8A669C89d5Ed246a22Eb6db8F6feDbf1", "prev": "0x57aecbaaacc488900", "new": "0x57af9bd249fc9c900", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0x0000000000000000000000000000000000000000", "prev": "0x0", "new": "0x198f3fb76000", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "error": "execution reverted", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/selfdestruct.json b/eth/tracers/internal/tracetest/testdata/call_tracer/selfdestruct.json index 03eca774d..492f078f0 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/selfdestruct.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/selfdestruct.json @@ -54,7 +54,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0xb436ba50D378D4BBC8660d312A13dF6af6E89dFB", "to": null, "value": "0x997a2bce4c000" @@ -62,13 +62,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0xb436ba50D378D4BBC8660d312A13dF6af6E89dFB", "value": "0x68ac555075c00" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x1585936b53834b021f68CC13eEeFdEc2EfC8e724", "value": "0x30cdd67dd6400" @@ -85,7 +85,7 @@ "addr": "0xb436ba50D378D4BBC8660d312A13dF6af6E89dFB", "prev": "0x1780d77678137ac1b775", "new": "0x1780d76ce070bddcf775", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x000000000000000000000000000000000000dEaD", @@ -97,19 +97,19 @@ "addr": "0x3b873A919aA0512D5A0F09E6dCCEaA4a6727faFE", "prev": "0x4d87094125a369d9bd5", "new": "0x0", - "reason": "unspecified" + "reason": "balance decrease due to selfDestruct" }, { "addr": "0xb436ba50D378D4BBC8660d312A13dF6af6E89dFB", "prev": "0x1780d76ce070bddcf775", "new": "0x1780d7736b3612e45375", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0x1585936b53834b021f68CC13eEeFdEc2EfC8e724", "prev": "0x0", "new": "0x30cdd67dd6400", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "calls": [ diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/simple.json b/eth/tracers/internal/tracetest/testdata/call_tracer/simple.json index f834c10b0..f80846d48 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/simple.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/simple.json @@ -59,7 +59,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0xb436ba50D378D4BBC8660d312A13dF6af6E89dFB", "to": null, "value": "0x997a2bce4c000" @@ -67,13 +67,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0xb436ba50D378D4BBC8660d312A13dF6af6E89dFB", "value": "0x576b3eb275400" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x1585936b53834b021f68CC13eEeFdEc2EfC8e724", "value": "0x420eed1bd6c00" @@ -84,31 +84,31 @@ "addr": "0xb436ba50D378D4BBC8660d312A13dF6af6E89dFB", "prev": "0x1780d77678137ac1b775", "new": "0x1780d76ce070bddcf775", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x3b873A919aA0512D5A0F09E6dCCEaA4a6727faFE", "prev": "0x4d87094125a369d9bd5", "new": "0x4d869a3b70062eb9bd5", - "reason": "balance decrease due to a transfer via a call" + "reason": "balance decrease due to transfer via a call" }, { "addr": "0x0024F658a46FBB89d8Ac105e98D7ac7cbBaF27C5", "prev": "0x0", "new": "0x6f05b59d3b20000", - "reason": "balance increase due to a transfer via a call" + "reason": "balance increase due to transfer via a call" }, { "addr": "0xb436ba50D378D4BBC8660d312A13dF6af6E89dFB", "prev": "0x1780d76ce070bddcf775", "new": "0x1780d7725724a9044b75", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0x1585936b53834b021f68CC13eEeFdEc2EfC8e724", "prev": "0x0", "new": "0x420eed1bd6c00", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "calls": [ diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/simple_onlytop.json b/eth/tracers/internal/tracetest/testdata/call_tracer/simple_onlytop.json index 1ed4a6839..fac9ad11b 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/simple_onlytop.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/simple_onlytop.json @@ -62,7 +62,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0xb436ba50D378D4BBC8660d312A13dF6af6E89dFB", "to": null, "value": "0x997a2bce4c000" @@ -70,13 +70,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0xb436ba50D378D4BBC8660d312A13dF6af6E89dFB", "value": "0x576b3eb275400" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x1585936b53834b021f68CC13eEeFdEc2EfC8e724", "value": "0x420eed1bd6c00" @@ -87,31 +87,31 @@ "addr": "0xb436ba50D378D4BBC8660d312A13dF6af6E89dFB", "prev": "0x1780d77678137ac1b775", "new": "0x1780d76ce070bddcf775", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x3b873A919aA0512D5A0F09E6dCCEaA4a6727faFE", "prev": "0x4d87094125a369d9bd5", "new": "0x4d869a3b70062eb9bd5", - "reason": "balance decrease due to a transfer via a call" + "reason": "balance decrease due to transfer via a call" }, { "addr": "0x0024F658a46FBB89d8Ac105e98D7ac7cbBaF27C5", "prev": "0x0", "new": "0x6f05b59d3b20000", - "reason": "balance increase due to a transfer via a call" + "reason": "balance increase due to transfer via a call" }, { "addr": "0xb436ba50D378D4BBC8660d312A13dF6af6E89dFB", "prev": "0x1780d76ce070bddcf775", "new": "0x1780d7725724a9044b75", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0x1585936b53834b021f68CC13eEeFdEc2EfC8e724", "prev": "0x0", "new": "0x420eed1bd6c00", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0xb436ba50d378d4bbc8660d312a13df6af6e89dfb", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer/throw.json b/eth/tracers/internal/tracetest/testdata/call_tracer/throw.json index f111654b9..72e0e194f 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer/throw.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer/throw.json @@ -52,7 +52,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x70C9217D814985faEF62B124420F8dFbdDD96433", "to": null, "value": "0x11c37937e08000" @@ -60,13 +60,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x70C9217D814985faEF62B124420F8dFbdDD96433", "value": "0x0" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x294e5d6c39A36Ce38aF1DCA70c1060f78Dee8070", "value": "0x11c37937e08000" @@ -77,13 +77,13 @@ "addr": "0x70C9217D814985faEF62B124420F8dFbdDD96433", "prev": "0x4ecd70668f5d854a", "new": "0x4ebbaced577d054a", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x294e5d6c39A36Ce38aF1DCA70c1060f78Dee8070", "prev": "0x0", "new": "0x11c37937e08000", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "error": "invalid jump destination", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/calldata.json b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/calldata.json index bddcb379d..6dbf02e26 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/calldata.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/calldata.json @@ -78,7 +78,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x4F5777744b500616697CB655DCb02ee6CD51DeB5", "to": null, "value": "0x21c166071e51e6" @@ -86,13 +86,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x4F5777744b500616697CB655DCb02ee6CD51DeB5", "value": "0x1026111b8570c0" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0xf8b483DbA2c3B7176a3Da549ad41A48BB3121069", "value": "0x119b54eb98e126" @@ -103,31 +103,31 @@ "addr": "0x4F5777744b500616697CB655DCb02ee6CD51DeB5", "prev": "0xb0983f1b83eec290", "new": "0xb0767db57cd070aa", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x4F5777744b500616697CB655DCb02ee6CD51DeB5", "prev": "0xb0767db57cd070aa", "new": "0x25af5ab0f2e870aa", - "reason": "balance decrease due to a transfer via a call" + "reason": "balance decrease due to transfer via a call" }, { "addr": "0x200Edd17F30485A8735878661960Cd7a9A95733F", "prev": "0x0", "new": "0x8ac7230489e80000", - "reason": "balance increase due to a transfer via a call" + "reason": "balance increase due to transfer via a call" }, { "addr": "0x4F5777744b500616697CB655DCb02ee6CD51DeB5", "prev": "0x25af5ab0f2e870aa", "new": "0x25bf80c20e6de16a", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0xf8b483DbA2c3B7176a3Da549ad41A48BB3121069", "prev": "0x16969a0ba2c2d384d07", "new": "0x16969b2558118d12e2d", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0x4f5777744b500616697cb655dcb02ee6cd51deb5", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/delegatecall.json b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/delegatecall.json index 6cc597a4b..abf3e3091 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/delegatecall.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/delegatecall.json @@ -135,7 +135,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x3dE712784baf97260455aE25fb74f574EC9c1add", "to": null, "value": "0x267b804776c000" @@ -143,13 +143,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x3dE712784baf97260455aE25fb74f574EC9c1add", "value": "0x1add08f8e96800" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x61C808D82A3Ac53231750daDc13c777b59310bD9", "value": "0xb9e774e8d5800" @@ -160,19 +160,19 @@ "addr": "0x3dE712784baf97260455aE25fb74f574EC9c1add", "prev": "0x23c8352f33854625", "new": "0x23a1b9aeec0e8625", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x3dE712784baf97260455aE25fb74f574EC9c1add", "prev": "0x23a1b9aeec0e8625", "new": "0x23bc96b7e4f7ee25", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0x61C808D82A3Ac53231750daDc13c777b59310bD9", "prev": "0x90a7af5d4755984561", "new": "0x90a7bafbbea4259d61", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0x3de712784baf97260455ae25fb74f574ec9c1add", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/frontier_create_outofstorage.json b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/frontier_create_outofstorage.json index b97ea4acb..bd7e0b04c 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/frontier_create_outofstorage.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/frontier_create_outofstorage.json @@ -79,7 +79,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x0047A8033CC6d6Ca2ED5044674Fd421F44884dE8", "to": null, "value": "0x13fbe85edc90000" @@ -87,13 +87,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x0047A8033CC6d6Ca2ED5044674Fd421F44884dE8", "value": "0xd52ed21cc43400" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0xe48430c4E88A929bBa0eE3DCe284866a9937b609", "value": "0x6a8fb3d104cc00" @@ -104,19 +104,19 @@ "addr": "0x0047A8033CC6d6Ca2ED5044674Fd421F44884dE8", "prev": "0x44f5ced08fe37cf7", "new": "0x43b6104aa21a7cf7", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x0047A8033CC6d6Ca2ED5044674Fd421F44884dE8", "prev": "0x43b6104aa21a7cf7", "new": "0x448b3f1cbedeb0f7", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0xe48430c4E88A929bBa0eE3DCe284866a9937b609", "prev": "0x26758774d51d8677a", "new": "0x267c3070122dd337a", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0x0047a8033cc6d6ca2ed5044674fd421f44884de8", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/multi_contracts.json b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/multi_contracts.json index a5a42a26e..f4cfc0cb0 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/multi_contracts.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/multi_contracts.json @@ -300,7 +300,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0xBe3aE5Cb97c253DdA67181C6E34E43F5C275E08b", "to": null, "value": "0x136dcc951d8c000" @@ -308,13 +308,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0xBe3aE5Cb97c253DdA67181C6E34E43F5C275E08b", "value": "0x5489446b9e1a00" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8", "value": "0xe25384e63aa600" @@ -325,55 +325,55 @@ "addr": "0xBe3aE5Cb97c253DdA67181C6E34E43F5C275E08b", "prev": "0x167d285b38143c04f", "new": "0x1669ba8ea2f6b004f", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x6e715Ab4F598eACF0016b9b35Ef33e4141844CcC", "prev": "0x4563918244f400000", "new": "0x0", - "reason": "balance decrease due to a transfer via a call" + "reason": "balance decrease due to transfer via a call" }, { "addr": "0xAD3Ecf23c0c8983B07163708be6d763b5F056193", "prev": "0x0", "new": "0x4563918244f400000", - "reason": "balance increase due to a transfer via a call" + "reason": "balance increase due to transfer via a call" }, { "addr": "0xAD3Ecf23c0c8983B07163708be6d763b5F056193", "prev": "0x4563918244f400000", "new": "0x22b1c8c1227a00001", - "reason": "balance decrease due to a transfer via a call" + "reason": "balance decrease due to transfer via a call" }, { "addr": "0x6e715Ab4F598eACF0016b9b35Ef33e4141844CcC", "prev": "0x0", "new": "0x22b1c8c12279fffff", - "reason": "balance increase due to a transfer via a call" + "reason": "balance increase due to transfer via a call" }, { "addr": "0xAD3Ecf23c0c8983B07163708be6d763b5F056193", "prev": "0x22b1c8c1227a00001", "new": "0x2", - "reason": "balance decrease due to a transfer via a call" + "reason": "balance decrease due to transfer via a call" }, { "addr": "0x6e715Ab4F598eACF0016b9b35Ef33e4141844CcC", "prev": "0x22b1c8c12279fffff", "new": "0x4563918244f3ffffe", - "reason": "balance increase due to a transfer via a call" + "reason": "balance increase due to transfer via a call" }, { "addr": "0xBe3aE5Cb97c253DdA67181C6E34E43F5C275E08b", "prev": "0x1669ba8ea2f6b004f", "new": "0x166f0322e9b091a4f", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8", "prev": "0x4ab3566739e7b24371", "new": "0x4ab438babecdece971", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0xbe3ae5cb97c253dda67181c6e34e43f5c275e08b", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/multilogs.json b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/multilogs.json index 44a502617..6d12f47fc 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/multilogs.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/multilogs.json @@ -168,7 +168,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x3FcB0342353c541E210013AadDc2E740b9A33D08", "to": null, "value": "0x214e8348c4f0000" @@ -176,13 +176,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x3FcB0342353c541E210013AadDc2E740b9A33D08", "value": "0x610b133d337400" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x2a65Aca4D5fC5B5C859090a6c34d164135398226", "value": "0x1b3dd214f1b8c00" @@ -193,31 +193,31 @@ "addr": "0x3FcB0342353c541E210013AadDc2E740b9A33D08", "prev": "0x6a0e4be198f18400", "new": "0x67f963ad0ca28400", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x3FcB0342353c541E210013AadDc2E740b9A33D08", "prev": "0x67f963ad0ca28400", "new": "0x6481360022c98400", - "reason": "balance decrease due to a transfer via a call" + "reason": "balance decrease due to transfer via a call" }, { "addr": "0x350e0fFC780a6a75B44Cc52E1fF9092870668945", "prev": "0xe37111b7c79406c0", "new": "0xe6e93f64b16d06c0", - "reason": "balance increase due to a transfer via a call" + "reason": "balance increase due to transfer via a call" }, { "addr": "0x3FcB0342353c541E210013AadDc2E740b9A33D08", "prev": "0x6481360022c98400", "new": "0x64e241135ffcf800", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0x2a65Aca4D5fC5B5C859090a6c34d164135398226", "prev": "0x44dc051cccdfd2e132", "new": "0x44ddb8f9ee2eee6d32", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0x3fcb0342353c541e210013aaddc2e740b9a33d08", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/notopic.json b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/notopic.json index 94e1148a8..ae4d73ba0 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/notopic.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/notopic.json @@ -103,7 +103,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x6412Becf35cc7e2A9E7e47966E443F295e1E4F4a", "to": null, "value": "0xeebe0b40e8000" @@ -111,13 +111,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x6412Becf35cc7e2A9E7e47966E443F295e1E4F4a", "value": "0x3bb109f807a00" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x61C808D82A3Ac53231750daDc13c777b59310bD9", "value": "0xb30d0148e0600" @@ -128,43 +128,43 @@ "addr": "0x6412Becf35cc7e2A9E7e47966E443F295e1E4F4a", "prev": "0xfb5dbfc0d448e70", "new": "0xfa6f01b59360e70", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x6412Becf35cc7e2A9E7e47966E443F295e1E4F4a", "prev": "0xfa6f01b59360e70", "new": "0xb7d1fb240980e70", - "reason": "balance decrease due to a transfer via a call" + "reason": "balance decrease due to transfer via a call" }, { "addr": "0x50739060a2C32dc076E507aE1A893aAB28eCFe68", "prev": "0x6a8ecefb09f7c4141", "new": "0x6ad16c019b81a4141", - "reason": "balance increase due to a transfer via a call" + "reason": "balance increase due to transfer via a call" }, { "addr": "0x50739060a2C32dc076E507aE1A893aAB28eCFe68", "prev": "0x6ad16c019b81a4141", "new": "0x6acff22b6b6ddeaed", - "reason": "balance decrease due to a transfer via a call" + "reason": "balance decrease due to transfer via a call" }, { "addr": "0x88e1315687AeC48a72786c6B3b3F075208B62713", "prev": "0x24b9f2c5dc266dc6", "new": "0x24d19028dd62c41a", - "reason": "balance increase due to a transfer via a call" + "reason": "balance increase due to transfer via a call" }, { "addr": "0x6412Becf35cc7e2A9E7e47966E443F295e1E4F4a", "prev": "0xb7d1fb240980e70", "new": "0xb80dac2e0188870", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0x61C808D82A3Ac53231750daDc13c777b59310bD9", "prev": "0x12f621ea72fef44f848", "new": "0x12f6229d80003d2fe48", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0x6412becf35cc7e2a9e7e47966e443f295e1e4f4a", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/simple.json b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/simple.json index 4dc0c107c..32bc2c065 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/simple.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/simple.json @@ -64,7 +64,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb", "to": null, "value": "0x1acc000dea4400" @@ -72,13 +72,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb", "value": "0x11c37937e08000" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0xe2fE6B13287f28E193333fDfe7Fedf2f6Df6124A", "value": "0x90886d609c400" @@ -89,19 +89,19 @@ "addr": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb", "prev": "0x14203bee2ea6fbe8c", "new": "0x141e8f2e2dc857a8c", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0xD1220A0cf47c7B9Be7A2E6BA89F429762e7b9aDb", "prev": "0x141e8f2e2dc857a8c", "new": "0x141fab65c1465fa8c", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0xe2fE6B13287f28E193333fDfe7Fedf2f6Df6124A", "prev": "0x2717a9c870a286f4350", "new": "0x2717aa58f90fe790750", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0xd1220a0cf47c7b9be7a2e6ba89f429762e7b9adb", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/tx_failed.json b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/tx_failed.json index fd60e5455..603289ac5 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/tx_failed.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/tx_failed.json @@ -138,7 +138,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0xe6002189a74B43e6868b20C1311Bc108E38AaC57", "to": null, "value": "0x81fc72632f7340" @@ -146,13 +146,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0xe6002189a74B43e6868b20C1311Bc108E38AaC57", "value": "0x0" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8", "value": "0x81fc72632f7340" @@ -163,25 +163,25 @@ "addr": "0xe6002189a74B43e6868b20C1311Bc108E38AaC57", "prev": "0x29129264d1ae4848b", "new": "0x290a729dab7b5114b", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413", "prev": "0x53d2c8df046dd3db5", "new": "0x51cfa87ca63cad105", - "reason": "balance decrease due to a transfer via a call" + "reason": "balance decrease due to transfer via a call" }, { "addr": "0x10abb5EfEcdC09581f8b7cb95791FE2936790b4E", "prev": "0x81f158e2814b4ab624c", "new": "0x81f35c02e3a97bdcefc", - "reason": "balance increase due to a transfer via a call" + "reason": "balance increase due to transfer via a call" }, { "addr": "0xEA674fdDe714fd979de3EdF0F56AA9716B898ec8", "prev": "0x1601bbe4c58ec73210", "new": "0x16023de137f1f6a550", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0xe6002189a74b43e6868b20c1311bc108e38aac57", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/tx_partial_failed.json b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/tx_partial_failed.json index 208c21de9..96da1ed47 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/tx_partial_failed.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/tx_partial_failed.json @@ -76,7 +76,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x01115b41bD2731353dd3e6Abf44818FDc035aAf1", "to": null, "value": "0xe35fa931a0000" @@ -84,13 +84,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x01115b41bD2731353dd3e6Abf44818FDc035aAf1", "value": "0x268d6662df800" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0x61C808D82A3Ac53231750daDc13c777b59310bD9", "value": "0xbcd242cec0800" @@ -101,19 +101,19 @@ "addr": "0x01115b41bD2731353dd3e6Abf44818FDc035aAf1", "prev": "0x16d99e16e809000", "new": "0x15f63e6db669000", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x01115b41bD2731353dd3e6Abf44818FDc035aAf1", "prev": "0x15f63e6db669000", "new": "0x161ccbd41948800", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0x61C808D82A3Ac53231750daDc13c777b59310bD9", "prev": "0x6a636960e34bd696f4", "new": "0x6a63752e0778c29ef4", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0x01115b41bd2731353dd3e6abf44818fdc035aaf1", diff --git a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/with_onlyTopCall.json b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/with_onlyTopCall.json index 97b9db76e..4d1e17d27 100644 --- a/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/with_onlyTopCall.json +++ b/eth/tracers/internal/tracetest/testdata/call_tracer_withLog/with_onlyTopCall.json @@ -79,7 +79,7 @@ "result": { "beforeEVMTransfers": [ { - "purpose": "feePayment", + "purpose": "purchase of gas for execution of a transaction", "from": "0x4F5777744b500616697CB655DCb02ee6CD51DeB5", "to": null, "value": "0x21c166071e51e6" @@ -87,13 +87,13 @@ ], "afterEVMTransfers": [ { - "purpose": "gasRefund", + "purpose": "refund for unused gas at the end of execution", "from": null, "to": "0x4F5777744b500616697CB655DCb02ee6CD51DeB5", "value": "0x1026111b8570c0" }, { - "purpose": "tip", + "purpose": "payment of transaction tip", "from": null, "to": "0xf8b483DbA2c3B7176a3Da549ad41A48BB3121069", "value": "0x119b54eb98e126" @@ -104,31 +104,31 @@ "addr": "0x4F5777744b500616697CB655DCb02ee6CD51DeB5", "prev": "0xb0983f1b83eec290", "new": "0xb0767db57cd070aa", - "reason": "unspecified" + "reason": "balance decrease due to purchase of gas for execution of a transaction" }, { "addr": "0x4F5777744b500616697CB655DCb02ee6CD51DeB5", "prev": "0xb0767db57cd070aa", "new": "0x25af5ab0f2e870aa", - "reason": "balance decrease due to a transfer via a call" + "reason": "balance decrease due to transfer via a call" }, { "addr": "0x200Edd17F30485A8735878661960Cd7a9A95733F", "prev": "0x0", "new": "0x8ac7230489e80000", - "reason": "balance increase due to a transfer via a call" + "reason": "balance increase due to transfer via a call" }, { "addr": "0x4F5777744b500616697CB655DCb02ee6CD51DeB5", "prev": "0x25af5ab0f2e870aa", "new": "0x25bf80c20e6de16a", - "reason": "unspecified" + "reason": "balance increase due to refund for unused gas at the end of execution" }, { "addr": "0xf8b483DbA2c3B7176a3Da549ad41A48BB3121069", "prev": "0x16969a0ba2c2d384d07", "new": "0x16969b2558118d12e2d", - "reason": "unspecified" + "reason": "balance increase due to payment of transaction tip" } ], "from": "0x4f5777744b500616697cb655dcb02ee6cd51deb5", diff --git a/eth/tracers/js/tracer_arbitrum.go b/eth/tracers/js/tracer_arbitrum.go index 49fcaeeb4..5bf0fd4bb 100644 --- a/eth/tracers/js/tracer_arbitrum.go +++ b/eth/tracers/js/tracer_arbitrum.go @@ -25,7 +25,7 @@ import ( ) func (jst *jsTracer) CaptureArbitrumTransfer( - from, to *common.Address, value *big.Int, before bool, purpose string, + from, to *common.Address, value *big.Int, before bool, reason tracing.BalanceChangeReason, ) { traceTransfer, ok := goja.AssertFunction(jst.obj.Get("captureArbitrumTransfer")) if !ok { @@ -46,7 +46,7 @@ func (jst *jsTracer) CaptureArbitrumTransfer( transfer.Set("value", value) transfer.Set("before", before) - transfer.Set("purpose", purpose) + transfer.Set("purpose", reason.String(nil, nil)) if _, err := traceTransfer(transfer); err != nil { jst.err = wrapError("captureArbitrumTransfer", err) diff --git a/eth/tracers/native/mux.go b/eth/tracers/native/mux.go index 2a3a7dcdd..4a66d05be 100644 --- a/eth/tracers/native/mux.go +++ b/eth/tracers/native/mux.go @@ -193,10 +193,10 @@ func (t *muxTracer) CaptureArbitrumStorageSet(key, value common.Hash, depth int, } } -func (t *muxTracer) CaptureArbitrumTransfer(from, to *common.Address, value *big.Int, before bool, purpose string) { +func (t *muxTracer) CaptureArbitrumTransfer(from, to *common.Address, value *big.Int, before bool, reason tracing.BalanceChangeReason) { for _, t := range t.tracers { if t.CaptureArbitrumTransfer != nil { - t.CaptureArbitrumTransfer(from, to, value, before, purpose) + t.CaptureArbitrumTransfer(from, to, value, before, reason) } } } diff --git a/eth/tracers/native/tracer_arbitrum.go b/eth/tracers/native/tracer_arbitrum.go index ee5c23fae..3a44d5183 100644 --- a/eth/tracers/native/tracer_arbitrum.go +++ b/eth/tracers/native/tracer_arbitrum.go @@ -30,11 +30,9 @@ type arbitrumTransfer struct { Value string `json:"value"` } -func (t *callTracer) CaptureArbitrumTransfer( - from, to *common.Address, value *big.Int, before bool, purpose string, -) { +func (t *callTracer) CaptureArbitrumTransfer(from, to *common.Address, value *big.Int, before bool, reason tracing.BalanceChangeReason) { transfer := arbitrumTransfer{ - Purpose: purpose, + Purpose: reason.String(nil, nil), Value: bigToHex(value), } if from != nil { @@ -52,12 +50,12 @@ func (t *callTracer) CaptureArbitrumTransfer( } } -func (t *flatCallTracer) CaptureArbitrumTransfer(from, to *common.Address, value *big.Int, before bool, purpose string) { +func (t *flatCallTracer) CaptureArbitrumTransfer(from, to *common.Address, value *big.Int, before bool, reason tracing.BalanceChangeReason) { if t.interrupt.Load() { return } transfer := arbitrumTransfer{ - Purpose: purpose, + Purpose: reason.String(nil, nil), Value: bigToHex(value), } if from != nil {