Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentRealm ¶
CurrentRealm retrieves the current realm's address and pkgPath. It's not a native binding; but is used as a helper function here and elsewhere to clarify usage.
Types ¶
type BankerInterface ¶
type BankerInterface interface { GetCoins(addr crypto.Bech32Address) (dst std.Coins) SendCoins(from, to crypto.Bech32Address, amt std.Coins) TotalCoin(denom string) int64 IssueCoin(addr crypto.Bech32Address, denom string, amount int64) RemoveCoin(addr crypto.Bech32Address, denom string, amount int64) }
type ExecContext ¶
type ExecContext struct { ChainID string ChainDomain string Height int64 Timestamp int64 // seconds TimestampNano int64 // nanoseconds, only used for testing. OriginCaller crypto.Bech32Address OriginSend std.Coins OriginSendSpent *std.Coins // mutable Banker BankerInterface Params ParamsInterface EventLogger *sdk.EventLogger }
func GetContext ¶
func GetContext(m *gno.Machine) ExecContext
GetContext returns the context from the Gno machine.
func (ExecContext) GetExecContext ¶
func (e ExecContext) GetExecContext() ExecContext
GetContext returns the execution context. This is used to allow extending the exec context using interfaces, for instance when testing.
type ExecContexter ¶
type ExecContexter interface {
GetExecContext() ExecContext
}
ExecContexter is a type capable of returning the parent ExecContext. When using these standard libraries, m.Context should always implement this interface. This can be obtained by embedding ExecContext.
type ParamsInterface ¶
Click to show internal directories.
Click to hide internal directories.