core

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capitalize

func Capitalize(s string) string

Capitalize uppercases the first character of s.

func ContractOutputPath

func ContractOutputPath(basePath, versionPath, packageName string) string

ContractOutputPath builds the output file path for a generated contract operations file.

func VersionToPath

func VersionToPath(version string) string

VersionToPath converts a semver string to a directory path segment.

func WriteGoFile

func WriteGoFile(path string, src []byte) error

WriteGoFile formats src as Go source and writes it to path, creating parent directories.

Types

type ChainFamilyHandler

type ChainFamilyHandler interface {
	Generate(config Config, tmpl *template.Template) error
}

ChainFamilyHandler abstracts all chain-specific generation logic.

type Config

type Config struct {
	Version     string    `yaml:"version"`
	ChainFamily string    `yaml:"chain_family"` // defaults to "evm"
	Input       yaml.Node `yaml:"input"`
	Output      yaml.Node `yaml:"output"`
	Contracts   yaml.Node `yaml:"contracts"`
	ConfigDir   string    `yaml:"-"`
}

Config holds the top-level generator configuration. Input/Output/Contracts are raw YAML nodes so handlers own their own schemas.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL