From abfd73b6b53a03a8dc1dd1b09b776aa813e1fe09 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 15:06:01 +0000 Subject: [PATCH 1/3] Initial plan From ae4a892bc5ff14375f36ea6cfc6ba65171a6a290 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 15:15:41 +0000 Subject: [PATCH 2/3] Add URL and description fields to all substreams.yaml templates Co-authored-by: maoueh <123014+maoueh@users.noreply.github.com> --- base_state.go | 32 +++++++++++++++++++ .../templates/sql/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/sql/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ sol-anchor/templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ .../templates/substreams.yaml.gotmpl | 2 ++ 20 files changed, 70 insertions(+) diff --git a/base_state.go b/base_state.go index 1b5c324..3a4125b 100644 --- a/base_state.go +++ b/base_state.go @@ -112,3 +112,35 @@ func (p *BaseConversationState) IsChainTestnet() bool { func (c *BaseConversationState) IsValidChainInput(input string) bool { return networks.GetSubstreamsRegistry().Find(input) != nil } + +// GetPackageURL generates a probable GitHub URL for the project based on the project name and chain. +// Returns a URL in the format: https://github.com/username/{project-name}-{chain} +func (p *BaseConversationState) GetPackageURL() string { + if p.Name == "" { + return "" + } + + chainSuffix := "" + if p.ChainName != "" { + chainSuffix = "-" + p.ChainName + } + + return "https://github.com/username/" + p.Name + chainSuffix +} + +// GetPackageDescription generates a description for the package based on the project name and chain. +// Returns a description like: "Substreams module for {project-name} on {chain-display-name}" +func (p *BaseConversationState) GetPackageDescription() string { + if p.Name == "" { + return "Substreams module" + } + + desc := "Substreams module for " + p.Name + + chainDisplay := p.ChainDisplayName() + if chainDisplay != "" { + desc += " on " + chainDisplay + } + + return desc +} diff --git a/evm-events-calls-raw/templates/sql/substreams.yaml.gotmpl b/evm-events-calls-raw/templates/sql/substreams.yaml.gotmpl index 1440a3c..0730317 100644 --- a/evm-events-calls-raw/templates/sql/substreams.yaml.gotmpl +++ b/evm-events-calls-raw/templates/sql/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: sql: https://github.com/streamingfast/substreams-sink-sql/releases/download/protodefs-v{{ .SQLImportVersion }}/substreams-sink-sql-protodefs-v{{ .SQLImportVersion }}.spkg diff --git a/evm-events-calls-raw/templates/substreams.yaml.gotmpl b/evm-events-calls-raw/templates/substreams.yaml.gotmpl index 3e83a07..c506e18 100644 --- a/evm-events-calls-raw/templates/substreams.yaml.gotmpl +++ b/evm-events-calls-raw/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: ethcommon: https://spkg.io/streamingfast/ethereum-common-v0.3.3.spkg diff --git a/evm-events-calls/templates/sql/substreams.yaml.gotmpl b/evm-events-calls/templates/sql/substreams.yaml.gotmpl index 1440a3c..0730317 100644 --- a/evm-events-calls/templates/sql/substreams.yaml.gotmpl +++ b/evm-events-calls/templates/sql/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: sql: https://github.com/streamingfast/substreams-sink-sql/releases/download/protodefs-v{{ .SQLImportVersion }}/substreams-sink-sql-protodefs-v{{ .SQLImportVersion }}.spkg diff --git a/evm-events-calls/templates/substreams.yaml.gotmpl b/evm-events-calls/templates/substreams.yaml.gotmpl index 7e431cf..4d2c22d 100644 --- a/evm-events-calls/templates/substreams.yaml.gotmpl +++ b/evm-events-calls/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: ethcommon: https://spkg.io/streamingfast/ethereum-common-v0.3.3.spkg diff --git a/evm-hello-world/templates/substreams.yaml.gotmpl b/evm-hello-world/templates/substreams.yaml.gotmpl index 379319e..9b6f09a 100644 --- a/evm-hello-world/templates/substreams.yaml.gotmpl +++ b/evm-hello-world/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} protobuf: files: diff --git a/injective-events/templates/substreams.yaml.gotmpl b/injective-events/templates/substreams.yaml.gotmpl index 679842d..0832db5 100644 --- a/injective-events/templates/substreams.yaml.gotmpl +++ b/injective-events/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .Name }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: injective: https://github.com/streamingfast/substreams-foundational-modules/releases/download/injective-common-v0.2.5/injective-common-v0.2.5.spkg diff --git a/injective-hello-world/templates/substreams.yaml.gotmpl b/injective-hello-world/templates/substreams.yaml.gotmpl index 2afbb44..ecabc0e 100644 --- a/injective-hello-world/templates/substreams.yaml.gotmpl +++ b/injective-hello-world/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: cosmos: https://github.com/streamingfast/substreams-cosmos/releases/download/v0.1.5/cosmos-v0.1.5.spkg diff --git a/mantra-events/templates/substreams.yaml.gotmpl b/mantra-events/templates/substreams.yaml.gotmpl index 010bc8a..b2ba873 100644 --- a/mantra-events/templates/substreams.yaml.gotmpl +++ b/mantra-events/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .Name }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: mantra: https://spkg.io/streamingfast/mantra-common-v0.1.1.spkg diff --git a/mantra-hello-world/templates/substreams.yaml.gotmpl b/mantra-hello-world/templates/substreams.yaml.gotmpl index 2afbb44..ecabc0e 100644 --- a/mantra-hello-world/templates/substreams.yaml.gotmpl +++ b/mantra-hello-world/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: cosmos: https://github.com/streamingfast/substreams-cosmos/releases/download/v0.1.5/cosmos-v0.1.5.spkg diff --git a/near-hello-world/templates/substreams.yaml.gotmpl b/near-hello-world/templates/substreams.yaml.gotmpl index 84b77a9..e5394e8 100644 --- a/near-hello-world/templates/substreams.yaml.gotmpl +++ b/near-hello-world/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: my_project version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} protobuf: files: diff --git a/sol-anchor/templates/substreams.yaml.gotmpl b/sol-anchor/templates/substreams.yaml.gotmpl index 3e345ae..3a3d093 100644 --- a/sol-anchor/templates/substreams.yaml.gotmpl +++ b/sol-anchor/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: solana: https://spkg.io/streamingfast/solana-common-v0.3.3.spkg diff --git a/sol-hello-world/templates/substreams.yaml.gotmpl b/sol-hello-world/templates/substreams.yaml.gotmpl index b1f0b14..ebfb53e 100644 --- a/sol-hello-world/templates/substreams.yaml.gotmpl +++ b/sol-hello-world/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: solana: https://spkg.io/streamingfast/solana-common-v0.3.3.spkg diff --git a/sol-transactions/templates/substreams.yaml.gotmpl b/sol-transactions/templates/substreams.yaml.gotmpl index e3439a1..a9ab84e 100644 --- a/sol-transactions/templates/substreams.yaml.gotmpl +++ b/sol-transactions/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .Name }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: solana: https://spkg.io/streamingfast/solana-common-v0.3.3.spkg diff --git a/starknet-events/templates/substreams.yaml.gotmpl b/starknet-events/templates/substreams.yaml.gotmpl index 7e70e29..1b66d87 100644 --- a/starknet-events/templates/substreams.yaml.gotmpl +++ b/starknet-events/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .Name }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: starknet: https://spkg.io/streamingfast/starknet-foundational-v0.1.4.spkg diff --git a/starknet-hello-world/templates/substreams.yaml.gotmpl b/starknet-hello-world/templates/substreams.yaml.gotmpl index 3457fa2..9c63e37 100644 --- a/starknet-hello-world/templates/substreams.yaml.gotmpl +++ b/starknet-hello-world/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: starknet: https://spkg.io/streamingfast/starknet-foundational-v0.1.4.spkg diff --git a/stellar-minimal/templates/substreams.yaml.gotmpl b/stellar-minimal/templates/substreams.yaml.gotmpl index daa8337..a7ee237 100644 --- a/stellar-minimal/templates/substreams.yaml.gotmpl +++ b/stellar-minimal/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: stellar: https://github.com/streamingfast/substreams-foundational-modules/releases/download/stellar-foundational-v0.5.0/stellar-foundational-v0.5.0.spkg diff --git a/stellar-transactions-operations/templates/substreams.yaml.gotmpl b/stellar-transactions-operations/templates/substreams.yaml.gotmpl index e267af0..920da35 100644 --- a/stellar-transactions-operations/templates/substreams.yaml.gotmpl +++ b/stellar-transactions-operations/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: stellar: stellar-foundational@v0.5.0 diff --git a/tron-hello-world/templates/substreams.yaml.gotmpl b/tron-hello-world/templates/substreams.yaml.gotmpl index 23521a3..65676d4 100644 --- a/tron-hello-world/templates/substreams.yaml.gotmpl +++ b/tron-hello-world/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: my_project version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: tron: https://spkg.io/v1/packages/tron_foundational/v0.1.2 # Input the Tron foundational modules (which allow you to filter on trasanctions) diff --git a/tron-transactions/templates/substreams.yaml.gotmpl b/tron-transactions/templates/substreams.yaml.gotmpl index eb11489..a71f236 100644 --- a/tron-transactions/templates/substreams.yaml.gotmpl +++ b/tron-transactions/templates/substreams.yaml.gotmpl @@ -2,6 +2,8 @@ specVersion: v0.1.0 package: name: {{ .GetModuleName }} version: v0.1.0 + url: {{ .GetPackageURL }} + description: {{ .GetPackageDescription }} imports: tron: https://spkg.io/v1/packages/tron_foundational/v0.1.2 From 1039d6ef8024b48bf03d52496d1ec2cf99126423 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 13 Jan 2026 15:20:10 +0000 Subject: [PATCH 3/3] Address code review feedback: improve comments for helper methods Co-authored-by: maoueh <123014+maoueh@users.noreply.github.com> --- base_state.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/base_state.go b/base_state.go index 3a4125b..30dadca 100644 --- a/base_state.go +++ b/base_state.go @@ -114,7 +114,8 @@ func (c *BaseConversationState) IsValidChainInput(input string) bool { } // GetPackageURL generates a probable GitHub URL for the project based on the project name and chain. -// Returns a URL in the format: https://github.com/username/{project-name}-{chain} +// Returns a URL in the format: https://github.com/username/{Name}-{ChainName} +// The 'username' is a placeholder that users should update with their actual GitHub username or organization. func (p *BaseConversationState) GetPackageURL() string { if p.Name == "" { return "" @@ -129,7 +130,8 @@ func (p *BaseConversationState) GetPackageURL() string { } // GetPackageDescription generates a description for the package based on the project name and chain. -// Returns a description like: "Substreams module for {project-name} on {chain-display-name}" +// Returns a description using the Name field and ChainDisplayName() method result. +// Example: "Substreams module for my-project on Ethereum Mainnet" func (p *BaseConversationState) GetPackageDescription() string { if p.Name == "" { return "Substreams module"