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

f: changed the action entity id and added tests #15

Merged
merged 8 commits into from
Apr 2, 2024

Conversation

jordaniza
Copy link

@jordaniza jordaniza commented Mar 26, 2024

Description

Removes execution data from actions inside proposals. Adds manual testing that can be replicated inside other plugins then refactored.

An ID for generating actions has been created, this will be moved to the osx-commons-subgraph.

A second PR on OSx core is in progress which will make the necessary changes to the subgraphs.

https://www.notion.so/aragonorg/execResult-in-the-Subgraph-8879407b1d6f42f19530ef6bc06b3dc6#da8cb903e33342279d88725f068c9506

Task ID: OS-1162

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran all tests with success and extended them if necessary.
  • I have updated the CHANGELOG.md file in the root folder.
  • I have updated the DEPLOYMENT_CHECKLIST file in the root folder.
  • I have updated the UPDATE_CHECKLIST file in the root folder.
  • I have updated the Subgraph and added a QA URL to the description of this PR.

@novaknole
Copy link

novaknole commented Mar 27, 2024

Just to re-iterate over this:

Assume token-voting has its own UI separated from the osx core UI. Because of the fact that token voting subgraph doesn't store the execResult and whether the action was allowed to fail, In this case, what's your flow about how in token-voting UI, we show the each action's execResult and whether it was allowed to fail or not ?

I believe UI would need to do either one of the following:
1. call osx subgraph to fetch that exact, same proposal whose id corresponds to the same id that was created in token voting subgraph when proposal was created. With this, proposals must be stored with the same id in both plugin and dao and this would only require to make 1 extra API call.
2. call osx subgraph multiple times to fetch details about each action. This requires multiple calls which won't scale in the long run. If we go with this, that's when deterministic id for actions start to make sense, otherwise, if we ditch the (2), why would actions still need to have deterministic id ?

Question 1: I believe (2) doesn't scale as if there're 10 actions, making 10 api calls doesn't scale. So seems like we either go with Option 1 or there's another solution that you have on your mind. With option (1), there's no need to have actions deterministic, is there ? I might be missing a crucial detail, so would be great if you could mention here why action id needs to be unique for all different plugins.

The problem with both of the options above is that you currently assume that token voting is the one that calls dao to execute actions. The situation could change pretty easily if we assume that we have multiple stage scenario where token voting calls multisig to move to next stage and multi sig is the one that calls dao. In such scenario, inside token voting's subgraph, you would have a proposal with id of tokenVotingAddr + callId whereas when the executed event will be emitted, it will contain multisig address. Though, currently, token voting actually stores the dao address and it redirects the call to the dao directly without any intermediaries and this problem doesn't emerge for now, but for the plugins that won't behave the same as token voting, we definitely have this problem and not yet sure of the perfect solution.

@jordaniza
Copy link
Author

jordaniza commented Mar 27, 2024

Breaking down the challenges you outline:

  1. Scaling of action calls. In the case of querying by Id. N actions = N+1 calls to fetch proposal + action items. As N -> 255, this would have a potential large, negative impact on performance.

  2. A deterministic ID is challenging for multistage plugin workflows where the proposal plugin might not be the execution plugin.

  3. Even if we stored proposal data inside OSx subgraphs, challenges in (2) will still be a problem in multistage or multi body governance.

As an alternative to the implementation abov, you suggest storing proposal data inside OSx subgraphs (noting the challenge in 3)

So on proposals being stored in OSx. I would push back for a couple of reasons:

  1. Proposals are currently implemented on plugins. Conceptually this would make their data belong in the plugin. We could explore having a lightweight IProposal entity in OSx, which would give the plugin developer options to add additional fields in a separate subgraph, but I have other reasons why that might not be a good idea

  2. Alternative execution methods. You already touch on this with multi body governance but it's a simpler problem than that IMO. You can grant execution permissions to anything in theory and they need not go through a proposal process. We'd then be adding a lot of conditional overhead to try and understand how to store different execution workflows and I think it is best to mirror the contract structure: keep the OSx subgraph to just store actions. it shouldn't care how they got there.

On the point about actions scaling. This is a very good one to be honest and I'm glad you raised it. For M users with N actions, calls scale at a rate of MxN. Here's a few options

  1. Action containers on OSx core: these are in the original document as a consideration but I wasn't a huge fan as they introduced extra schema changes - maybe I need to rethink this. Containers would be stored on the DAO in place of actions and would be a many to many junction entity with metadata about the batch of actions. Each batch would have a unique ID. This would require additional schema changes on OSx core and we would need to think carefully about the ID for multistage governance.

  2. Range query methods: we could advise clients to use filters over all actions instead of querying by action. This could be using the block number or the tx execution hash. Action IDs could be a filtering mechanism on the client side. Don't love this as it adds a lot of overhead to the UI and easy to get wrong.

Just coming back to deterministic IDs. I think in the event of multistage plugins we should defer a lot of heavy lifting to the plugin developer. The information we have inside Executed is enough (IMO) to give good guarantees on uniqueness for actions and are deterministic. If we went down the action containers route we could skip the action index.

If you had a complex, multistage plugin inside a subgraph, I would say you need to be ensuring that the id is of the execution plugin. This can be done with context variables, or potentially as part of the plugin proposal manager, which is the orchestration tool.

@jordaniza jordaniza marked this pull request as draft March 27, 2024 10:55
@jordaniza
Copy link
Author

Ongoing discussions are in discord and notion

