Skip to content

Commit

Permalink
try to fix insufficient fee error
Browse files Browse the repository at this point in the history
  • Loading branch information
jewei1997 committed Oct 4, 2024
1 parent 32a2abb commit ec07ab2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion contracts/test/EVMCompatabilityTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ describe("EVM Test", function () {

// increment value
debug("Incrementing value...")
const resp = await box.boxIncr();
const resp = await box.boxIncr({ gasPrice: ethers.parseUnits('100', 'gwei') });
await resp.wait();

// make sure value is incremented
Expand Down
3 changes: 2 additions & 1 deletion evmrpc/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ func (i *InfoAPI) GasPrice(ctx context.Context) (result *hexutil.Big, returnErr
feeHist.Reward[0][0].ToInt(),
baseFee,
)
return (*hexutil.Big)(sum), nil
gp := (*hexutil.Big)(sum)
return gp, nil
}

// lastBlock is inclusive
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@ require (
replace (
github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.4
github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0
github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.37-0.20240923023912-aa7a702d42cc
// github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.37-0.20240923023912-aa7a702d42cc
github.com/cosmos/cosmos-sdk => ../sei-cosmos
github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0
github.com/cosmos/ibc-go/v3 => github.com/sei-protocol/sei-ibc-go/v3 v3.3.2
github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-23
Expand Down
1 change: 0 additions & 1 deletion x/evm/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ func (server msgServer) EVMTransaction(goCtx context.Context, msg *types.MsgEVMT
originalGasMeter.ConsumeGas(adjustedGasUsed.TruncateInt().Uint64(), "evm transaction")
}()

fmt.Println("JEREMYDEBUG: calling apply evm message from EVMTransaction")
res, applyErr := server.applyEVMMessage(ctx, emsg, stateDB, gp)
serverRes = &types.MsgEVMTransactionResponse{
Hash: tx.Hash().Hex(),
Expand Down
1 change: 0 additions & 1 deletion x/evm/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) {
// EndBlock executes all ABCI EndBlock logic respective to the evm module. It
// returns no validator updates.
func (am AppModule) EndBlock(ctx sdk.Context, req abci.RequestEndBlock) []abci.ValidatorUpdate {
fmt.Println("JEREMYDEBUG: block gas used", req.BlockGasUsed, ", block height", ctx.BlockHeight())
newBaseFee := am.keeper.AdjustDynamicBaseFeePerGas(ctx, uint64(req.BlockGasUsed))
if newBaseFee != nil {
metrics.GaugeEvmBlockBaseFee(newBaseFee.TruncateInt().BigInt(), req.Height)
Expand Down

0 comments on commit ec07ab2

Please sign in to comment.