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

gas.fees: enable celo for gas fees #6846

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

gas.fees: enable celo for gas fees #6846

wants to merge 4 commits into from

Conversation

jeff-dude
Copy link
Member

No description provided.

@@ -92,7 +83,7 @@ WITH base_model as (
,txns.gas_used as gas_used
,{{tx_fee_raw(blockchain) }} as tx_fee_raw
,{{tx_fee_breakdown_raw(blockchain)}} as tx_fee_breakdown_raw
,{{fee_currency(blockchain)}} as tx_fee_currency
,{{var('ETH_ERC20_ADDRESS')}} as tx_fee_currency
Copy link
Member Author

Choose a reason for hiding this comment

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

during the fix, looks like blockchain team has cleaned up the raw table to match other chains and the fee_currency field no longer exists

select fee_currency, *
from celo.transactions
limit 10

Copy link
Member Author

Choose a reason for hiding this comment

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

i don't think we can simply remove this here. our non-raw values will break without the decimal assignment, which requires the correct address to join to metadata. i have raised to the team internally again.

@jeff-dude jeff-dude added WIP work in progress dune team created by dune team labels Sep 27, 2024
@jeff-dude
Copy link
Member Author

currently the test is failing for tx_fee_raw to equal the sum of parts within tx_fee_breakdown_raw

  • tx_fee_raw:
cast(gas_price as uint256) * cast(txns.gas_used as uint256)
  • tx_fee_breakdown_raw:
map_concat(
    map()
          ,case when txns.priority_fee_per_gas is null or txns.priority_fee_per_gas < 0
                then map(array['base_fee'], array[(cast(gas_price as uint256) * cast(txns.gas_used as uint256))])
                else map(array['base_fee','priority_fee'],
                         array[(cast(base_fee_per_gas as uint256) * cast(txns.gas_used as uint256))
                                ,(cast(priority_fee_per_gas as uint256) * cast(txns.gas_used as uint256))]
                         )
                end)
 as tx_fee_breakdown_raw

base_fee_per_gas comes from blocks table. maybe that doesn't align with values in transactions.gas_price?

need to investigate further. celo docs:
https://docs.celo.org/protocol/transaction/gas-pricing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dune team created by dune team WIP work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant