Closed audsssy closed 1 year ago
See loom on how things work now.
Idea is to have all vote
buttons sign proposals instead of vote on them. And when it's time to processProposal
, we then multicall
all vote signatures via voteBySig
with processProposal
so that all members may enjoy gasless voting. All vote signatures live on IPFS instead of testnet. However, because of this, we will need to update voting UI to grab vote progress from IPFS instead of subgraph.
excellence @audsssy This will be huge unlock for token voting
Something to make sure of -- we want to multicall()
before voting period ends so that votes don't get lost
Good point. Feels like a 2-step process~
The flow is there but still got an elusive bug to fix. Almost there~
I'm getting InvalidSignature()
when invoking voteBySig
(trying to get this through first before processing via multicall
). Signing typed data works as expected and so is retrieving corresponding r
, s
, v
, but perhaps data is not configured properly for signing (?), or something else. Super keen to get this going but I feel like I'm missing something ahhhhhh. Will come back to this with fresh eyes.
I started testing with a stripped down version of KaliDAO.sol and it confirms that signatures do not match up.
voteBySig
now works!!!
Apparently the issue is that we needed to feed dynamic data to sign typed data with, like below.
Anyhow, voteBySig
now works alone and also in conjunction with multicall
, next step is to update front end with appropriate buttons to reflect gasless voting. Woot~
Might take some time to update front end logic to retrieve vote status for display and toggling of relevant buttons now that we're using signed voting data vs onchain data because we will need to grab voting data from IPFS rather than from subgraph.
Might take some time to update front end logic to retrieve vote status for display and toggling of relevant buttons now that we're using signed voting data vs onchain data because we will need to grab voting data from IPFS rather than from subgraph.
We can use ceramic(just so it's a single file) for storing all the votes before they are processed and then it's business as usual because Vote event will be emitted.
Closing this out in favor of KaliDAORelayer
and a newly developed bot for processing proposals.
The latest updates on your projects. Learn more about Vercel for Git ↗︎