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 .
We look forward to seeing your findings.
Smart contracts for the cross-chain version of Proof-of-Humanity
yarn
Scripts to help with deployment are in scripts/deploy
folder. You can run corresponding commands to deploy different contracts:
deploy-poh
: deploy ProofOfHumanity (on sidechain)deploy-extended
: deploy ProofOfHumanityExtended (on mainnet for integration of v1 profiles)deploy-ccpoh
: deploy CrossChainProofOfHumanitydeploy-gateway
: deploy cross-chain gatewaydeploy-pohlegacy
: deploy legacy version of ProofOfHumanity (v1) (testnets only)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.
yarn compile
Other hardhat commands can be searched in the hardhat documentation.
Running script deploy-extended mainnet
, the main PoH contracts (proxy and implementation) are deployed on Ethereum mainnet.
ProofOfHumanityExtended.sol
): 0x87c5c294C9d0ACa6b9b2835A99FE0c9A444Aacc1Running script deploy-ccpoh mainnet
, the cross chain contracts (proxy and implementation) are deployed on Ethereum mainnet.
CrossChainProofOfHumanity.sol
): 0xD8D462ac9F3FAD77Af2ae2640fE7F591F1651A2CRunning script deploy-gateway mainnet
will deploy the gateway on Ethereum mainnet necessary for interaction with the AMB Bridge.
AMBBridgeGateway.sol
): 0x290e997D7c46BDFf666Ad38506fcFB3082180DF9The 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
.
ForkModule.sol
): 0x116cB4077afbb9B5c7E0dCd5fc4Ce943Ab624dbFOthers (no need to deploy manually):
Running script deploy-poh gnosis
, the main PoH contracts (proxy and implementation) are deployed on Gnosis.
ProofOfHumanity.sol
): 0xECd1823b3087acEE3C77928b1959c08d31A8F20eRunning script deploy-ccpoh gnosis
, the cross chain contracts (proxy and implementation) are deployed on Gnosis.
CrossChainProofOfHumanity.sol
): 0xF921b42B541bc53a07067B65207F879c9377bf7FRunning script deploy-gateway gnosis
will deploy the gateway on Gnosis, necessary for interaction with the AMB Bridge deployed on Gnosis.
AMBBridgeGateway.sol
): 0xD8D462ac9F3FAD77Af2ae2640fE7F591F1651A2COthers (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.