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

Commit

Permalink
Add note about Arbitrum effectiveGasPrice support
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinweaver committed Jul 6, 2022
1 parent e3b6d1c commit c951c1c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/interface-adapter/lib/adapter/web3/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ export class Web3InterfaceAdapter implements InterfaceAdapter {
return this.web3.eth.getBlockNumber();
}

public async getTransactionCostReport(receipt: TransactionReceipt): Promise<TransactionCostReport> {
public async getTransactionCostReport(
receipt: TransactionReceipt
): Promise<TransactionCostReport> {
const tx = await this.getTransaction(receipt.transactionHash);
const block = await this.getBlock(receipt.blockNumber);

Expand All @@ -78,6 +80,8 @@ export class Web3InterfaceAdapter implements InterfaceAdapter {
const balance = await this.getBalance(tx.from);
// gasPrice has been deprecated in favor of effectiveGasPrice
// via https://github.com/ethereum/execution-specs/pull/251
// Note: this incidentally conforms to Arbitrum as well
// via https://github.com/trufflesuite/truffle/issues/4559
const gasPrice = new BN(receipt.effectiveGasPrice || tx.gasPrice);
const gas = new BN(receipt.gasUsed);
const value = new BN(tx.value);
Expand Down

0 comments on commit c951c1c

Please sign in to comment.