Documentation ¶
Index ¶
- Constants
- func Byte32ToString(bytes [32]byte) string
- func ChainId() string
- func ChainIdWithEIP155() string
- func EIP155ChainID() *big.Int
- func GetCrossChainMetadata(name, symbol string, decimals uint32, aliases ...string) banktypes.Metadata
- func GetDefGasPrice() sdk.Coin
- func GetDefaultNodeHome() string
- func GetFXMetaData(denom string) banktypes.Metadata
- func GetIbcDenomTrace(denom string, channelIBC string) (ibctransfertypes.DenomTrace, error)
- func IsEmptyHash(hash string) bool
- func IsZeroEthereumAddress(address string) bool
- func MustABIJson(str string) abi.ABI
- func MustDecodeHex(str string) []byte
- func MustStrToByte32(str string) [32]byte
- func SetChainId(id string)
- func SetConfig(isCosmosCoinType bool)
- func Sha256Hex(b []byte) string
- func StrToByte32(s string) ([32]byte, error)
- func ValidateEthereumAddress(address string) error
- func ValidateMetadata(md banktypes.Metadata) error
- type Contract
- type FxTarget
- type Router
- type TransactionHook
Constants ¶
View Source
const ( Name = "fxcore" AddressPrefix = "fx" EnvPrefix = "FX" DefaultDenom = "FX" DenomUnit = 18 )
View Source
const ( EmptyEvmAddress = "0x0000000000000000000000000000000000000000" FIP20LogicAddress = "0x0000000000000000000000000000000000001001" WFXLogicAddress = "0x0000000000000000000000000000000000001002" StakingAddress = "0x0000000000000000000000000000000000001003" CrossChainAddress = "0x0000000000000000000000000000000000001004" )
View Source
const ( // EthereumContractAddressLen is the length of contract address strings EthereumContractAddressLen = 42 // EthereumAddressPrefix is the address prefix address EthereumAddressPrefix = "0x" )
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 )
mainnet
View Source
const ( TestnetChainId = "dhobyghaut" TestnetGenesisHash = "06D0A9659E1EC5B0E57E8E2E5F1B1266094808BC9B4081E1A55011FEF4586ACE" TestnetBlockHeightV2 = 3_418_880 TestnetBlockHeightV3 = 6_578_000 TestnetBlockHeightV4 = 8_088_000 TestnetBlockHeightV41 = 8_376_000 TestnetBlockHeightV42 = 8_481_000 TestnetBlockHeightV5 = 9_773_000 )
testnet
Variables ¶
This section is empty.
Functions ¶
func Byte32ToString ¶
func ChainIdWithEIP155 ¶
func ChainIdWithEIP155() string
func EIP155ChainID ¶
func GetCrossChainMetadata ¶
func GetDefGasPrice ¶
func GetDefaultNodeHome ¶
func GetDefaultNodeHome() string
func GetFXMetaData ¶
func GetIbcDenomTrace ¶
func GetIbcDenomTrace(denom string, channelIBC string) (ibctransfertypes.DenomTrace, error)
func IsEmptyHash ¶
IsEmptyHash returns true if the hash corresponds to an empty ethereum hex hash.
func IsZeroEthereumAddress ¶
IsZeroEthereumAddress returns true if the address corresponds to an empty ethereum hex address.
func MustABIJson ¶
func MustDecodeHex ¶
func MustStrToByte32 ¶
func SetChainId ¶
func SetChainId(id string)
func StrToByte32 ¶
func ValidateEthereumAddress ¶
ValidateEthereumAddress validates the ethereum address strings
func ValidateMetadata ¶
Types ¶
type Contract ¶
func GetERC1967Proxy ¶
func GetERC1967Proxy() Contract
type FxTarget ¶
type FxTarget struct { Prefix string SourcePort string SourceChannel string // contains filtered or unexported fields }
func ParseFxTarget ¶
func (FxTarget) IBCValidate ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
type TransactionHook ¶
type TransactionHook interface { TransferAfter(ctx sdk.Context, sender sdk.AccAddress, receive string, coins, fee sdk.Coin, originToken bool) error PrecompileCancelSendToExternal(ctx sdk.Context, txID uint64, sender sdk.AccAddress) (sdk.Coin, error) PrecompileIncreaseBridgeFee(ctx sdk.Context, txID uint64, sender sdk.AccAddress, addBridgeFee sdk.Coin) error }
Click to show internal directories.
Click to hide internal directories.