Documentation ¶
Index ¶
- Constants
- func Byte32ToString(bytes [32]byte) string
- func ChainId() string
- func ChainIdWithEIP155() string
- func EIP155ChainID() *big.Int
- func GetCrossChainMetadataManyToOne(name, symbol string, decimals uint32, aliases ...string) banktypes.Metadata
- func GetCrossChainMetadataOneToOne(name, denom, symbol string, decimals uint32) banktypes.Metadata
- func GetDefGasPrice() sdk.Coin
- func GetDefaultNodeHome() string
- func GetFXMetaData() banktypes.Metadata
- func GetIbcDenomTrace(denom string, channelIBC string) (ibctransfertypes.DenomTrace, error)
- func MustStrToByte32(str string) [32]byte
- func ParseAddress(addr string) (accAddr sdk.AccAddress, isEvmAddr bool, err error)
- func SetChainId(id string)
- func SetConfig(isCosmosCoinType bool)
- func Sha256Hex(b []byte) string
- func StrToByte32(s string) ([32]byte, error)
- func ValidateMetadata(md banktypes.Metadata) error
- func VerifyAddressFormat(bz []byte) error
- type FxTarget
Constants ¶
View Source
const ( Name = "fxcore" AddressPrefix = "fx" EnvPrefix = "FX" DefaultDenom = "FX" DenomUnit = 18 AddrLen = 20 )
View Source
const ( LegacyERC20Target = "module/evm" ERC20Target = "erc20" GravityTarget = "gravity" EthTarget = "eth" LegacyChainPrefix = "chain/" IBCPrefix = "ibc/" )
View Source
const ( MainnetChainId = "fxcore" MainnetGenesisHash = "56629F685970FEC1E35521FC943ACE9AEB2C53448544A0560E4DD5799E1A5593" MainnetBlockHeightV2 = 5_713_000 MainnetBlockHeightV3 = 8_756_000 MainnetBlockHeightV4 = 10_477_500 MainnetBlockHeightV5 = 11_601_700 MainnetBlockHeightV6 = 13_598_000 MainnetBlockHeightV7 = 16_838_000 )
mainnet
View Source
const ( TestnetChainId = "dhobyghaut" TestnetGenesisHash = "06D0A9659E1EC5B0E57E8E2E5F1B1266094808BC9B4081E1A55011FEF4586ACE" TestnetBlockHeightV2 = 3_418_880 TestnetBlockHeightV3 = 6_578_000 TestnetBlockHeightV4 = 8_088_000 TestnetBlockHeightV41 = 8_376_000 // v4.1 TestnetBlockHeightV42 = 8_481_000 // v4.2 TestnetBlockHeightV5 = 9_773_000 TestnetBlockHeightV6 = 11_701_000 TestnetBlockHeightV7 = 12_961_500 TestnetBlockHeightV71 = 14_369_500 // v7.1 TestnetBlockHeightV72 = 14_389_000 // v7.2 TestnetBlockHeightV73 = 14_551_500 // v7.3 TestnetBlockHeightV74 = 15_614_000 // v7.4 TestnetBlockHeightV75 = 15_660_500 // v7.5 )
testnet
Variables ¶
This section is empty.
Functions ¶
func Byte32ToString ¶
func ChainIdWithEIP155 ¶
func ChainIdWithEIP155() string
func EIP155ChainID ¶
func GetDefGasPrice ¶
func GetDefaultNodeHome ¶
func GetDefaultNodeHome() string
func GetFXMetaData ¶
func GetIbcDenomTrace ¶
func GetIbcDenomTrace(denom string, channelIBC string) (ibctransfertypes.DenomTrace, error)
func MustStrToByte32 ¶
func ParseAddress ¶
func ParseAddress(addr string) (accAddr sdk.AccAddress, isEvmAddr bool, err error)
func SetChainId ¶
func SetChainId(id string)
func StrToByte32 ¶
func ValidateMetadata ¶
func VerifyAddressFormat ¶
VerifyAddressFormat verifies whether the address is compatible with Ethereum
Types ¶
type FxTarget ¶
type FxTarget struct { Prefix string SourcePort string SourceChannel string // contains filtered or unexported fields }
func ParseFxTarget ¶
func (FxTarget) IBCValidate ¶
Click to show internal directories.
Click to hide internal directories.