Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.

(Freature) Add ERC-735 claim generation + PoPA ERC-725 Contract #212

Merged

Conversation

unjapones
Copy link
Contributor

Integration branch that includes the code from PRs #208 , #209 + some UI improvements on the ERC-735 claim generation page.

@phahulin one thing that it is still pending:

this PR adds a contract called ProofOfPhysicalAddressKeyHolder.sol which is a different contract than the main ProofOfPhysicalAddress.sol.

The reason:

making ProofOfPhysicalAddress.sol inherit from KeyHolder.sol makes the contract deployment fail on testrpc (generic out of gas error, most probably due to a large contract), breaking any automated testing.

The not so good thing about this is that the address of the "PoPA identity contract" (the address that appears on the issuer field of the ERC-735 claims, and that I highlight in the demo below) holds the address of ProofOfPhysicalAddressKeyHolder.sol and not the main ProofOfPhysicalAddress.sol. I'm not really sure if this is a_bad thing_ but we end up with 2 contracts... [1]

@phahulin do you have an opinion on the above? May be we could try a refactor using Solidity's delegatecall, or some other pattern, so we end up with a unique contract that has everything: previous features + new identity/key holder features.

Short demo:
popa_erc725_integration

NOTES:

  • [1] with this approach, the only modification on ProofOfPhysicalAddress.sol was the compiler version so, in theory, we should not need to upgrade/redeploy it.

unjapones and others added 20 commits October 24, 2018 09:39
Remove jquery minified file from public folder.
Make server-lib/sign function return extra data needed for the
erc-725/erc-735 signature and claim generation.
Add the corresponding controller, env variables and config 
modifications.
Add basic route spec.
Add is_address_confirmed spec.
Add server/lib/is_address_confirmed.
…y-page

(Feature) "Add claim to identity" page
Move signature generation code out of issueErc725Claim controller.
Move erc725 URI constant to config/env file.
Add issueErc725Cliam.spec.js with validation specs.
Fix naming parts of the code that handle erc735 claim generation code
(previously named with "erc735 something", which was too general).
Fix tests accordingly.
Add ProofOfPhysicalAddressKeyHolder.sol which is a KeyHolder contract 
(taken from Origin's playground repo).
Add test for ProofOfPhysicalAddressKeyHolder.sol (also taken from 
Origin's playgorund repo).
Add removeKey tests to proof_of_physical_address_key_holder_spec.js.
Add signer management to ProofOfPhysicalAddressKeyHolder + tests.
…d-contracts' into add-claim-to-identity-page-improvements
Modify AddClaimToIdentityPage to show erc735 claim data generated.
Add a button to explicitly add the erc735 to the erc725 identity 
contract.
Update tests.
@ghost ghost assigned unjapones Nov 21, 2018
@ghost ghost added the in progress label Nov 21, 2018
@unjapones unjapones closed this Nov 21, 2018
@ghost ghost removed the in progress label Nov 21, 2018
@unjapones unjapones changed the base branch from erc-725-integration to master November 21, 2018 01:32
@unjapones unjapones reopened this Nov 21, 2018
@ghost ghost added the in progress label Nov 21, 2018
@unjapones
Copy link
Contributor Author

Just in case, I have just performed the following:

  • Deleted the old erc-725-integration from this repo branch since I had it on my clone-repo (that caused the automatic close of the PR, sorry for the spam).
  • Re-opened the PR against the correct branch.

@unjapones unjapones added this to the erc-725 milestone Nov 21, 2018
@pablofullana
Copy link

@phahulin friendly ping 😬

@phahulin phahulin changed the base branch from master to erc-725-integration December 7, 2018 15:29
@phahulin
Copy link
Contributor

phahulin commented Dec 7, 2018

I think it's best if we stay with two contracts without the need to upgrade existing PoPA contract.
I'm gonna merge this into a new branch (not master), so that we can safely upgrade existing setup, because this PR introduces some breaking changes.

@phahulin phahulin merged commit 54825bd into poanetwork:erc-725-integration Dec 7, 2018
@ghost ghost removed the in progress label Dec 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants