utils

package
v0.0.0-...-861319e Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 35 Imported by: 4

Documentation

Index

Constants

View Source
const (

	// Contract version definitions
	ContractsVersionLocal = "local"
	// Notice: "local" should be used only for development,
	// while a specific version should be pinned for releases (production deployments).
	ContractsVersionLatestSupported = "054376f21418" // Feb 19, 2026
)

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 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.

func ToTONAddress

func ToTONAddress(ref datastore.AddressRef) (*address.Address, error)

ToTONAddress formats a datastore.AddressRef into a TON *address.Address.

Types

type Artifact

type Artifact struct {
	Path string
	Data []byte
}

type CompiledContractData

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

type ContractMappingMetadata

type ContractMappingMetadata struct {
	CompiledVersionKey string
}

type DownloadArtifactsInput

type DownloadArtifactsInput struct {
	Organization        string
	Repository          string
	Release             string
	Asset               string
	FilesSuffixToFilter string
}

type DownloadArtifactsOutput

type DownloadArtifactsOutput struct {
	Artifacts []Artifact
}

type RetrieveCompiledContractsInput

type RetrieveCompiledContractsInput struct {
	ContractsVersionSha string
	Contracts           []ds.ContractType
}

func (*RetrieveCompiledContractsInput) Validate

func (i *RetrieveCompiledContractsInput) Validate() error

type RetrieveCompiledContractsOutput

type RetrieveCompiledContractsOutput struct {
	CompiledContracts map[ds.ContractType]CompiledContractData
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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