Skip to content

Conversation

@Neeharika-Sompalli
Copy link
Contributor

@Neeharika-Sompalli Neeharika-Sompalli commented Sep 19, 2025

Fixes #21090

  • Adds fees for Adding and Deleting hooks (1 USD for each addition/deletion)
  • Adds fees for executing hooks ($0.005 for CryptoTransfer that has hook executions)
  • Used the SBS fee component in CryptoCreate/CryptoUpdate/ContractCreate/CryptoTransfer to set the constant fees for hooks. Used TV fee component to add the constant fees for ContractUpdate. The reason for choosing these parameters is because they are not currently used in the calculation of fees for the respective handlers.

NOTE: All this calculation using the respective fee components will be changed very soon with Simple fees.

  • Updated feeSchedules.json to reflect new fee data

Neeharika-Sompalli and others added 30 commits September 5, 2025 10:44
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Michael Tinker <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
rbarker-dev
rbarker-dev previously approved these changes Sep 30, 2025
Signed-off-by: Neeharika-Sompalli <[email protected]>
tinker-michaelj
tinker-michaelj previously approved these changes Oct 3, 2025
Copy link
Contributor

@tinker-michaelj tinker-michaelj left a comment

Choose a reason for hiding this comment

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

This all makes sense to me, tyvm @Neeharika-Sompalli !

xin-hedera
xin-hedera previously approved these changes Oct 3, 2025
Copy link

@xin-hedera xin-hedera left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Neeharika-Sompalli <[email protected]>
Copy link

@xin-hedera xin-hedera left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

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

Seems good on first pass.
Left on clarifying suggestion

Copy link
Contributor

@tinker-michaelj tinker-michaelj left a comment

Choose a reason for hiding this comment

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

LGTM, tyvm @Neeharika-Sompalli !

@Neeharika-Sompalli Neeharika-Sompalli merged commit f8dc256 into main Oct 6, 2025
56 of 57 checks passed
@Neeharika-Sompalli Neeharika-Sompalli deleted the hooks-fees branch October 6, 2025 11:19
Comment on lines +330 to +337
if (hasPreTxHook) {
gas = clampedAdd(
gas, aa.preTxAllowanceHookOrThrow().evmHookCallOrThrow().gasLimit());
}
if (hasPrePostTxHook) {
gas = clampedAdd(
gas, aa.prePostTxAllowanceHookOrThrow().evmHookCallOrThrow().gasLimit());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't these both be gas += clamedAdd(...)? (Javadoc: Adds gas from pre-tx and pre+post allowance hooks on an account transfer)

mxtartaglia-sl pushed a commit that referenced this pull request Nov 3, 2025
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Michael Tinker <[email protected]>
Co-authored-by: Michael Tinker <[email protected]>
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.

Implement fees for all hook handlers