network

package
v0.0.11-rc Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplicationModuleGenesisStateWithAddresses

func ApplicationModuleGenesisStateWithAddresses(t *testing.T, addresses []string) *apptypes.GenesisState

ApplicationModuleGenesisStateWithAccount generates a GenesisState object with a single application for each of the given addresses.

func DefaultApplicationModuleGenesisState

func DefaultApplicationModuleGenesisState(t *testing.T, n int) *apptypes.GenesisState

DefaultApplicationModuleGenesisState generates a GenesisState object with a given number of applications. It returns the populated GenesisState object.

func DefaultConfig

func DefaultConfig() network.Config

DefaultConfig will initialize config for the network with custom application, genesis and single validator. All other parameters are inherited from cosmos-sdk/testutil/network.DefaultConfig

func DefaultGatewayModuleGenesisState

func DefaultGatewayModuleGenesisState(t *testing.T, n int) *gatewaytypes.GenesisState

DefaultGatewayModuleGenesisState generates a GenesisState object with a given number of gateways. It returns the populated GenesisState object.

func DefaultSupplierModuleGenesisState

func DefaultSupplierModuleGenesisState(t *testing.T, n int) *suppliertypes.GenesisState

DefaultSupplierModuleGenesisState generates a GenesisState object with a given number of suppliers. It returns the populated GenesisState object.

func DefaultTokenomicsModuleGenesisState

func DefaultTokenomicsModuleGenesisState(t *testing.T) *tokenomicstypes.GenesisState

func DelegateAppToGateway

func DelegateAppToGateway(
	t *testing.T,
	net *Network,
	appAddr string,
	gatewayAddr string,
)

DelegateAppToGateway delegates the provided application to the provided gateway

func GatewayModuleGenesisStateWithAddresses

func GatewayModuleGenesisStateWithAddresses(t *testing.T, addresses []string) *gatewaytypes.GenesisState

GatewayModuleGenesisStateWithAddresses generates a GenesisState object with a gateway list full of gateways with the given addresses. It returns the populated GenesisState object.

func InitAccount

func InitAccount(t *testing.T, net *Network, addr sdk.AccAddress)

InitAccount initializes an Account by sending it some funds from the validator in the network to the address provided

func InitAccountWithSequence

func InitAccountWithSequence(
	t *testing.T,
	net *Network,
	addr sdk.AccAddress,
	signatureSequencerNumber int,
)

InitAccountWithSequence initializes an Account by sending it some funds from the validator in the network to the address provided

func NewBondDenomCoins

func NewBondDenomCoins(t *testing.T, net *network.Network, numCoins int64) sdk.Coins

TODO_TECHDEBT: Reuse this helper in all test helpers where appropriate.

func ProofModuleGenesisStateWithClaims added in v0.0.3

func ProofModuleGenesisStateWithClaims(t *testing.T, claims []prooftypes.Claim) *prooftypes.GenesisState

ProofModuleGenesisStateWithClaims generates a GenesisState object with the given claims. It returns the populated GenesisState object.

func SupplierModuleGenesisStateWithAddresses

func SupplierModuleGenesisStateWithAddresses(t *testing.T, addresses []string) *suppliertypes.GenesisState

SupplierModuleGenesisStateWithAddresses generates a GenesisState object with a single supplier for each of the given addresses.

func UndelegateAppFromGateway

func UndelegateAppFromGateway(
	t *testing.T,
	net *Network,
	appAddr string,
	gatewayAddr string,
)

UndelegateAppFromGateway undelegates the provided application from the provided gateway

Types

type Config

type Config = network.Config

type Network

type Network = network.Network

func New

func New(t *testing.T, configs ...Config) *Network

New creates instance with fully configured cosmos network. Accepts optional config, that will be used in place of the DefaultConfig() if provided.

Jump to

Keyboard shortcuts

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