-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_test.go
28 lines (21 loc) · 692 Bytes
/
main_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main
import (
"context"
"log/slog"
"testing"
"github.com/gagliardetto/solana-go"
"github.com/gagliardetto/solana-go/rpc"
"github.com/stretchr/testify/require"
)
var (
exampleCreateHash = solana.MustSignatureFromBase58("VeA7DN7fA1fjhn9dxDQCGJY4nDjPQENwRzjJ5XLW7s3omxsyVzbWWhPTFJoDekCmeMgsWhGqsJZXx2d5PQU7kwy")
exampleBuyHash = ""
)
func TestBasic(t *testing.T) {
client := rpc.New("https://rpc.ankr.com/solana_devnet")
tx, err := client.GetParsedTransaction(context.Background(), exampleCreateHash, &rpc.GetParsedTransactionOpts{})
require.NoError(t, err)
events, err := checkCreateEvent(programID, tx)
require.NoError(t, err)
slog.Info("", "events", events)
}