Skip to content

ai-dao-delegate-eth-denver2024/ai-dao-delegate

Repository files navigation

peer tunning ai

contract deployed

Linea Goerli:

https://goerli.lineascan.build/address/0xb1fEC5fe2d82A189eE793aE9a675eA4a7caC6e99

uses Phosphor and Verax

inco:

https://explorer.testnet.inco.org/address/0x70abFFA49E84860F06E91c7809D0D87B73166f25

uses full homomorphic encryption for private voting

XDC:

Deployment

front-end

cd react
yarn
yarn dev

Foundry

$ forge build
$ forge test
$ anvil
forge create --rpc-url $rpc_url --private-key $owner_key contracts/PeerReview.sol:PeerReview --constructor-args "mit" 100
cast send --private-key $owner_key --rpc-url $rpc_url $contract_addr "addAuthor(address)" $author_addr && \
cast send --private-key $reviewer1_key --rpc-url $rpc_url $contract_addr "addReviewer(address,string[])" $reviewer1_addr "[\"dao\",\"delegate\",\"vote\"]" && \
cast send --private-key $reviewer2_key --rpc-url $rpc_url $contract_addr "addReviewer(address,string[])" $reviewer2_addr "[\"defi\",\"erc20\"]" && \
cast send --private-key $reviewer3_key --rpc-url $rpc_url $contract_addr "addReviewer(address,string[])" $reviewer3_addr "[\"nft\",\"erc721\"]" && \
cast send --private-key $author_key --rpc-url $rpc_url $contract_addr "submitData(string)" "Exploring the impact of DAOs and
web3 on decentralized governance." && \
cast send --private-key $owner_key --rpc-url $rpc_url $contract_addr "assignRandomSeedToSubmission(uint256)" 0 && \
cast send --private-key $owner_key --rpc-url $rpc_url $contract_addr "shuffleReviewers(uint256)" 0 && \
cast send --private-key $owner_key --rpc-url $rpc_url $contract_addr "findTopReviewersForSubmission(uint256)" 0 && \
cast send --private-key $reviewer1_key --rpc-url $rpc_url $contract_addr "reviewerVote(uint32,uint256)" 1 0 && \
cast send --private-key $reviewer2_key --rpc-url $rpc_url $contract_addr "reviewerVote(uint32,uint256)" 1 0 && \
cast send --private-key $reviewer3_key --rpc-url $rpc_url $contract_addr "reviewerVote(uint32,uint256)" 1 0 && \
cast send --private-key $owner_key --rpc-url $rpc_url $contract_addr "revealVotes(uint256)" 0 && \
cast call --private-key $owner_key --rpc-url $rpc_url $contract_addr "getIsApproved(uint256)" 0 && \