Skip to content

Commit

Permalink
Merge pull request #1574 from decentdao/release/20240417
Browse files Browse the repository at this point in the history
2024-04-17 release
  • Loading branch information
adamgall authored Apr 17, 2024
2 parents 2285855 + 5ad1737 commit 3bfab21
Show file tree
Hide file tree
Showing 181 changed files with 1,916 additions and 2,372 deletions.
12 changes: 12 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ VITE_APP_ALCHEMY_MAINNET_API_KEY=""
VITE_APP_ALCHEMY_POLYGON_API_KEY=""
# Alchemy provider API key, used on Sepolia
VITE_APP_ALCHEMY_SEPOLIA_API_KEY=""
# Alchemy provider API key, used on Base Sepolia
VITE_APP_ALCHEMY_BASE_SEPOLIA_API_KEY=""
# Alchemy provider API key, used on Base
VITE_APP_ALCHEMY_BASE_API_KEY=""
# Alchemy provider API key, used on Optimism
VITE_APP_ALCHEMY_OPTIMISM_API_KEY=""
# Alchemy automated testing workflows
VITE_APP_ALCHEMY_TESTING_API_KEY=""

Expand All @@ -21,6 +27,12 @@ VITE_APP_ETHERSCAN_MAINNET_API_KEY=""
VITE_APP_ETHERSCAN_POLYGON_API_KEY=""
# ABI selector, used on Sepolia
VITE_APP_ETHERSCAN_SEPOLIA_API_KEY=""
# ABI selector, used on Base Sepolia
VITE_APP_ETHERSCAN_BASE_SEPOLIA_API_KEY=""
# ABI selector, used on Base
VITE_APP_ETHERSCAN_BASE_API_KEY=""
# ABI selector, used on Optimism
VITE_APP_ETHERSCAN_OPTIMISM_API_KEY=""

# IPFS pinning
VITE_APP_INFURA_IPFS_API_KEY=""
Expand Down
2 changes: 1 addition & 1 deletion .graphclientrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sources:
- name: fractal
handler:
graphql:
endpoint: https://api.studio.thegraph.com/query/43215/fractal-{context.chainName:sepolia}/version/latest
endpoint: https://api.studio.thegraph.com/query/{context.subgraphSpace:71032}/{context.subgraphSlug:fractal-mainnet}/{context.subgraphVersion:v0.0.1}

documents:
- ./src/graphql/DAO.graphql
18 changes: 0 additions & 18 deletions docs/NETWORK_SUPPORT.md

This file was deleted.

8 changes: 4 additions & 4 deletions netlify/functions/tokenPrices.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// eslint-disable-next-line import/named
import { Store, getStore } from '@netlify/blobs';
import { ethers } from 'ethers';
import { getStore } from '@netlify/blobs';
import type { Store } from '@netlify/blobs';
import { isAddress } from 'viem';

