syncabi

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package syncabi fetches contract ABIs from the upstream FilOzone/filecoin-services repository and regenerates the Go bindings under internal/contracts/.

Index

Constants

View Source
const (
	// DefaultRepo is the upstream ABI source of truth for generated bindings.
	DefaultRepo = "FilOzone/filecoin-services"
	// DefaultRef pins the upstream ABI commit used to regenerate bindings.
	// Upgrade flow: update this ref, run `make generate-contracts`, then commit abi.json and bindings.go.
	DefaultRef = "ed85348ebad54196b5bfefc5cb0dbe7e8bfd6f7c"
)

Variables

This section is empty.

Functions

func DefaultBaseURL

func DefaultBaseURL(ref string) string

DefaultBaseURL builds a raw.githubusercontent.com URL for the given git ref. Supported ref forms:

  • 40-char lower-hex commit SHA (passed verbatim)
  • ref fragment like "heads/<branch>" or "tags/<tag>"
  • fully-qualified ref like "refs/heads/<branch>" or "refs/tags/<tag>"
  • bare branch name (anything else)

Note: a bare ref such as "refs/main" is invalid on GitHub's raw server, so a plain branch name must NOT be prefixed with refs/.

func Sync

func Sync(ctx context.Context, cfg Config) error

Types

type Config

type Config struct {
	BaseURL string
	Ref     string
	RootDir string
	Client  *http.Client
}

type ContractSpec

type ContractSpec struct {
	PackageName string
	UpstreamABI string
	MergeErrors bool
}

Jump to

Keyboard shortcuts

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