defi

package module
v0.0.0-...-a9af343 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 4 Imported by: 0

README

defi-utilities

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainID

type ChainID uint64
const (
	MAINNET         ChainID = 1        // Mainnet
	GOERLI          ChainID = 5        // Goerli
	SEPOLIA         ChainID = 11155111 // Sepolia
	OPTIMISM        ChainID = 10       // Optimism
	OPTIMISM_GOERLI ChainID = 420      // Optimism Goerli
	ARBITRUM_ONE    ChainID = 42161    // Arbitrum One
	ARBITRUM_GOERLI ChainID = 421611   // Arbitrum Goerli
	POLYGON         ChainID = 137      // Polygon
	POLYGON_MUMBAI  ChainID = 80001    // Polygon Mumbai
	CELO            ChainID = 42220    // Celo
	CELO_ALFAJORES  ChainID = 44787    // Celo Alfajores
	GNOSIS          ChainID = 60       // Gnosis
	MOONBEAM        ChainID = 1284     // Moonbeam
	BNB             ChainID = 56       // Binance Smart Chain
	AVALANCHE       ChainID = 43114    // Avalanche
	BASE_GOERLI     ChainID = 84531    // Base Goerli
	BASE            ChainID = 8453     // Base
	KAVA_EVM        ChainID = 2222     // Kava
)

func (ChainID) Big

func (c ChainID) Big() *big.Int

type Token

type Token struct {
	// contains filtered or unexported fields
}

func NewToken

func NewToken(chainID ChainID, address string, decimals int64, symbol string, name string, bypassChecksum bool) *Token

func (*Token) Address

func (currency *Token) Address() common.Address

func (*Token) ChainID

func (currency *Token) ChainID() ChainID

func (*Token) Decimals

func (currency *Token) Decimals() int64

func (*Token) Equals

func (currency *Token) Equals(other *Token) bool

func (*Token) GetWrapped

func (currency *Token) GetWrapped() *Token

func (*Token) IsNative

func (currency *Token) IsNative() bool

func (*Token) IsToken

func (currency *Token) IsToken() bool

func (*Token) Name

func (currency *Token) Name() string

func (*Token) SortsBefore

func (currency *Token) SortsBefore(other *Token) (bool, error)

func (*Token) Symbol

func (currency *Token) Symbol() string

Directories

Path Synopsis
standard

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL