Documentation
¶
Index ¶
- func AddTimeStampToFileName(fileName string) string
- func CompileWorkflowToWasm(workflowPath string) ([]byte, error)
- func ComputeHashKey(owner common.Address, workflowName string) [32]byte
- func DeleteFileIfExists(filePath string) error
- func EnsureTool(bin string) error
- func GetDirectoryName() (string, error)
- func GetWorkflowLanguage(inputFile string) string
- func IsBinaryFile(fileName string) (bool, error)
- func ResolveWorkflowPath(workflowDir, pathFromYAML string) (absPath string, err error)
- func SimTransactOpts() *bind.TransactOpts
- func ToStringSlice(args []any) []string
- func ValidateEventSignature(l *zerolog.Logger, tx *seth.DecodedTransaction, e abi.Event) (bool, int)
- func ValidatePrivateKey(key string) error
- func WorkflowPathRootAndMain(workflowPath string) (rootDir, mainFile string, err error)
- func WriteChangesetFile(fileName string, changesetFile *inttypes.ChangesetFile, ...) error
- func WriteJsonToFile(j interface{}, filePath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddTimeStampToFileName ¶
func CompileWorkflowToWasm ¶ added in v1.1.0
CompileWorkflowToWasm compiles the workflow at workflowPath and returns the WASM binary. It runs the sequence of commands from getBuildCmds (make build + copy for WASM, or single build for Go/TS), then reads the temp WASM file.
func DeleteFileIfExists ¶
func EnsureTool ¶ added in v1.0.2
EnsureTool checks that the binary exists on PATH
func GetDirectoryName ¶
func GetWorkflowLanguage ¶
GetWorkflowLanguage determines the workflow language based on the file extension Note: inputFile can be a file path (e.g., "main.ts", "main.go", or "workflow.wasm") or a directory (for Go workflows, e.g., ".") Returns constants.WorkflowLanguageTypeScript for .ts or .tsx files, constants.WorkflowLanguageWasm for .wasm files, constants.WorkflowLanguageGolang otherwise
func IsBinaryFile ¶
There is only a small group of acceptable file extensions by this tool and only few of them are considered to be binary files
func ResolveWorkflowPath ¶ added in v1.1.0
ResolveWorkflowPath turns a workflow-path value from YAML (e.g. "." or "main.ts") into an absolute path to the main file. When pathFromYAML is "." or "", looks for main.go then main.ts under workflowDir. Callers can use GetWorkflowLanguage on the result to get the language.
func SimTransactOpts ¶
func SimTransactOpts() *bind.TransactOpts
SimTransactOpts is useful to generate just the calldata for a given gethwrapper method.
func ToStringSlice ¶
toStringSlice converts a slice of any type to a slice of strings. If an element is a byte slice, it prints it as hex.
func ValidateEventSignature ¶
func ValidatePrivateKey ¶
ValidatePrivateKey validates the input string is a valid Ethereum private key
func WorkflowPathRootAndMain ¶ added in v1.1.0
WorkflowPathRootAndMain returns the absolute root directory and main file name for a workflow path (e.g. "workflowName/main.go" -> rootDir, "main.go"). Use with GetWorkflowLanguage(mainFile) for consistent language detection.
func WriteChangesetFile ¶ added in v1.0.6
func WriteJsonToFile ¶
Types ¶
This section is empty.