feat: support local fee payer sponsorship while preserving gas station defaults#17
feat: support local fee payer sponsorship while preserving gas station defaults#17
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new “local fee payer” sponsorship mode to the Decibel SDK while preserving existing gas-station defaults, enabling transactions to be fee-sponsored by a locally provided Aptos account.
Changes:
- Add optional
fee_payer_accounttoBaseSDKOptions/BaseSDKOptionsSyncand route fee-paid submission accordingly. - Implement async/sync local fee payer submission that builds a fee-payer authenticator and submits signed BCS transactions to the fullnode.
- Add documentation and a sponsorship regression test suite for async and sync paths.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/decibel/_base.py |
Threads fee_payer_account through SDK options and submission flow; adds fee payer address override helper. |
src/decibel/_fee_pay.py |
Adds local fee payer submission implementation and routing logic in async/sync submitters. |
tests/test_sponsorship.py |
Adds coverage for routing, conflicting options, fee payer override behavior, and local fullnode submission. |
README.md |
Documents sponsorship modes and how to configure a local fee payer. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds support for “local fee payer” gas sponsorship (fee payer signs locally and the SDK submits signed BCS directly to the fullnode) while keeping the existing gas station defaults unchanged unless explicitly overridden via options.
Changes:
- Add
fee_payer_accounttoBaseSDKOptions/BaseSDKOptionsSyncand plumb it throughsubmit_tx(async/sync), including a fee payer address override. - Extend fee-paid submission to support a local fee payer flow (async/sync) that constructs a fee-payer authenticator and submits to
fullnode_url/transactions. - Add README documentation and a new sponsorship regression test suite.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/decibel/_base.py |
Adds fee_payer_account options, enforces option compatibility, overrides fee_payer_address, and forwards local fee payer settings into fee-pay submission. |
src/decibel/_fee_pay.py |
Adds local fee payer submission path and BCS signed-transaction building for fee payer auth. |
tests/test_sponsorship.py |
New tests covering option conflicts, routing behavior, fee payer address override, and local fullnode submission behavior (async/sync). |
README.md |
Documents sponsorship modes and how to use fee_payer_account. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds a new sponsorship mode that allows submitting fee-payer sponsored transactions using a locally controlled Account, while keeping existing gas station defaults unchanged unless explicitly overridden.
Changes:
- Add optional
fee_payer_accounttoBaseSDKOptions/BaseSDKOptionsSyncand wire it through async/sync submission paths. - Implement local fee payer submission in
_fee_pay.pythat builds a fee-payer authenticator and posts BCS signed transactions to the fullnode. - Add README documentation and a dedicated async/sync sponsorship regression test suite.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_sponsorship.py | New regression tests covering routing and local fee payer submission behavior (async + sync). |
| src/decibel/_fee_pay.py | Adds local-fee-payer submit path and routing logic when fee_payer_account is provided. |
| src/decibel/_base.py | Plumbs fee_payer_account into BaseSDK and applies fee payer address overrides during send/submit. |
| README.md | Documents sponsorship modes and how to use fee_payer_account. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds a “local fee payer” sponsorship mode to the Decibel SDK so callers can sponsor gas with a provided Account while keeping the existing gas station behavior as the default.
Changes:
- Add optional
fee_payer_accountto async/sync SDK options and route fee-paid submission through local signing when provided. - Implement async/sync local fee-payer submission that builds a fee-payer authenticator and submits BCS signed transactions directly to the fullnode.
- Add README docs and a new sponsorship regression test suite covering routing and local submission behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/decibel/_base.py |
Adds fee_payer_account options + fee payer address override logic and passes local fee payer info into fee-paid submitters. |
src/decibel/_fee_pay.py |
Adds local fee payer submission + signed transaction building utilities; updates routing based on fee_payer_account. |
tests/test_sponsorship.py |
New comprehensive tests for routing, option conflicts, address override behavior, and local submission (async/sync). |
README.md |
Documents sponsorship modes and how to enable local fee payer usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds an opt-in “local fee payer” sponsorship path while keeping the existing gas station sponsorship defaults unchanged, addressing Issue #13’s request for flexible sponsorship without breaking current behavior.
Changes:
- Introduces optional
fee_payer_accountonBaseSDKOptions/BaseSDKOptionsSync, with validation againstno_fee_payer. - Routes fee-paid submission through a new local fee payer flow (async/sync) when
fee_payer_accountis provided; otherwise preserves existing gas station routing. - Adds README documentation and a new async+sync sponsorship regression test suite.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/test_sponsorship.py |
New regression suite covering routing, validation, local submission, and async/sync parity. |
src/decibel/_fee_pay.py |
Adds local fee payer submission (build fee payer authenticator, submit signed BCS to fullnode) and routing logic updates. |
src/decibel/_base.py |
Adds options plumbing + fee payer address override/validation to keep defaults while enabling local fee payer mode. |
README.md |
Documents sponsorship modes and how to enable local fee payer via BaseSDKOptions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
fee_payer_accounttoBaseSDKOptionsandBaseSDKOptionsSyncfee_payer_accountis explicitly providedMotivation
Issue #13 requests gas sponsorship flexibility with custom account support while preserving current gas station usage and configuration.
Validation
uv run pytestuv run ruff check src testsuv run pyrightFixes #13