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

feat: move and refactor subgraph #7

Merged
merged 44 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
37fc816
feat: add the plugin events to the placeholder and update the contrac…
clauBv23 Mar 12, 2024
055fdf7
feat: start moving admin subgraph
clauBv23 Mar 14, 2024
260e336
Merge branch 'merge/template/develop' into OS-497/move-and-refactor-s…
clauBv23 Mar 14, 2024
41dceff
feat: update template placeholder
clauBv23 Mar 15, 2024
545801a
ci: remove not needed files
clauBv23 Mar 15, 2024
795de85
feat: update some types and refactor handle proposal created function
clauBv23 Mar 15, 2024
3d60002
feat: update psp tests to work
clauBv23 Mar 15, 2024
c4bd5d1
feat: add tests, constants, and helper functions
clauBv23 Mar 15, 2024
b6db7b5
fix: undo changes
clauBv23 Mar 15, 2024
d390ed4
ci: remove not needed definitions
clauBv23 Mar 15, 2024
3537ab5
ci: rmv new line
clauBv23 Mar 15, 2024
6c9207c
ci: add new line
clauBv23 Mar 15, 2024
6dba0c4
feat: add PermissionManager to generate his ABI
clauBv23 Mar 15, 2024
040912e
feat: add admin members
clauBv23 Mar 15, 2024
1c0790f
feat: add admin members tests
clauBv23 Mar 15, 2024
17b3dc6
feat: refactor the manifest placeholder
clauBv23 Mar 15, 2024
fd20963
ci: rename the dao param for daoAddress
clauBv23 Mar 15, 2024
55507fc
feat: update the psp handle installation prepared function to use the…
clauBv23 Mar 15, 2024
e72b7b7
feat: update the psp test
clauBv23 Mar 15, 2024
9c68f25
ci: update entities property name
clauBv23 Mar 15, 2024
c906b0d
fix: admin tests
clauBv23 Mar 15, 2024
65ecba7
fix psp handler problem with the plugin entity id
clauBv23 Mar 24, 2024
8a05901
ci: refactor the var names
clauBv23 Mar 24, 2024
7d63ed8
ci: update entity param description
clauBv23 Mar 24, 2024
327af0d
feat: update the plugin deployed addresses
clauBv23 Mar 24, 2024
e8d7343
ci: rename var in tests helpers
clauBv23 Mar 24, 2024
2f95884
ci: remove new line
clauBv23 Mar 25, 2024
da6095b
feat: update the manifest data json
clauBv23 Mar 25, 2024
b4885c8
ci: remove base goerli due to is deprecated
clauBv23 Mar 25, 2024
6db495e
feat: update the placeholder
clauBv23 Mar 25, 2024
98edc23
feat: update the script to correctly get the plugin repo address
clauBv23 Mar 25, 2024
e516b13
feat: rename admin ts file for plugin ts file
clauBv23 Mar 25, 2024
338938d
fix: update import
clauBv23 Mar 25, 2024
ce2572b
fix: update import
clauBv23 Mar 25, 2024
858836d
Update packages/subgraph/schema.graphql
clauBv23 Mar 25, 2024
5ee03f5
Update packages/subgraph/schema.graphql
clauBv23 Mar 25, 2024
fa02664
feat: remove loop for iterate over a single element array list
clauBv23 Mar 25, 2024
27f9499
ci: add comment for clarification
clauBv23 Mar 25, 2024
85cbd65
feat: create constant and move the execute proposal permission has
clauBv23 Mar 25, 2024
c444bb7
feat: rename administrator related variables to be more clear
clauBv23 Mar 25, 2024
b292034
feat: define variables for clarifying the usage in the code
clauBv23 Mar 25, 2024
bbbb379
feat: use constant in test instead of magic expression
clauBv23 Mar 25, 2024
82cef2a
feat: update the deploy script to get the repo address from the corre…
clauBv23 Mar 25, 2024
67eed30
Update packages/subgraph/manifest/data/localhost.json
clauBv23 Mar 25, 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
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/arbitrum.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "arbitrum-one",
"PluginRepo": {
"address": "0x326A2aee6A8eE78D79E7E956DE60C6E452f76a8e"
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0x308a1DC5020c4B5d992F5543a7236c465997fecB",
"startBlock": 145462184
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
18 changes: 0 additions & 18 deletions packages/subgraph/manifest/data/arbitrumGoerli.json

This file was deleted.

10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/arbitrumSepolia.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "arbitrum-sepolia",
"PluginRepo": {
"address": "0x152c9E28995E418870b85cbbc0AEE4e53020edb2"
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f",
"startBlock": 2827173
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
18 changes: 0 additions & 18 deletions packages/subgraph/manifest/data/baseGoerli.json

This file was deleted.

10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/baseMainnet.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "base",
"PluginRepo": {
"address": "0x212eF339C77B3390599caB4D46222D79fAabcb5c"
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0x91a851E9Ed7F2c6d41b15F76e4a88f5A37067cC9",
"startBlock": 2094737
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/baseSepolia.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "base-sepolia",
"PluginRepo": {
"address": "0x152c9E28995E418870b85cbbc0AEE4e53020edb2"
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f",
"startBlock": 3654401
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
18 changes: 0 additions & 18 deletions packages/subgraph/manifest/data/goerli.json

This file was deleted.

12 changes: 5 additions & 7 deletions packages/subgraph/manifest/data/localhost.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "rinkeby",
"network": "sepolia",
"PluginRepo": {
"address": null
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0x2B8C4DD137104d1E869105cd0106e7D9EF955BfE",
"startBlock": 7727664
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/mainnet.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "mainnet",
"PluginRepo": {
"address": "0xA4371a239D08bfBA6E8894eccf8466C6323A52C3"
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f",
"startBlock": 16721812
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/mumbai.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "mumbai",
"PluginRepo": {
"address": "0x0DF9b15550fF39149e491dDD154b28f587e0cD16"
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0x9227b311C5cecB416707F1C8B7Ca1b52649AabEc",
"startBlock": 33514164
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/polygon.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "matic",
"PluginRepo": {
"address": "0x7fF570473d0876db16A59e8F04EE7F17Ab117309"
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0x879D9dfe3F36d7684BeC1a2bB4Aa8E8871A7245B",
"startBlock": 40817440
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
10 changes: 4 additions & 6 deletions packages/subgraph/manifest/data/sepolia.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest",
"network": "sepolia",
"PluginRepo": {
"address": "0x152c9E28995E418870b85cbbc0AEE4e53020edb2"
},
"dataSources": {
"PluginSetupProcessors": [
{
"name": "PluginSetupProcessor",
"address": "0xC24188a73dc09aA7C721f96Ad8857B469C01dC9f",
"startBlock": 4415294
}
],
"Plugin": {
"name": "MyPlugin",
"address": null,
"startBlock": 7727664
}
]
}
}
43 changes: 34 additions & 9 deletions packages/subgraph/manifest/subgraph.placeholder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,48 @@ dataSources:
{{/dataSources.PluginSetupProcessors}}
# templates
templates:
# Plugin (package)
# Plugin
- name: Plugin
kind: ethereum/contract
network: {{network}}
source:
abi: Plugin
abi: Admin
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- Dao
- AdminPlugin
- AdminProposal
- Action
file: ./src/plugin/plugin.ts
abis:
- name: Plugin
file: $PLUGIN_MODULE/contracts/artifacts/src/MyPlugin.sol/MyPlugin.json
- name: Admin
file: $PLUGIN_MODULE/contracts/artifacts/src/Admin.sol/Admin.json
eventHandlers:
- event: NumberStored(uint256)
handler: handleNumberStored
file: ./src/plugin/plugin.ts

- event: MembershipContractAnnounced(indexed address)
handler: handleMembershipContractAnnounced
- event: ProposalExecuted(indexed uint256)
handler: handleProposalExecuted
- event: ProposalCreated(indexed uint256,indexed address,uint64,uint64,bytes,(address,uint256,bytes)[],uint256)
handler: handleProposalCreated
- name: AdminMembers
kind: ethereum/contract
network: {{network}}
source:
abi: PermissionManager
mapping:
kind: ethereum/events
apiVersion: 0.0.5
language: wasm/assemblyscript
entities:
- Administrator
file: ./src/plugin/adminMembers.ts
abis:
- name: PermissionManager
file: ./imported/PermissionManager.json
eventHandlers:
- event: Granted(indexed bytes32,indexed address,address,indexed address,address)
handler: handleGranted
- event: Revoked(indexed bytes32,indexed address,address,indexed address)
handler: handleRevoked
Loading
Loading