Documentation ¶
Index ¶
- Constants
- Variables
- func Byte32ToString(bytes [32]byte) string
- func ChainId() string
- func EIP155ChainID() *big.Int
- func GetCrossChainMetadata(name, symbol string, decimals uint32, denom string) banktypes.Metadata
- func GetFXMetaData(denom string) banktypes.Metadata
- func GetMetadata() []banktypes.Metadata
- func IBCRouteBlock() int64
- func IsEmptyHash(hash string) bool
- func IsZeroEthereumAddress(address string) bool
- func SafeInt64(value uint64) (int64, error)
- func SetChainId(id string)
- func SetConfig(isCosmosCoinType bool)
- func StringToByte32(str string) [32]byte
- func SupportDenomManyToOneMsgTypes() []string
- func UpgradeExponential1Block() int64
- func UpgradeExponential2Block() int64
- func UpgradeTrigonometric1Block() int64
- func UpgradeTrigonometric2Block() int64
- func ValidateEthereumAddress(address string) error
- type Contract
- type Fip20TargetType
- type TargetIBC
- type TransferCrossChainEvent
- func (event *TransferCrossChainEvent) GetAmount(denom string) sdk.Coin
- func (event *TransferCrossChainEvent) GetFee(denom string) sdk.Coin
- func (event *TransferCrossChainEvent) GetFrom() sdk.AccAddress
- func (event *TransferCrossChainEvent) GetTarget() (Fip20TargetType, string)
- func (event *TransferCrossChainEvent) TotalAmount(denom string) sdk.Coins
Constants ¶
View Source
const ( Name = "fxcore" AddressPrefix = "fx" DefaultDenom = "FX" DenomUnit = 18 )
View Source
const ( EmptyEvmAddress = "0x0000000000000000000000000000000000000000" FIP20LogicAddress = "0x0000000000000000000000000000000000001001" WFXLogicAddress = "0x0000000000000000000000000000000000001002" )
View Source
const ( // EthereumContractAddressLen is the length of contract address strings EthereumContractAddressLen = 42 // EthereumAddressPrefix is the address prefix address EthereumAddressPrefix = "0x" )
View Source
const ( FIP20TransferToChainPrefix = "chain/" FIP20TransferToIBCPrefix = "ibc/" )
View Source
const (
FIP20EventTransferCrossChain = "TransferCrossChain"
)
View Source
const (
MainnetChainId = "fxcore"
)
mainnet
View Source
const (
TestnetChainId = "dhobyghaut"
)
testnet
Variables ¶
View Source
var ( // BypassMinFeeMsgTypesKey defines the configuration key for the // BypassMinFeeMsgTypes value. // nolint: gosec BypassMinFeeMsgTypesKey = "bypass-min-fee.msg-types" BypassMinFeeMsgMaxGasUsageKey = "bypass-min-fee.msg-max-gas-usage" )
View Source
var (
EthereumAddressRegular = regexp.MustCompile("^0x[0-9a-fA-F]{40}$")
)
Functions ¶
func Byte32ToString ¶
func EIP155ChainID ¶
func GetCrossChainMetadata ¶
func GetFXMetaData ¶
func GetMetadata ¶
func IBCRouteBlock ¶
func IBCRouteBlock() int64
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 SetChainId ¶
func SetChainId(id string)
func StringToByte32 ¶
func SupportDenomManyToOneMsgTypes ¶ added in v2.2.0
func SupportDenomManyToOneMsgTypes() []string
SupportDenomManyToOneMsgTypes return msg types use method return to prevent accidental modification
func UpgradeExponential1Block ¶ added in v2.3.1
func UpgradeExponential1Block() int64
func UpgradeExponential2Block ¶ added in v2.3.1
func UpgradeExponential2Block() int64
func UpgradeTrigonometric1Block ¶ added in v2.3.1
func UpgradeTrigonometric1Block() int64
func UpgradeTrigonometric2Block ¶ added in v2.3.1
func UpgradeTrigonometric2Block() int64
func ValidateEthereumAddress ¶
ValidateEthereumAddress validates the ethereum address strings
Types ¶
type Contract ¶
func GetERC1967Proxy ¶
func GetERC1967Proxy() Contract
func GetInitContracts ¶
func GetInitContracts() []Contract
type Fip20TargetType ¶
type Fip20TargetType int
const ( FIP20TargetUnknown Fip20TargetType = iota FIP20TargetChain FIP20TargetIBC )
func (Fip20TargetType) String ¶
func (tt Fip20TargetType) String() string
type TransferCrossChainEvent ¶
type TransferCrossChainEvent struct { From common.Address Recipient string Amount *big.Int Fee *big.Int Target [32]byte }
func (*TransferCrossChainEvent) GetAmount ¶
func (event *TransferCrossChainEvent) GetAmount(denom string) sdk.Coin
func (*TransferCrossChainEvent) GetFee ¶
func (event *TransferCrossChainEvent) GetFee(denom string) sdk.Coin
func (*TransferCrossChainEvent) GetFrom ¶
func (event *TransferCrossChainEvent) GetFrom() sdk.AccAddress
func (*TransferCrossChainEvent) GetTarget ¶
func (event *TransferCrossChainEvent) GetTarget() (Fip20TargetType, string)
func (*TransferCrossChainEvent) TotalAmount ¶
func (event *TransferCrossChainEvent) TotalAmount(denom string) sdk.Coins
Source Files ¶
Click to show internal directories.
Click to hide internal directories.