- 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
1.3 KiB
1.3 KiB
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.solcovers submitMintAuth success, replay revert, and signer-revoked-at-block. UsesMockMintableTokenfor 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 optionalDBIS_EIP712Lib). - Extracting the mint loop in
DBIS_GRU_MintController.mintFromAuthorizationinto_mintToRecipientsto reduce stack depth. - Using
StablecoinReferenceRegistry._setEntryfor struct assignment andSignerRegistry.hasDuplicateSigners/areSignersActiveAtBlockto keep router loops out of the main path.
- Moving EIP-712 hashing and signature recovery into
- Deploy: Run
DeployDBISRail.s.solon Chain 138; deployDBIS_EIP712Helperfirst and pass its address to bothDBIS_SettlementRouterandDBIS_ConversionRouterconstructors; then set GRU token on MintController, grant MINTER_ROLE on c* tokens to MintController, register stablecoins, and add venues/quote issuers as needed.