compiler

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package runtime provides the execution environment for smart contracts.

Index

Constants

This section is empty.

Variables

View Source
var RestrictedCommentPrefixes []string = []string{
	"go ",
	"+build",
	"-build",
	"go:",
	"// +build",
	"//line",
	"//export",
	"//extern",
	"//cgo",
	"//syscall",
	"//unsafe",
	"//runtime",
	"//internal",
	"//vendor",
}
View Source
var WASM_CONTRACT_TEMPLATE string

Functions

This section is empty.

Types

type Maker

type Maker struct {
	// contains filtered or unexported fields
}

Maker handles the compilation and validation of smart contracts.

func NewMaker

func NewMaker(config api.ContractConfig) *Maker

NewMaker creates a new contract maker with the given configuration.

func (*Maker) CompileContract

func (m *Maker) CompileContract(code []byte) ([]byte, error)

CompileContract compiles the given contract source code.

func (*Maker) ValidateContract

func (m *Maker) ValidateContract(code []byte) error

ValidateContract checks if the smart contract code adheres to the restrictions and rules defined for the VM.

Directories

Path Synopsis
WebAssembly Contract Communication Wrapper Layer Provides standard interfaces for smart contracts to communicate with the host environment
WebAssembly Contract Communication Wrapper Layer Provides standard interfaces for smart contracts to communicate with the host environment

Jump to

Keyboard shortcuts

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