Documentation
¶
Index ¶
- Variables
- func EndBlocker(vmk vm.VMKeeperI) func(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func GetNodeReadiness(n *node.Node) <-chan struct{}
- func InitChainer(baseApp *sdk.BaseApp, acctKpr auth.AccountKeeperI, bankKpr bank.BankKeeperI, ...) func(sdk.Context, abci.RequestInitChain) abci.ResponseInitChain
- func LoadGenesisTxsFile(path string, chainID string, genesisRemote string) ([]std.Tx, error)
- func LoadPackage(pkg gnomod.Pkg, creator bft.Address, fee std.Fee, deposit std.Coins) (std.Tx, error)
- func LoadPackagesFromDir(dir string, creator bft.Address, fee std.Fee) ([]std.Tx, error)
- func NewApp(dataRootDir string, skipFailingGenesisTxs bool, logger *slog.Logger, ...) (abci.Application, error)
- func NewAppWithOptions(cfg *AppOptions) (abci.Application, error)
- func NewDefaultGenesisConfig(pk crypto.PubKey, chainid string) *bft.GenesisDoc
- func NewDefaultTMConfig(rootdir string) *tmcfg.Config
- func NewInMemoryNode(logger *slog.Logger, cfg *InMemoryNodeConfig) (*node.Node, error)
- func NewMockedPrivValidator() bft.PrivValidator
- func NoopGenesisTxHandler(ctx sdk.Context, tx std.Tx, res sdk.Result)
- func PanicOnFailingTxHandler(ctx sdk.Context, tx std.Tx, res sdk.Result)
- func ProtoGnoAccount() std.Account
- type AppOptions
- type Balance
- type Balances
- func (bs Balances) Get(address crypto.Address) (balance Balance, ok bool)
- func (bs Balances) LeftMerge(from Balances)
- func (bs Balances) List() []Balance
- func (bs Balances) LoadFromEntries(entries ...string) error
- func (bs Balances) LoadFromSheet(sheet io.Reader) error
- func (bs Balances) Set(address crypto.Address, amount std.Coins)
- type GenesisTxHandler
- type GnoAccount
- type GnoGenesisState
- type InMemoryNodeConfig
Constants ¶
This section is empty.
Variables ¶
var ( ErrBalanceEmptyAddress = errors.New("balance address is empty") ErrBalanceEmptyAmount = errors.New("balance amount is empty") )
var Package = amino.RegisterPackage(amino.NewPackage( "github.com/gnolang/gno/gno.land/pkg/gnoland", "gno", amino.GetCallersDirname(), ).WithDependencies().WithTypes( &GnoAccount{}, "Account", GnoGenesisState{}, "GenesisState", ))
Functions ¶
func EndBlocker ¶
func EndBlocker(vmk vm.VMKeeperI) func(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
XXX not used yet.
func GetNodeReadiness ¶
GetNodeReadiness waits until the node is ready, signaling via the EventNewBlock event. XXX: This should be replace by https://github.com/gnolang/gno/pull/1216
func InitChainer ¶
func InitChainer(baseApp *sdk.BaseApp, acctKpr auth.AccountKeeperI, bankKpr bank.BankKeeperI, resHandler GenesisTxHandler) func(sdk.Context, abci.RequestInitChain) abci.ResponseInitChain
InitChainer returns a function that can initialize the chain with genesis.
func LoadGenesisTxsFile ¶
LoadGenesisTxsFile loads genesis transactions from the provided file path. XXX: Improve the way we generate and load this file
func LoadPackage ¶
func LoadPackage(pkg gnomod.Pkg, creator bft.Address, fee std.Fee, deposit std.Coins) (std.Tx, error)
LoadPackage loads a single package into a `std.Tx`
func LoadPackagesFromDir ¶
LoadPackagesFromDir loads gno packages from a directory. It creates and returns a list of transactions based on these packages.
func NewApp ¶
func NewApp(dataRootDir string, skipFailingGenesisTxs bool, logger *slog.Logger, maxCycles int64) (abci.Application, error)
NewApp creates the GnoLand application.
func NewAppWithOptions ¶
func NewAppWithOptions(cfg *AppOptions) (abci.Application, error)
NewApp creates the GnoLand application.
func NewDefaultGenesisConfig ¶
func NewDefaultGenesisConfig(pk crypto.PubKey, chainid string) *bft.GenesisDoc
NewInMemoryNodeConfig creates a default configuration for an in-memory node.
func NewDefaultTMConfig ¶
func NewInMemoryNode ¶
NewInMemoryNode creates an in-memory gnoland node. In this mode, the node does not persist any data and uses an in-memory database. The `InMemoryNodeConfig.TMConfig.RootDir` should point to the correct gno repository to load the stdlibs.
func NewMockedPrivValidator ¶
func NewMockedPrivValidator() bft.PrivValidator
NewMockedPrivValidator generate a new key
func PanicOnFailingTxHandler ¶
func ProtoGnoAccount ¶
Types ¶
type AppOptions ¶
type AppOptions struct { DB dbm.DB // `gnoRootDir` should point to the local location of the gno repository. // It serves as the gno equivalent of GOROOT. GnoRootDir string GenesisTxHandler GenesisTxHandler Logger *slog.Logger MaxCycles int64 }
func NewAppOptions ¶
func NewAppOptions() *AppOptions
type Balance ¶
func LoadGenesisBalancesFile ¶
LoadGenesisBalancesFile loads genesis balances from the provided file path.
func (Balance) MarshalAmino ¶
func (*Balance) UnmarshalAmino ¶
type Balances ¶
func GetBalancesFromEntries ¶
func NewBalances ¶
func NewBalances() Balances
func (Balances) LoadFromEntries ¶
LoadFromEntries extracts the balance entries in the form of <address>=<amount>
func (Balances) LoadFromSheet ¶
LoadFromSheet extracts the balance sheet from the passed in balance sheet file, that has the format of <address>=<amount>ugnot
type GnoAccount ¶
type GnoAccount struct {
std.BaseAccount
}
type GnoGenesisState ¶
type InMemoryNodeConfig ¶
type InMemoryNodeConfig struct { PrivValidator bft.PrivValidator // identity of the validator Genesis *bft.GenesisDoc TMConfig *tmcfg.Config GenesisTxHandler GenesisTxHandler GenesisMaxVMCycles int64 }