htlc

package
v0.0.0-...-903540d Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BNB_DENOM   = "htltbnb"
	DEPUTY_ADDR = "cosmos1kznrznww4pd6gx0zwrpthjk68fdmqypjpkj5hp"
)
View Source
const DeputyArmor = `` /* 255-byte string literal not displayed */

Variables

View Source
var (
	Deputy               sdk.AccAddress
	MinTimeLock          uint64 = 50
	MaxTimeLock          uint64 = 60
	ReceiverOnOtherChain        = "ReceiverOnOtherChain"
	SenderOnOtherChain          = "SenderOnOtherChain"
)

Functions

func ClaimHTLCExec

func ClaimHTLCExec(t *testing.T,
	network simapp.Network,
	clientCtx client.Context,
	from string,
	id string,
	secret string,
	extraArgs ...string,
) *simapp.ResponseTx

ClaimHTLCExec executes the claiming of an HTLC with the provided parameters.

Parameters: - t: testing.T instance for running test functions - network: simapp.Network instance for simulating the network - clientCtx: client.Context instance for client context - from: string representing the sender of the HTLC - id: string representing the ID of the HTLC - secret: string representing the secret of the HTLC - extraArgs: variadic string arguments for additional parameters

Returns a *simapp.ResponseTx pointer.

func CreateHTLCExec

func CreateHTLCExec(t *testing.T,
	network simapp.Network,
	clientCtx client.Context,
	from string,
	extraArgs ...string,
) *simapp.ResponseTx

CreateHTLCExec executes the creation of an HTLC with the provided parameters.

Parameters: - t: testing.T instance for running test functions - network: simapp.Network instance for simulating the network - clientCtx: client.Context instance for client context - from: string representing the sender of the HTLC - extraArgs: variadic string arguments for additional parameters

Returns a simapp.ResponseTx pointer.

func QueryHTLCExec

func QueryHTLCExec(t *testing.T,
	network simapp.Network,
	clientCtx client.Context,
	id string,
	extraArgs ...string,
) *htlctypes.HTLC

QueryHTLCExec executes a query for an HTLC based on the provided ID and additional arguments.

Parameters: - t: testing.T instance for running test functions - network: simapp.Network instance for simulating the network - clientCtx: client.Context instance for client context - id: string representing the ID of the HTLC - extraArgs: variadic string arguments for additional parameters

Returns an htlctypes.HTLC pointer.

Types

type QueryTestSuite

type QueryTestSuite struct {
	e2e.TestSuite
}

QueryTestSuite is a suite of end-to-end tests for the htlc module

func (*QueryTestSuite) TestQueryCmd

func (s *QueryTestSuite) TestQueryCmd()

TestQueryCmd tests all query command in the htlc module

type TxTestSuite

type TxTestSuite struct {
	e2e.TestSuite
}

func (*TxTestSuite) SetupSuite

func (s *TxTestSuite) SetupSuite()

SetupSuite creates a new network for integration tests

func (*TxTestSuite) TestTxCmd

func (s *TxTestSuite) TestTxCmd()

TestTxCmd makes sure the cli command for this module works as expected

Jump to

Keyboard shortcuts

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