From 31171749e0d30bd0f97d4407d207e807ec6aeecc Mon Sep 17 00:00:00 2001 From: Jan-Felix Date: Fri, 14 Jun 2024 17:11:32 +0200 Subject: [PATCH 1/4] fix indexing of adapter updates --- packages/subgraph/src/helpers.ts | 2 -- packages/subgraph/src/periphery.mapping.ts | 9 +++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/subgraph/src/helpers.ts b/packages/subgraph/src/helpers.ts index 153dac093..66590fa53 100644 --- a/packages/subgraph/src/helpers.ts +++ b/packages/subgraph/src/helpers.ts @@ -136,7 +136,6 @@ export const getOrCreateAllowance = (allowanceKey: Bytes, rolesModifierId: strin } export const getOrCreateUnwrapAdapter = ( - adapterAddress: Address, targetAddress: Address, selector: Bytes, rolesModifierId: string, @@ -147,7 +146,6 @@ export const getOrCreateUnwrapAdapter = ( // save adapter the first time we encounter it if (!adapter) { adapter = new UnwrapAdapter(id) - adapter.adapterAddress = adapterAddress adapter.rolesModifier = rolesModifierId adapter.targetAddress = targetAddress adapter.selector = selector diff --git a/packages/subgraph/src/periphery.mapping.ts b/packages/subgraph/src/periphery.mapping.ts index 2d8ba04e3..a505df5f3 100644 --- a/packages/subgraph/src/periphery.mapping.ts +++ b/packages/subgraph/src/periphery.mapping.ts @@ -6,12 +6,9 @@ export function handleSetUnwrapAdapter(event: SetUnwrapAdapter): void { const rolesModifierAddress = event.address const rolesModifierId = getRolesModifierId(rolesModifierAddress) - const adapter = getOrCreateUnwrapAdapter( - event.params.adapter, - event.params.to, - event.params.selector, - rolesModifierId, - ) + const adapter = getOrCreateUnwrapAdapter(event.params.to, event.params.selector, rolesModifierId) + adapter.adapterAddress = event.params.adapter + adapter.save() log.info("UnwrapAdapter {} has been set to {}", [adapter.id, adapter.adapterAddress.toHexString()]) } From 8b6ac4f0207100c94f9fcab74ff90b0752c9d2e3 Mon Sep 17 00:00:00 2001 From: Jan-Felix Date: Fri, 14 Jun 2024 18:15:44 +0200 Subject: [PATCH 2/4] use latest subgraphs --- README.md | 16 ++++++++-------- packages/deployments/src/chains.ts | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 8d86b9648..2f0929f33 100644 --- a/README.md +++ b/README.md @@ -79,14 +79,14 @@ Address: `0x91B1bd7BCC5E623d5CE76b0152253499a9C819d1` #### Subgraphs -- [Mainnet](https://api.studio.thegraph.com/query/23167/zodiac-roles-mainnet/v2.2.1) -- [Optimism](https://api.studio.thegraph.com/query/23167/zodiac-roles-optimism/v2.2.1) -- [Gnosis](https://api.studio.thegraph.com/query/23167/zodiac-roles-gnosis/v2.2.1) -- [Polygon](https://api.studio.thegraph.com/query/23167/zodiac-roles-polygon/v2.2.1) -- [Arbitrum One](https://api.studio.thegraph.com/query/23167/zodiac-roles-arbitrum-one/v2.2.1) -- [Avalanche C-Chain](https://api.studio.thegraph.com/query/23167/zodiac-roles-avalanche/v2.2.1) -- [Base](https://api.studio.thegraph.com/query/23167/zodiac-roles-base/v2.2.1) -- [Sepolia](https://api.studio.thegraph.com/query/23167/zodiac-roles-sepolia/v2.2.1) +- [Mainnet](https://api.studio.thegraph.com/query/23167/zodiac-roles-mainnet/v2.2.2) +- [Optimism](https://api.studio.thegraph.com/query/23167/zodiac-roles-optimism/v2.2.2) +- [Gnosis](https://api.studio.thegraph.com/query/23167/zodiac-roles-gnosis/v2.2.2) +- [Polygon](https://api.studio.thegraph.com/query/23167/zodiac-roles-polygon/v2.2.2) +- [Arbitrum One](https://api.studio.thegraph.com/query/23167/zodiac-roles-arbitrum-one/v2.2.2) +- [Avalanche C-Chain](https://api.studio.thegraph.com/query/23167/zodiac-roles-avalanche/v2.2.2) +- [Base](https://api.studio.thegraph.com/query/23167/zodiac-roles-base/v2.2.2) +- [Sepolia](https://api.studio.thegraph.com/query/23167/zodiac-roles-sepolia/v2.2.2) ### Development environment setup diff --git a/packages/deployments/src/chains.ts b/packages/deployments/src/chains.ts index 3c5f25dfb..e80c54f17 100644 --- a/packages/deployments/src/chains.ts +++ b/packages/deployments/src/chains.ts @@ -3,48 +3,48 @@ export const chains = { name: "mainnet", prefix: "eth", subgraph: - "https://api.studio.thegraph.com/query/23167/zodiac-roles-mainnet/v2.2.1", + "https://api.studio.thegraph.com/query/23167/zodiac-roles-mainnet/v2.2.2", }, [10]: { name: "optimism", prefix: "oeth", subgraph: - "https://api.studio.thegraph.com/query/23167/zodiac-roles-optimism/v2.2.1", + "https://api.studio.thegraph.com/query/23167/zodiac-roles-optimism/v2.2.2", }, [100]: { name: "gnosis", prefix: "gno", subgraph: - "https://api.studio.thegraph.com/query/23167/zodiac-roles-gnosis/v2.2.1", + "https://api.studio.thegraph.com/query/23167/zodiac-roles-gnosis/v2.2.2", }, [137]: { name: "polygon", prefix: "matic", subgraph: - "https://api.studio.thegraph.com/query/23167/zodiac-roles-polygon/v2.2.1", + "https://api.studio.thegraph.com/query/23167/zodiac-roles-polygon/v2.2.2", }, [42161]: { name: "arbitrumOne", prefix: "arb1", subgraph: - "https://api.studio.thegraph.com/query/23167/zodiac-roles-arbitrum-one/v2.2.1", + "https://api.studio.thegraph.com/query/23167/zodiac-roles-arbitrum-one/v2.2.2", }, [43114]: { name: "avalanche", prefix: "avax", subgraph: - "https://api.studio.thegraph.com/query/23167/zodiac-roles-avalanche/v2.2.1", + "https://api.studio.thegraph.com/query/23167/zodiac-roles-avalanche/v2.2.2", }, [8453]: { name: "base", prefix: "base", subgraph: - "https://api.studio.thegraph.com/query/23167/zodiac-roles-base/v2.2.1", + "https://api.studio.thegraph.com/query/23167/zodiac-roles-base/v2.2.2", }, [11155111]: { name: "sepolia", prefix: "sep", subgraph: - "https://api.studio.thegraph.com/query/23167/zodiac-roles-sepolia/v2.2.1", + "https://api.studio.thegraph.com/query/23167/zodiac-roles-sepolia/v2.2.2", }, } as const From 2242ddec86028fe833e0bf9f71c5285563153957 Mon Sep 17 00:00:00 2001 From: Jan-Felix Date: Fri, 14 Jun 2024 18:16:01 +0200 Subject: [PATCH 3/4] fetch multiSend addresses configured for a roles mod --- packages/deployments/src/fetchRolesMod.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/deployments/src/fetchRolesMod.ts b/packages/deployments/src/fetchRolesMod.ts index f6e6f7d1b..f3a4fafda 100644 --- a/packages/deployments/src/fetchRolesMod.ts +++ b/packages/deployments/src/fetchRolesMod.ts @@ -31,6 +31,9 @@ const QUERY = ` } } } + unwrapAdapters(where: {selector: "0x8d80ff0a", adapterAddress: "0x93b7fcbc63ed8a3a24b59e1c3e6649d50b7427c0"}) { + targetAddress + } } } ` @@ -90,11 +93,15 @@ export interface RolesModifier { avatar: `0x${string}` target: `0x${string}` roles: RoleSummary[] + multiSendAddresses: `0x${string}`[] } const mapGraphQl = (rolesModifier: any): RolesModifier => ({ ...rolesModifier, roles: rolesModifier.roles.map(mapGraphQlRole), + multiSendAddresses: rolesModifier.unwrapAdapters.map( + (adapter: any) => adapter.targetAddress + ), }) const mapGraphQlRole = (role: any): RoleSummary => ({ From 1b4596d695dd3981959501ed2320265fd379b4d8 Mon Sep 17 00:00:00 2001 From: Jan-Felix Date: Fri, 21 Jun 2024 11:11:39 +0200 Subject: [PATCH 4/4] bump deployments patch --- packages/deployments/package.json | 2 +- packages/sdk/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/deployments/package.json b/packages/deployments/package.json index ac5c3c66a..84a996c5d 100644 --- a/packages/deployments/package.json +++ b/packages/deployments/package.json @@ -1,6 +1,6 @@ { "name": "zodiac-roles-deployments", - "version": "2.2.3", + "version": "2.2.4", "license": "LGPL-3.0+", "main": "build/cjs/index.js", "module": "build/esm/index.js", diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 70e4662d0..96c36b64c 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "zodiac-roles-sdk", - "version": "2.12.5", + "version": "2.12.6", "license": "LGPL-3.0+", "main": "build/cjs/sdk/src/index.js", "module": "build/esm/sdk/src/index.js",