Documentation
¶
Index ¶
- Variables
- func X_deriveStorageDepositAddr(pkgPath string) string
- func X_emit(m *gno.Machine, typ string, attrs []string)
- func X_packageAddress(pkgPath string) string
- func X_pubKeyAddress(bech32PubKey string) (addr string, errStr string)
- type Event
- type EventAttribute
- type StorageDepositEvent
- type StorageUnlockEvent
Constants ¶
This section is empty.
Variables ¶
View Source
var Package = amino.RegisterPackage(amino.NewPackage( "github.com/gnolang/gno/gnovm/stdlibs/chain", "tm", amino.GetCallersDirname(), ). WithDependencies( abci.Package, ). WithTypes( EventAttribute{}, Event{}, StorageDepositEvent{}, StorageUnlockEvent{}, ))
Functions ¶
func X_packageAddress ¶
func X_pubKeyAddress ¶
X_pubKeyAddress derives the bech32 address from a bech32-encoded public key. Returns ("", errStr) on error — the gno wrapper translates to a Go-side error or address cast.
Used by r/sys/params.GetValsetEntries to parse "<bech32-pubkey>:<power>" entries from valset:current. The function is narrow on purpose: bech32 decode + amino unmarshal + Address() derivation are not safely doable in pure gno (amino-decode is not exposed to gno), so this is the only chain-side primitive needed for that use case.
Types ¶
type Event ¶
type Event struct {
Type string `json:"type"`
Attributes []EventAttribute `json:"attrs"`
PkgPath string `json:"pkg_path"`
}
func (Event) AssertABCIEvent ¶
func (e Event) AssertABCIEvent()
type EventAttribute ¶
type StorageDepositEvent ¶
type StorageDepositEvent struct {
BytesDelta int64 `json:"bytes_delta"`
FeeDelta std.Coin `json:"fee_delta"`
PkgPath string `json:"pkg_path"`
}
StorageDepositEvent is emitted when a storage deposit fee is locked.
func (StorageDepositEvent) AssertABCIEvent ¶
func (e StorageDepositEvent) AssertABCIEvent()
type StorageUnlockEvent ¶
type StorageUnlockEvent struct {
// For unlock, BytesDelta is negative
BytesDelta int64 `json:"bytes_delta"`
FeeRefund std.Coin `json:"fee_refund"`
PkgPath string `json:"pkg_path"`
// RefundWithheld is true if the refund was retained because of token lock
RefundWithheld bool `json:"refund_withheld"`
}
StorageUnlockEvent is emitted when a storage deposit fee is unlocked.
func (StorageUnlockEvent) AssertABCIEvent ¶
func (e StorageUnlockEvent) AssertABCIEvent()
Click to show internal directories.
Click to hide internal directories.