Cultura Attestation Service (CAS) is a robust and modular on-chain attestation system designed for the Cultura ecosystem. CAS simplifies the process of creating, endorsing, and challenging attestations, which are integral to managing verifiable Digital Asset certifications and intellectual property (IP) integrations.
The core of CAS lies in its CAS.sol smart contract, which handles all attestation related operations:
Initialization & Configuration:
The initialize method sets key parameters, including the contract owner, schema registry, ERC20 bond token, treasury, verifier module, and predefined grade configurations (S, A, B, C) that set fee requirements and endorsement thresholds.
Attestation Lifecycle Management:
The Attest function validates Digital Asset addresses, confirms schema existence, checks expiration times and revocability, transfers the required bond tokens, generates a unique attestation UID, assigns Digital Asset grade and level, and deploys a new RightsBoundAccount contract.
Signature Verification:
Deployed through EIP712 and ECDSA standards, CAS securely handles delegated attestations by verifying off-chain signatures with nonce management.
Upgradability:
Using the UUPS proxy pattern, CAS supports seamless upgrades to incorporate new features without interrupting existing functionality.
The SchemaRegistry maintains valid attestation schemas, assigning each a unique UID and a revocability flag. CAS uses these schemas to validate every attestation request.See:
The comprehensive test suite (CAS.test.ts) illustrates the operational flow and validates:
Deployment & Initialization:
Setting up the schema registry, bond token, Mock Digital Asset contract (such as TestNFT), and CulturaDigitalAsset contract.
Attestation and Delegated Attestation:
Creation of attestations while enforcing validation checks on Digital Asset address, schema, expiration time, and bond token amount.
Verification & Challenge Mechanisms:
Upgrading or demoting Digital Asset Rights levels based on the number of verifications and bonding amounts.
Integration with CulturaDigitalAsset:
Demonstrating the complete flow from attestation creation to the minting of a Licensed Digital Asset linked to an Digital Asset.
By running npx hardhat run scripts/deploy.ts you will deploy the following contracts:
SchemaRegistry
Mock ERC20 token for bonding
CAS
CulturaDigitalAsset
CRS (Cultura Royalty Module)
VerifierModule
Mock Licensing protocol (only for testing purposes)
Deploy and Initialize CAS:
Use the UUPS proxy pattern to deploy CAS and configure it with the owner address, schema registry, bond token, treasury, and verifier module.
Register a Schema:
Register an attestation schema in the SchemaRegistry with your desired revocability settings.
Mint Digital Assets and Approve Fund Transfers:
Mint Digital Assets using your Digital Asset contract and grant CAS permission to spend the required bond tokens.
Create an Attestation:
Call CAS.attest with a valid attestation request (including schema, recipient address, Digital Asset details, grade, and bond token amount).
This operation records the attestation, assigns an Digital Asset grade, updates the level, and deploys a RightsBoundAccount.
Delegated Attestation (Optional):
If needed, use EIP712 to sign a message off-chain and submit via CAS.delegatedAttest to perform delegated attestations.
Verify & Challenge:
Increase attestation value by calling verify to upgrade the level, or call challengeAttestation if the attestation is wrong and needs to be disputed.
Cultura Attestation Service (CAS) is the cornerstone of a secure, scalable, and modular attestation ecosystem within Cultura. It empowers creators, collectors, and developers with the tools needed for Digital Asset verification, royalty/licensing integration, and dynamic community engagement.Explore the unit tests in CAS.test.ts to see CAS in action, and start building interactive, secure Digital Asset experiences today.Happy Attesting!