Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(relayer): fix tx spend calc for op chains #2359

Merged
merged 4 commits into from
Nov 5, 2024
Merged

Conversation

kevinhalliday
Copy link
Contributor

Fix PnL metrics / logs for op chains.

OP receipts include L1GasUsed, L1GasPrice, and L1Fee (L1GasPrice * L1GasUsed).
We need to include these in spend calc.

issue: #2354

go.mod Outdated Show resolved Hide resolved
lib/optypes/receipt.go Outdated Show resolved Hide resolved
relayer/app/sender.go Outdated Show resolved Hide resolved
lib/optypes/receipt.go Outdated Show resolved Hide resolved
relayer/app/pnl.go Outdated Show resolved Hide resolved
@@ -166,23 +181,21 @@ func getFees(
fees.nETH += feesGwei
fees.nUSD += feesGwei * prices[tokens.ETH]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

best error if prices don't contain expect token

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coingecko provider makes those checks

relayer/app/pnl.go Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
lib/ethclient/ethclient.go Outdated Show resolved Hide resolved
@kevinhalliday kevinhalliday merged commit 495576c into main Nov 5, 2024
18 checks passed
@kevinhalliday kevinhalliday deleted the kh/opreceipts branch November 5, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants