Skip to content

Commit

Permalink
add check-win.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
diman-io committed Apr 20, 2022
1 parent 310e5bb commit 5f50716
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ For possible values for POOL use `../raydium ido --help`

Claim is smart. It try to do all possible actions and doesn't do not needed actions. Though if you want the transactions looks like as the official site make it you could use optional flags for this. `../raydium ido claim --help` helps you.

## check-win.sh

```
./check-win.sh <POOL>
```

# Keypairs scripts

## keygen.sh
Expand Down
17 changes: 17 additions & 0 deletions scripts/check-win.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

raydium_cli=../raydium

POOL=$1

if [[ -z ${URL} ]]; then
URL=mainnet-beta
fi

fmt="%-45s%s\n"
for keypair in keys/*.json
do
address=$(solana address -k $keypair)
winning_tickets=$($raydium_cli ido $POOL user-info $address -u $URL --output json-compact | jq -c '.winningTickets')
printf "$fmt" $address $winning_tickets
done

0 comments on commit 5f50716

Please sign in to comment.