feat: initial contracts setup - #45
Open
hpmaxi wants to merge 13 commits into
Open
Conversation
hpmaxi
force-pushed
the
feat/initial-contracts-setup
branch
from
August 26, 2026 18:56
d06d2ad to
ac9645c
Compare
hpmaxi
marked this pull request as ready for review
August 26, 2026 18:58
Permissive compliance dispatcher (bind/unbind token, add/remove modules, admin-gated) with no policy modules registered, and an allowlist identity verifier whose verify_identity reverts with error 304 for non-listed accounts. Minimal RWA wiring for M1: the share-token constructor requires both, and mint calls verify_identity. Closes #63
Add the RWAToken surface (mint/burn/forced_transfer/recover/freeze/…), each gated on the manager role and delegating to the audited RWA internals, plus AccessControl and an admin-gated Pausable brake. All contractimpl blocks live in one module: soroban's contracttrait client generation can't be split across files without breaking the test build on the client's private testutils fields. A test asserts the manager mints to an allowlisted holder. Closes #62
Declare compliance, identity-verifier and share-token under [development.contracts] with client generation and constructor args. Account and contract names resolve to deployed addresses, so the share-token constructor receives the compliance and identity-verifier addresses at deploy time. Lets stellar-scaffold deploy the three and generate their TS clients. Closes #66
hpmaxi
force-pushed
the
feat/initial-contracts-setup
branch
from
August 27, 2026 22:17
8f6329b to
fbc9c6a
Compare
Add a //! header and a contractmeta entry (stub=testnet-only; prod=external ERC-3643 ...) to the compliance and identity-verifier stubs, so the deployed wasm advertises they are placeholders, not part of the product.
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.
Summary
First slice of the reference contracts, plus the deploy wiring so CI can
build the wasms and generate the TS clients.
What's here
pricing(deposit/redeem conversion,round-trip and overflow invariants) and cross-contract
bindings.metadata, admin, the
managerrole and the two compliance components.The privileged surface is RBAC-gated on
managerand delegates to theaudited RWA internals;
Pausableis the token's own admin brake.an allowlist verifier: the minimal RWA wiring M1 needs.
environments.tomldeclares the threecontracts with constructor args, so stellar-scaffold deploys them and
emits TS clients.
Design notes
ContractType = RWA; theasync vault lands in Port the async vault #65. A contract can pick only one ContractType, so
the split is forced, not stylistic.
client generation can't be split across files —
cargo testbreaks onthe generated client's private testutils fields.
does not, so a de-listed holder can always be redeemed out.
Verification
cargo test: share-token 2/2, pricing 4/4.stellar contract build: three wasms (share_token 35 KB).runs in CI (needs the local-network container).
Closes #62, #63, #66.