streamingfast / substreams

Powerful Blockchain streaming data engine, based on StreamingFast Firehose technology.
Apache License 2.0
166 stars 46 forks source link

`substreams init` default project name should be derived from folder name #552

Open maoueh opened 1 month ago

maoueh commented 1 month ago

Right now, substreams init generates file in the current directly. It's likely that the folder's name is the Substreams project's name.

Instead of hardcoding my_project, use something like strings.ReplaceAll(sanitizeProjectNameFromParentFolder(filepath.Base(filepath.Dir(os.Getcwd()))), "-", "_") .