Skip to content

Conversation

@rodrigombsoares
Copy link
Contributor

Summary

This PR implements a registry generator, which will generate a contracts_registry.go file containing a map of packagemodulefunction nameFunctionInfo struct.

Features

  • Implements registry generator
  • Generates registry for current bindings

Testing

go run ./cmd/registergen/main.go --input=bindings --output=bindings/bind

1. **Scans** all `.go` files in the bindings directory
2. **Extracts** `const FunctionInfo = \`...\`` declarations using regex
3. **Parses** the JSON function metadata
4. **Generates** `contracts_registry.go` with a structured map and helper functions
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think contracts_registry.go should live inside bindings/contracts_registry.go, but there's a platform_secondary.go misplaced there.

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

Successfully merging this pull request may close these issues.

1 participant