Skip to content

Commit

Permalink
chore: update to v1.0.3 (snapshot-labs/sx-subgraph#44)
Browse files Browse the repository at this point in the history
* feat: index multiple delegations

* chore: bump version to 0.0.17

* chore: update to v1.0.3

* chore: update contract addresses

* chore: update to v0.0.18

* chore: update to v0.0.19

* chore: add mainnet specific contracts

* chore: update version to v0.0.20

---------

Co-authored-by: Wiktor Tkaczyński <[email protected]>
  • Loading branch information
bonustrack and Sekhmet authored Dec 13, 2023
1 parent 2a4d5c4 commit 99161eb
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
5 changes: 5 additions & 0 deletions apps/subgraph-api/abis/AvatarExecutionStrategy.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@
},
{
"inputs": [
{
"name": "proposalId",
"type": "uint256",
"internalType": "uint256"
},
{
"components": [
{
Expand Down
5 changes: 5 additions & 0 deletions apps/subgraph-api/abis/TimelockExecutionStrategy.json
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,11 @@
},
{
"inputs": [
{
"name": "proposalId",
"type": "uint256",
"internalType": "uint256"
},
{
"components": [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/subgraph-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sx-subgraph",
"version": "0.0.17",
"version": "0.0.20",
"scripts": {
"codegen": "graph codegen",
"build": "graph build",
Expand Down
16 changes: 10 additions & 6 deletions apps/subgraph-api/src/mapping.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Address, BigDecimal, BigInt, Bytes } from '@graphprotocol/graph-ts'
import {Address, BigDecimal, BigInt, Bytes, dataSource } from '@graphprotocol/graph-ts'
import { ProxyDeployed } from '../generated/ProxyFactory/ProxyFactory'
import { AvatarExecutionStrategy } from '../generated/ProxyFactory/AvatarExecutionStrategy'
import { TimelockExecutionStrategy } from '../generated/ProxyFactory/TimelockExecutionStrategy'
Expand Down Expand Up @@ -33,11 +33,15 @@ import {
import { Space, ExecutionStrategy, ExecutionHash, Proposal, Vote, User } from '../generated/schema'
import { updateStrategiesParsedMetadata, updateProposalValidationStrategy } from './helpers'

const MASTER_SPACE = Address.fromString('0xd9c46d5420434355d0E5Ca3e3cCb20cE7A533964')
const MASTER_SIMPLE_QUORUM_AVATAR = Address.fromString('0x3813f3d97Aa2F80e3aF625605A31206e067FB2e5')
const MASTER_SIMPLE_QUORUM_TIMELOCK = Address.fromString(
'0x00C5E67e6F7FDf80d7bCA249E38C355FbE62Ba34'
)
let MASTER_SPACE = Address.fromString('0xC3031A7d3326E47D49BfF9D374d74f364B29CE4D')
let MASTER_SIMPLE_QUORUM_AVATAR = Address.fromString('0xecE4f6b01a2d7FF5A9765cA44162D453fC455e42')
let MASTER_SIMPLE_QUORUM_TIMELOCK = Address.fromString('0xf2A1C2f2098161af98b2Cc7E382AB7F3ba86Ebc4')

if (dataSource.network() == 'mainnet') {
MASTER_SPACE = Address.fromString('0xd9c46d5420434355d0E5Ca3e3cCb20cE7A533964')
MASTER_SIMPLE_QUORUM_AVATAR = Address.fromString('0x3813f3d97Aa2F80e3aF625605A31206e067FB2e5')
MASTER_SIMPLE_QUORUM_TIMELOCK = Address.fromString('0x3813f3d97Aa2F80e3aF625605A31206e067FB2e5')
}

export function handleProxyDeployed(event: ProxyDeployed): void {
if (event.params.implementation.equals(MASTER_SPACE)) {
Expand Down

0 comments on commit 99161eb

Please sign in to comment.