Add Semaphore ABI to utils package
cedoor opened this issue · 2 comments
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 of course! Let me know if you need any other info.