@jordaniza jordaniza marked this pull request as ready for review March 27, 2024 14:30
packages/subgraph/src/utils/ids.ts Outdated Show resolved Hide resolved
packages/subgraph/tests/plugin/plugin.test.ts Outdated Show resolved Hide resolved
@jordaniza jordaniza requested a review from clauBv23 April 2, 2024 15:51
@jordaniza jordaniza merged commit ee12e20 into develop Apr 2, 2024
5 checks passed
clauBv23 added a commit that referenced this pull request May 10, 2024
* feat: copied files from the simple-storage-example-plugin repo into package/contracts

* set monorepo package.json

* fix: CI/CD

* init subgraph

* fix: CI/CD

* feat: CI/CD improvements

* feat: cleaned devDependencies

* feat: improve CI step description

* subgraph bare bone (WIP)

* feat: add subpackages and cleaned dependencies

* feat: temporary readme

* feat: move packages

* fix: wrong path

* add post install

* plugin repo only

* switch to osx-ethers

* fix missing dir issue

* make it build

* build 1

* chore: cleaning

* feat: deleted contracts-versions

* feat: refactoring

* feat: refactoring

* feat: improvements

* feat: refactoring

* fix: linting and prettier

* feat: print more infos, remove unused function

* fix: print more info

* More infos

* Renaming

* More info

* fix: test failing because of wrong default test network

* feature: add subgraph workflow

* fix: rename flows

* fix: adapt triggers

* fix: install packages first

* fix: triggers

* feat: one .env file

* fix: .env paths

* fix: remove redundant checkout

* debug: print info

* debug: attempt fix

* fix: missing env variable

* fix: triggers

* Removed summaries

* WIP

* improvements

* fix: path

* fix: empty json handling

* fix: lint warnings

* add psp and pluginRepos related mapping WIP

* refactor PSP handlers (WIP)

* refactor PSP handlers (WIP)

* refactor PSP handlers (WIP)

* refactor PSP handlers (WIP)

* clean up

* create common id functions

* clean up

