solana-go icon indicating copy to clipboard operation
solana-go copied to clipboard

Unable transaction sign

Open mjour opened this issue 1 year ago • 1 comments

I can't run Sign() function because of error. Here is my code.

_, err = tx.Sign(
	func(key solana.PublicKey) *solana.PrivateKey {
		if wallet.PublicKey().Equals(key) {
			return &wallet
		}
		return nil
	},
)

The error is same as following.

panic: runtime error: slice bounds out of range [:128] with capacity 8

goroutine 1 [running]:
github.com/gagliardetto/solana-go.(*Message).signerKeys(...)
        C:/Users/brigh/go/pkg/mod/github.com/gagliardetto/[email protected]/message.go:269
github.com/gagliardetto/solana-go.(*Transaction).Sign(0xc00026fd40, 0xc00026fce8)
        C:/Users/brigh/go/pkg/mod/github.com/gagliardetto/[email protected]/transaction.go:390 +0x470

How can I solve it?

mjour avatar Mar 22 '23 16:03 mjour

Is the transaction a "versioned" transaction with some accounts residing in an "account lookup table"?

gagliardetto avatar Mar 22 '23 17:03 gagliardetto