getters.gno
1.48 Kb · 39 lines
1package ucs03_zkgm
2
3import (
4 types "gno.land/p/onbloc/ibc/union/types"
5 tb "gno.land/p/onbloc/ibc/union/zkgm/tokenbucket"
6 u256 "gno.land/p/onbloc/math/uint256"
7)
8
9// GetTokenBucket returns a snapshot of the rate-limit bucket configured for denom.
10func GetTokenBucket(denom string) (*tb.TokenBucket, error) {
11 return mustGetImpl().GetTokenBucket(denom)
12}
13
14// GetChannelBalanceV2 returns the escrow balance for the v2 channel-balance key.
15func GetChannelBalanceV2(channelId types.ChannelId, path *u256.Uint, baseToken string, quoteToken []byte) (*u256.Uint, error) {
16 return mustGetImpl().GetChannelBalanceV2(channelId, path, baseToken, quoteToken)
17}
18
19// GetLockedTokenAmount returns the total terminally locked base-token amount for denom.
20func GetLockedTokenAmount(denom string) (*u256.Uint, error) {
21 return mustGetImpl().GetLockedTokenAmount(denom)
22}
23
24// GetVoucherList returns a page of up to count wrapped voucher tokens starting
25// at offset, ordered by denom.
26func GetVoucherList(offset, count int) ([]VoucherInfo, error) {
27 return mustGetImpl().GetVoucherList(offset, count)
28}
29
30// GetVoucherInfo returns a snapshot of the single wrapped voucher registered for ibcDenom.
31func GetVoucherInfo(ibcDenom string) (VoucherInfo, error) {
32 return mustGetImpl().GetVoucherInfo(ibcDenom)
33}
34
35// GetVoucherSize returns the total number of registered vouchers, i.e. the
36// key count callers need to drive GetVoucherList's offset/count pagination.
37func GetVoucherSize() (int, error) {
38 return mustGetImpl().GetVoucherSize()
39}