Skip to content

Commit

Permalink
Parse strkey from deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Sep 14, 2023
1 parent ff2cada commit 2daaecf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/soroban-rpc/internal/test/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/creachadair/jrpc2/jhttp"
"github.com/google/shlex"
"github.com/stellar/go/keypair"
"github.com/stellar/go/strkey"
"github.com/stellar/go/txnbuild"
"github.com/stellar/go/xdr"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -75,7 +76,10 @@ func TestCLIRestorePreamble(t *testing.T) {
// This ensures that the CLI restores the entry (using the RestorePreamble in the simulateTransaction response)
ch := jhttp.NewChannel(test.sorobanRPCURL(), nil)
client := jrpc2.NewClient(ch, nil)
contractID := getContractID(t, getCLIDefaultAccount(t), testSalt, StandaloneNetworkPassphrase)
contractIDBytes := strkey.MustDecode(strkey.VersionByteContract, strkeyContractID)
require.Len(t, contractIDBytes, 32)
var contractID [32]byte
copy(contractID[:], contractIDBytes)
contractIDHash := xdr.Hash(contractID)
counterSym := xdr.ScSymbol("COUNTER")
key := xdr.LedgerKey{
Expand Down

0 comments on commit 2daaecf

Please sign in to comment.