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

Commit

Permalink
hardcode temp base value for gas for matic
Browse files Browse the repository at this point in the history
  • Loading branch information
jakekidd committed Jun 17, 2021
1 parent aa91baf commit 598c31b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/contracts/src.ts/services/ethService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ export const BIG_GAS_LIMIT = BigNumber.from(2_000_000);
// nothing should ever be this expensive... _should_
export const BIG_GAS_PRICE = parseUnits("1500", "gwei");

// TODO: Temp hotfix solution.
const MATIC_TEMP_GAS_PRICE = parseUnits("4", "gwei");

// TODO: Deprecate. Note that this is used in autoRebalance.ts.
export const waitForTransaction = async (
provider: JsonRpcProvider,
Expand Down Expand Up @@ -384,6 +387,9 @@ export class EthereumChainService extends EthereumChainReader implements IVector
gasPrice =
presetGasPrice ??
(await (async (): Promise<BigNumber> => {
if (chainId === 137) {
return MATIC_TEMP_GAS_PRICE;
}
const price = await this.getGasPrice(chainId);
if (price.isError) {
throw price.getError()!;
Expand Down

0 comments on commit 598c31b

Please sign in to comment.