-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contract Self-Signed gasless poll creation & voting #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass, I didn't test it yet, will do it later.
I suggest we have demo-voting supporting all three mechanisms:
- payable votes (current master branch)
- GSN votes
- gasless votes (we should come up with a fancy Oasis name for it?)
That being said I would not merge this until we cleanup the backend/contracts:
- EIP155Signer.sol should become part of @oasisprotocol/sapphire-contracts
- IERC165 should just be included from openzeppelin?
- RLPWriter should be part of @oasisprotocol/sapphire-contracts
- DAOv1 should be an interface with three implementations mentioned above
If we don't make it for EthCC, it's even fine to have it in a separate PRs for now.
Thoughts?
|
||
import { useDAOv1 } from '../contracts'; | ||
import { useDAOv1, useGaslessVoting, useUnwrappedDAOv1, useUnwrappedGaslessVoting } from '../contracts'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this to a separate PR please? I would need that for my GSN voting as well and let's merge it separately ;)
@@ -25,10 +25,72 @@ export function useDAOv1(): ComputedRef<DAOv1> { | |||
}); | |||
} | |||
|
|||
export function useUnwrappedDAOv1(): ComputedRef<DAOv1> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move useUnwrappedDAO
and useUnwrappedPollACLv1
to a separate PR please? I would need that for my GSN voting as well and let's merge it separately ;)
Good idea to move the EIP155Signer and RLPWriter to sapphire-contracts.
The unwrapped providers are kinda messy, could have an extra PR for them or
could just have 3 branches and copy what you need.
Would prefer to make finishing touches for deployment to mainnet on my
branch.
|
There is no need for DAOv1 to be an interface with multiple implementations, unless we follow OpenZeppelin Governance interfaces or similar. GSN implementation can use the same pattern as I did with GaslessVoting.
|
7afe0aa
to
a2cbdcc
Compare
fd184b6
to
83881f9
Compare
83881f9
to
550a21f
Compare
Need to dismiss review after you took over
I can't merge this because it's my branch. You will need to approve it. |
0ff9572
to
6272f22
Compare
This hoists my previous gasless voting PR onto the new design + fixes lots of UX things which made it tedious to use.
Deploy with the gasless voting addition:
Uses EIP-712 for both poll creation and poll voting. Aside from creating, voting and closing polls there are no other interjections from metamask. Users don't need to have gas on Sapphire to perform these operations.
TODO:
Admin util to withdraw unused gas(moved to gasless voting: Add util to withdraw unused gas #16)Remove 'publish votes' from the frontend?Reimplement publish votes (Reimplement show individual votes checkbox #15)