Extensibility Overview
How to extend Integra’s functionality without modifying core contracts.
Overview
Integra is designed for extensibility from the ground up. The architecture separates immutable core contracts from upgradeable service layers, allowing developers to add new functionality without compromising security guarantees. This extensibility enables the ecosystem to grow and adapt to new use cases while maintaining backward compatibility.
Extensibility Mechanisms
1. Custom Resolvers
Add document services without changing core contracts:
contract MyCustomResolver is IDocumentResolver {
function onDocumentRegistered(
bytes32 integraHash,
bytes32 documentHash,
address owner,
bytes calldata metadata
) external override {
// Your custom logic here
}
}Use cases:
- Custom compliance checks
- Automated workflows
- Third-party integrations
- Analytics and reporting
2. Custom Tokenizers
Create new tokenization models:
contract MyTokenizer is BaseTokenizer, ERC721Upgradeable {
// Inherit base functionality
// Add your custom logic
}Use cases:
- Industry-specific token standards
- Novel ownership models
- Regulatory compliance tokens
3. Attestation Providers
Integrate alternative identity systems:
contract MyAttestationProvider is IAttestationProvider {
function verify(
bytes32 attestationUID,
bytes32 capability
) external view returns (bool);
}Use cases:
- Alternative identity providers
- Custom verification logic
- Multi-signature schemes
4. Component Registry
Register new components in the unified registry:
// Register a new resolver
integraRegistry.registerComponent(
RESOLVER_TYPE,
"MyResolver",
resolverAddress,
codeHash
);Architecture Benefits
Immutable Core
Core contracts never change:
- Document Registry stays stable
- Security guarantees preserved
- No migration required
Flexible Services
Service layer can evolve:
- Add new resolvers anytime
- Deploy custom tokenizers
- Integrate new providers
Interoperability
Components work together:
- Resolvers can call other resolvers
- Tokenizers use shared registry
- All components verified via registry
Getting Started
- Identify your extension point - Resolver, tokenizer, or provider?
- Implement the interface - Follow the standard interface
- Test thoroughly - Use testnets extensively
- Register in component registry - Make it discoverable
- Document your component - Help others integrate
Examples
Real Estate Compliance Resolver
contract REComplianceResolver is IDocumentResolver {
function onOwnershipTransferred(
bytes32 integraHash,
address oldOwner,
address newOwner,
string calldata reason
) external {
// Verify new owner meets real estate regulations
require(isAccreditedInvestor(newOwner), "Not accredited");
require(meetsAMLRequirements(newOwner), "AML check failed");
}
}Rental Payment Automation
contract RentAutomation is IDocumentResolver {
function onDocumentRegistered(
bytes32 integraHash,
bytes32,
address,
bytes calldata metadata
) external {
// Set up recurring payment schedule
(uint256 rentAmount, uint256 dueDay) = abi.decode(metadata, (uint256, uint256));
scheduleMonthlyPayment(integraHash, rentAmount, dueDay);
}
}Related Documentation
- Resolver Composition - Complete resolver guide
- Custom Tokenizers - Building tokenizers
- Component Registry - Registration process
- Security Patterns - Security considerations