Skip to content

feat: allow disabling gas refunds#288

Merged
ARR4N merged 7 commits into
mainfrom
allow-disabling-refunds
Jun 22, 2026
Merged

feat: allow disabling gas refunds#288
ARR4N merged 7 commits into
mainfrom
allow-disabling-refunds

Conversation

@ARR4N

@ARR4N ARR4N commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Why this should be merged

Avalanche C-Chain doesn't refund gas and needs to use the libevm/core.ApplyTransaction() function for SAE.

How this works

Adds params.RulesHooks.ShouldRefundGas() bool with a no-op implementation that always returns true.

How this was tested

Integration test exercised via core.ApplyTransaction(), demonstrating refund behaviour in both the default and disabled states.

@rahulmutt-ava rahulmutt-ava left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good! Mostly had comments about adding comments / intent.

Comment thread params/hooks.libevm.go
Comment thread core/state_transition.libevm.go
Comment thread core/state_transition.libevm_test.go Outdated
@ARR4N ARR4N enabled auto-merge (squash) June 22, 2026 14:00
@ARR4N ARR4N merged commit 0979214 into main Jun 22, 2026
13 checks passed
@ARR4N ARR4N deleted the allow-disabling-refunds branch June 22, 2026 14:11
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.

3 participants