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

Cache solana cli #33

Merged
merged 3 commits into from
May 8, 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
17 changes: 5 additions & 12 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v3

# From https://docs.solana.com/cli/install-solana-cli-tools
- name: Install Solana
run: sh -c "$(curl -sSfL https://release.solana.com/stable/install)"

- name: Add to PATH
run: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
- uses: actions/checkout@v4
- uses: metadaoproject/[email protected]
with:
# Install Solana CLI (beta, required to fix 'ahash' issue)
solana-cli-version: "1.18.5"

- name: Run Solana validator (and background it)
run: solana-test-validator &
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Solana helpers

The `helpers` package contains Solana helper functions, for use in the browser and/or node.js, [made by the Solana Foundation Developer Ecosystem team](https://youtu.be/zvQIa68ObK8?t=319) and our friends at [Anza](https://anza.xyz), [Turbin3](https://turbin3.com/), [Unboxed Software](https://beunboxed.com/) and [StarAtlas](https://staratlas.com/).
The `helpers` package contains Solana helper functions, for use in the browser and/or node.js, [made by the Solana Foundation Developer Ecosystem team](https://youtu.be/zvQIa68ObK8?t=319) and our friends at [Anza](https://anza.xyz), [Turbin3](https://turbin3.com/), [Unboxed Software](https://beunboxed.com/), and [StarAtlas](https://staratlas.com/).

Eventually most of these will end up in `@solana/web3.js`.
Eventually, most of these will end up in `@solana/web3.js`.

## What can I do with this module?

Expand Down Expand Up @@ -132,7 +132,7 @@ Usage:
airdropIfRequired(connection, publicKey, lamports, maximumBalance);
```

Request and confirm an airdrop in one step. As soon as the `await` returns, the airdropped tokens will be ready in the address, and the new balance of tokens is returned. The `maximumBalance` is used to avoid errors caused by unnecessarily asking for SOL when there's already enough in the account, and makes `airdropIfRequired()` very handy in scripts that run repeatedly.
Request and confirm an airdrop in one step. As soon as the `await` returns, the airdropped tokens will be ready to use, and the new balance of tokens will be returned. The `maximumBalance` is used to avoid errors caused by unnecessarily asking for SOL when there's already enough in the account, and makes `airdropIfRequired()` very handy in scripts that run repeatedly.

To ask for 0.5 SOL, if the balance is below 1 SOL, use:

Expand Down Expand Up @@ -326,7 +326,7 @@ initializeKeypair(connection, options);

Loads in a keypair from the filesystem, or environment and then airdrops to it if needed.

How the keypair is initialized is dependant on the `initializeKeypairOptions`:
How the keypair is initialized is dependent on the `initializeKeypairOptions`:

```typescript
interface initializeKeypairOptions {
Expand Down
Loading