Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

accessor.gno

0.62 Kb · 23 lines
 1package governance
 2
 3import (
 4	"gno.land/r/gnoswap/gov/staker"
 5)
 6
 7type govStakerAccessor struct{}
 8
 9func (g *govStakerAccessor) GetTotalDelegationAmountAtSnapshot(snapshotTime int64) (int64, bool) {
10	return staker.GetTotalDelegationAmountAtSnapshot(snapshotTime)
11}
12
13func (g *govStakerAccessor) GetUserDelegationAmountAtSnapshot(userAddr address, snapshotTime int64) (int64, bool) {
14	return staker.GetUserDelegationAmountAtSnapshot(userAddr, snapshotTime)
15}
16
17func (g *govStakerAccessor) GetTotalxGnsSupply() int64 {
18	return staker.GetTotalxGnsSupply()
19}
20
21func newGovStakerAccessor() GovStakerAccessor {
22	return &govStakerAccessor{}
23}