Skip to content

Extract data structures and pure functions into shareable crate#36

Open
jeff-sqds wants to merge 10 commits into
mainfrom
feat/extract-types
Open

Extract data structures and pure functions into shareable crate#36
jeff-sqds wants to merge 10 commits into
mainfrom
feat/extract-types

Conversation

@jeff-sqds
Copy link
Copy Markdown

This PR is an attempt to reduce the overall vulnerability of consumers of the smart-account-program rust components by enabling data structures and their pure functions to be canonically defined alongside the solana programs they're chiefly intended for, while removing the need for consumers of those types and functions from importing the entire solana program and anchor dependency chain. This is an attempt to mitigate the brittle duplication of copy-pasting types and methods previously seen from consumers of the V4 program as well as maintain a single canonical source of the types by the originating project so consumers are not required to vet potentially malicious copies in the crates registry when constructing consuming applications.

Functionally this change migrates type definitions and function implementations into a squads_smart_account_program_types crate that includes optional implementations of borsh and anchor dependencies for "batteries included but not installed" deriving of common traits. These are then imported and enabled by default in the program crate. The types crate is structured to mirror the module layout of the program crate for familiarity and usage internal to the program crate is maintained via re-exports.

@jeff-sqds jeff-sqds requested a review from 0xRigel-squads May 1, 2026 17:19
@jeff-sqds jeff-sqds marked this pull request as ready for review May 1, 2026 17:19
@jeff-sqds jeff-sqds requested a review from 0xLeo-sqds May 1, 2026 17:19
@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcargo/​solana-address-lookup-table-interface@​2.2.210010093100100
Addedcargo/​solana-pubkey@​2.4.010010093100100
Updatedcargo/​anchor-lang@​0.29.0 ⏵ 0.32.110010093100100
Updatedcargo/​anchor-spl@​0.29.0 ⏵ 0.32.110010093100100
Updatedcargo/​solana-program@​1.18.26 ⏵ 2.3.0100 +1210093 -7100100

View full report

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.

1 participant