mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 12:46:44 +00:00
internal/ethapi: change default tx type to 0x2
This commit is contained in:
parent
243407a3aa
commit
f9bb2f36c5
2 changed files with 6 additions and 6 deletions
|
|
@ -986,7 +986,7 @@ func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, bloc
|
|||
}
|
||||
var (
|
||||
msg = args.ToMessage(blockContext.BaseFee, true)
|
||||
tx = args.ToTransaction(types.LegacyTxType)
|
||||
tx = args.ToTransaction(types.DynamicFeeTxType)
|
||||
traceConfig *TraceConfig
|
||||
)
|
||||
// Lower the basefee to 0 to avoid breaking EVM
|
||||
|
|
|
|||
|
|
@ -1606,7 +1606,7 @@ func (api *TransactionAPI) SendTransaction(ctx context.Context, args Transaction
|
|||
return common.Hash{}, err
|
||||
}
|
||||
// Assemble the transaction and sign with the wallet
|
||||
tx := args.ToTransaction(types.LegacyTxType)
|
||||
tx := args.ToTransaction(types.DynamicFeeTxType)
|
||||
|
||||
signed, err := wallet.SignTx(account, tx, api.b.ChainConfig().ChainID)
|
||||
if err != nil {
|
||||
|
|
@ -1628,7 +1628,7 @@ func (api *TransactionAPI) FillTransaction(ctx context.Context, args Transaction
|
|||
return nil, err
|
||||
}
|
||||
// Assemble the transaction and obtain rlp
|
||||
tx := args.ToTransaction(types.LegacyTxType)
|
||||
tx := args.ToTransaction(types.DynamicFeeTxType)
|
||||
data, err := tx.MarshalBinary()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
@ -1824,7 +1824,7 @@ func (api *TransactionAPI) SignTransaction(ctx context.Context, args Transaction
|
|||
return nil, err
|
||||
}
|
||||
// Before actually sign the transaction, ensure the transaction fee is reasonable.
|
||||
tx := args.ToTransaction(types.LegacyTxType)
|
||||
tx := args.ToTransaction(types.DynamicFeeTxType)
|
||||
if err := checkTxFee(tx.GasPrice(), tx.Gas(), api.b.RPCTxFeeCap()); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -1880,7 +1880,7 @@ func (api *TransactionAPI) Resend(ctx context.Context, sendArgs TransactionArgs,
|
|||
if err := sendArgs.setDefaults(ctx, api.b, sidecarConfig{}); err != nil {
|
||||
return common.Hash{}, err
|
||||
}
|
||||
matchTx := sendArgs.ToTransaction(types.LegacyTxType)
|
||||
matchTx := sendArgs.ToTransaction(types.DynamicFeeTxType)
|
||||
|
||||
// Before replacing the old transaction, ensure the _new_ transaction fee is reasonable.
|
||||
price := matchTx.GasPrice()
|
||||
|
|
@ -1910,7 +1910,7 @@ func (api *TransactionAPI) Resend(ctx context.Context, sendArgs TransactionArgs,
|
|||
if gasLimit != nil && *gasLimit != 0 {
|
||||
sendArgs.Gas = gasLimit
|
||||
}
|
||||
signedTx, err := api.sign(sendArgs.from(), sendArgs.ToTransaction(types.LegacyTxType))
|
||||
signedTx, err := api.sign(sendArgs.from(), sendArgs.ToTransaction(types.DynamicFeeTxType))
|
||||
if err != nil {
|
||||
return common.Hash{}, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue