Eksiksiz, çalıştırılabilir litesvm-go örnekleri. Her örnek, bir pakete ekleyip go test ile çalıştırabileceğiniz bağımsız bir Go testidir.
SOL Transferi
Bir system-program transferi oluşturun ve gönderin
Hesap Kurulumu
Test hesaplarını seed ile doldurun ve program veri durumunu ayarlayın
Program Testi
Özel SBF programlarını yükleyin ve test edin
Zamana Dayalı Test
WarpToSlot / SetClock ile zamana bağlı mantığı test edin
Örnekleri Çalıştırma
# 1) Initialize a Go module (skip if you already have a go.mod)go mod init mytest# 2) Add the dependencies to your Go projectgo get github.com/LiteSVM/litesvm-gogo get github.com/gagliardetto/solana-go# 3) Drop an example into a _test.go file and rungo test ./...
Alpine / musl üzerinde, doğru satıcı arşivinin bağlanması için go test çağrınıza -tags musl ekleyin.
Bağımsız bir komut satırı örneği için (test çalıştırıcısı olmadan) litesvm-go deposundaki
examples/transfer/main.go
dosyasına bakın.
Is this page helpful?