poanetwork / poa-popa

DApp for proof of physical address (PoPA) attestation for validators of POA Network
https://popa.poa.network
GNU General Public License v3.0
24 stars 18 forks source link

(Feature) ERC-725 with origin-playground contracts #209

Closed unjapones closed 5 years ago

unjapones commented 5 years ago

BLOCKED BY #208 (will show more files changed that it should). To see the real diff, make a diff against the branch from the blocking PR.

Closes #204.

Adds a ProofOfPhysicalAddressKeyHolder contract thah inherits from KeyHolder and erc725 implementation. I considered thah the erc735 API is not required to be implemented for now, since we only want a contract to verify the issued/signed claims generated in #208.

Important note ProofOfPhysicalAddressKeyHolder for now is a sepparate contract from the main ProofOfPhysicalAddress. I tried to make the latter inherit from KeyHolder but sistematically got an out of gas error when deploying to the local testrpc for testing/development (I have a TODO item that says "check if the deployment on Ropsten/Rinkeby shows the same error" though). On the other hand, this sepparation has the advantage of not-having to deploy ProofOfPhysicalAddress again.

KeyHolder was taken from https://github.com/OriginProtocol/origin-playground (plus a little verification on removeKey), since it is the base contract used in other erc735 examples/implementations + it had some tests that were copied, adapted and added to this PR.

unjapones commented 5 years ago

Added on hold label to check why Travis CI build fails.

unjapones commented 5 years ago

Ok, I had to update solidity-coverage dependency in blockchain/package e.json to fix the "error intrumenting...", but then I had another problem caused by a bug in solidity-coverage described here.

The build should finish successfully, at least it did on my clone here https://travis-ci.org/unjapones/poa-popa/builds/451994617.