Repository navigation
feat(vault,dx): add vault config setters, devcontainer, vscode tasks, and make doctor - #639
Merged
Elizabethxxx merged 2 commits intoOct 26, 2026
Conversation
… and make doctor Resolve 0xLizTech#69, 0xLizTech#81, 0xLizTech#82, and 0xLizTech#86: - Add VaultContract foundation, ADR-006 mutability policy, and admin setters set_compliance and set_max_share_supply with ComplianceSet and MaxShareSupplySet events - Enforce MAX_COMPLIANCE_LEVEL (3) in constructor and set_compliance (InvalidComplianceLevel = 16) and tighten-only cap transitions (InvalidSupplyCap = 17) - Amend ADR-002, ADR-003, and ADR-004 for vault entry points and error discriminants - Add .devcontainer/devcontainer.json pinned to rust-toolchain.toml, stellar-cli 27.1.0, and Node 22 with sdk npm ci on creation - Add .vscode/tasks.json for make build, make lint, make test, and npm test - Add make doctor target and scripts/doctor.sh to check rustc, wasm32v1-none, stellar-cli, node, and npm versions
|
@Tyreenn Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
OrderStream
reviewed
Oct 22, 2026
OrderStream
left a comment
Contributor
There was a problem hiding this comment.
Architecturally sound vault mutability controls and developer ergonomics:
- Security controls: Enforcing tighten-only semantics on set_max_share_supply prevents malicious or accidental supply cap inflation.
- Event emission: Emitting ComplianceSet and MaxShareSupplySet ensures off-chain indexers stay synchronized with contract state mutations.
- DX consistency: Adding .devcontainer and scripts/doctor.sh guarantees new contributors match the exact compiler target (wasm32v1-none) and CLI versions.
- Minor note: Verify �dmin.require_auth() is called at the very entry of set_compliance prior to reading storage keys to save metering execution units on failed authorizations.
# Conflicts: # .github/workflows/contracts-ci.yml # CHANGELOG.md # Makefile # contracts/governance/src/lib.rs # contracts/vault/src/error.rs # contracts/vault/src/events.rs # contracts/vault/src/lib.rs # contracts/vault/src/test.rs # contracts/vault/src/token.rs # contracts/vault/tests/test_vault.rs # docs/architecture/003-upgrade-path.md # docs/architecture/004-cross-contract-interaction.md # docs/architecture/006-vault.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #69
closes #81
closes #82
closes #86
Summary
VaultConfigfield (plusdecimals) indocs/architecture/006-vault.mdunder Decision and Consequences.set_compliance(compliance, min_level)to rebind or clear compliance screening at runtime and emitComplianceSet, enforcingmin_level <= MAX_COMPLIANCE_LEVEL(3, matchingcompliance::MAX_LEVEL) in both__constructorandset_compliancewithVaultError::InvalidComplianceLevel(16).set_max_share_supply(max_share_supply)matchingrwa-asset(Let the admin tighten a supply cap but never raise it #54 / IR-02), rejecting negative, loosening, or below-supply caps withVaultError::InvalidSupplyCap(17) and emittingMaxShareSupplySet.lockup_secs,underlying,exchange_rate,decimals,name, andsymbolimmutable.ADR-002,ADR-003, andADR-004for the vault authorization map, error discriminant allocations (VaultError1-17), and screened operations..devcontainer/devcontainer.jsonpinned torust-toolchain.toml(1.98.1,wasm32v1-none,rustfmt,clippy),stellar-cli27.1.0(verified by SHA-256 matching.github/workflows/contracts-ci.yml), and Node.js 22, runningnpm ciinsdk/on creation..vscode/tasks.jsonwith tasks formake build,make lint,make test, andnpm testgrouped asbuildandtesttasks, documented inCONTRIBUTING.md.make doctorandscripts/doctor.shto checkrustc,wasm32v1-none,stellar-cli,node, andnpmagainst expected versions and exit non-zero on any missing or mismatched dependency.Verification
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo test --all --features testutils