Skip to content

MAX_SPONSORS and BPS_DENOMINATOR are independently redeclared per-contract instead of centralized in mergefi-common #163

Description

@chonilius

pub const BPS_DENOMINATOR: i128 = 10_000; is declared identically in all three contracts' lib.rs files, and pub const MAX_SPONSORS: u32 = 20; is declared identically in both contracts/escrow/src/lib.rs and contracts/milestones/src/lib.rs — three (respectively two) separate hand-copied declarations of the same named value, with nothing enforcing they stay in sync if one is ever changed without the other(s). mergefi-common already exists as the natural home for exactly this kind of shared constant, alongside require_admin/extend_ttl. Moving these there (as pub consts re-exported by each contract) would make "bump MAX_SPONSORS to 30" or similar a one-line change instead of a hand-synchronized multi-file edit — directly relevant given the already-filed issue asking for MAX_SPONSORS to become configurable.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programarchitectureArchitecture/design issueenhancementNew feature or requestgood first issueGood for newcomershelp wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions