Skip to content
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

Remove Gundb and generate MACI key from wallet signature #615

Closed
wants to merge 60 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
72d2b50
refactor maci utility functions and bump ethers.js version
yuetloo Oct 19, 2022
3480d9a
fix hardhat error by bumping node version
yuetloo Oct 20, 2022
fbd3599
update Poseidon contract location
yuetloo Oct 20, 2022
8f85cdf
generate contributor encryption key using contributor signature hash
yuetloo Oct 26, 2022
f480934
fix linting warning
yuetloo Oct 26, 2022
1826c8a
subgraph schema change
yuetloo Oct 26, 2022
0ea2d5b
fix contract test case failures
yuetloo Oct 28, 2022
c8daaca
fix build error with contract
yuetloo Oct 28, 2022
ae00295
deploy Poseidon contracts with the correct bytecode
yuetloo Nov 3, 2022
465ad3b
remove unused variables
yuetloo Nov 3, 2022
63e6ec3
revert voice credit factor changes
yuetloo Nov 3, 2022
b223da9
Merge remote-tracking branch 'origin/develop' into deterministic-key
yuetloo Jan 13, 2023
7d2221f
merged with the develop branch
yuetloo Jan 13, 2023
90788b9
remove gundb
yuetloo Jan 16, 2023
9ef2caf
fix incorrect contribution amount when there are more than 1 round
yuetloo Jan 17, 2023
842bab4
add missing project index
yuetloo Jan 17, 2023
652ceff
filter messages by funding round and contributor address
yuetloo Jan 18, 2023
78e0bf7
simplify code
yuetloo Jan 18, 2023
ccc6037
upgrade subgraph
yuetloo Jan 18, 2023
3f03747
remove warning
yuetloo Jan 18, 2023
219e269
change login message to use round address
yuetloo Jan 18, 2023
32b741b
remove unused import
yuetloo Jan 18, 2023
bbd02ae
fix missing key for reallocation and code cleanup
yuetloo Jan 18, 2023
b94cef5
upgrade vue-app to typescript 4
yuetloo Jan 19, 2023
73f5a67
update github script for better testing
yuetloo Jan 19, 2023
9323c2b
fix trigger
yuetloo Jan 19, 2023
789cb8f
handle lost key scenario
yuetloo Jan 19, 2023
3a0d726
code cleanup and change new key generation logic
yuetloo Jan 23, 2023
8f08260
remove unused library
yuetloo Jan 23, 2023
01f5703
upgrade to typescript 4.1.2
yuetloo Jan 23, 2023
e676dfe
disable eslint error on BigInt
yuetloo Jan 23, 2023
67545b8
update specVersion
yuetloo Jan 23, 2023
0fb0a5c
update version to 0.0.4
yuetloo Jan 23, 2023
5a03c8f
Merge remote-tracking branch 'origin/develop' into deterministic-key
yuetloo Jan 23, 2023
bad351b
rework the logic to find key changes and use ethers.js sha256 for con…
yuetloo Jan 24, 2023
a999e78
missing await
yuetloo Jan 24, 2023
b05b846
upload the tally file before finalize so we have it if finalize fails
yuetloo Jan 24, 2023
1dee70d
refactor key lookup logic
yuetloo Jan 24, 2023
cd9bcc6
add set-duration task
yuetloo Feb 27, 2023
eeacb62
use passkey to generate MACI key
yuetloo Mar 1, 2023
d178065
add missing component
yuetloo Mar 1, 2023
2c601b6
remove console log debug statements
yuetloo Mar 1, 2023
7013a9f
fix unused variables warnings
yuetloo Mar 1, 2023
16cf838
merge with maci-0.10.2 branch
yuetloo Mar 11, 2023
9e31696
Merge remote-tracking branch 'origin/develop' into deterministic-key
yuetloo Mar 13, 2023
4bcd660
Merge remote-tracking branch 'origin/develop' into deterministic-key
yuetloo Mar 13, 2023
1d9f4b9
remove unused import
yuetloo Mar 13, 2023
f00d227
Merge remote-tracking branch 'origin/develop' into deterministic-key
yuetloo Mar 13, 2023
99fac9c
missing comma
yuetloo Mar 15, 2023
9f20846
find the valid public key from subgraph when creating from existing key
yuetloo Mar 15, 2023
c9aad4c
add usage to passkey modal
yuetloo Mar 15, 2023
4b85159
show passkey modal with description
yuetloo Mar 15, 2023
f4c54c0
fix missing locale key
yuetloo Mar 15, 2023
3e43692
show empty cart instead of spinning
yuetloo Mar 15, 2023
ffcc7df
guide for testing the clrfund app
yuetloo Mar 15, 2023
dffb4e0
rename variables
yuetloo Mar 15, 2023
0e355af
fix up documentation
yuetloo Mar 15, 2023
70641f2
merged with develop branch
yuetloo Mar 21, 2023
b7b2400
add sequence diagram for passkey creation and retrieval flow
yuetloo Mar 29, 2023
ac4fd16
add line breaks and reformatting
yuetloo Mar 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rename variables
yuetloo committed Mar 15, 2023
commit dffb4e0d65b8671b80a0d25ec0f7d7faf0fda5f4
4 changes: 3 additions & 1 deletion vue-app/src/api/contributions.ts
Original file line number Diff line number Diff line change
@@ -86,7 +86,9 @@ export async function withdrawContribution(
return transaction
}

export async function hasContributorEverVoted(contributorAddress: string) {
export async function hasContributorVotedInPreviousRounds(
contributorAddress: string
) {
const data = await sdk.GetContributorVotesForAllRounds({
contributorAddress,
})
2 changes: 1 addition & 1 deletion vue-app/src/api/user.ts
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ export interface User {
etherBalance?: BigNumber | null
contribution?: BigNumber | null
ensName?: string | null
votedBefore?: boolean
votedInPreviousRounds?: boolean
}

export async function getProfileImageUrl(
4 changes: 3 additions & 1 deletion vue-app/src/components/PasskeyModal.vue
Original file line number Diff line number Diff line change
@@ -61,7 +61,9 @@ export default class PasskeyModal extends Vue {
showExistingBtn = false

async created() {
this.showExistingBtn = Boolean(this.$store.getters.currentUser?.votedBefore)
this.showExistingBtn = Boolean(
this.$store.getters.currentUser?.votedInPreviousRounds
)
this.loaded = true
}

6 changes: 3 additions & 3 deletions vue-app/src/store/actions.ts
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ import {
serializeContributorData,
getContributionAmount,
hasContributorVoted,
hasContributorEverVoted,
hasContributorVotedInPreviousRounds,
getContributorIndex,
Contributor,
} from '@/api/contributions'
@@ -241,7 +241,7 @@ const actions = {
let ensName: string | null = state.currentUser.ensName
ensName = await ensLookup(state.currentUser.walletAddress)

const votedBefore = await hasContributorEverVoted(
const votedInPreviousRounds = await hasContributorVotedInPreviousRounds(
state.currentUser.walletAddress
)

@@ -251,7 +251,7 @@ const actions = {
balance,
etherBalance,
ensName,
votedBefore,
votedInPreviousRounds,
})
},
async [LOAD_BRIGHT_ID]({ commit, state }) {