Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Port int `mapstructure:"port"` RPCURL string `mapstructure:"rpcURL"` Ticker string `mapstructure:"ticker"` TokenAddress string `mapstructure:"tokenAddress"` TokenMintBlockNumber uint64 `mapstructure:"tokenMintBlockNumber"` ExcludedAddresses []string `mapstructure:"excludedAddresses"` SDLPool string `mapstructure:"sdlPool"` VestingAddresses []string `mapstructure:"vestingAddresses"` }
Config object
func LoadConfig ¶
LoadConfig returns the initialised config from file
type TokenSupply ¶
type TokenSupply struct { ETHClient *ethclient.Client Config *Config ERC20 *abi.ERC20 Uncirculating []Uncirculating // contains filtered or unexported fields }
TokenSupply represents application memory state
func NewTokenSupply ¶
func NewTokenSupply(configPath string, uncirculating ...Uncirculating) (*TokenSupply, error)
NewTokenSupply returns a new instance of the app
func (*TokenSupply) CirculatingSupply ¶
func (t *TokenSupply) CirculatingSupply() *big.Float
CirculatingSupply returns the circulating supply of the token
func (*TokenSupply) Start ¶
func (t *TokenSupply) Start() error
Start will start the app refreshing token supply
func (*TokenSupply) TotalSupply ¶
func (t *TokenSupply) TotalSupply() *big.Float
TotalSupply returns the total supply of the token
type Uncirculating ¶
type Uncirculating interface { Init(t *TokenSupply) error Uncirculating() (*big.Int, error) }
Uncirculating is an interface for plugins that exclude tokens to calculate circulating supply
Click to show internal directories.
Click to hide internal directories.