assets

package
v1.4.0-rc-1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(
	networks map[uint64]*parser.Network,
	bridgeAccountId string,
	hederaFeePercentages map[string]int64,
	routerClients map[uint64]client.DiamondRouter,
	mirrorNode client.MirrorNode,
	evmTokenClients map[uint64]map[string]client.EvmFungibleToken,
	evmNftClients map[uint64]map[string]client.EvmNft,
) *Service

func (*Service) FetchEvmFungibleReserveAmount

func (a *Service) FetchEvmFungibleReserveAmount(
	networkId uint64,
	assetAddress string,
	isNative bool,
	evmTokenClient client.EvmFungibleToken,
	routerContractAddress string,
) (inLowestDenomination *big.Int, err error)

func (*Service) FetchEvmNonFungibleReserveAmount

func (a *Service) FetchEvmNonFungibleReserveAmount(
	networkId uint64,
	assetAddress string,
	isNative bool,
	evmTokenClient client.EvmNft,
	routerContractAddress string,
) (inLowestDenomination *big.Int, err error)

func (*Service) FetchHederaTokenReserveAmount

func (a *Service) FetchHederaTokenReserveAmount(
	assetId string,
	mirrorNode client.MirrorNode,
	isNative bool,
	hederaTokenBalances map[string]int,
) (reserveAmount *big.Int, err error)

func (*Service) FungibleAssetInfo

func (a *Service) FungibleAssetInfo(networkId uint64, assetAddressOrId string) (assetInfo *assetModel.FungibleAssetInfo, exist bool)

func (*Service) FungibleNativeAsset

func (a *Service) FungibleNativeAsset(nativeChainId uint64, nativeAssetAddress string) *assetModel.NativeAsset

func (*Service) FungibleNetworkAssets

func (a *Service) FungibleNetworkAssets() map[uint64][]string

func (*Service) FungibleNetworkAssetsByChainId

func (a *Service) FungibleNetworkAssetsByChainId(chainId uint64) []string

func (*Service) IsNative

func (a *Service) IsNative(networkId uint64, asset string) bool

func (*Service) NativeToWrapped

func (a *Service) NativeToWrapped(nativeAsset string, nativeChainId, targetChainId uint64) string

func (*Service) NativeToWrappedAssets

func (a *Service) NativeToWrappedAssets() map[uint64]map[string]map[uint64]string

func (*Service) NonFungibleAssetInfo

func (a *Service) NonFungibleAssetInfo(networkId uint64, assetAddressOrId string) (assetInfo *assetModel.NonFungibleAssetInfo, exist bool)

func (*Service) NonFungibleNetworkAssets

func (a *Service) NonFungibleNetworkAssets() map[uint64][]string

func (*Service) OppositeAsset

func (a *Service) OppositeAsset(chainOne uint64, chainTwo uint64, asset string) string

func (*Service) WrappedFromNative

func (a *Service) WrappedFromNative(nativeChainId uint64, nativeAsset string) map[uint64]string

func (*Service) WrappedToNative

func (a *Service) WrappedToNative(wrappedAsset string, wrappedChainId uint64) *assetModel.NativeAsset

Jump to

Keyboard shortcuts

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