utils

package
v0.0.0-...-6c97b1e Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NearNetworkId = "localnet"
	NetworkName   = "near-sffl"
	// TODO(edwin): near-sffl-test-relayer -> near-sffl-relayer?
	RelayerImageName     = "near-sffl-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