constant

package
v0.0.0-...-bd3dd7f Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexerCommandName = "indexer"
	RelayerCommandName = "relayer"
)
View Source
const (
	SNXDecimals = 18
	SNXSymbol   = "SNX"
)
View Source
const (
	SUSDDecimals = 18
	SUSDSymbol   = "sUSD"
)
View Source
const (
	USDTDecimalsInEthereum = 6
	USDTDecimalsInArbitrum = 6
	USDTDecimalsInOptimism = 6
	USDTDecimalsInPolygon  = 6
	BUSDDecimalsInBSC      = 18
)
View Source
const (
	USDTAddressInEthereum = "0xdAC17F958D2ee523a2206206994597C13D831ec7"
	USDTAddressInPolygon  = "0xc2132D05D31c914a87C6611C10748AEb04B58e8F"
	USDTAddressInArbitrum = "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"
	USDTAddressInOptimism = "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58"
	BUSDAddressInBSC      = "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56"
)
View Source
const (
	EthereumDecimals = 18
)

Variables

This section is empty.

Functions

func ChainID

func ChainID(network Network) uint64

func ERC1155InterfaceID

func ERC1155InterfaceID() [4]byte

func ERC20AllowanceMethod

func ERC20AllowanceMethod() common.Hash

func ERC20ApprovalEvent

func ERC20ApprovalEvent() common.Hash

func ERC20ApproveMethod

func ERC20ApproveMethod() common.Hash

func ERC20BalanceOfMethod

func ERC20BalanceOfMethod() common.Hash

func ERC20MustEventIDs

func ERC20MustEventIDs() map[string]struct{}

func ERC20MustMethodIDs

func ERC20MustMethodIDs() map[string]struct{}

func ERC20TotalSupplyMethod

func ERC20TotalSupplyMethod() common.Hash

func ERC20TransderFromMethod

func ERC20TransderFromMethod() common.Hash

func ERC20TransferEvent

func ERC20TransferEvent() common.Hash

func ERC20TransferMethod

func ERC20TransferMethod() common.Hash

func ERC721InterfaceID

func ERC721InterfaceID() [4]byte

func ERC721MetadataInterfaceID

func ERC721MetadataInterfaceID() [4]byte

func ERC721MustEventIDs

func ERC721MustEventIDs() map[string]struct{}

func ERC721MustMethodIDs

func ERC721MustMethodIDs() map[string]struct{}

func EthereumAddress

func EthereumAddress() common.Address

func NetworkStrings

func NetworkStrings() []string

NetworkStrings returns a slice of all String values of the enum

func Opposite

func Opposite(number *big.Int) *big.Int

func USDContractAddress

func USDContractAddress(network Network) common.Address

func USDDecimals

func USDDecimals(network Network) uint8

func UniswapPostitionTransferEvent

func UniswapPostitionTransferEvent() common.Hash

func ZeroAddress

func ZeroAddress() common.Address

func ZeroBigInt

func ZeroBigInt() *big.Int

Types

type Network

type Network int64
const (
	NetworkEthereum        Network = 1
	NetworkGoerli          Network = 5
	NetworkOptimism        Network = 10
	NetworkBSC             Network = 56
	NetworkEthereumClassic Network = 61
	NetworkPolygon         Network = 137
	NetworkBase            Network = 8453
	NetworkArbitrumOne     Network = 42161
	NetworkArbitrumNova    Network = 42170
	NetworkBaseGoerli      Network = 84531
)

func NetworkString

func NetworkString(s string) (Network, error)

NetworkString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func NetworkValues

func NetworkValues() []Network

NetworkValues returns all values of the enum

func (Network) IsANetwork

func (i Network) IsANetwork() bool

IsANetwork returns "true" if the value is listed in the enum definition. "false" otherwise

func (Network) MarshalJSON

func (i Network) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for Network

func (Network) String

func (i Network) String() string

func (*Network) UnmarshalJSON

func (i *Network) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for Network

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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