Skip to content

Commit

Permalink
zero price
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc committed Nov 29, 2024
1 parent c2aaf11 commit 7ef486c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions api/web3server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ func TestEstimateGas(t *testing.T) {
core.EXPECT().ChainID().Return(uint32(1)).Times(2)

t.Run("estimate execution", func(t *testing.T) {
core.EXPECT().EVMNetworkID().Return(uint32(0)).AnyTimes()
core.EXPECT().Account(gomock.Any()).Return(&iotextypes.AccountMeta{IsContract: true}, nil, nil)
core.EXPECT().EstimateExecutionGasConsumption(gomock.Any(), gomock.Any(), gomock.Any()).Return(uint64(11000), nil)

Expand Down
8 changes: 4 additions & 4 deletions api/web3server_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ func (call *callMsg) toUnsignedTx(chainID uint32) (*types.Transaction, error) {
case call.GasFeeCap != nil || call.GasTipCap != nil:
tx = types.NewTx(&types.DynamicFeeTx{
ChainID: big.NewInt(int64(chainID)),
GasTipCap: call.GasTipCap,
GasFeeCap: call.GasFeeCap,
GasTipCap: big.NewInt(0),
GasFeeCap: big.NewInt(0),
Gas: call.Gas,
To: toAddr,
Value: call.Value,
Expand All @@ -397,7 +397,7 @@ func (call *callMsg) toUnsignedTx(chainID uint32) (*types.Transaction, error) {
case call.AccessList != nil:
tx = types.NewTx(&types.AccessListTx{
ChainID: big.NewInt(int64(chainID)),
GasPrice: call.GasPrice,
GasPrice: big.NewInt(0),
Gas: call.Gas,
To: toAddr,
Value: call.Value,
Expand All @@ -406,7 +406,7 @@ func (call *callMsg) toUnsignedTx(chainID uint32) (*types.Transaction, error) {
})
default:
tx = types.NewTx(&types.LegacyTx{
GasPrice: call.GasPrice,
GasPrice: big.NewInt(0),
Gas: call.Gas,
To: toAddr,
Value: call.Value,
Expand Down

0 comments on commit 7ef486c

Please sign in to comment.