* Feature: Add js client (#2)

* add dummy js-client

* update yarn.lock

* update package.json

* fix formatting

* fix comments and add js-client github actions

* update js-client test workflow

* fix test workflow

* fix lint

* update workflow

* wip

* fix comments and add implementation

* update yarn lock and remove docs workflow

* Update packages/contracts-ethers/package.json

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* Update packages/js-client/src/context.ts

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* Update packages/js-client/test/unit/context.test.ts

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* add tests

* fix comments

* fix comments

* update client-common version

* fix lint command

* Update packages/js-client/src/internal/modules/methods.ts

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* update size limit

* update gh actions

* update gh actions

* fix gh actions

* add build command

* update gh actions

* fix gh action

* fix lint

* fix lint

* ignore js-client tests

* minor fixes

---------

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* fix subgraph build

* fix lint

* map 1 event

* chore: bump package versions

* feat: added event, tests, and improved signer, renamed plugin

* fix: linting and formatting errors

* feature: support base goerli network

* Add missing migration import for setup processing

* feat: added sepolia and base support and fix IPFS returning empty strings (#10)

* feat: added sepolia and base support

* fix: replaced outdated IPFS server url

* fix: empty return value

* OS-593: refactors repo for linting and linting during workflows (#11)

* chore(OS-593): Removes .editorconfig from project root

Prettier uses its .prettierrc as a first priority to configure the
formatter

* chore(OS-593): Updates node to v18 in gitpod

* chore(OS-593): same network for subgraph and contracts

Use the same network for subgraph and contracts in the .env.example file

* chore(OS-593): configure vscode editor correctly

configures vscode to use fixed a tabsize of 4 and adds commitizen
extentions into recommendations

* chore(OS-593): reconfigures linting system to start from the root

all linting commands have to be run from the root, then eslint merges
the configs per package and lints those

* build(OS-593): refactors package.json and dependency handling

moves all linting commands to the root of the repo for proper config
merging

* chore(OS-593): adds solidity visual developer as recommmended

we recommend to use the solidity visual auditor extension for
development

* style(OS-593): fixes linting issues

fixes some linting issues in contracts and js-client

* ci(OS-593): refactor workflows and include linting

refactors workflows to be easier and includes formatting and linting in
all workflows

* style(OS-593): apply prettier formatting

* ci(OS-593): lint all packages indiviually

lints the packages individually and adds step summaries for important
steps

* ci(OS-593): remove prettier output from summary

prettiers output isn't really working with step summary

* ci(OS-593): uses now node 18 in workflows

* chore(OS-593): fix typo in formatting-linting.yml

* docs: added readme (#13)

* docs: added readme

* docs: fix typos

* Os 782 remove the contracts ethers and do rollup in mini sdk (#12)

* refactor(OS-782): removes contracts-ethers package

Removes a now unecessary contracts-ethers package. js-client creates its
own typechain now

BREAKING CHANGE: Removal of contracts-ethers

* refactor(OS-782): js-client generates typescript

js-client doesn't depend on contracts-ethers anymore and creates the
typechain typings during its own build

* test(OS-782): ganache replacment, optimizations, use native jest

replaces depricated ganache setup with hardhat for testing, removes
contract interactions where they aren't necessary, upgrades jest by not
using tsdx for testing

* ci(OS-782): fixes js-client publish and tests workflows

corrects reusable worfklow in js-client publishing workflow, adapts
js-client-tests to use the new typechain integration properly

* build(OS-782): removes contracts-ethers linting command

* chore(OS-782): applies prettier formatting

* refactor: renamed and refactored files

* refactor: skip repo creation if ENS name is already taken

* docs: added usage guide and improved comments

* ci: fix workflow by removing outdated lint

* ci: formatting & linting on every push

* docs: improve migration file comment

* ci: fix linting workflow

* build: use the same typescript version everywhere

* docs: improve usage guide

* docs: improved usage guide

* OS-754 : re-organize entity relations & add testing (#15)

* re organize entity relations

* add testing for OSx & Plugin

* remove extra files

* Update Satsuma deploy node url

* Clean up

* fix lint

* fix subgraph scripts

* fix subgraph test flow

* ci: fixed linting work flow

* add comment

* OSx: Remove redundant code

* flow: build contracts for subgraph testing

* flow: build root for subgraph testing

* flow: remove comments

* subgraph: update test constants and comments

* subgraph: refactor & add comments

* ci: skip js-client linting

* docs: fix typo

---------

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* fix(js-client): exclude dist from tsconfig.json (#20)

* fix(js-client): exclude dist from tsconfig.json

not excluding dist would result in an error trying to run tests after
the client has been built

* ci(js-client): fix missing env in build

* chore: added arbitrum and arbitrumGoerli (#18)

* chore: added arbitrum and arbitrumGoerli

* ci: fix ci pipeline by adding typescript dev dependency

* ci: fix pipeline by removing leftover contracts-ethers lint

* ci: do a global lint on every push

* fix: etherscan arbitrum name

* ci: skip js-client linting

* build: add cross-env to fix subgraph ci

* refactor: add event explicitly

* build(js-client): replaces tsdx with dts-cli (#21)

* build(js-client): replace tsdx with dts-cli
deps(js-client): update to typescript 5.2.2
deps(root): update eslint packages

* lint(js-client): fixes linting errors

* test(js-client): fixes jest-environment import

* style: apply prettier changes

* chore: bump OZ dependency (#22)

* docs: add readme and usage guide

* OS-888 fix: Import Repo address from plugin-info (#26)

* fix: Import repo address from plugin-info

* fix: fix typo

* update plugin-info.json location

* update script

* update gitignore

* update osx-ethers to version 1.3.0

* Update .gitignore

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* fix import

* remove alias import

---------

Co-authored-by: Jose Manuel Mariñas Bascoy <josemarinasbascoy@gmail.com>
Co-authored-by: josemarinas <36479864+josemarinas@users.noreply.github.com>
Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* build: clean-up of dependecy and commands  (#19)

* build: remove docker-related commands

* build: remove local subgraphs commands

* chore: bump dependencies

* build: bump OZ version and fix unmet dependencies

* Feature: Add Subgraph step-by-step guide (#25)

* add step-by-step guide

* fiux lintint

* fix comments

* fix lint

* fix: Remove individual usage

* fix: update .env.example to include Sepolia

* docs: Improve usage guide

* fix: replace arbitrumGoerli and baseGoerli with the sepolia replacements

* fix: improve usage format

* Apply suggestions from code review

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* feat: improve usage guide file structure & address comments

* fix: remove redundant titles

* fix: link dependencies in the usage guide

* fix: fix typo

* Apply suggestions from code review

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

---------

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* feat: use `osx-commons-contracts` and `osx-commons-configs` (aragon#28)

* build: use ts 5.2.2

* refactor: use osx-commons

* refactor: use osx-commons

* build: use osx-commons-sdk

* build: use osx-commons-sdk

* refactor: contract improvements

* build: print coverage report

* chore: bump osx-commons-sdk version

* feat: use the latest osx-commons-contracts

* refactor: use osx-commons-configs and deploy script refactor

* build: subgraph fix

* docs: improve .env example

* style: fix prettier

* build: use osx-commons

* chore: bump subgraph osx-ethers dependency

* chore: remove todo

* test: remove redundant expect

* fix: use unknown instead of any

* fix: imports

* fix: wrong type

* fix: import

* fix: import

* feat: use typechain binding

* refactor: deploy script simplification

* refactor: findPluginRepo and domain

* refactor: improve code, comments, and tests

* refactor: improved helpers

* style: fix linting issues

* chore: remove todos

* revert: deletion of hashHelpers

* feat: catch errors properly

* refactor: folder structure

* refactor: help gh to track files

* refactor: help gh to track files

* refactor: improve folder structure (aragon#30)

* build: remove js client (aragon#31)

* ci: clean GH flows and remove gitpod (aragon#32)

* ci: improve flows

* style: remove unused commitizen config file

* build: update yarn.lock

* docs: update README.md (aragon#33)

* docs: update README.md

* doc: improve README and USAGE_GUIDE

* doc: minor improvement

* feat: use commons subgraph (aragon#29)

* use commons subgraph

* update events folder structure

* fix comments

* fix tests

* build: update yarn.lock

---------

Co-authored-by: Michael Heuer <michael.heuer@rwth-aachen.de>

* build: improve  package.json files (aragon#34)

* feat: improvements surfaced from the admin plugin (aragon#36)

* feat: various improvements that surfaced from the admin plugin

* build: remove duplicated dependency

* ci: use network name env var

* style: throw errors for unsupported networks or missing deployments

* feat: update the env examples to change the infura api key for the alchemy one

* feat: update the hardhat contracts file to use the new commons networks config

* feat: update the hardhat config to use the new addRpcUrlToNetwork function from the config commons package

* feat: update the config commons dependency version

* ci: update the readme to add the new alchemy api key needed

* feat: add new commons config version

* ci: typo

* Update .env.example

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* Update README.md

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* feat: update the api key in the workflows

* ci: update readme

* feat: bump commons config version on subgraph

* feat: update the actions to run over the PR changes  instead of the commit changes

* ci: comment to check the pipeline

* ci: undo the last comment added on the readme

* feature: improvements (aragon#44)

* doc: added missing comment

* build: remove redundant dependency

* feat: add a function to generate a random ens, set the ens to the plugin settings

* feat: bump commons config version in subgraph

* feat: add random name function

* refactor: settings

---------

Co-authored-by: Claudia <claudiabarcelovaldes40@gmail.com>

* feat: add manifest with psp address for missing networks and add the Plugin address to the json

* feat: update the script for getting the repo address

* feat: update the readme

* feat: update the deployment script to avoid deploying if the plugin address is not set

* ci update comment

* feat: change the manifest data json struct

* feat: change the script to get the correct params from the manifest data

* featL change to ens name

* feat: remove the ens domain due to it is not used

* feat: update deploy script to get the correct repo address

* feat: added IAction to template

* feat: bump matchstick version

* fix: remove deprecated networks

* fix: update the repository in the placeholder

* fix: local deploy script problem with `generateRandomName`  (aragon#53)

* fix: error on local deployment

* refactor: move generateName to avoid circular dependency

* refactor: split upgrade repo script into two (aragon#60)

* refactor: renamed file

* refactor: extract skip function

* refactor: renaming and commenting

* style: satisfy linter

* chore: maintained guide

* refactor: don't alias

* fix: wrong import

* fix: change the execution order so that reinitialization happens by default

* refactor: common steps

* refactor: remove IAction (aragon#61)

* f: removed IAction from template as is opinonated solution

* style: add empty line at EOF

---------

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* chore: refactor helpers (aragon#57)

* refactor: delete hashHelpers

* style: fix linter

* fix: import

* build: bump OZ dependency

* chore: bump osx-commons-sdk dependency

* chore: bumped commons-contracts

* chore: bump osx-commons-sdk version (aragon#62)

* chore: sync with `osx-commons` (aragon#63)

* chore: bump osx-commons-sdk version

* chore: bump osx-commons

* fix: yarn lock

* chore: removed networks (aragon#65)

---------

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: josemarinas <36479864+josemarinas@users.noreply.github.com>
Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>
Co-authored-by: Jør∂¡ <itsbrickpop@gmail.com>
Co-authored-by: Mathias Scherer <mathias@aragon.org>
Co-authored-by: Aaron Abu Usama <50079365+pythonpete32@users.noreply.github.com>
Co-authored-by: Jose Manuel Mariñas Bascoy <josemarinasbascoy@gmail.com>
Co-authored-by: Claudia <claudiabarcelovaldes40@gmail.com>
Co-authored-by: jordaniza <jordan.imran@predixa.ai>
Co-authored-by: Jordan <45881807+jordaniza@users.noreply.github.com>
clauBv23 added a commit that referenced this pull request May 13, 2024
* chore: merge develop into main (aragon#38)

* feat: copied files from the simple-storage-example-plugin repo into package/contracts

* set monorepo package.json

* fix: CI/CD

* init subgraph

* fix: CI/CD

* feat: CI/CD improvements

* feat: cleaned devDependencies

* feat: improve CI step description

* subgraph bare bone (WIP)

* feat: add subpackages and cleaned dependencies

* feat: temporary readme

* feat: move packages

* fix: wrong path

* add post install

* plugin repo only

* switch to osx-ethers

* fix missing dir issue

* make it build

* build 1

* chore: cleaning

* feat: deleted contracts-versions

* feat: refactoring

* feat: refactoring

* feat: improvements

* feat: refactoring

* fix: linting and prettier

* feat: print more infos, remove unused function

* fix: print more info

* More infos

* Renaming

* More info

* fix: test failing because of wrong default test network

* feature: add subgraph workflow

* fix: rename flows

* fix: adapt triggers

* fix: install packages first

* fix: triggers

* feat: one .env file

* fix: .env paths

* fix: remove redundant checkout

* debug: print info

* debug: attempt fix

* fix: missing env variable

* fix: triggers

* Removed summaries

* WIP

* improvements

* fix: path

* fix: empty json handling

* fix: lint warnings

* add psp and pluginRepos related mapping WIP

* refactor PSP handlers (WIP)

* refactor PSP handlers (WIP)

* refactor PSP handlers (WIP)

* refactor PSP handlers (WIP)

* clean up

* create common id functions

* clean up

* Feature: Add js client (#2)

* add dummy js-client

* update yarn.lock

* update package.json

* fix formatting

* fix comments and add js-client github actions

* update js-client test workflow

* fix test workflow

* fix lint

* update workflow

* wip

* fix comments and add implementation

* update yarn lock and remove docs workflow

* Update packages/contracts-ethers/package.json

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* Update packages/js-client/src/context.ts

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* Update packages/js-client/test/unit/context.test.ts

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* add tests

* fix comments

* fix comments

* update client-common version

* fix lint command

* Update packages/js-client/src/internal/modules/methods.ts

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* update size limit

* update gh actions

* update gh actions

* fix gh actions

* add build command

* update gh actions

* fix gh action

* fix lint

* fix lint

* ignore js-client tests

* minor fixes

---------

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* fix subgraph build

* fix lint

* map 1 event

* chore: bump package versions

* feat: added event, tests, and improved signer, renamed plugin

* fix: linting and formatting errors

* feature: support base goerli network

* Add missing migration import for setup processing

* feat: added sepolia and base support and fix IPFS returning empty strings (#10)

* feat: added sepolia and base support

* fix: replaced outdated IPFS server url

* fix: empty return value

* OS-593: refactors repo for linting and linting during workflows (#11)

* chore(OS-593): Removes .editorconfig from project root

Prettier uses its .prettierrc as a first priority to configure the
formatter

* chore(OS-593): Updates node to v18 in gitpod

* chore(OS-593): same network for subgraph and contracts

Use the same network for subgraph and contracts in the .env.example file

* chore(OS-593): configure vscode editor correctly

configures vscode to use fixed a tabsize of 4 and adds commitizen
extentions into recommendations

* chore(OS-593): reconfigures linting system to start from the root

all linting commands have to be run from the root, then eslint merges
the configs per package and lints those

* build(OS-593): refactors package.json and dependency handling

moves all linting commands to the root of the repo for proper config
merging

* chore(OS-593): adds solidity visual developer as recommmended

we recommend to use the solidity visual auditor extension for
development

* style(OS-593): fixes linting issues

fixes some linting issues in contracts and js-client

* ci(OS-593): refactor workflows and include linting

refactors workflows to be easier and includes formatting and linting in
all workflows

* style(OS-593): apply prettier formatting

* ci(OS-593): lint all packages indiviually

lints the packages individually and adds step summaries for important
steps

* ci(OS-593): remove prettier output from summary

prettiers output isn't really working with step summary

* ci(OS-593): uses now node 18 in workflows

* chore(OS-593): fix typo in formatting-linting.yml

* docs: added readme (#13)

* docs: added readme

* docs: fix typos

* Os 782 remove the contracts ethers and do rollup in mini sdk (#12)

* refactor(OS-782): removes contracts-ethers package

Removes a now unecessary contracts-ethers package. js-client creates its
own typechain now

BREAKING CHANGE: Removal of contracts-ethers

* refactor(OS-782): js-client generates typescript

js-client doesn't depend on contracts-ethers anymore and creates the
typechain typings during its own build

* test(OS-782): ganache replacment, optimizations, use native jest

replaces depricated ganache setup with hardhat for testing, removes
contract interactions where they aren't necessary, upgrades jest by not
using tsdx for testing

* ci(OS-782): fixes js-client publish and tests workflows

corrects reusable worfklow in js-client publishing workflow, adapts
js-client-tests to use the new typechain integration properly

* build(OS-782): removes contracts-ethers linting command

* chore(OS-782): applies prettier formatting

* refactor: renamed and refactored files

* refactor: skip repo creation if ENS name is already taken

* docs: added usage guide and improved comments

* ci: fix workflow by removing outdated lint

* ci: formatting & linting on every push

* docs: improve migration file comment

* ci: fix linting workflow

* build: use the same typescript version everywhere

* docs: improve usage guide

* docs: improved usage guide

* OS-754 : re-organize entity relations & add testing (#15)

* re organize entity relations

* add testing for OSx & Plugin

* remove extra files

* Update Satsuma deploy node url

* Clean up

* fix lint

* fix subgraph scripts

* fix subgraph test flow

* ci: fixed linting work flow

* add comment

* OSx: Remove redundant code

* flow: build contracts for subgraph testing

* flow: build root for subgraph testing

* flow: remove comments

* subgraph: update test constants and comments

* subgraph: refactor & add comments

* ci: skip js-client linting

* docs: fix typo

---------

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* fix(js-client): exclude dist from tsconfig.json (#20)

* fix(js-client): exclude dist from tsconfig.json

not excluding dist would result in an error trying to run tests after
the client has been built

* ci(js-client): fix missing env in build

* chore: added arbitrum and arbitrumGoerli (#18)

* chore: added arbitrum and arbitrumGoerli

* ci: fix ci pipeline by adding typescript dev dependency

* ci: fix pipeline by removing leftover contracts-ethers lint

* ci: do a global lint on every push

* fix: etherscan arbitrum name

* ci: skip js-client linting

* build: add cross-env to fix subgraph ci

* refactor: add event explicitly

* build(js-client): replaces tsdx with dts-cli (#21)

* build(js-client): replace tsdx with dts-cli
deps(js-client): update to typescript 5.2.2
deps(root): update eslint packages

* lint(js-client): fixes linting errors

* test(js-client): fixes jest-environment import

* style: apply prettier changes

* chore: bump OZ dependency (#22)

* docs: add readme and usage guide

* OS-888 fix: Import Repo address from plugin-info (#26)

* fix: Import repo address from plugin-info

* fix: fix typo

* update plugin-info.json location

* update script

* update gitignore

* update osx-ethers to version 1.3.0

* Update .gitignore

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* fix import

* remove alias import

---------

Co-authored-by: Jose Manuel Mariñas Bascoy <josemarinasbascoy@gmail.com>
Co-authored-by: josemarinas <36479864+josemarinas@users.noreply.github.com>
Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* build: clean-up of dependecy and commands  (#19)

* build: remove docker-related commands

* build: remove local subgraphs commands

* chore: bump dependencies

* build: bump OZ version and fix unmet dependencies

* Feature: Add Subgraph step-by-step guide (#25)

* add step-by-step guide

* fiux lintint

* fix comments

* fix lint

* fix: Remove individual usage

* fix: update .env.example to include Sepolia

* docs: Improve usage guide

* fix: replace arbitrumGoerli and baseGoerli with the sepolia replacements

* fix: improve usage format

* Apply suggestions from code review

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* feat: improve usage guide file structure & address comments

* fix: remove redundant titles

* fix: link dependencies in the usage guide

* fix: fix typo

* Apply suggestions from code review

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

---------

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* feat: use `osx-commons-contracts` and `osx-commons-configs` (aragon#28)

* build: use ts 5.2.2

* refactor: use osx-commons

* refactor: use osx-commons

* build: use osx-commons-sdk

* build: use osx-commons-sdk

* refactor: contract improvements

* build: print coverage report

* chore: bump osx-commons-sdk version

* feat: use the latest osx-commons-contracts

* refactor: use osx-commons-configs and deploy script refactor

* build: subgraph fix

* docs: improve .env example

* style: fix prettier

* build: use osx-commons

* chore: bump subgraph osx-ethers dependency

* chore: remove todo

* test: remove redundant expect

* fix: use unknown instead of any

* fix: imports

* fix: wrong type

* fix: import

* fix: import

* feat: use typechain binding

* refactor: deploy script simplification

* refactor: findPluginRepo and domain

* refactor: improve code, comments, and tests

* refactor: improved helpers

* style: fix linting issues

* chore: remove todos

* revert: deletion of hashHelpers

* feat: catch errors properly

* refactor: folder structure

* refactor: help gh to track files

* refactor: help gh to track files

* refactor: improve folder structure (aragon#30)

* build: remove js client (aragon#31)

* ci: clean GH flows and remove gitpod (aragon#32)

* ci: improve flows

* style: remove unused commitizen config file

* build: update yarn.lock

* docs: update README.md (aragon#33)

* docs: update README.md

* doc: improve README and USAGE_GUIDE

* doc: minor improvement

* feat: use commons subgraph (aragon#29)

* use commons subgraph

* update events folder structure

* fix comments

* fix tests

* build: update yarn.lock

---------

Co-authored-by: Michael Heuer <michael.heuer@rwth-aachen.de>

* build: improve  package.json files (aragon#34)

* feat: improvements surfaced from the admin plugin (aragon#36)

* feat: various improvements that surfaced from the admin plugin

* build: remove duplicated dependency

* ci: use network name env var

* style: throw errors for unsupported networks or missing deployments

---------

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: josemarinas <36479864+josemarinas@users.noreply.github.com>
Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>
Co-authored-by: Jør∂¡ <itsbrickpop@gmail.com>
Co-authored-by: Mathias Scherer <mathias@aragon.org>
Co-authored-by: Aaron Abu Usama <50079365+pythonpete32@users.noreply.github.com>
Co-authored-by: Jose Manuel Mariñas Bascoy <josemarinasbascoy@gmail.com>

* chore: merge `develop` into `main` (aragon#64)

* feat: copied files from the simple-storage-example-plugin repo into package/contracts

* set monorepo package.json

* fix: CI/CD

* init subgraph

* fix: CI/CD

* feat: CI/CD improvements

* feat: cleaned devDependencies

* feat: improve CI step description

* subgraph bare bone (WIP)

* feat: add subpackages and cleaned dependencies

* feat: temporary readme

* feat: move packages

* fix: wrong path

* add post install

* plugin repo only

* switch to osx-ethers

* fix missing dir issue

* make it build

* build 1

* chore: cleaning

* feat: deleted contracts-versions

* feat: refactoring

* feat: refactoring

* feat: improvements

* feat: refactoring

* fix: linting and prettier

* feat: print more infos, remove unused function

* fix: print more info

* More infos

* Renaming

* More info

* fix: test failing because of wrong default test network

* feature: add subgraph workflow

* fix: rename flows

* fix: adapt triggers

* fix: install packages first

* fix: triggers

* feat: one .env file

* fix: .env paths

* fix: remove redundant checkout

* debug: print info

* debug: attempt fix

* fix: missing env variable

* fix: triggers

* Removed summaries

* WIP

* improvements

* fix: path

* fix: empty json handling

* fix: lint warnings

* add psp and pluginRepos related mapping WIP

* refactor PSP handlers (WIP)

* refactor PSP handlers (WIP)

* refactor PSP handlers (WIP)

* refactor PSP handlers (WIP)

* clean up

* create common id functions

* clean up

* Feature: Add js client (#2)

* add dummy js-client

* update yarn.lock

* update package.json

* fix formatting

* fix comments and add js-client github actions

* update js-client test workflow

* fix test workflow

* fix lint

* update workflow

* wip

* fix comments and add implementation

* update yarn lock and remove docs workflow

* Update packages/contracts-ethers/package.json

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* Update packages/js-client/src/context.ts

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* Update packages/js-client/test/unit/context.test.ts

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* add tests

* fix comments

* fix comments

* update client-common version

* fix lint command

* Update packages/js-client/src/internal/modules/methods.ts

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* update size limit

* update gh actions

* update gh actions

* fix gh actions

* add build command

* update gh actions

* fix gh action

* fix lint

* fix lint

* ignore js-client tests

* minor fixes

---------

Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>

* fix subgraph build

* fix lint

* map 1 event

* chore: bump package versions

* feat: added event, tests, and improved signer, renamed plugin

* fix: linting and formatting errors

* feature: support base goerli network

* Add missing migration import for setup processing

* feat: added sepolia and base support and fix IPFS returning empty strings (#10)

* feat: added sepolia and base support

* fix: replaced outdated IPFS server url

* fix: empty return value

* OS-593: refactors repo for linting and linting during workflows (#11)

* chore(OS-593): Removes .editorconfig from project root

Prettier uses its .prettierrc as a first priority to configure the
formatter

* chore(OS-593): Updates node to v18 in gitpod

* chore(OS-593): same network for subgraph and contracts

Use the same network for subgraph and contracts in the .env.example file

* chore(OS-593): configure vscode editor correctly

configures vscode to use fixed a tabsize of 4 and adds commitizen
extentions into recommendations

* chore(OS-593): reconfigures linting system to start from the root

all linting commands have to be run from the root, then eslint merges
the configs per package and lints those

* build(OS-593): refactors package.json and dependency handling

moves all linting commands to the root of the repo for proper config
merging

* chore(OS-593): adds solidity visual developer as recommmended

we recommend to use the solidity visual auditor extension for
development

* style(OS-593): fixes linting issues

fixes some linting issues in contracts and js-client

* ci(OS-593): refactor workflows and include linting

refactors workflows to be easier and includes formatting and linting in
all workflows

* style(OS-593): apply prettier formatting

* ci(OS-593): lint all packages indiviually

lints the packages individually and adds step summaries for important
steps

* ci(OS-593): remove prettier output from summary

prettiers output isn't really working with step summary

* ci(OS-593): uses now node 18 in workflows

* chore(OS-593): fix typo in formatting-linting.yml

* docs: added readme (#13)

* docs: added readme

* docs: fix typos

* Os 782 remove the contracts ethers and do rollup in mini sdk (#12)

* refactor(OS-782): removes contracts-ethers package

Removes a now unecessary contracts-ethers package. js-client creates its
own typechain now

BREAKING CHANGE: Removal of contracts-ethers

* refactor(OS-782): js-client generates typescript

js-client doesn't depend on contracts-ethers anymore and creates the
typechain typings during its own build

* test(OS-782): ganache replacment, optimizations, use native jest

replaces depricated ganache setup with hardhat for testing, removes
contract interactions where they aren't necessary, upgrades jest by not
using tsdx for testing

* ci(OS-782): fixes js-client publish and tests workflows

corrects reusable worfklow in js-client publishing workflow, adapts
js-client-tests to use the new typechain integration properly

* build(OS-782): removes contracts-ethers linting command

* chore(OS-782): applies prettier formatting

* refactor: renamed and refactored files

* refactor: skip repo creation if ENS name is already taken

* docs: added usage guide and improved comments

* ci: fix workflow by removing outdated lint

* ci: formatting & linting on every push

* docs: improve migration file comment

* ci: fix linting workflow

* build: use the same typescript version everywhere

* docs: improve usage guide

* docs: improved usage guide

* OS-754 : re-organize entity relations & add testing (#15)

* re organize entity relations

* add testing for OSx & Plugin

* remove extra files

* Update Satsuma deploy node url

* Clean up

* fix lint

* fix subgraph scripts

* fix subgraph test flow

* ci: fixed linting work flow

* add comment

* OSx: Remove redundant code

* flow: build contracts for subgraph testing

* flow: build root for subgraph testing

* flow: remove comments

* subgraph: update test constants and comments

* subgraph: refactor & add comments

* ci: skip js-client linting

* docs: fix typo

---------

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* fix(js-client): exclude dist from tsconfig.json (#20)

* fix(js-client): exclude dist from tsconfig.json

not excluding dist would result in an error trying to run tests after
the client has been built

* ci(js-client): fix missing env in build

* chore: added arbitrum and arbitrumGoerli (#18)

* chore: added arbitrum and arbitrumGoerli

* ci: fix ci pipeline by adding typescript dev dependency

* ci: fix pipeline by removing leftover contracts-ethers lint

* ci: do a global lint on every push

* fix: etherscan arbitrum name

* ci: skip js-client linting

* build: add cross-env to fix subgraph ci

* refactor: add event explicitly

* build(js-client): replaces tsdx with dts-cli (#21)

* build(js-client): replace tsdx with dts-cli
deps(js-client): update to typescript 5.2.2
deps(root): update eslint packages

* lint(js-client): fixes linting errors

* test(js-client): fixes jest-environment import

* style: apply prettier changes

* chore: bump OZ dependency (#22)

* docs: add readme and usage guide

* OS-888 fix: Import Repo address from plugin-info (#26)

* fix: Import repo address from plugin-info

* fix: fix typo

* update plugin-info.json location

* update script

* update gitignore

* update osx-ethers to version 1.3.0

* Update .gitignore

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* fix import

* remove alias import

---------

Co-authored-by: Jose Manuel Mariñas Bascoy <josemarinasbascoy@gmail.com>
Co-authored-by: josemarinas <36479864+josemarinas@users.noreply.github.com>
Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* build: clean-up of dependecy and commands  (#19)

* build: remove docker-related commands

* build: remove local subgraphs commands

* chore: bump dependencies

* build: bump OZ version and fix unmet dependencies

* Feature: Add Subgraph step-by-step guide (#25)

* add step-by-step guide

* fiux lintint

* fix comments

* fix lint

* fix: Remove individual usage

* fix: update .env.example to include Sepolia

* docs: Improve usage guide

* fix: replace arbitrumGoerli and baseGoerli with the sepolia replacements

* fix: improve usage format

* Apply suggestions from code review

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* feat: improve usage guide file structure & address comments

* fix: remove redundant titles

* fix: link dependencies in the usage guide

* fix: fix typo

* Apply suggestions from code review

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

---------

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* feat: use `osx-commons-contracts` and `osx-commons-configs` (aragon#28)

* build: use ts 5.2.2

* refactor: use osx-commons

* refactor: use osx-commons

* build: use osx-commons-sdk

* build: use osx-commons-sdk

* refactor: contract improvements

* build: print coverage report

* chore: bump osx-commons-sdk version

* feat: use the latest osx-commons-contracts

* refactor: use osx-commons-configs and deploy script refactor

* build: subgraph fix

* docs: improve .env example

* style: fix prettier

* build: use osx-commons

* chore: bump subgraph osx-ethers dependency

* chore: remove todo

* test: remove redundant expect

* fix: use unknown instead of any

* fix: imports

* fix: wrong type

* fix: import

* fix: import

* feat: use typechain binding

* refactor: deploy script simplification

* refactor: findPluginRepo and domain

* refactor: improve code, comments, and tests

* refactor: improved helpers

* style: fix linting issues

* chore: remove todos

* revert: deletion of hashHelpers

* feat: catch errors properly

* refactor: folder structure

* refactor: help gh to track files

* refactor: help gh to track files

* refactor: improve folder structure (aragon#30)

* build: remove js client (aragon#31)

* ci: clean GH flows and remove gitpod (aragon#32)

* ci: improve flows

* style: remove unused commitizen config file

* build: update yarn.lock

* docs: update README.md (aragon#33)

* docs: update README.md

* doc: improve README and USAGE_GUIDE

* doc: minor improvement

* feat: use commons subgraph (aragon#29)

* use commons subgraph

* update events folder structure

* fix comments

* fix tests

* build: update yarn.lock

---------

Co-authored-by: Michael Heuer <michael.heuer@rwth-aachen.de>

* build: improve  package.json files (aragon#34)

* feat: improvements surfaced from the admin plugin (aragon#36)

* feat: various improvements that surfaced from the admin plugin

* build: remove duplicated dependency

* ci: use network name env var

* style: throw errors for unsupported networks or missing deployments

* feat: update the env examples to change the infura api key for the alchemy one

* feat: update the hardhat contracts file to use the new commons networks config

* feat: update the hardhat config to use the new addRpcUrlToNetwork function from the config commons package

* feat: update the config commons dependency version

* ci: update the readme to add the new alchemy api key needed

* feat: add new commons config version

* ci: typo

* Update .env.example

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* Update README.md

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* feat: update the api key in the workflows

* ci: update readme

* feat: bump commons config version on subgraph

* feat: update the actions to run over the PR changes  instead of the commit changes

* ci: comment to check the pipeline

* ci: undo the last comment added on the readme

* feature: improvements (aragon#44)

* doc: added missing comment

* build: remove redundant dependency

* feat: add a function to generate a random ens, set the ens to the plugin settings

* feat: bump commons config version in subgraph

* feat: add random name function

* refactor: settings

---------

Co-authored-by: Claudia <claudiabarcelovaldes40@gmail.com>

* feat: add manifest with psp address for missing networks and add the Plugin address to the json

* feat: update the script for getting the repo address

* feat: update the readme

* feat: update the deployment script to avoid deploying if the plugin address is not set

* ci update comment

* feat: change the manifest data json struct

* feat: change the script to get the correct params from the manifest data

* featL change to ens name

* feat: remove the ens domain due to it is not used

* feat: update deploy script to get the correct repo address

* feat: added IAction to template

* feat: bump matchstick version

* fix: remove deprecated networks

* fix: update the repository in the placeholder

* fix: local deploy script problem with `generateRandomName`  (aragon#53)

* fix: error on local deployment

* refactor: move generateName to avoid circular dependency

* refactor: split upgrade repo script into two (aragon#60)

* refactor: renamed file

* refactor: extract skip function

* refactor: renaming and commenting

* style: satisfy linter

* chore: maintained guide

* refactor: don't alias

* fix: wrong import

* fix: change the execution order so that reinitialization happens by default

* refactor: common steps

* refactor: remove IAction (aragon#61)

* f: removed IAction from template as is opinonated solution

* style: add empty line at EOF

---------

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>

* chore: refactor helpers (aragon#57)

* refactor: delete hashHelpers

* style: fix linter

* fix: import

* build: bump OZ dependency

* chore: bump osx-commons-sdk dependency

* chore: bumped commons-contracts

* chore: bump osx-commons-sdk version (aragon#62)

* chore: sync with `osx-commons` (aragon#63)

* chore: bump osx-commons-sdk version

* chore: bump osx-commons

* fix: yarn lock

* chore: removed networks (aragon#65)

---------

Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: josemarinas <36479864+josemarinas@users.noreply.github.com>
Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>
Co-authored-by: Jør∂¡ <itsbrickpop@gmail.com>
Co-authored-by: Mathias Scherer <mathias@aragon.org>
Co-authored-by: Aaron Abu Usama <50079365+pythonpete32@users.noreply.github.com>
Co-authored-by: Jose Manuel Mariñas Bascoy <josemarinasbascoy@gmail.com>
Co-authored-by: Claudia <claudiabarcelovaldes40@gmail.com>
Co-authored-by: jordaniza <jordan.imran@predixa.ai>
Co-authored-by: Jordan <45881807+jordaniza@users.noreply.github.com>

* ci: remove not needed code (aragon#66)

* ci: remove the module name and version (aragon#67)

---------

Co-authored-by: Michael Heuer <20623991+Michael-A-Heuer@users.noreply.github.com>
Co-authored-by: Rekard0 <5880388+Rekard0@users.noreply.github.com>
Co-authored-by: josemarinas <36479864+josemarinas@users.noreply.github.com>
Co-authored-by: Jør∂¡ <4456749+brickpop@users.noreply.github.com>
Co-authored-by: Jør∂¡ <itsbrickpop@gmail.com>
Co-authored-by: Mathias Scherer <mathias@aragon.org>
Co-authored-by: Aaron Abu Usama <50079365+pythonpete32@users.noreply.github.com>
Co-authored-by: Jose Manuel Mariñas Bascoy <josemarinasbascoy@gmail.com>
Co-authored-by: jordaniza <jordan.imran@predixa.ai>
Co-authored-by: Jordan <45881807+jordaniza@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants