Documentation ¶
Index ¶
- type MockAssetsService
- func (mas *MockAssetsService) FetchEvmFungibleReserveAmount(networkId uint64, assetAddress string, isNative bool, ...) (inLowestDenomination *big.Int, err error)
- func (mas *MockAssetsService) FetchEvmNonFungibleReserveAmount(networkId uint64, assetAddress string, isNative bool, ...) (inLowestDenomination *big.Int, err error)
- func (mas *MockAssetsService) FetchHederaTokenReserveAmount(assetId string, mirrorNode client.MirrorNode, isNative bool, ...) (reserveAmount *big.Int, err error)
- func (mas *MockAssetsService) FungibleAssetInfo(networkId uint64, assetAddress string) (assetInfo *assetModel.FungibleAssetInfo, exist bool)
- func (mas *MockAssetsService) FungibleNativeAsset(chainId uint64, nativeAssetAddress string) *assetModel.NativeAsset
- func (mas *MockAssetsService) FungibleNetworkAssets() map[uint64][]string
- func (mas *MockAssetsService) FungibleNetworkAssetsByChainId(chainId uint64) []string
- func (mas *MockAssetsService) IsNative(chainId uint64, assetAddress string) bool
- func (mas *MockAssetsService) NativeToWrapped(nativeAssetAddress string, nativeChainId, targetChainId uint64) string
- func (mas *MockAssetsService) NativeToWrappedAssets() map[uint64]map[string]map[uint64]string
- func (mas *MockAssetsService) NonFungibleAssetInfo(networkId uint64, assetAddress string) (assetInfo *assetModel.NonFungibleAssetInfo, exist bool)
- func (mas *MockAssetsService) NonFungibleNetworkAssets() map[uint64][]string
- func (mas *MockAssetsService) OppositeAsset(sourceChainId uint64, targetChainId uint64, assetAddress string) string
- func (mas *MockAssetsService) WrappedFromNative(nativeChainId uint64, nativeAssetAddress string) map[uint64]string
- func (mas *MockAssetsService) WrappedToNative(wrappedAssetAddress string, wrappedChainId uint64) *assetModel.NativeAsset
- type MockBridgeConfigService
- type MockBurnService
- type MockDistrubutorService
- type MockFeeService
- type MockLockService
- type MockMessageService
- func (m *MockMessageService) ProcessSignature(transferID, signature string, targetChainId uint64, timestamp int64, ...) error
- func (m *MockMessageService) SanityCheckFungibleSignature(tm *proto.TopicEthSignatureMessage) (bool, error)
- func (m *MockMessageService) SanityCheckNftSignature(tm *proto.TopicEthNftSignatureMessage) (bool, error)
- func (m *MockMessageService) SignFungibleMessage(transfer payload.Transfer) ([]byte, error)
- func (m *MockMessageService) SignNftMessage(transfer payload.Transfer) ([]byte, error)
- type MockPricingService
- func (mas *MockPricingService) FetchAndUpdateNftFeesForApi() error
- func (mas *MockPricingService) FetchAndUpdateUsdPrices() error
- func (mas *MockPricingService) GetHederaNftFee(token string) (int64, bool)
- func (mas *MockPricingService) GetHederaNftPrevFee(token string) (int64, bool)
- func (mas *MockPricingService) GetMinAmountsForAPI() map[uint64]map[string]string
- func (mas *MockPricingService) GetTokenPriceInfo(networkId uint64, tokenAddressOrId string) (priceInfo pricing.TokenPriceInfo, exist bool)
- func (mas *MockPricingService) NftFees() map[uint64]map[string]pricing.NonFungibleFee
- type MockPrometheusService
- func (mps *MockPrometheusService) ConstructMetricName(sourceNetworkId, targetNetworkId uint64, ...) (string, error)
- func (mps *MockPrometheusService) CreateCounterIfNotExists(opts prometheus.CounterOpts) prometheus.Counter
- func (mps *MockPrometheusService) CreateGaugeIfNotExists(opts prometheus.GaugeOpts) prometheus.Gauge
- func (mps *MockPrometheusService) CreateSuccessRateGaugeIfNotExists(transactionId string, sourceChainId, targetChainId uint64, ...) (prometheus.Gauge, error)
- func (mps *MockPrometheusService) DeleteCounter(name string)
- func (mps *MockPrometheusService) DeleteGauge(name string)
- func (mps *MockPrometheusService) GetCounter(name string) prometheus.Counter
- func (mps *MockPrometheusService) GetGauge(name string) prometheus.Gauge
- func (mps *MockPrometheusService) GetIsMonitoringEnabled() bool
- type MockReadOnlyService
- func (m *MockReadOnlyService) FindAssetTransfer(transferID string, asset string, transfers []transfer.Hedera, ...)
- func (m *MockReadOnlyService) FindNftTransfer(transferID string, tokenID string, serialNum int64, sender string, ...)
- func (m *MockReadOnlyService) FindScheduledNftAllowanceApprove(t *payload.Transfer, sender hedera.AccountID, ...)
- func (m *MockReadOnlyService) FindTransfer(transferID string, fetch func() (*mirrorNodeTransaction.Response, error), ...)
- type MockScheduledService
- func (mss *MockScheduledService) ExecuteScheduledBurnTransaction(id, asset string, amount int64, status *chan string, ...)
- func (mss *MockScheduledService) ExecuteScheduledMintTransaction(id, asset string, amount int64, status *chan string, ...)
- func (mss *MockScheduledService) ExecuteScheduledNftAllowTransaction(id string, nftID hedera.NftID, owner hedera.AccountID, ...)
- func (mss *MockScheduledService) ExecuteScheduledNftTransferTransaction(id string, nftID hedera.NftID, sender hedera.AccountID, ...)
- func (mss *MockScheduledService) ExecuteScheduledTransferTransaction(id, nativeAsset string, transfers []transfer.Hedera, ...)
- type MockSignerService
- type MockTransferService
- func (mts *MockTransferService) Create(ct *payload.Transfer) (*entity.Transfer, error)
- func (mts *MockTransferService) GetByTransactionId(txId string) (*entity.Transfer, error)
- func (mts *MockTransferService) GetWithFee(txId string) (*entity.Transfer, error)
- func (mts *MockTransferService) GetWithPreloads(txId string) (*entity.Transfer, error)
- func (mts *MockTransferService) InitiateNewTransfer(tm payload.Transfer) (*entity.Transfer, error)
- func (mts *MockTransferService) Paged(filter *transfer.PagedRequest) (*transfer.Paged, error)
- func (mts *MockTransferService) ProcessNativeNftTransfer(tm payload.Transfer) error
- func (mts *MockTransferService) ProcessNativeTransfer(tm payload.Transfer) error
- func (mts *MockTransferService) ProcessWrappedTransfer(tm payload.Transfer) error
- func (mts *MockTransferService) SanityCheckTransfer(tx transaction.Transaction) transfer.SanityCheckResult
- func (mts *MockTransferService) TransferData(txId string) (interface{}, error)
- func (mts *MockTransferService) UpdateStatusCompleted(txId string) error
- func (mts *MockTransferService) UpdateStatusFailed(txId string) error
- type MockUtilsService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockAssetsService ¶ added in v1.4.0
func (*MockAssetsService) FetchEvmFungibleReserveAmount ¶ added in v1.4.0
func (mas *MockAssetsService) FetchEvmFungibleReserveAmount(networkId uint64, assetAddress string, isNative bool, evmTokenClient client.EvmFungibleToken, routerContractAddress string) (inLowestDenomination *big.Int, err error)
FetchEvmFungibleReserveAmount Gets EVM's Fungible Token Reserve Amount
func (*MockAssetsService) FetchEvmNonFungibleReserveAmount ¶ added in v1.4.0
func (mas *MockAssetsService) FetchEvmNonFungibleReserveAmount(networkId uint64, assetAddress string, isNative bool, evmTokenClient client.EvmNft, routerContractAddress string) (inLowestDenomination *big.Int, err error)
FetchEvmNonFungibleReserveAmount Gets EVM's Non-Fungible Token Reserve Amount
func (*MockAssetsService) FetchHederaTokenReserveAmount ¶ added in v1.4.0
func (mas *MockAssetsService) FetchHederaTokenReserveAmount(assetId string, mirrorNode client.MirrorNode, isNative bool, hederaTokenBalances map[string]int) (reserveAmount *big.Int, err error)
FetchHederaTokenReserveAmount Gets Hedera's Token Reserve Amount
func (*MockAssetsService) FungibleAssetInfo ¶ added in v1.4.0
func (mas *MockAssetsService) FungibleAssetInfo(networkId uint64, assetAddress string) (assetInfo *assetModel.FungibleAssetInfo, exist bool)
FungibleAssetInfo Gets FungibleAssetInfo
func (*MockAssetsService) FungibleNativeAsset ¶ added in v1.4.0
func (mas *MockAssetsService) FungibleNativeAsset(chainId uint64, nativeAssetAddress string) *assetModel.NativeAsset
FungibleNativeAsset Gets NativeAsset for passed chainId and assetAddress
func (*MockAssetsService) FungibleNetworkAssets ¶ added in v1.4.0
func (mas *MockAssetsService) FungibleNetworkAssets() map[uint64][]string
FungibleNetworkAssets Gets all Fungible Assets by Network ID
func (*MockAssetsService) FungibleNetworkAssetsByChainId ¶ added in v1.4.0
func (mas *MockAssetsService) FungibleNetworkAssetsByChainId(chainId uint64) []string
FungibleNetworkAssetsByChainId Gets all Fungible assets for passed Chain ID
func (*MockAssetsService) IsNative ¶ added in v1.4.0
func (mas *MockAssetsService) IsNative(chainId uint64, assetAddress string) bool
IsNative Returns flag showing if the passed Asset's Address is Native for the passed Chain ID
func (*MockAssetsService) NativeToWrapped ¶ added in v1.4.0
func (mas *MockAssetsService) NativeToWrapped(nativeAssetAddress string, nativeChainId, targetChainId uint64) string
NativeToWrapped Gets Wrapped Asset for passed Native Asset's address and Target Chain ID
func (*MockAssetsService) NativeToWrappedAssets ¶ added in v1.4.0
func (mas *MockAssetsService) NativeToWrappedAssets() map[uint64]map[string]map[uint64]string
NativeToWrappedAssets Gets all Native assets with their Wrapped assets by Network ID
func (*MockAssetsService) NonFungibleAssetInfo ¶ added in v1.4.0
func (mas *MockAssetsService) NonFungibleAssetInfo(networkId uint64, assetAddress string) (assetInfo *assetModel.NonFungibleAssetInfo, exist bool)
NonFungibleAssetInfo Gets NonFungibleAssetInfo
func (*MockAssetsService) NonFungibleNetworkAssets ¶ added in v1.4.0
func (mas *MockAssetsService) NonFungibleNetworkAssets() map[uint64][]string
NonFungibleNetworkAssets Gets all Non-Fungible Assets by Network ID
func (*MockAssetsService) OppositeAsset ¶ added in v1.4.0
func (mas *MockAssetsService) OppositeAsset(sourceChainId uint64, targetChainId uint64, assetAddress string) string
OppositeAsset Gets Opposite asset for passed chain IDs and assetAddress
func (*MockAssetsService) WrappedFromNative ¶ added in v1.4.0
func (mas *MockAssetsService) WrappedFromNative(nativeChainId uint64, nativeAssetAddress string) map[uint64]string
WrappedFromNative Gets All Wrapped Assets for passed Native Asset's address
func (*MockAssetsService) WrappedToNative ¶ added in v1.4.0
func (mas *MockAssetsService) WrappedToNative(wrappedAssetAddress string, wrappedChainId uint64) *assetModel.NativeAsset
WrappedToNative Gets Native Asset from passed Wrapped Asset's address and Wrapped Chain ID
type MockBridgeConfigService ¶ added in v1.4.0
func (*MockBridgeConfigService) ProcessLatestConfig ¶ added in v1.4.0
func (m *MockBridgeConfigService) ProcessLatestConfig(topicID hedera.TopicID) (*parser.Bridge, error)
type MockBurnService ¶ added in v1.4.0
func (*MockBurnService) ProcessEvent ¶ added in v1.4.0
func (m *MockBurnService) ProcessEvent(event payload.Transfer)
func (*MockBurnService) TransactionID ¶ added in v1.4.0
func (m *MockBurnService) TransactionID(id string) (string, error)
type MockDistrubutorService ¶ added in v1.4.0
func (*MockDistrubutorService) CalculateMemberDistribution ¶ added in v1.4.0
func (mds *MockDistrubutorService) CalculateMemberDistribution(validFee int64) ([]transfer.Hedera, error)
func (*MockDistrubutorService) PrepareTransfers ¶ added in v1.4.0
func (mds *MockDistrubutorService) PrepareTransfers(amount int64, token string) ([]transaction.Transfer, error)
func (*MockDistrubutorService) ValidAmount ¶ added in v1.4.0
func (mds *MockDistrubutorService) ValidAmount(amount int64) int64
type MockFeeService ¶ added in v1.4.0
func (*MockFeeService) CalculateFee ¶ added in v1.4.0
func (mfs *MockFeeService) CalculateFee(token string, amount int64) (fee, remainder int64)
type MockLockService ¶ added in v1.4.0
func (*MockLockService) ProcessEvent ¶ added in v1.4.0
func (m *MockLockService) ProcessEvent(event payload.Transfer)
type MockMessageService ¶ added in v1.4.0
func (*MockMessageService) ProcessSignature ¶ added in v1.4.0
func (m *MockMessageService) ProcessSignature(transferID, signature string, targetChainId uint64, timestamp int64, authMsg []byte) error
ProcessSignature processes the signature message, verifying and updating all necessary fields in the DB
func (*MockMessageService) SanityCheckFungibleSignature ¶ added in v1.4.0
func (m *MockMessageService) SanityCheckFungibleSignature(tm *proto.TopicEthSignatureMessage) (bool, error)
SanityCheckFungibleSignature performs any validation required prior handling the topic message (verifies metadata against the corresponding Transaction record)
func (*MockMessageService) SanityCheckNftSignature ¶ added in v1.4.0
func (m *MockMessageService) SanityCheckNftSignature(tm *proto.TopicEthNftSignatureMessage) (bool, error)
SanityCheckNftSignature performs any validation required prior handling the topic message (verifies metadata against the corresponding Transaction record)
func (*MockMessageService) SignFungibleMessage ¶ added in v1.4.0
func (m *MockMessageService) SignFungibleMessage(transfer payload.Transfer) ([]byte, error)
func (*MockMessageService) SignNftMessage ¶ added in v1.4.0
func (m *MockMessageService) SignNftMessage(transfer payload.Transfer) ([]byte, error)
type MockPricingService ¶ added in v1.4.0
func (*MockPricingService) FetchAndUpdateNftFeesForApi ¶ added in v1.4.0
func (mas *MockPricingService) FetchAndUpdateNftFeesForApi() error
func (*MockPricingService) FetchAndUpdateUsdPrices ¶ added in v1.4.0
func (mas *MockPricingService) FetchAndUpdateUsdPrices() error
FetchAndUpdateUsdPrices fetches all prices from the Web APIs and updates them in the mapping
func (*MockPricingService) GetHederaNftFee ¶ added in v1.4.0
func (mas *MockPricingService) GetHederaNftFee(token string) (int64, bool)
GetHederaNftFee returns the nft fee for Hedera NFTs based on token id
func (*MockPricingService) GetHederaNftPrevFee ¶ added in v1.4.0
func (mas *MockPricingService) GetHederaNftPrevFee(token string) (int64, bool)
GetHederaNftPrevFee returns the previous nft fee for Hedera NFTs based on token id
func (*MockPricingService) GetMinAmountsForAPI ¶ added in v1.4.0
func (mas *MockPricingService) GetMinAmountsForAPI() map[uint64]map[string]string
GetMinAmountsForAPI getting all prices by networkId
func (*MockPricingService) GetTokenPriceInfo ¶ added in v1.4.0
func (mas *MockPricingService) GetTokenPriceInfo(networkId uint64, tokenAddressOrId string) (priceInfo pricing.TokenPriceInfo, exist bool)
GetTokenPriceInfo gets price for token with the passed networkId and tokenAddressOrId
func (*MockPricingService) NftFees ¶ added in v1.4.0
func (mas *MockPricingService) NftFees() map[uint64]map[string]pricing.NonFungibleFee
type MockPrometheusService ¶ added in v1.4.0
func (*MockPrometheusService) ConstructMetricName ¶ added in v1.4.0
func (mps *MockPrometheusService) ConstructMetricName(sourceNetworkId, targetNetworkId uint64, asset, transactionId, metricTarget string) (string, error)
ConstructMetricName constructing name for metric
func (*MockPrometheusService) CreateCounterIfNotExists ¶ added in v1.4.0
func (mps *MockPrometheusService) CreateCounterIfNotExists(opts prometheus.CounterOpts) prometheus.Counter
CreateCounterIfNotExists creates new Counter Metric and registers it in Prometheus
func (*MockPrometheusService) CreateGaugeIfNotExists ¶ added in v1.4.0
func (mps *MockPrometheusService) CreateGaugeIfNotExists(opts prometheus.GaugeOpts) prometheus.Gauge
CreateGaugeIfNotExists creates new Gauge Metric and registers it in Prometheus if not exists
func (*MockPrometheusService) CreateSuccessRateGaugeIfNotExists ¶ added in v1.4.0
func (mps *MockPrometheusService) CreateSuccessRateGaugeIfNotExists(transactionId string, sourceChainId, targetChainId uint64, asset, metricNameSuffix, metricHelp string) (prometheus.Gauge, error)
CreateSuccessRateGaugeIfNotExists creates new Gauge Metric for Success Rate and registers it in Prometheus if not exists
func (*MockPrometheusService) DeleteCounter ¶ added in v1.4.0
func (mps *MockPrometheusService) DeleteCounter(name string)
DeleteCounter unregisters and deletes Counter with the passed name
func (*MockPrometheusService) DeleteGauge ¶ added in v1.4.0
func (mps *MockPrometheusService) DeleteGauge(name string)
DeleteGauge unregisters and deletes Gauge with the passed name
func (*MockPrometheusService) GetCounter ¶ added in v1.4.0
func (mps *MockPrometheusService) GetCounter(name string) prometheus.Counter
GetCounter retrieves Counter by name with flag for existence
func (*MockPrometheusService) GetGauge ¶ added in v1.4.0
func (mps *MockPrometheusService) GetGauge(name string) prometheus.Gauge
GetGauge retrieves Gauge by name with flag for existence
func (*MockPrometheusService) GetIsMonitoringEnabled ¶ added in v1.4.0
func (mps *MockPrometheusService) GetIsMonitoringEnabled() bool
GetIsMonitoringEnabled returns if the monitoring is enabled
type MockReadOnlyService ¶ added in v1.4.0
func (*MockReadOnlyService) FindAssetTransfer ¶ added in v1.4.0
func (m *MockReadOnlyService) FindAssetTransfer(transferID string, asset string, transfers []transfer.Hedera, fetch func() (*mirrorNodeTransaction.Response, error), save func(transactionID, scheduleID, status string) error)
func (*MockReadOnlyService) FindNftTransfer ¶ added in v1.4.0
func (*MockReadOnlyService) FindScheduledNftAllowanceApprove ¶ added in v1.4.0
func (*MockReadOnlyService) FindTransfer ¶ added in v1.4.0
func (m *MockReadOnlyService) FindTransfer(transferID string, fetch func() (*mirrorNodeTransaction.Response, error), save func(transactionID, scheduleID, status string) error)
type MockScheduledService ¶ added in v1.4.0
func (*MockScheduledService) ExecuteScheduledBurnTransaction ¶ added in v1.4.0
func (*MockScheduledService) ExecuteScheduledMintTransaction ¶ added in v1.4.0
func (*MockScheduledService) ExecuteScheduledNftAllowTransaction ¶ added in v1.4.0
func (mss *MockScheduledService) ExecuteScheduledNftAllowTransaction(id string, nftID hedera.NftID, owner hedera.AccountID, spender hedera.AccountID, onExecutionSuccess func(txId string, scheduleId string), onExecutionFail, onSuccess, onFail func(txId string))
func (*MockScheduledService) ExecuteScheduledNftTransferTransaction ¶ added in v1.4.0
func (*MockScheduledService) ExecuteScheduledTransferTransaction ¶ added in v1.4.0
type MockSignerService ¶ added in v1.4.0
func (*MockSignerService) Address ¶ added in v1.4.0
func (m *MockSignerService) Address() string
func (*MockSignerService) NewKeyTransactor ¶ added in v1.4.0
func (m *MockSignerService) NewKeyTransactor(chainId *big.Int) (*bind.TransactOpts, error)
type MockTransferService ¶
func (*MockTransferService) GetByTransactionId ¶ added in v1.4.0
func (mts *MockTransferService) GetByTransactionId(txId string) (*entity.Transfer, error)
func (*MockTransferService) GetWithFee ¶ added in v1.4.0
func (mts *MockTransferService) GetWithFee(txId string) (*entity.Transfer, error)
func (*MockTransferService) GetWithPreloads ¶ added in v1.4.0
func (mts *MockTransferService) GetWithPreloads(txId string) (*entity.Transfer, error)
func (*MockTransferService) InitiateNewTransfer ¶
func (*MockTransferService) Paged ¶ added in v1.4.0
func (mts *MockTransferService) Paged(filter *transfer.PagedRequest) (*transfer.Paged, error)
func (*MockTransferService) ProcessNativeNftTransfer ¶ added in v1.4.0
func (mts *MockTransferService) ProcessNativeNftTransfer(tm payload.Transfer) error
func (*MockTransferService) ProcessNativeTransfer ¶ added in v1.4.0
func (mts *MockTransferService) ProcessNativeTransfer(tm payload.Transfer) error
func (*MockTransferService) ProcessWrappedTransfer ¶ added in v1.4.0
func (mts *MockTransferService) ProcessWrappedTransfer(tm payload.Transfer) error
func (*MockTransferService) SanityCheckTransfer ¶
func (mts *MockTransferService) SanityCheckTransfer(tx transaction.Transaction) transfer.SanityCheckResult
func (*MockTransferService) TransferData ¶
func (mts *MockTransferService) TransferData(txId string) (interface{}, error)
func (*MockTransferService) UpdateStatusCompleted ¶ added in v1.4.0
func (mts *MockTransferService) UpdateStatusCompleted(txId string) error
func (*MockTransferService) UpdateStatusFailed ¶ added in v1.4.0
func (mts *MockTransferService) UpdateStatusFailed(txId string) error
type MockUtilsService ¶ added in v1.4.0
func (*MockUtilsService) ConvertEvmHashToBridgeTxId ¶ added in v1.4.0
func (m *MockUtilsService) ConvertEvmHashToBridgeTxId(txId string, chainId uint64) (*service.BridgeTxId, error)
Source Files ¶
- assets_service_mock.go
- bridge_config_service_mock.go
- burn_service_mock.go
- distributor_service_mock.go
- fee_service_mock.go
- lock_service_mock.go
- message_service_mock.go
- pricing_service_mock.go
- prometheus_service_mock.go
- readonly_service_mock.go
- scheduled_service_mock.go
- signer_service_mock.go
- transfer_service_mock.go
- utils_service_mock.go