Giveth / DeVouch-BE

DeVouch - Decentralized Vouching via Attestations
GNU General Public License v3.0
22 stars 2 forks source link

Create resolver contract and new schema for DeVouch attestations #95

Closed divine-comedian closed 1 week ago

divine-comedian commented 2 months ago

We can create a new resolver contract that emits events whenever a user uses our devouch attestation.

The events emitted by the contract can be caught by the subsquid.

when someone attests to a giveth project - we can define it in the impact-graph with webhook - second part is updating subsquid which is processing attestation data to call webhook inside of impact-graph.

need to define requirements of resolver contract

divine-comedian commented 1 month ago

We need to finish testing the sepolia deployment and test upgrading the contract.

change the config in the vault - @aminlatifi needs to give @MohammadPCh access to this

change schema variable in the vault, fill in the data run the github actions - stop will erase the data and starting will reindex the data. We need the indexer

we need to be able to handle indexing attestations from two separate schemas - will require some development work

divine-comedian commented 1 month ago

We deployed a new test contract that was successfully upgraded using proxy admin

https://sepolia.etherscan.io/address/0x703A9725015bC3CE2D8aC45c780434219ccBC2B2

we may want to consider either testing the requireFee feature or removing it entirely in the production version of this contract

new schema for staging using custom resolver can be found here https://sepolia.easscan.org/schema/view/0x421da38e6ff5eb5d0402a4e9be70e70f961bce228e8a20d1eca19634556247fd

divine-comedian commented 3 weeks ago

each contract has two types of transactions, external and internal transactions - need to check this contract

we need a way to have on-chain transactions shown from our resolver contracts as users issue DeVouch attestations.

divine-comedian commented 2 weeks ago

New Optimism deployment is here

resolver:

https://optimistic.etherscan.io/address/0x35d3fef295a14f7109c78487f516da112ecf46bf

schema:

https://optimism.easscan.org/schema/view/0xa7f7d1998e932af05e1151874743ed167aefecaa0d0921ea1c84a268080c7852

@aminlatifi - we will need to add this schema into the vault env into the array of schemas you created

@mateodaza we will need to make sure the front-end is issuing attestations using this new schema, it is the exact same format but now has a custom resolver contract associated with it.

aminlatifi commented 2 weeks ago

New Optimism deployment is here

resolver:

https://optimistic.etherscan.io/address/0x35d3fef295a14f7109c78487f516da112ecf46bf

schema:

https://optimism.easscan.org/schema/view/0xa7f7d1998e932af05e1151874743ed167aefecaa0d0921ea1c84a268080c7852

@aminlatifi - we will need to add this schema into the vault env into the array of schemas you created

@mateodaza we will need to make sure the front-end is issuing attestations using this new schema, it is the exact same format but now has a custom resolver contract associated with it.

@divine-comedian Done, I also restarted the service to use both schemas

divine-comedian commented 2 weeks ago

Thanks Amin! @mateodaza when the FE is using the new schema on prod move this to QA and assign to me for testing.

divine-comedian commented 2 weeks ago

We should make sure we have updated both schemas we use for staging and production

STAGING

https://sepolia.easscan.org/schema/view/0x421da38e6ff5eb5d0402a4e9be70e70f961bce228e8a20d1eca19634556247fd

PRODUCTION

https://optimism.easscan.org/schema/view/0xa7f7d1998e932af05e1151874743ed167aefecaa0d0921ea1c84a268080c7852

mateodaza commented 2 weeks ago

We should make sure we have updated both schemas we use for staging and production

STAGING

https://sepolia.easscan.org/schema/view/0x421da38e6ff5eb5d0402a4e9be70e70f961bce228e8a20d1eca19634556247fd

PRODUCTION

https://optimism.easscan.org/schema/view/0xa7f7d1998e932af05e1151874743ed167aefecaa0d0921ea1c84a268080c7852

Just confirmed Staging one is proper

For production It's an environment variable (NEXT_PUBLIC_PROJECT_VERIFY_SCHEMA) change from 0x97b0c9911936fad57e77857fac6eef6771f8d0bf025be9549214e32bf9e2415a to 0xa7f7d1998e932af05e1151874743ed167aefecaa0d0921ea1c84a268080c7852

Vercel is set waiting for the new release with this new schema

CC @divine-comedian @aminlatifi @MohammadPCh