Currently, we are using EAS contracts (EAS.sol, SchemaRegistry.sol), AuthorStake.sol contract and our custom resolver (RoyaltyResolver.sol) to store attestation details for Olas Citations.
We need to extend these contracts to store additional data as specified above. Let's go through those changes.
OlasHub.sol
Main Olas contract - This is what glues together Olas users with off-chain storage along with data stored in EAS.
Olas Hub will contain a mapping to store User Profile details.
mapping(address => Profile) public userProfiles;
EAS Contracts
Note: An article on Olas is nothing but an attestation by the User on EAS.
We can use user address from OlasHub contract and Olas schema UID to search for Attested events from EAS contracts. This would give us a list of attestations (i.e. articles) published by Olas.
Better would be to have another mapping in OlasHub to store attestation uids (i.e. articles)
mapping(address => bytes32[]) public articlesUid;
Search for all articles on Olas
For this we can either search for all attestations on EAS with attester address and Olas schemaUID. We can get list of all registered users on Olas from a centralized DB or by listening to the profileCreatedEvent
In order to support a UI for https://github.com/olas-protocol/Project-Planning/issues/22 we need to make modifications to existing citation smart contracts.
What all do we need?
TODO: we are not storing AA smart contract address in this, will add later
Technical Details
Currently, we are using EAS contracts (EAS.sol, SchemaRegistry.sol), AuthorStake.sol contract and our custom resolver (RoyaltyResolver.sol) to store attestation details for Olas Citations.
We need to extend these contracts to store additional data as specified above. Let's go through those changes.
OlasHub.sol Main Olas contract - This is what glues together Olas users with off-chain storage along with data stored in EAS.
Olas Hub will contain a mapping to store User Profile details.
mapping(address => Profile) public userProfiles;
EAS Contracts Note: An article on Olas is nothing but an attestation by the User on EAS.
We can use user address from OlasHub contract and Olas schema UID to search for Attested events from EAS contracts. This would give us a list of attestations (i.e. articles) published by Olas.
Better would be to have another mapping in OlasHub to store attestation uids (i.e. articles)
mapping(address => bytes32[]) public articlesUid;
Search for all articles on Olas For this we can either search for all attestations on EAS with attester address and Olas schemaUID. We can get list of all registered users on Olas from a centralized DB or by listening to the profileCreatedEvent