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

[Do not merge] Beta #429

Draft
wants to merge 48 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6c7816f
Merge remote-tracking branch 'origin/Batch-fix' into beta
Corantin Sep 12, 2024
b38e22e
Fix coucil safe not seeing buttons
Corantin Sep 13, 2024
7b69f79
Merge branch 'Batch-fix' into beta
Mati0x Sep 13, 2024
9e33a59
fix-pool-form-conviction-growth-not-converted
Corantin Sep 11, 2024
c1e6a91
Merge branch 'gnosis-deploy-0.0.4' into beta
Corantin Sep 16, 2024
c39a314
Merge branch 'dev' into beta
Corantin Sep 16, 2024
6d24e74
Merge remote-tracking branch 'origin/dev' into beta
Corantin Sep 18, 2024
e97fbf8
Merge branch 'fix-not-loading-when-wrong-network' into beta
Corantin Sep 18, 2024
117cc94
Merge branch 'tooltip-not-visible' into beta
Corantin Sep 18, 2024
f49c0f5
Merge remote-tracking branch 'origin/dev' into beta
Corantin Sep 18, 2024
47cfd8b
Merge branch 'mobile-connect-button' into beta
Corantin Sep 24, 2024
db584ed
Merge branch 'gnosis-deploy-0.0.4' into beta
Corantin Sep 26, 2024
6255684
Use sub version v4
Corantin Sep 26, 2024
29c47b2
Merge remote-tracking branch 'origin/magic-number' into beta
Corantin Sep 26, 2024
648e2f6
:recycle: Refactored daily job route for multi-chain support
Corantin Oct 11, 2024
c2f68ab
Merge branch 'dev' into beta
Corantin Oct 15, 2024
cef6c57
Merge branch 'dev' into beta
Corantin Oct 15, 2024
1f20af2
Merge branch 'dev' into beta
Corantin Oct 15, 2024
b8ed4dc
Merge branch 'dev' into beta
Corantin Oct 15, 2024
8135990
Merge branch 'dev' into beta
Corantin Oct 16, 2024
6bad13b
Merge branch 'dev' into beta
Corantin Oct 16, 2024
3f398f5
Merge branch 'dev' into beta
Corantin Oct 16, 2024
fdb9067
Merge branch 'dev' into beta
Corantin Oct 16, 2024
a279142
Merge branch 'dev' into beta
Corantin Oct 16, 2024
5358dc2
:arrow_up: Bump production version
Corantin Oct 17, 2024
35617c6
Merge branch 'dev' into beta
Corantin Oct 18, 2024
19c9c88
Merge branch 'dev' into beta
Corantin Oct 18, 2024
97db6fa
Merge branch 'dev' into beta
Corantin Oct 18, 2024
2ea917e
Merge branch 'dev' into beta
Corantin Oct 18, 2024
47082be
Merge branch 'dev' into beta
Corantin Oct 18, 2024
da78c22
Merge branch 'dev' into beta
Corantin Oct 18, 2024
0f189c8
Merge branch 'dev' into beta
Corantin Oct 19, 2024
095cd5a
Merge branch 'dev' into beta
Corantin Oct 20, 2024
0577ecf
Merge branch 'dev' into beta
Corantin Oct 20, 2024
de865ee
Merge branch 'dev' into beta
Corantin Oct 20, 2024
3d0f36c
Merge branch 'dev' into beta
Corantin Oct 20, 2024
c24da41
Merge branch 'dev' into beta
Corantin Oct 20, 2024
5bcb025
Bump subgraph to v0.1.2
Corantin Oct 22, 2024
be7e332
order garden card by comm from most to least
Mati0x Oct 22, 2024
9829a09
addt garden card by members when comm length is equal
Mati0x Oct 22, 2024
27e9556
Merge remote-tracking branch 'origin/fix/membership-stake-amount-deci…
Mati0x Oct 23, 2024
f38699d
Merge branch 'dev' into beta
Corantin Oct 23, 2024
b4f5a63
Merge branch 'dev' into beta
Corantin Oct 23, 2024
d70a23b
fix pool header
Mati0x Oct 29, 2024
8b219cf
fix: remove proposal and funds statistic from pool in review
Mati0x Oct 31, 2024
59f5d82
fix: pool form token address
Mati0x Oct 31, 2024
3e776dc
Merge branch 'dev' into beta
Corantin Nov 5, 2024
3c40ddc
fix: remove pool id from `PoolHeader`
Mati0x Nov 12, 2024
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
598 changes: 3 additions & 595 deletions apps/web/app/page.tsx

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions apps/web/components/Forms/PoolEditForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { FormRadioButton } from "./FormRadioButton";
import { FormSelect } from "./FormSelect";
import { Button } from "../Button";
import { EthAddress } from "../EthAddress";
import { InfoBox } from "../InfoBox";
import { chainConfigMap } from "@/configs/chains";
import { usePubSubContext } from "@/contexts/pubsub.context";
import { useChainFromPath } from "@/hooks/useChainFromPath";
Expand Down Expand Up @@ -55,7 +54,6 @@ export default function PoolEditForm({
chainId,
initValues,
proposalType,
proposalOnDispute: isProposalOnDispute,
setModalOpen,
}: Props) {
const {
Expand All @@ -66,7 +64,7 @@ export default function PoolEditForm({
defaultValues: {
spendingLimit: initValues.spendingLimit,
minimumConviction: initValues.minimumConviction,
convictionGrowth: initValues.convictionGrowth,
convictionGrowth: Math.round(+initValues.convictionGrowth / 3600 / 24), // convert seconds to days
minThresholdPoints: initValues.minThresholdPoints,
// arb settings
defaultResolution: initValues.defaultResolution,
Expand Down
8 changes: 4 additions & 4 deletions apps/web/components/PoolHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function PoolHeader({
spendingLimitPct * MAX_RATIO_CONSTANT,
);

const convictionGrowth = calculateConvictionGrowthInSeconds(
const convictionGrowthSec = calculateConvictionGrowthInSeconds(
strategy.config.decay,
blockTime,
);
Expand All @@ -133,7 +133,7 @@ export default function PoolHeader({
(proposal) => ProposalStatus[proposal.proposalStatus] === "disputed",
);

const { value, unit } = convertSecondsToReadableTime(convictionGrowth);
const { value, unit } = convertSecondsToReadableTime(convictionGrowthSec);

const poolConfig = [
{
Expand Down Expand Up @@ -240,7 +240,7 @@ export default function PoolHeader({
<h2>
{ipfsResult?.title} #{poolId}
</h2>
{(isCouncilMember ?? isCouncilSafe) && (
{(!!isCouncilMember || isCouncilSafe) && (
// true
<div className="flex gap-2">
<Button
Expand Down Expand Up @@ -297,7 +297,7 @@ export default function PoolHeader({
proposalOnDispute={proposalOnDispute}
initValues={{
minimumConviction: minimumConviction.toFixed(2),
convictionGrowth: convictionGrowth.toFixed(2),
convictionGrowth: convictionGrowthSec.toFixed(2),
minThresholdPoints: minThresholdPoints,
spendingLimit: spendingLimit.toFixed(2),
defaultResolution: defaultResolution,
Expand Down
8 changes: 4 additions & 4 deletions apps/web/configs/chains.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ export const chains: Chain[] = [
sepolia,

arbitrum,
optimism,
polygon,
gnosis,
// mainnet,
optimism,
// gnosis,
];

if (process.env.NODE_ENV === "development") {
Expand All @@ -55,7 +55,7 @@ type ChainData = {
};

const SUBGRAPH_TESTNET_VERSION = "0.25";
const SUBGRAPH_PRODNET_VERSION = "1.3";
const SUBGRAPH_PRODNET_VERSION = "0.0.3";

export const chainConfigMap: {
[key: number | string]: ChainData;
Expand All @@ -78,7 +78,7 @@ export const chainConfigMap: {
421614: {
name: arbitrumSepolia.name,
icon: Arbitrum,
explorer: "https://sepolia-explorer.arbitrum.io",
explorer: "https://arbitrum-sepolia.blockscout.com/",
blockTime: 0.23,
confirmations: 7,
rpcUrl: process.env.NEXT_PUBLIC_RPC_URL_ARB_TESTNET!,
Expand Down
2 changes: 1 addition & 1 deletion apps/web/services/getTitlesFromUrlSegments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export async function getTitlesFromUrlSegments(
chainId: parseInt(segments[1]),
};
const tokenData = await fetchToken(tokenArgs)
.then((token) => token?.symbol)
.then((token) => token?.name)
.catch(() => {
console.error("Error fetching token from address: ", tokenArgs);
toast.error("Token not found");
Expand Down
596 changes: 596 additions & 0 deletions broadcast/DeployCVMultiChain.s.sol/100/run-1726500026.json

Large diffs are not rendered by default.

596 changes: 596 additions & 0 deletions broadcast/DeployCVMultiChain.s.sol/100/run-1726500433.json

Large diffs are not rendered by default.

596 changes: 596 additions & 0 deletions broadcast/DeployCVMultiChain.s.sol/100/run-latest.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions pkg/contracts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,12 @@ deploy-multi-gnosis:
--rpc-url $(RPC_URL_GNOSIS) \
--sig "run(string)" 'gnosis' \
--account pkGarden \
--etherscan-api-key $(GNOSISSCAN_API_KEY) \
--ffi \
--chain-id 100 \
--broadcast \
--legacy \
--verify \
--via-ir \
-vvv

Expand Down
8 changes: 4 additions & 4 deletions pkg/contracts/config/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@
}
},
{
"name": "mainnet",
"chainId": 1,
"name": "gnosis",
"chainId": 100,
"testnet": false,
"no-safe": false,
"ENVS": {
Expand All @@ -125,8 +125,8 @@
}
},
{
"name": "gnosis",
"chainId": 100,
"name": "mainnet",
"chainId": 1,
"testnet": false,
"no-safe": false,
"ENVS": {
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/contracts/out/CVStrategyV0_0.sol/CVStrategyV0_0.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/contracts/out/CVStrategyV0_0.sol/IPointStrategy.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/contracts/out/CVStrategyV0_0.sol/StrategyStruct.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/contracts/out/FAllo.sol/FAllo.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/contracts/out/GV2ERC20.sol/GV2ERC20.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/contracts/out/IArbitrator.sol/IArbitrator.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/contracts/out/ISafe.sol/Enum.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/contracts/out/ISafe.sol/ISafe.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/contracts/out/ISafe.sol/SafeProxyFactory.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/contracts/out/PassportScorer.sol/PassportScorer.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/contracts/out/SafeArbitrator.sol/SafeArbitrator.json

Large diffs are not rendered by default.

This file was deleted.

18 changes: 18 additions & 0 deletions pkg/subgraph/config/gnosis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"network": "gnosis",
"chainId": 100,
"dataSources": [
{
"name": "RegistryFactoryV0_0",
"startBlock": 36032424,
"address": "0x08df82f74d1f56f650e98da2dd4240f1a31711bc",
"customTemplate": "registryFactory"
},
{
"name": "PassportScorer",
"startBlock": 36032424,
"address": "0xd7b72fcb6a4e2857685175f609d1498ff5392e46",
"customTemplate": "passportScorer"
}
]
}
3 changes: 3 additions & 0 deletions pkg/subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"manifest:arbitrum": "node ./src/scripts/mustache arbitrum",
"manifest:optimism": "node ./src/scripts/mustache optimism",
"manifest:matic": "node ./src/scripts/mustache matic",
"manifest:gnosis": "node ./src/scripts/mustache gnosis",
"build:arbsep": "pnpm manifest:arbsep && graph codegen && graph build",
"build:ethsep": "pnpm manifest:ethsep && graph codegen && graph build",
"create-local": "graph create --node http://localhost:8020/ kamikazebr/gv2",
Expand All @@ -21,6 +22,8 @@
"deploy:arbitrum": "pnpm manifest:arbitrum && graph deploy --studio gv2-arbitrum",
"deploy:optimism": "pnpm manifest:optimism && graph deploy --studio gv2-optimism",
"deploy:matic": "pnpm manifest:matic && graph deploy --studio gv2-matic",
"deploy:gnosis": "pnpm manifest:gnosis && graph deploy --studio gv2-gnosis",
"deploy:prod": "export SUB_PROD_VERSION=0.0.4 && pnpm deploy:arbitrum -l $SUB_PROD_VERSION && pnpm deploy:optimism -l $SUB_PROD_VERSION && pnpm deploy:matic -l $SUB_PROD_VERSION && pnpm deploy:gnosis -l $SUB_PROD_VERSION",
"build-deploy:arbsep": "pnpm build:arbsep && pnpm deploy:arbsep:last",
"build-deploy:ethsep": "pnpm build:ethsep && pnpm deploy:ethsep:last",
"local": "pnpm create-local && pnpm build && pnpm deploy:local",
Expand Down
4 changes: 2 additions & 2 deletions pkg/subgraph/src/scripts/last-addr.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const arbitrumSepoliaLatest = require("../../../../broadcast/DeployCVMultiChain.
// const optimismSepoliaLatest = require("../../../../broadcast/DeployCVMultiChain.s.sol/11155420/run-latest.json");
const sepoliaLatest = require("../../../../broadcast/DeployCVMultiChain.s.sol/11155111/run-latest.json");
const optimismLatest = require("../../../../broadcast/DeployCVMultiChain.s.sol/10/run-latest.json");
// const gnosisLatest = require("../../../../broadcast/DeployCVMultiChain.s.sol/100/run-latest.json");
const gnosisLatest = require("../../../../broadcast/DeployCVMultiChain.s.sol/100/run-latest.json");
const polygonLatest = require("../../../../broadcast/DeployCVMultiChain.s.sol/137/run-latest.json");
const arbitrumLatest = require("../../../../broadcast/DeployCVMultiChain.s.sol/42161/run-latest.json");
// const mainnetLatest = require("../../../../broadcast/DeployCVMultiChain.s.sol/1/run-latest.json");
Expand All @@ -19,7 +19,7 @@ const jsons = {
[viemChains.sepolia.id]: sepoliaLatest,

[viemChains.optimism.id]: optimismLatest,
// [viemChains.gnosis.id]: gnosisLatest,
[viemChains.gnosis.id]: gnosisLatest,
[viemChains.polygon.id]: polygonLatest,
[viemChains.arbitrum.id]: arbitrumLatest,
// [viemChains.mainnet.id]: mainnetLatest
Expand Down
20 changes: 10 additions & 10 deletions pkg/subgraph/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ schema:
dataSources:
- kind: ethereum/contract
name: RegistryFactoryV0_0
network: optimism
network: matic
context:
chainId:
type: Int
data: 10
data: 137
source:
address: "0x1fac47cf25f1ca9f20ba366099d26b28401f5715"
address: "0x57a9835b204dbcc101dbf981625a3625e8043b9c"
abi: RegistryFactoryV0_0
startBlock: 125112016
startBlock: 61584765
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand All @@ -40,15 +40,15 @@ dataSources:

- kind: ethereum/contract
name: PassportScorer
network: optimism
network: matic
context:
chainId:
type: Int
data: 10
data: 137
source:
address: "0xc93830dd463516ed5f28f6cd4f837173b87ff389"
address: "0x1fac47cf25f1ca9f20ba366099d26b28401f5715"
abi: PassportScorer
startBlock: 125112016
startBlock: 61584765
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand All @@ -72,7 +72,7 @@ dataSources:
templates:
- kind: ethereum/contract
name: RegistryCommunityV0_0
network: optimism
network: matic
source:
abi: RegistryCommunityV0_0
mapping:
Expand Down Expand Up @@ -134,7 +134,7 @@ templates:

- kind: ethereum/contract
name: CVStrategyV0_0
network: optimism
network: matic
source:
abi: CVStrategyV0_0
mapping:
Expand Down
Loading