gnovm

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: UNKNOWN not legal advice Imports: 0 Imported by: 0

README

GnoVM -- Gnolang Virtual Machine

GnoVM is a virtual machine that interprets Gnolang, a custom version of Golang optimized for blockchains, featuring automatic state management, full determinism, and idiomatic Go. It works with Tendermint2 and enables smarter, more modular, and transparent appchains with embedded smart-contracts. It can be used in TendermintCore, forks, and non-Cosmos blockchains.

Read the "Intro to Gnoland" blogpost.

This folder focuses on the VM, language, stdlibs, tests, and tools, independent of the blockchain. This enables non-web3 developers to contribute without requiring an understanding of the broader context.

Language Features

  • Like interpreted Go, but more ambitious.
  • Completely deterministic, for complete accountability.
  • Transactional persistence across data realms.
  • Designed for concurrent blockchain smart contracts systems.

Getting started

Install gno and refer to the examples folder to start developing contracts.

Check the Makefile to enhance GnoVM, Gnolang, and stdlibs.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Package = amino.RegisterPackage(amino.NewPackage(
	"github.com/gnolang/gno/gnovm",
	"gnovm",
	amino.GetCallersDirname(),
).WithDependencies().WithTypes(

	MemFile{}, "MemFile",
	MemPackage{}, "MemPackage",
))

Functions

func SplitFilepath

func SplitFilepath(filepath string) (dirpath string, filename string)

Splits a path into the dirpath and filename.

Types

type MemFile

type MemFile struct {
	Name string `json:"name" yaml:"name"`
	Body string `json:"body" yaml:"body"`
}

type MemPackage

type MemPackage struct {
	Name  string     `json:"name" yaml:"name"` // package name as declared by `package`
	Path  string     `json:"path" yaml:"path"` // import path
	Files []*MemFile `json:"files" yaml:"files"`
}

MemPackage represents the information and files of a package which will be stored in memory. It will generally be initialized by package gnolang's ReadMemPackage.

NOTE: in the future, a MemPackage may represent updates/additional-files for an existing package.

func (*MemPackage) GetFile

func (mempkg *MemPackage) GetFile(name string) *MemFile

func (*MemPackage) IsEmpty

func (mempkg *MemPackage) IsEmpty() bool

func (*MemPackage) Validate

func (mempkg *MemPackage) Validate() error

path must not contain any dots after the first domain component. file names must contain dots. NOTE: this is to prevent conflicts with nested paths.

Jump to

Keyboard shortcuts

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