Documentation ¶
Index ¶
- func EthereumChainIDStrings() []string
- func HookFunc() mapstructure.DecodeHookFuncType
- func IsOptimismSuperchain(chainID uint64) bool
- func NetworkStrings() []string
- func ParseNetworkAndChainIDFromString(networkString string) (Network, EthereumChainID)
- type EthereumChainID
- func (i EthereumChainID) IsAEthereumChainID() bool
- func (i EthereumChainID) MarshalJSON() ([]byte, error)
- func (i EthereumChainID) MarshalYAML() (interface{}, error)
- func (i *EthereumChainID) Scan(value interface{}) error
- func (i EthereumChainID) String() string
- func (i *EthereumChainID) UnmarshalJSON(data []byte) error
- func (i *EthereumChainID) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (i EthereumChainID) Value() (driver.Value, error)
- func (EthereumChainID) Values() []string
- type Network
- func (i Network) IsANetwork() bool
- func (i Network) MarshalJSON() ([]byte, error)
- func (i Network) MarshalYAML() (interface{}, error)
- func (n Network) Protocol() Protocol
- func (i *Network) Scan(value interface{}) error
- func (i Network) String() string
- func (i *Network) UnmarshalJSON(data []byte) error
- func (n *Network) UnmarshalParam(param string) error
- func (i *Network) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (i Network) Value() (driver.Value, error)
- func (Network) Values() []string
- type Protocol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EthereumChainIDStrings ¶
func EthereumChainIDStrings() []string
EthereumChainIDStrings returns a slice of all String values of the enum
func HookFunc ¶
func HookFunc() mapstructure.DecodeHookFuncType
func IsOptimismSuperchain ¶
func NetworkStrings ¶
func NetworkStrings() []string
NetworkStrings returns a slice of all String values of the enum
func ParseNetworkAndChainIDFromString ¶ added in v0.4.2
func ParseNetworkAndChainIDFromString(networkString string) (Network, EthereumChainID)
ParseNetworkAndChainIDFromString returns the Network and its corresponding EthereumChainID based on a string network name.
Types ¶
type EthereumChainID ¶
type EthereumChainID uint64
const ( EthereumChainIDArbitrum EthereumChainID = 42161 // arbitrum EthereumChainIDAvalanche EthereumChainID = 43114 // avax EthereumChainIDBase EthereumChainID = 8453 // base EthereumChainIDBinanceSmartChain EthereumChainID = 56 // binance-smart-chain EthereumChainIDCrossbell EthereumChainID = 3737 // crossbell EthereumChainIDGnosis EthereumChainID = 100 // gnosis EthereumChainIDLinea EthereumChainID = 59144 // linea EthereumChainIDMainnet EthereumChainID = 1 // ethereum EthereumChainIDOptimism EthereumChainID = 10 // optimism EthereumChainIDPolygon EthereumChainID = 137 // polygon EthereumChainIDSatoshiVM EthereumChainID = 3109 // savm EthereumChainIDVSL EthereumChainID = 12553 // vsl EthereumChainIDXLayer EthereumChainID = 196 // x-layer )
func EthereumChainIDString ¶
func EthereumChainIDString(s string) (EthereumChainID, error)
EthereumChainIDString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func EthereumChainIDValues ¶
func EthereumChainIDValues() []EthereumChainID
EthereumChainIDValues returns all values of the enum
func (EthereumChainID) IsAEthereumChainID ¶
func (i EthereumChainID) IsAEthereumChainID() bool
IsAEthereumChainID returns "true" if the value is listed in the enum definition. "false" otherwise
func (EthereumChainID) MarshalJSON ¶
func (i EthereumChainID) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for EthereumChainID
func (EthereumChainID) MarshalYAML ¶
func (i EthereumChainID) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler for EthereumChainID
func (*EthereumChainID) Scan ¶
func (i *EthereumChainID) Scan(value interface{}) error
func (EthereumChainID) String ¶
func (i EthereumChainID) String() string
func (*EthereumChainID) UnmarshalJSON ¶
func (i *EthereumChainID) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for EthereumChainID
func (*EthereumChainID) UnmarshalYAML ¶
func (i *EthereumChainID) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler for EthereumChainID
func (EthereumChainID) Values ¶
func (EthereumChainID) Values() []string
type Network ¶
type Network uint64
const ( Unknown Network = iota // unknown Arbitrum // arbitrum Arweave // arweave Avalanche // avax Base // base BinanceSmartChain // binance-smart-chain Bitcoin // bitcoin Crossbell // crossbell Ethereum // ethereum Farcaster // farcaster Gnosis // gnosis Linea // linea Mastodon // mastodon Near // near Optimism // optimism Polygon // polygon RSSHub // rsshub SatoshiVM // savm VSL // vsl XLayer // x-layer Bluesky // bluesky )
func NetworkString ¶
NetworkString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func (Network) IsANetwork ¶
IsANetwork returns "true" if the value is listed in the enum definition. "false" otherwise
func (Network) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface for Network
func (Network) MarshalYAML ¶
MarshalYAML implements a YAML Marshaler for Network
func (*Network) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for Network
func (*Network) UnmarshalParam ¶
func (*Network) UnmarshalYAML ¶
UnmarshalYAML implements a YAML Unmarshaler for Network
type Protocol ¶ added in v0.5.11
type Protocol string