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

Commit

Permalink
Fixing gas parameter for eth_call
Browse files Browse the repository at this point in the history
  • Loading branch information
poplexity committed Sep 11, 2024
1 parent 19e277e commit cc1f7dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/routes/evm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
import NonceRetryManager from "../../util/NonceRetryManager";
import {TransactionVars} from "../../telosevm-js/telos";
import {estypes} from "@elastic/elasticsearch";
import {DEFAULT_GAS_LIMIT} from "../../telosevm-js/constants";

const BN = require('bn.js');
const GAS_PRICE_OVERESTIMATE = 1.00
Expand Down Expand Up @@ -973,6 +974,8 @@ export default async function (fastify: FastifyInstance, opts: TelosEvmConfig) {
value: _value.toHexString().replace(/^0x/, ''),
sender: txParams.from,
};
obj.gas = obj.gasLimit || obj.gas || DEFAULT_GAS_LIMIT;
delete obj.gasLimit;
let tx = await fastify.evm.createEthTx(obj);
let sender = txParams.from

Expand Down
4 changes: 2 additions & 2 deletions src/telosevm-js/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const ETH_CHAIN = 'mainnet'
export const FORK = 'istanbul'
export const DEFAULT_GAS_LIMIT = '0x1E8480'
export const DEFAULT_GAS_LIMIT = '0x989680'
export const DEFAULT_VALUE = '0x0'
export const DEFAULT_CHAIN_ID = 1
export const DEFAULT_CHAIN_ID = 1

0 comments on commit cc1f7dc

Please sign in to comment.