olas-protocol / citation-poc

A POC to showcase how Olas Citation System could work with EAS (Ethereum Attestation Service)
2 stars 0 forks source link

Publish Article Function #12

Closed KohliSuraj closed 3 months ago

KohliSuraj commented 4 months ago

The Publish Article function in OlasHub.sol is responsible for calling attest function in EAS.sol contract and making sure attested UID returned from function is stored in mapping on OlasHub contract.

Pseudocode

   mapping(address => bytes32[]) public articlesUid;

    function publish(bytes32 data) returns (bytes32) {
        bytes32 new_uid = attest(AttestationRequest request);
        articlesUid[userAddress].push(new_uid);
    }
KohliSuraj commented 3 months ago

Changes to approach. We'll use delegated attestation now.

Image