hats-finance / Proof-Of-Humanity-V2-0xef0709445d394a22704850c772a28a863bb780b0

Proof of Humanity Protocol v2
2 stars 1 forks source link

Audit Competition for Proof-Of-Humanity-V2

This repository is for the audit competition for the Proof-Of-Humanity-V2. To participate, submit your findings only by using the on-chain submission process on https://app.hats.finance/vulnerability .

How to participate

Smart contracts for the cross-chain version of Proof-of-Humanity

image

Install dependencies

yarn

Deployment

Scripts to help with deployment are in scripts/deploy folder. You can run corresponding commands to deploy different contracts:

Note that variables are hardcoded in each script file and contract addresses (which are going to be used to connect contracts interacting with each other) are to be added in scripts/consts/addresses/addresses-mainnets.ts file.

Compile contracts

yarn compile

Other hardhat commands can be searched in the hardhat documentation.

Deployed contracts on mainnets (Ethereum and Gnosis) and guidance

- ETHEREUM:

Running script deploy-extended mainnet, the main PoH contracts (proxy and implementation) are deployed on Ethereum mainnet.

Running script deploy-ccpoh mainnet, the cross chain contracts (proxy and implementation) are deployed on Ethereum mainnet.

Running script deploy-gateway mainnet will deploy the gateway on Ethereum mainnet necessary for interaction with the AMB Bridge.

The ForkModule allows to mark v1 profiles without affecting PoHv1. Should be deployed automatically. If it is needed (under failure when deploying POH), it can be deployed manually by running script deploy-fork-manually mainnet.

Others (no need to deploy manually):

- GNOSIS:

Running script deploy-poh gnosis, the main PoH contracts (proxy and implementation) are deployed on Gnosis.

Running script deploy-ccpoh gnosis, the cross chain contracts (proxy and implementation) are deployed on Gnosis.

Running script deploy-gateway gnosis will deploy the gateway on Gnosis, necessary for interaction with the AMB Bridge deployed on Gnosis.

Others (no need to deploy manually):

For deploying, a correct order should be interpolating deployments between mainnet and gnosis, for instance: deploy Extended PoH on mainnet, PoH on gnosis, CCPoH on mainnet, CCPoH on gnosis, Gateway on mainnet, and Gateway on gnosis. After each script, it is required to progressively fill the corresponding addresses on scripts/consts/addresses/addresses-mainnets.ts. The last gateway's deployment should set the needed foreign gateway address, otherwise, it should be set manually.