How 0xostium/smart-contracts-public works
File structure
• Top-level:
• hardhat.config.ts – Hardhat configuration for compilation, testing, and deployment
• package.json / yarn.lock – Node.js/TypeScript development dependencies (Hardhat, Ethers.js, TypeChain, etc.)
• tsconfig.json – TypeScript compiler settings
• src/
• abstract/ – abstract Solidity contracts that define base functionality/inheritance
• interfaces/
– internal interfaces for type safety and contract-to-contract calls
– external/ interfaces for adapters (price oracles, DEX routers, RWA accessors)
• lib/ – shared libraries (math utilities, shared constants)
README for additional insight
• The README confirms this is the “core” of the protocol; deployment and integration with frontends or risk-management bots happen elsewhere. It mentions adaptation from Gains v5 and new protocol-specific integrations, implying external adapters and oracles play a key role.
Elements
• Hardhat → Blockchain (deployment)
• Client → Blockchain (transactions / calls)
• Contracts → External interfaces → Oracles/DEX
• Blue for dev tools (Hardhat, TypeScript)
• Green for on-chain components (contracts)
• Orange for off-chain/external systems (oracles, clients)
• Gray for libraries/interfaces