const PUBLIC_DEMO_API_BASE_URL = 'https://api.coingecko.com/api/v3/';
const AUTH_QUERY_PARAM = `?x_cg_demo_api_key=${process.env.COINGECKO_API_KEY}`;
Expand All @@ -27,7 +27,7 @@ type SupportedNetworks = (typeof SUPPORTED_NETWORKS)[number];
function sanitizeUserInput(tokensString: string, network: SupportedNetworks) {
const rawTokenAddresses = tokensString.split(',');
const needNativeAsset = rawTokenAddresses.map(address => address.toLowerCase()).includes(network);
const validTokenAddresses = rawTokenAddresses.filter(address => ethers.utils.isAddress(address));
const validTokenAddresses = rawTokenAddresses.filter(address => isAddress(address));
const lowerCaseTokenAddresses = validTokenAddresses.map(address => address.toLowerCase());
const tokens = [...new Set(lowerCaseTokenAddresses)];
if (needNativeAsset) tokens.push(network);
Expand Down
38 changes: 27 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "fractal-interface",
"private": true,
"dependencies": {
"@adraffy/ens-normalize": "^1.10.1",
"@apollo/client": "^3.7.10",
"@chakra-ui/react": "^2.8.2",
"@decent-org/fractal-ui": "^0.1.25",
Expand All @@ -11,12 +12,12 @@
"@ethersproject/providers": "^5.7.2",
"@fontsource/ibm-plex-mono": "^4.5.12",
"@fontsource/ibm-plex-sans": "^4.5.13",
"@fractal-framework/fractal-contracts": "^0.4.0",
"@fractal-framework/fractal-contracts": "^0.7.0",
"@graphprotocol/client-apollo": "^1.0.16",
"@lido-sdk/contracts": "^3.0.2",
"@netlify/blobs": "^6.5.0",
"@netlify/functions": "^2.6.0",
"@safe-global/safe-deployments": "^1.23.0",
"@safe-global/safe-deployments": "^1.34.0",
"@safe-global/safe-ethers-lib": "^1.9.2",
"@safe-global/safe-service-client": "^1.5.2",
"@sentry/react": "^7.104.0",
Expand Down Expand Up @@ -62,7 +63,7 @@
"dev": "VITE_APP_GIT_HASH=`git rev-parse HEAD` vite --force",
"start": "vite start",
"preview": "vite preview",
"build": "npm run graphql:build && VITE_APP_GIT_HASH=`git rev-parse HEAD` vite build",
"build": "VITE_APP_GIT_HASH=`git rev-parse HEAD` vite build",
"graphql:build": "graphclient build",
"graphql:dev-server": "graphclient serve-dev",
"test": "vitest --dir=test",
Expand Down
64 changes: 0 additions & 64 deletions src/components/CreateProposalTemplate/ProposalTemplateMetadata.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions src/components/CreateProposalTemplate/constants.ts

This file was deleted.

25 changes: 13 additions & 12 deletions src/components/DaoCreator/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { BigNumber } from 'ethers';
import {
CreatorFormState,
GovernanceType,
Expand All @@ -8,11 +7,13 @@ import {

export const DEFAULT_TOKEN_DECIMALS = 18;

// @todo make the time lengths dynamic for whatever real-life values we're targeting here

export const initialState: CreatorFormState = {
essentials: {
daoName: '',
governance: GovernanceType.MULTISIG,
snapshotURL: '',
snapshotENS: '',
},
erc20Token: {
tokenCreationType: TokenCreationType.NEW,
Expand Down Expand Up @@ -45,7 +46,7 @@ export const initialState: CreatorFormState = {
],
quorumThreshold: {
value: '10',
bigNumberValue: BigNumber.from(10),
bigintValue: 10n,
},
},
/**
Expand All @@ -58,42 +59,42 @@ export const initialState: CreatorFormState = {
azorius: {
quorumPercentage: {
value: '4',
bigNumberValue: BigNumber.from(4),
bigintValue: 4n,
},
timelock: {
value: '1440',
bigNumberValue: BigNumber.from(1440),
bigintValue: 1440n,
},
votingPeriod: {
value: '10080',
bigNumberValue: BigNumber.from(10080),
bigintValue: 10080n,
},
executionPeriod: {
value: '2880',
bigNumberValue: BigNumber.from(2880),
bigintValue: 2880n,
},
votingStrategyType: VotingStrategyType.LINEAR_ERC20,
},
freeze: {
executionPeriod: {
value: '2880',
bigNumberValue: BigNumber.from(2880),
bigintValue: 2880n,
},
timelockPeriod: {
value: '1440',
bigNumberValue: BigNumber.from(1440),
bigintValue: 1440n,
},
freezeVotesThreshold: {
value: '1',
bigNumberValue: BigNumber.from(1),
bigintValue: 1n,
},
freezeProposalPeriod: {
value: '10080',
bigNumberValue: BigNumber.from(10080),
bigintValue: 10080n,
},
freezePeriod: {
value: '10080',
bigNumberValue: BigNumber.from(10080),
bigintValue: 10080n,
},
},
multisig: {
Expand Down
Loading

0 comments on commit 3bfab21

Please sign in to comment.