semaphore-protocol / semaphore

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

Deploy Semaphore contracts deterministically #766

Closed cedoor closed 1 month ago

cedoor commented 3 months ago

Description

In order for Semaphore contracts to have the same address on all supported networks, it is necessary to deploy them deterministically, using the CREATE2 opcode.

A proxy Yul contract like Zoltu's implementation, or the updated Arachnid's version, can be used to deploy the Semaphore contracts by passing their bytecode + salt.