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

Refactor project manifest file #463

Closed
ianhe8x opened this issue Sep 1, 2021 · 1 comment
Closed

Refactor project manifest file #463

ianhe8x opened this issue Sep 1, 2021 · 1 comment
Milestone

Comments

@ianhe8x
Copy link
Collaborator

ianhe8x commented Sep 1, 2021

From the view of subquery developer, even though they need an archive node when developing the project, the endpoint is not necessary bond to this subquery project. That means if he decides to use managed indexing service from 3rd party, he is not responsible to provide the chain node endpoint.

Goals:

  1. Separate endpoint, dictionary into runtimeConfig.yaml (and passed from cli only, with default search place)
  2. Separate type definition into its own file
  3. Explicitly specify target network in the manifest file
  4. use genesisHash to identify network
  5. chainName for known chains
  6. deprecate support of specName filter
  7. Allow project.yaml use other file name, if a subquery project supports both polkadot and kusama, they can create project-polkadot.yaml and project-kusama.yaml.
  8. Define entry of mapping function in project.yaml, decouple it from package.json

Suggest

# project.yaml
specVersion: "0.2.0"
description: ""
repository: "https://github.com/subquery/subql-starter"

schema:
  file: ./schema.graphql

network:
  genesisHash: '0x'
  chaintypes:
    file: ./types.json

dataSources:
  - name: main
    kind: substrate/Runtime
    startBlock: 1
    mapping:
      file: dist/index.js
      handlers:
        - handler: handleBlock
          kind: substrate/BlockHandler
        - handler: handleEvent
          kind: substrate/EventHandler
          filter: #Filter is optional
            module: balances
            method: Deposit
        - handler: handleCall
          kind: substrate/CallHandler
@ianhe8x ianhe8x added this to the 1.0.0 milestone Sep 12, 2021
@ianhe8x ianhe8x changed the title Seperate network endpoints from manifest file Refactor project manifest file Sep 13, 2021
@stwiname
Copy link
Collaborator

I think it would be good to have a version field to this to help decouple from package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants