utils

package
v0.0.0-...-b9e3845 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 24 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateClient

func CreateClient(ctx context.Context, url string) (*ton.APIClient, error)

func CreateRandomHighloadWallet deprecated

func CreateRandomHighloadWallet(client ton.APIClientWrapped) (*wallet.Wallet, error)

Deprecated: use tvm.NewRandomHighloadV3TestWallet instead

func CreateRandomWallet deprecated

func CreateRandomWallet(client ton.APIClientWrapped, version wallet.VersionConfig, option wallet.Option) (*wallet.Wallet, error)

Deprecated: use tvm.NewRandomTestWallet instead

func DataStoreToAddressBook

func DataStoreToAddressBook(ds *ds.MemoryDataStore) (*cldf.AddressBookMap, error)

DataStoreToAddressBook is a temp function to transform a DataStore to the legacy AddressBook. Couldn't find any utility function to do this. Once we adopt this new change set in CLD we can remove returning AddressBook at all :)

func FundWallets

func FundWallets(t *testing.T, client ton.APIClientWrapped, recipients []*address.Address, amounts []tlb.Coins) error

func FundWalletsNoT

func FundWalletsNoT(client ton.APIClientWrapped, recipients []*address.Address, amounts []tlb.Coins) error

func FundWalletsWithCtx

func FundWalletsWithCtx(ctx context.Context, client ton.APIClientWrapped, recipients []*address.Address, amounts []tlb.Coins) error

func GetLocalnetFunderWallet deprecated

func GetLocalnetFunderWallet(client ton.APIClientWrapped) (*wallet.Wallet, error)

Deprecated: use tvm.MyLocalTONWalletDefault instead

func InvokeDeployContractOperation

func InvokeDeployContractOperation(b operations.Bundle, dp *dep.DependencyProvider, chainSelector uint64, compiledContract CompiledContractData, storage any, messageBody any, coin string, semver *semver.Version) (*ds.AddressRef, error)

InvokeDeployContractOperation deploys a TON contract if it's not already deployed. It checks the current address, executes the deployment operation if needed, Returns an error if the deployment fails.

func StartChain

func StartChain(t *testing.T, chainID uint64, once *sync.Once) (cldf_ton.Chain, error)

StartChain creates a TON chain using the CLDF CTFChainProvider. The once parameter ensures CTF network is only initialized once across test suite.

Types

type CompiledContractData

type CompiledContractData struct {
	Type               ds.ContractType
	Code               *cell.Cell
	ContractVersionSha string
	ContractPath       string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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