Files
smom-dbis-138/contracts/dbis/BUILD_NOTES.md
defiQUG 1511f33857 chore: update DBIS contracts and integrate EIP-712 helper
- Updated DBIS_ConversionRouter and DBIS_SettlementRouter to utilize IDBIS_EIP712Helper for EIP-712 hashing and signature recovery, improving stack depth management.
- Refactored minting logic in DBIS_GRU_MintController to streamline recipient processing.
- Enhanced BUILD_NOTES.md with updated build instructions and test coverage details.
- Added new functions in DBIS_SignerRegistry for duplicate signer checks and active signer validation.
- Introduced a new submodule, DBIS_EIP712Helper, to encapsulate EIP-712 related functionalities.

Made-with: Cursor
2026-03-04 02:00:09 -08:00

10 lines
1.3 KiB
Markdown

# DBIS Rail — Build notes
- **Contracts:** All DBIS Rail contracts (RootRegistry, ParticipantRegistry, SignerRegistry, SettlementRouter, GRU_MintController, StablecoinReferenceRegistry, Conversion Router) are in this folder and implement Technical Spec v1 and v1.5 add-ons.
- **Tests:** `test/dbis/DBIS_Rail.t.sol` covers submitMintAuth success, replay revert, and signer-revoked-at-block. Uses `MockMintableToken` for a minimal GRU token in tests.
- **Build:** Default Foundry config (`via_ir = true`, `optimizer_runs = 200`) builds successfully. Yul stack-too-deep was resolved by:
- Moving EIP-712 hashing and signature recovery into `DBIS_EIP712Helper` (and optional `DBIS_EIP712Lib`).
- Extracting the mint loop in `DBIS_GRU_MintController.mintFromAuthorization` into `_mintToRecipients` to reduce stack depth.
- Using `StablecoinReferenceRegistry._setEntry` for struct assignment and `SignerRegistry.hasDuplicateSigners` / `areSignersActiveAtBlock` to keep router loops out of the main path.
- **Deploy:** Run `DeployDBISRail.s.sol` on Chain 138; deploy `DBIS_EIP712Helper` first and pass its address to both `DBIS_SettlementRouter` and `DBIS_ConversionRouter` constructors; then set GRU token on MintController, grant MINTER_ROLE on c* tokens to MintController, register stablecoins, and add venues/quote issuers as needed.