Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/beta' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Corantin committed Dec 7, 2024
2 parents 3aec24d + 833ad7d commit 766e663
Show file tree
Hide file tree
Showing 13 changed files with 2,276 additions and 555 deletions.
24 changes: 20 additions & 4 deletions apps/web/app/(app)/gardens/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,26 @@ export default function Page() {
return (
<>
{tokenGardens
.sort(
(a, b) =>
(b.communities?.length ?? 0) - (a.communities?.length ?? 0),
)
.sort((a, b) => {
const communitiesDiff =
(b.communities?.length ?? 0) - (a.communities?.length ?? 0);

if (communitiesDiff === 0) {
const aTotalMembers =
a.communities?.reduce(
(sum, community) => sum + (community.members?.length ?? 0),
0,
) ?? 0;
const bTotalMembers =
b.communities?.reduce(
(sum, community) => sum + (community.members?.length ?? 0),
0,
) ?? 0;
return bTotalMembers - aTotalMembers;
}

return communitiesDiff;
})
.map((garden) => (
<div key={garden.id}>
<GardenCard garden={garden} />
Expand Down
2 changes: 1 addition & 1 deletion apps/web/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import { redirect } from "next/navigation";

export default function Page() {
redirect("/gardens");
}
}
1 change: 1 addition & 0 deletions apps/web/components/Forms/PoolForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ export function PoolForm({ token, communityAddr }: Props) {
const { isConnected, missmatchUrl, tooltipMessage } = useDisableButtons();

const watchedAddress = watch("poolTokenAddress").toLowerCase() as Address;

const { data: customTokenData } = useToken({
address: watchedAddress ?? "0x",
chainId: +chain,
Expand Down
13 changes: 6 additions & 7 deletions apps/web/components/PoolCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,12 @@ export function PoolCard({ pool, token, chainId }: Props) {
label="voting weight"
count={capitalize(PointSystems[config?.pointSystem])}
/>
{isEnabled && (
<Statistic
icon={<HandRaisedIcon />}
count={proposals.length}
label="proposals"
/>
)}
<Statistic
icon={<HandRaisedIcon />}
count={proposals.length}
label="proposals"
className={`${isEnabled ? "visible" : "invisible"}`}
/>
{isEnabled && poolType && PoolTypes[poolType] === "funding" && (
<Statistic icon={<CurrencyDollarIcon />} label="funds">
<DisplayNumber
Expand Down
4 changes: 2 additions & 2 deletions apps/web/components/PoolHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,11 @@ export default function PoolHeader({

return (
<section className="section-layout flex flex-col gap-0">
<header className="mb-2 flex flex-col">
<header className="mb-4 flex flex-col">
<div className="flex justify-between flex-wrap">
<h2>
<Skeleton isLoading={!ipfsResult} className="sm:!w-96 h-8">
{ipfsResult?.title} #{poolId}
{ipfsResult?.title}
</Skeleton>
</h2>
{(!!isCouncilMember || isCouncilSafe) && (
Expand Down
1,066 changes: 1,066 additions & 0 deletions broadcast/UpgradeCVMultichain.s.sol/10/run-1729553069.json

Large diffs are not rendered by default.

646 changes: 323 additions & 323 deletions broadcast/UpgradeCVMultichain.s.sol/10/run-latest.json

Large diffs are not rendered by default.

311 changes: 311 additions & 0 deletions broadcast/UpgradeCVMultichain.s.sol/100/run-1729553281.json

Large diffs are not rendered by default.

190 changes: 97 additions & 93 deletions broadcast/UpgradeCVMultichain.s.sol/100/run-latest.json

Large diffs are not rendered by default.

324 changes: 324 additions & 0 deletions broadcast/UpgradeCVMultichain.s.sol/137/run-1729553264.json

Large diffs are not rendered by default.

228 changes: 114 additions & 114 deletions broadcast/UpgradeCVMultichain.s.sol/137/run-latest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"proxies:prod": "node src/scripts/list-proxies.cjs arbitrum && node src/scripts/list-proxies.cjs optimism && node src/scripts/list-proxies.cjs matic && node src/scripts/list-proxies.cjs gnosis",
"build-client": "mustache ../../apps/web/configs/subgraph.json .graphclientrc.template.yml > .graphclientrc.yml && graphclient build --fileType js",
"build-all": "pnpm create-local && pnpm build && pnpm deploy:local",
"deploy:arbsep:last": "dotenvx run -- ts-node --esm -P ../../apps/web/tsconfig.json ./src/scripts/last-version.ts gv2-arbsepolia",
"deploy:arbsep:last": "dotenvx run -- ts-node --esm -P ../../apps/web/tsconfig.json ./src/scripts/last-version.ts gv2-arbitrum-sepolia",
"deploy:ethsep:last": "dotenvx run -- ts-node --esm -P ../../apps/web/tsconfig.json ./src/scripts/last-version.ts gv2-ethsepolia",
"codegen": "graph codegen",
"graph": "graph",
Expand Down
20 changes: 10 additions & 10 deletions pkg/subgraph/subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dataSources:
name: RegistryFactoryV0_0
network: localhost
context:
chainId:
chainId:
type: Int
data: 1337
source:
Expand All @@ -33,16 +33,16 @@ dataSources:
- event: CommunityValiditySet(address,bool)
handler: handleCommunityValiditySet
- event: ProtocolFeeSet(address,uint256)
handler: handleProtocolFeeSet
handler: handleProtocolFeeSet
- event: Initialized(uint8)
handler: handleRegistryInitialized
handler: handleRegistryInitialized
file: ./src/mappings/registry-factory.ts

- kind: ethereum/contract
name: PassportScorer
network: localhost
context:
chainId:
chainId:
type: Int
data: 1337
source:
Expand Down Expand Up @@ -100,7 +100,7 @@ templates:
file: ../contracts/out/CVStrategyV0_0.sol/CVStrategyV0_0.json
- name: RegistryFactoryV0_0
file: ../contracts/out/RegistryFactoryV0_0.sol/RegistryFactoryV0_0.json

eventHandlers:
- event: RegistryInitialized(bytes32,string,(uint256,string))
handler: handleInitialized
Expand Down Expand Up @@ -204,7 +204,7 @@ templates:
handler: handleAllowlistMembersRemoved
- event: SybilScorerUpdated(address)
handler: handleSybilScorerUpdated

file: ./src/mappings/cv-strategy.ts

- kind: ethereum/contract
Expand All @@ -229,8 +229,8 @@ templates:
handler: handleCollateralWithdrawnFor
- event: CollateralWithdrawn(uint256,indexed address,uint256,bool)
handler: handleCollateralWithdrawn
file: ./src/mappings/cv-strategy.ts
file: ./src/mappings/cv-strategy.ts

- name: ProposalDisputeMetadata
kind: file/ipfs
mapping:
Expand All @@ -243,7 +243,7 @@ templates:
abis:
- name: CVStrategyV0_0
file: ../contracts/out/CVStrategyV0_0.sol/CVStrategyV0_0.json

- name: ProposalMetadata
kind: file/ipfs
mapping:
Expand All @@ -255,4 +255,4 @@ templates:
- ProposalMetadata
abis:
- name: CVStrategyV0_0
file: ../contracts/out/CVStrategyV0_0.sol/CVStrategyV0_0.json
file: ../contracts/out/CVStrategyV0_0.sol/CVStrategyV0_0.json

0 comments on commit 766e663

Please sign in to comment.