Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Proxy Account and Meta Transactions #2251

Merged
merged 115 commits into from
May 14, 2019
Merged

Proxy Account and Meta Transactions #2251

merged 115 commits into from
May 14, 2019

Conversation

nick
Copy link
Contributor

@nick nick commented May 9, 2019

This PR adds:

  • ProxyFactory contract (taken from Gnosis) for deploying new ERC725 Identity Proxy contracts with significantly less gas
  • ERC725 Identity Proxy with Meta Transaction support. All of a user's interactions with the Marketplace and IdentityEvents contracts will be proxied via this. Users can also give permission for transactions to be run on their behalf by signing the transaction they wish to execute and passing the signature and transaction call data to a relayer server.

Since we're now supporting both direct wallet AND proxy identity interactions with our contracts, I have introduced the concept of an Account 'owner' in GraphQL. This will return the controlling wallet in the case of a Proxy account, or the same wallet address if the account is just a wallet.

For example, if the seller is a wallet 0xab then both listing.seller.id and listing.seller.owner.id will return 0xabc
If the seller is an account proxy 0xdef with owner 0xabc, then listing.seller.id will return 0xdef and listing.seller.owner.id will return 0xabc

The actual use of Proxy account is disabled by default. Use env var ENABLE_PROXY_ACCOUNTS=1 to enable them.

nick and others added 30 commits April 13, 2019 16:36
* copy identity package as part of notifications

* typo

* typo 2
* Fix notifications container

* Rename logger for notifications
* Fix SafeAreaView problem

* Improve network detection
* Fix SafeAreaView on marketplace screen

* Bump bundle
* Add clodubuild file

* Add signing files

* Android build work

* Update google-services.json

* Downgrade react-native-push-notifications

* Upgrade gradle

* Add encrypted keystore properties

* Gitignore keystore.properties

* Remove signing dir

* Fix paths

* Updates for automated builds

* Update keystore properties

* Remove ports that no longer need forwarding

* Revert "Remove ports that no longer need forwarding"

This reverts commit 0430c9b.

* Fix issue with notifications modal interferign with signing

* Update image
* More restrictive searching and more relevant results

* Fix test
@nick nick requested a review from shahthepro May 9, 2019 15:08
@nick nick requested a review from franckc May 9, 2019 16:31
Copy link
Contributor

@franckc franckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a pass at reviewing. Looking great ! You are so faaaast.

A few minor comments inline... otherwise LGTM.

infra/bridge/relayer.js Show resolved Hide resolved
packages/graphql/src/utils/hasProxy.js Show resolved Hide resolved
packages/graphql/src/mutations/_txHelper.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@shahthepro shahthepro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nick Everything looks good to me. But there is a potential security bug in the IdentityProxy.s file. We may have to sort it out.

@nick nick marked this pull request as ready for review May 13, 2019 23:53
@nick
Copy link
Contributor Author

nick commented May 13, 2019

@franckc @shahthepro ready for final review now... it's all wired off so we should be OK to merge to master

@nick nick merged commit 5b41e4f into master May 14, 2019
@nick nick deleted the nick/meta-tx branch May 14, 2019 16:57
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.

10 participants