semaphore-protocol / semaphore

A zero-knowledge protocol for anonymous interactions.
https://semaphore.pse.dev
MIT License
876 stars 191 forks source link

Add Semaphore ABI to utils package #817

Closed cedoor closed 1 week ago

cedoor commented 1 week ago

Description

Since the data package and the subgraph app need the Semaphore contract interface (ABI), that JSON file must currently be copied manually every time the contract changes. The ABI could be automatically copied into the utils package, which can, in turn, be used by data and subgraph.

Contract interfaces are generated when the yarn compile command is executed in the packages/contracts folder. A script could be run immediately after compilation to copy the file artifacts/contracts/Semaphore.sol/Semaphore.json to packages/utils/src/semaphore-abi.json. Then all packages/apps that need the interface can import it from @semaphore-protocol/utils.

Additionally, all devs or external apps that need the Semaphore ABI will be able to import it directly from the @semaphore-protocol/utils package.

Dozie2001 commented 1 week ago

@cedoor can I be assigned this?

cedoor commented 1 week ago

@Dozie2001 of course! Let me know if you need any other info.