verify

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountBalance

func AccountBalance(t *testing.T, hederaClient *hedera.Client, hederaID hedera.AccountID, expectedReceiveAmount uint64, beforeHbarBalance hedera.AccountBalance, asset string)

func BurnERC721Event

func BurnERC721Event(t *testing.T, txReceipt *types.Receipt, expectedRouterLock *router.RouterBurnERC721) string

func BurnEvent

func BurnEvent(t *testing.T, txReceipt *types.Receipt, expectedRouterBurn *router.RouterBurn) string

func ERC721TokenId

func ERC721TokenId(t *testing.T, evm *evm.Client, wrappedToken string, serialNumber int64, receiver string, expectedMetadata string)

func EventTransactionIDFromValidatorAPI

func EventTransactionIDFromValidatorAPI(t *testing.T, validatorClient *e2eClients.Validator, eventID, expectedTxID string)

func FeeRecord

func FeeRecord(t *testing.T, dbValidation *Service, expectedRecord *entity.Fee)

func FungibleTransferFromValidatorAPI

func FungibleTransferFromValidatorAPI(t *testing.T, validatorClient *e2eClients.Validator, tokenId hedera.TokenID, evm evmSetup.Utils, txId, tokenID, expectedSendAmount, targetAsset string) *service.FungibleTransferData

func ListenForTx

func ListenForTx(t *testing.T, response *transaction.Response, mirrorNode *mirror_node.Client, expectedTransfers []transaction.Transfer, asset string) (string, string)

func LockEvent

func LockEvent(t *testing.T, txReceipt *types.Receipt, expectedRouterLock *router.RouterLock) string

func MembersScheduledTxs

func MembersScheduledTxs(t *testing.T, hederaClient *hedera.Client, mirrorNodeClient *mirror_node.Client, members []hedera.AccountID, asset string, expectedTransfers []transaction.Transfer, now time.Time) (transactionID, scheduleID string)

func NftOwner

func NftOwner(t *testing.T, hederaClient *hedera.Client, tokenID string, serialNumber int64, expectedOwner hedera.AccountID)

func NftSpender

func NftSpender(t *testing.T, hederaClient *hedera.Client, tokenID string, serialNumber int64, expectedSpender hedera.AccountID)

func NonFungibleTransferFromValidatorAPI

func NonFungibleTransferFromValidatorAPI(t *testing.T, validatorClient *e2eClients.Validator, tokenId hedera.TokenID, evm evmSetup.Utils, txId string, tokenID string, metadata string, tokenIdOrSerialNum int64, targetAsset string) *service.NonFungibleTransferData

func ReceiverAccountBalance

func ReceiverAccountBalance(t *testing.T, hederaClient *hedera.Client, expectedReceiveAmount uint64, beforeHbarBalance hedera.AccountBalance, asset string, tokenId hedera.TokenID)

func ScheduleRecord

func ScheduleRecord(t *testing.T, dbValidation *Service, expectedRecord *entity.Schedule)

func ScheduledBurnTx

func ScheduledBurnTx(t *testing.T, mirrorNodeClient *mirror_node.Client, account hedera.AccountID, asset string, expectedTransfers []transaction.Transfer, now time.Time) (transactionID, scheduleID string)

func ScheduledMintTx

func ScheduledMintTx(t *testing.T, mirrorNodeClient *mirror_node.Client, account hedera.AccountID, asset string, expectedTransfers []transaction.Transfer, now time.Time) (transactionID, scheduleID string)

func ScheduledNftAllowanceApprove

func ScheduledNftAllowanceApprove(t *testing.T, hederaClient *hedera.Client, mirrorNodeClient *mirror_node.Client, payerAccount hedera.AccountID, expectedTransactionID string, startTimestamp int64) (transactionID, scheduleID string)

func ScheduledNftTransfer

func ScheduledNftTransfer(t *testing.T, hederaClient *hedera.Client, mirrorNodeClient *mirror_node.Client, bridgeAccount hedera.AccountID, token string, serialNum int64) (transactionID, scheduleID string)

func ScheduledTx

func ScheduledTx(t *testing.T, hederaClient *hedera.Client, mirrorNodeClient *mirror_node.Client, account hedera.AccountID, asset string, expectedTransfers []transaction.Transfer, now time.Time) (transactionID, scheduleID string)

func SendNFTAllowance

func SendNFTAllowance(hederaClient *hedera.Client, nftId hedera.NftID, ownerAccountId, spenderAccountId hedera.AccountID) (*hedera.TransactionResponse, error)

func SubmittedScheduledTx

func SubmittedScheduledTx(t *testing.T, hederaClient *hedera.Client, mirrorNodeClient *mirror_node.Client, members []hedera.AccountID, asset string, expectedTransfers []transaction.Transfer, now time.Time) (transactionID, scheduleID string)

func TokenTransferToBridgeAccount

func TokenTransferToBridgeAccount(t *testing.T, hederaClient *hedera.Client, bridgeAccount hedera.AccountID, evmAsset string, tokenID hedera.TokenID, evm evmSetup.Utils, memo string, wTokenReceiverAddress common.Address, amount int64) (hedera.TransactionResponse, *big.Int)

func TopicMessagesWithStartTime

func TopicMessagesWithStartTime(t *testing.T, hederaClient *hedera.Client, topicId hedera.TopicID, expectedValidatorsCount int, txId string, startTime int64) []string

func TransferRecord

func TransferRecord(t *testing.T, dbValidation *Service, expectedRecord *entity.Transfer)

func TransferRecordAndSignatures

func TransferRecordAndSignatures(t *testing.T, dbValidation *Service, expectedRecord *entity.Transfer, authMsgBytes []byte, signatures []string)

func TransferToBridgeAccount

func TransferToBridgeAccount(t *testing.T, hederaClient *hedera.Client, bridgeAccount hedera.AccountID, wrappedAsset string, evm evmSetup.Utils, memo string, whbarReceiverAddress common.Address, expectedAmount int64) (hedera.TransactionResponse, *big.Int)

func WrappedAssetBalance

func WrappedAssetBalance(t *testing.T, evm evmSetup.Utils, nativeAsset string, mintAmount *big.Int, wrappedBalanceBefore *big.Int, wTokenReceiverAddress common.Address)

Types

type Service

type Service struct {
	DatabaseRetryCount      int
	DatabaseRetryTimeout    time.Duration
	ExpectedValidatorsCount int
	// contains filtered or unexported fields
}

func NewService

func NewService(dbConfigs []config.Database) *Service

func (*Service) VerifyFeeRecord

func (s *Service) VerifyFeeRecord(expectedRecord *entity.Fee) (bool, error)

func (*Service) VerifyScheduleRecord

func (s *Service) VerifyScheduleRecord(expectedRecord *entity.Schedule) (bool, error)

func (*Service) VerifyTransferAndSignatureRecords

func (s *Service) VerifyTransferAndSignatureRecords(expectedTransferRecord *entity.Transfer, authMsgBytes []byte, signatures []string) (bool, error)

func (*Service) VerifyTransferRecord

func (s *Service) VerifyTransferRecord(expectedTransferRecord *entity.Transfer) (bool, error)

Jump to

Keyboard shortcuts

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