This directory contains reusable helper code and shared utilities used throughout the AIBTC platform.
These utilities provide common functionality needed across different parts of the application, reducing code duplication and ensuring consistent behavior.
asset-helpers.ts
- Utilities for working with blockchain assets and balancescontract-dependencies.ts
- Defines dependencies between contractscontract-deployment-order.ts
- Defines the order for contract deploymentcontract-error-codes.ts
- Standardized error codes for contracts (organized by contract type with unique ranges)contract-helpers.ts
- Helper functions for contract operationscontract-registry.ts
- Registry for managing contract definitions and lookupscontract-types.ts
- Type definitions for contract categories and subtypesdao-helpers.ts
- Helper functions for DAO operationsdebug-logging.ts
- Logging utilities with configurable verbosityknown-addresses.ts
- Registry of known blockchain addressesknown-traits.ts
- Registry of contract traitssimnet.ts
- Simnet initialization for testingtemplate-processor.ts
- Processes contract templates with variable replacementstemplate-scanner.ts
- Scans contract templates to extract variablestemplate-variables.ts
- Template variable management for contract generation
The platform organizes contracts into the following types:
AGENT
- Agent automation contractsBASE
- Core DAO contractsACTIONS
- Action proposal contractsEXTENSIONS
- DAO extension contractsPROPOSALS
- Proposal management contractsTOKEN
- Token and DEX-related contracts
Each type has specific subtypes as defined in contract-types.ts
.
These utilities are imported by other parts of the codebase to perform common operations like:
- Contract generation and template processing
- Dependency management between contracts
- Asset and balance tracking
- Testing and simulation
- Type checking and validation