Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Problem: etherjs smartcontract cannot change state (fix #257) #264

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 3 additions & 1 deletion ethereum/rpc/namespaces/eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,9 @@ func (e *PublicAPI) EstimateGas(args evmtypes.CallArgs) (hexutil.Uint64, error)
return 0, evmtypes.NewExecErrorWithReason(data.Ret)
}

return hexutil.Uint64(data.GasUsed), nil
// estimate for ethereum
// example: computed 21204 , ethereum 41646
return hexutil.Uint64(data.GasUsed + 40000), nil
}

// GetBlockByHash returns the block identified by hash.
Expand Down