Skip to content

Commit

Permalink
Merge pull request ethereum#513 from clrfund/v0.7.0
Browse files Browse the repository at this point in the history
V0.7.0
  • Loading branch information
auryn-macmillan authored Jun 23, 2022
2 parents ac77f25 + 028ce10 commit 0fae156
Show file tree
Hide file tree
Showing 9 changed files with 62 additions and 15 deletions.
2 changes: 1 addition & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clrfund/contracts",
"version": "0.6.0",
"version": "0.7.0",
"license": "GPL-3.0",
"scripts": {
"hardhat": "hardhat",
Expand Down
2 changes: 1 addition & 1 deletion contracts/tests/deployer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ethers, waffle } from 'hardhat'
import { use, expect } from 'chai'
import { solidity } from 'ethereum-waffle'
import { Contract, ContractReceipt } from 'ethers'
import { Contract } from 'ethers'
import { genRandomSalt } from 'maci-crypto'
import { Keypair } from 'maci-domainobjs'

Expand Down
4 changes: 2 additions & 2 deletions subgraph/config/xdai.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"network": "xdai",
"address": "0x549F91A93c94358C5f5380D7ABF23E1340CfF2db",
"address": "0x4ede8f30d9c2dc96a9d6787e9c4a478424fb960a",
"factoryStartBlock": 15217676,
"recipientRegistryStartBlock": 0
"recipientRegistryStartBlock": 15217676
}
8 changes: 4 additions & 4 deletions subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"lint:js": "eslint 'src/*.ts'",
"lint": "yarn lint:js",
"build": "graph build",
"deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ daodesigner/clrfund",
"create-local": "graph create --node http://localhost:8020/ daodesigner/clrfund",
"remove-local": "graph remove --node http://localhost:8020/ daodesigner/clrfund",
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 daodesigner/clrfund"
"deploy": "graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ clrfund/clrfund",
"create-local": "graph create --node http://localhost:8020/ clrfund/clrfund",
"remove-local": "graph remove --node http://localhost:8020/ clrfund/clrfund",
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 clrfund/clrfund"
},
"dependencies": {
"@graphprotocol/graph-cli": "0.21.0",
Expand Down
5 changes: 1 addition & 4 deletions subgraph/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dataSources:
name: FundingRoundFactory
network: xdai
source:
address: '0x549F91A93c94358C5f5380D7ABF23E1340CfF2db'
address: '0x4ede8f30d9c2dc96a9d6787e9c4a478424fb960a'
abi: FundingRoundFactory
startBlock: 15217676
mapping:
Expand All @@ -20,7 +20,6 @@ dataSources:
- RecipientRegistry
- ContributorRegistry
- FundingRound
- MACI
abis:
- name: FundingRoundFactory
file: ./abis/FundingRoundFactory.json
Expand All @@ -32,8 +31,6 @@ dataSources:
file: ./abis/OptimisticRecipientRegistry.json
- name: BrightIdUserRegistry
file: ./abis/BrightIdUserRegistry.json
- name: MACI
file: ./abis/MACI.json
eventHandlers:
- event: CoordinatorChanged(address)
handler: handleCoordinatorChanged
Expand Down
42 changes: 42 additions & 0 deletions vue-app/.env.xdai
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Ethereum Mainnet provider (used for ENS lookups)
VUE_APP_ETHEREUM_MAINNET_API_URL=

# Chain details where contract is deployed
VUE_APP_ETHEREUM_API_URL=
VUE_APP_ETHEREUM_API_CHAINID=100
VUE_APP_INFURA_ID=
VUE_APP_IPFS_GATEWAY_URL=https://ipfs.io
VUE_APP_SUBGRAPH_URL=https://api.thegraph.com/subgraphs/name/clrfund/clrfund

# Comma-separated list of URLs
VUE_APP_GUN_PEERS=

VUE_APP_CLRFUND_FACTORY_ADDRESS=0x4ede8f30d9c2dc96a9d6787e9c4a478424fb960a

# Supported values: simple, brightid
VUE_APP_USER_REGISTRY_TYPE=brightid
# clr.fund (prod) or CLRFundTest (testing)
# Learn more about BrightID and context in /docs/brightid.md
VUE_APP_BRIGHTID_CONTEXT=clr.fund

# Supported values: simple, optimistic, kleros, universal
VUE_APP_RECIPIENT_REGISTRY_TYPE=optimistic

VUE_APP_RECIPIENT_REGISTRY_POLICY=QmeygKjvrpidJeFHv6ywjUrj718nwtFQgCCPPR4r5nL87R

# Comma-separated list of IPFS hashes
VUE_APP_EXTRA_ROUNDS=Qmat3wDbwNFWGXk4J7JzAJBzrRDGo6nMgPDdmNgrViwRoL,QmVUwHXC9z3WLydQAJGRTrnGUkYwtVqYoTroJGxg1E53tH,QmXAWFeZABxrs1R8CJ3jmDzvvFTXdsSoyT9Sj1EJWyKMhh/#/round/0x18604d042A77C6Ed870Bb86Bc59042daf20BC2Fe,QmXAWFeZABxrs1R8CJ3jmDzvvFTXdsSoyT9Sj1EJWyKMhh/#/round/0xA61aAd9fc284ef75B2b39575E3E0f16863e755bc,QmXAWFeZABxrs1R8CJ3jmDzvvFTXdsSoyT9Sj1EJWyKMhh/#/round/0x4a7242887b004E6C2919E8F040E5B3Cf3369Cd7C,bafybeiacf4qiuchnhyraowz2ziupymlwxkv2lfqf3ae37mzgw6wcbp6cmi/#/round/0x5D259f67FBB03bcF2F1c3f35Ec12F711d7A2D439,bafybeiacf4qiuchnhyraowz2ziupymlwxkv2lfqf3ae37mzgw6wcbp6cmi/#/round/0xf8acacfA954742Dc4eaf8Bd8498F4DFdc01B3875,bafybeiacf4qiuchnhyraowz2ziupymlwxkv2lfqf3ae37mzgw6wcbp6cmi/#/round/0x1c1DF3c3612E140B295F8D37636cBdAf209C2d99

# Operator of clr.fund instance
VUE_APP_OPERATOR=

# Google Service Account credentials in JSON format
GOOGLE_APPLICATION_CREDENTIALS=
# Spreadsheet ID to send recipients data
VUE_APP_GOOGLE_SPREADSHEET_ID=

# metadata config
# VUE_APP_METADATA_NETWORKS is comma separated network strings
# which will be appended to the METADATA_SUBGRAPH_URL_PREFIX
VUE_APP_METADATA_NETWORKS=
METADATA_SUBGRAPH_URL_PREFIX=https://api.thegraph.com/subgraphs/name/clrfund/metadata-
2 changes: 1 addition & 1 deletion vue-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@clrfund/vue-app",
"version": "0.6.0",
"version": "0.7.0",
"private": true,
"scripts": {
"gun": "gun --host localhost",
Expand Down
10 changes: 9 additions & 1 deletion vue-app/src/api/recipient-registry-optimistic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@ export async function getRegistryInfo(
)
const deposit = await registry.baseDeposit()
const challengePeriodDuration = await registry.challengePeriodDuration()
const recipientCount = await registry.getRecipientCount()
let recipientCount
try {
recipientCount = await registry.getRecipientCount()
} catch {
// older BaseRecipientRegistry contract did not have recipientCount
// set it to zero as this information is only
// used during current round for space calculation
recipientCount = BigNumber.from(0)
}
const owner = await registry.owner()
return {
deposit,
Expand Down
2 changes: 1 addition & 1 deletion vue-app/src/components/Breadcrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default class Breadcrumbs extends Vue {
}
.link {
color: #fff;
color: var(--text-color);
&:hover {
opacity: 0.8;
}
Expand Down

0 comments on commit 0fae156

Please sign in to comment.