완전하고 실행 가능한 litesvm-go 데모 예제입니다. 각 예제는 독립적인 Go 테스트로, 패키지에 추가한 후 go test로 실행할 수 있습니다.
SOL 전송
System Program 전송 빌드 및 실행
계정 설정
테스트 계정 및 프로그램 데이터 상태를 seed로 초기화
프로그램 테스트
커스텀 SBF 프로그램 로드 및 실행 테스트
시간 기반 테스트
WarpToSlot / SetClock으로 시간 의존 로직 테스트
예제 실행
# 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 환경에서는 올바른 벤더 아카이브가 링크되도록 go test 명령어에 -tags musl을 추가하세요.
독립 실행형 커맨드라인 예제(테스트 러너 없음)는 litesvm-go 저장소의
examples/transfer/main.go
를 참고하세요.
Is this page helpful?