Skip to content

Commit c3242a1

Browse files
committed
[pyth] Remove get_pub_key command and update docs/scripts.
1 parent 1b3f5c1 commit c3242a1

File tree

3 files changed

+4
-29
lines changed

3 files changed

+4
-29
lines changed

doc/getting_started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This creates the directory (if it didnt already exist) and creates a key-pair fi
2020
Please extract the public key from this key-pair and send it to the administrator so it can be permissioned for your symbols of interest. The public key can be extracted as follows:
2121

2222
```
23-
./pyth get_pub_key $KDIR/publish_key_pair.json
23+
solana-keygen pubkey $KDIR/publish_key_pair.json
2424
```
2525

2626
This will output the public key in base58 encoding and will look something like:

pcapps/pyth.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ int usage()
6060
std::cerr << " get_product <prod_key> [options]" << std::endl;
6161
std::cerr << " get_product_list [options]" << std::endl;
6262
std::cerr << " get_all_products [options]" << std::endl;
63-
std::cerr << " get_pub_key <key_pair_file>" << std::endl;
6463
std::cerr << " version" << std::endl;
6564
std::cerr << std::endl;
6665

@@ -949,24 +948,6 @@ int on_upd_publisher( int argc, char **argv, bool is_add )
949948
}
950949
}
951950

952-
int on_get_pub_key( int argc, char **argv )
953-
{
954-
if ( argc < 2 ) {
955-
return usage();
956-
}
957-
key_pair kp;
958-
if ( !kp.init_from_file( argv[1] ) ) {
959-
std::cerr << "pyth: failed to init key_pair from " << argv[1]
960-
<< std::endl;
961-
return 1;
962-
}
963-
pub_key pk( kp );
964-
std::string pnm;
965-
pk.enc_base58( pnm );
966-
std::cout << pnm << std::endl;
967-
return 0;
968-
}
969-
970951
static void print_json( json_wtr& wtr )
971952
{
972953
net_buf *hd, *tl;
@@ -1454,8 +1435,6 @@ int main(int argc, char **argv)
14541435
rc = on_upd_price_val( argc, argv );
14551436
} else if ( cmd == "upd_test" ) {
14561437
rc = on_upd_test( argc, argv );
1457-
} else if ( cmd == "get_pub_key" ) {
1458-
rc = on_get_pub_key( argc, argv );
14591438
} else if ( cmd == "get_product" ) {
14601439
rc = on_get_product( argc, argv );
14611440
} else if ( cmd == "get_product_list" ) {

pctest/setup_pub.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
PYTH=./pyth
44
SOLANA=../../solana/target/release/solana
5+
SOLANA_KEYGEN=../../solana/target/release/solana-keygen
56
SOL_OPT="-u localhost --commitment finalized"
67
RPC="-r localhost"
78
FINAL="-c finalized"
@@ -30,19 +31,14 @@ setup_pub()
3031
check "$SOLANA airdrop 10 -k $DIR/publish_key_pair.json $SOL_OPT"
3132

3233
# get program public key
33-
prog_id=$($PYTH get_pub_key $ADM/program_key_pair.json)
34+
prog_id=$($SOLANA_KEYGEN pubkey $ADM/program_key_pair.json)
3435
echo $prog_id > $DIR/program_key.json
3536
chmod 0400 $DIR/program_key.json
3637

3738
# get mapping public key
38-
map_id=$($PYTH get_pub_key $ADM/mapping_key_pair.json)
39+
map_id=$($SOLANA_KEYGEN pubkey $ADM/mapping_key_pair.json)
3940
echo $map_id > $DIR/mapping_key.json
4041
chmod 0400 $DIR/mapping_key.json
41-
42-
# get parameter public key
43-
map_id=$($PYTH get_pub_key $ADM/param_key_pair.json)
44-
echo $map_id > $DIR/param_key.json
45-
chmod 0400 $DIR/param_key.json
4642
}
4743

4844
ADIR=$1

0 commit comments

Comments
 (0)