utils

package
v0.0.0-...-ded9150 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NearNetworkId = "localnet"
	NetworkName   = "nffl"
	// TODO(edwin): nffl-test-relayer -> nffl-relayer?
	RelayerImageName     = "nffl-test-relayer"
	RelayerContainerName = "relayer"
	IndexerPort          = "3030"
	MetricsPort          = "9091"
)

Variables

This section is empty.

Functions

func GetDaContractAccountId

func GetDaContractAccountId(anvil *AnvilInstance) string

func GetRelayerContainerName

func GetRelayerContainerName(anvil *AnvilInstance) string

func StartRelayer

func StartRelayer(t *testing.T, ctx context.Context, daAccountId, indexerContainerIp string, anvil *AnvilInstance) (testcontainers.Container, error)

Types

type AnvilInstance

type AnvilInstance struct {
	Container  testcontainers.Container
	HttpClient eth.Client
	HttpUrl    string
	WsClient   eth.Client
	WsUrl      string
	RpcClient  *rpc.Client
	ChainID    *big.Int
}

func StartAnvilTestContainer

func StartAnvilTestContainer(t *testing.T, ctx context.Context, name, exposedPort, chainId string, isMainnet bool, networkName string) *AnvilInstance

func (*AnvilInstance) Mine

func (ai *AnvilInstance) Mine(blockCount, timestampInterval *big.Int) error

func (*AnvilInstance) SetBalance

func (ai *AnvilInstance) SetBalance(address common.Address, balance *big.Int) error

Jump to

Keyboard shortcuts

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