Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump fork to v1.10.0 #4

Merged
merged 21 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.17.x, 1.18.x, 1.19.x]
go-version: [1.19.x, 1.20.x, 1.21.x, 1.22.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Solana SDK library for Go

[![GoDoc](https://pkg.go.dev/badge/github.com/gagliardetto/solana-go?status.svg)](https://pkg.go.dev/github.com/gagliardetto/solana-go@v1.8.4?tab=doc)
[![GoDoc](https://pkg.go.dev/badge/github.com/gagliardetto/solana-go?status.svg)](https://pkg.go.dev/github.com/gagliardetto/solana-go@v1.10.0?tab=doc)
[![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/gagliardetto/solana-go?include_prereleases&label=release-tag)](https://github.com/gagliardetto/solana-go/releases)
[![Build Status](https://github.com/gagliardetto/solana-go/workflows/tests/badge.svg?branch=main)](https://github.com/gagliardetto/solana-go/actions?query=branch%3Amain)
[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/gagliardetto/solana-go/main)](https://www.tickgit.com/browse?repo=github.com/gagliardetto/solana-go&branch=main)
Expand Down Expand Up @@ -83,7 +83,7 @@ Thanks!

## Current development status

There is currently **no stable release**. The SDK is actively developed and latest is `v1.8.4` which is an `alpha` release.
There is currently **no stable release**. The SDK is actively developed and latest is `v1.10.0` which is an `alpha` release.

The RPC and WS client implementation is based on [this RPC spec](https://github.com/solana-labs/solana/blob/c2435363f39723cef59b91322f3b6a815008af29/docs/src/developing/clients/jsonrpc-api.md).

Expand All @@ -100,7 +100,7 @@ The RPC and WS client implementation is based on [this RPC spec](https://github.

```bash
$ cd my-project
$ go get github.com/gagliardetto/solana-go@v1.8.4
$ go get github.com/gagliardetto/solana-go@v1.10.0
```

## Pretty-Print transactions/instructions
Expand Down Expand Up @@ -296,7 +296,7 @@ func exampleFromGetTransaction() {
endpoint := rpc.TestNet_RPC
client := rpc.New(endpoint)

txSig := solana.MustSignatureFromBase58("3pByJJ2ff7EQANKd2bgetmnYQxknk3QUib1xLMnrg6aCvg5hS78peaGMoceC9AFckomqrsgo38DpzrG2LPW9zj3g")
txSig := solana.MustSignatureFromBase58("3hZorctJtD3QLCRV3zF6JM6FDbFR5kAvsuKEG1RH9rWdz8YgnDzAvMWZFjdJgoL8KSNzZnx7aiExm1JEMC8KHfyy")
{
out, err := client.GetTransaction(
context.TODO(),
Expand Down Expand Up @@ -327,12 +327,15 @@ func decodeSystemTransfer(tx *solana.Transaction) {

// Find the program address of this instruction:
progKey, err := tx.ResolveProgramIDIndex(i0.ProgramIDIndex)
if if err != nil {
if err != nil {
panic(err)
}

// FInd the accounts of this instruction:
accounts := i0.ResolveInstructionAccounts(&tx.Message)
// Find the accounts of this instruction:
accounts, err := i0.ResolveInstructionAccounts(&tx.Message)
if err != nil {
panic(err)
}

// Feed the accounts and data to the system program parser
// OR see below for alternative parsing when you DON'T know
Expand Down Expand Up @@ -616,7 +619,7 @@ func main() {
// Create a new RPC client:
client := rpc.New(rpc.TestNet_RPC)

// Airdrop 5 SOL to the new account:
// Airdrop 1 SOL to the new account:
out, err := client.RequestAirdrop(
context.TODO(),
account.PublicKey(),
Expand Down Expand Up @@ -744,7 +747,7 @@ func main() {
amount := uint64(3333)

if true {
// Airdrop 5 sol to the account so it will have something to transfer:
// Airdrop 1 sol to the account so it will have something to transfer:
out, err := rpcClient.RequestAirdrop(
context.TODO(),
accountFrom.PublicKey(),
Expand Down
49 changes: 44 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,55 @@
module github.com/gagliardetto/solana-go

go 1.16
go 1.19

require (
github.com/gagliardetto/binary v0.7.7
github.com/gagliardetto/binary v0.8.0
github.com/gagliardetto/gofuzz v1.2.2
github.com/gagliardetto/treeout v0.1.4
github.com/google/uuid v1.6.0
)

require (
cloud.google.com/go v0.56.0 // indirect
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/daaku/go.zipexe v1.0.0 // indirect
github.com/fsnotify/fsnotify v1.4.7 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.4.2 // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/magiconair/properties v1.8.1 // indirect
github.com/mattn/go-colorable v0.1.4 // indirect
github.com/mattn/go-isatty v0.0.11 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml v1.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/afero v1.1.2 // indirect
github.com/spf13/cast v1.3.0 // indirect
github.com/spf13/jwalterweatherman v1.0.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.5 // indirect
google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940 // indirect
google.golang.org/grpc v1.28.0 // indirect
google.golang.org/protobuf v1.23.0 // indirect
gopkg.in/ini.v1 v1.51.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

require (
contrib.go.opencensus.io/exporter/stackdriver v0.13.4 // indirect
filippo.io/edwards25519 v1.0.0-rc.1
github.com/AlekSi/pointer v1.1.0
github.com/GeertJohan/go.rice v1.0.0
Expand All @@ -30,9 +70,8 @@ require (
github.com/spf13/cobra v1.1.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.7.1
github.com/streamingfast/logging v0.0.0-20220405224725-2755dab2ce75
github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091
github.com/stretchr/testify v1.7.0
github.com/teris-io/shortid v0.0.0-20201117134242-e59966efd125 // indirect
go.mongodb.org/mongo-driver v1.11.0
go.opencensus.io v0.22.5 // indirect
go.uber.org/ratelimit v0.2.0
Expand Down
Loading
Loading