Skip to content
Open
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
4 changes: 3 additions & 1 deletion .github/workflows/test-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ jobs:
run: |
# Provides ephemeral-validator, query-filtering-service, vrf-oracle and
# mb-test-validator — every binary test-locally.sh needs.
npm install -g @magicblock-labs/ephemeral-validator@latest
# Pinned: 1.1.1's committor sends transactions the base validator can't
# deserialize, so every commit-to-base test times out.
npm install -g @magicblock-labs/ephemeral-validator@0.14.10
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

- name: Configure Solana
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
**/.next/
**/dist
**/.env
**/.vercel
**/tsconfig.tsbuildinfo
**/*test-storage

Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,17 @@ End-to-end app templates you can fork and build on.
<p><em>MagicBlock VRF gachapon demo that mints a Metaplex Core NFT reward.</em></p>
</blockquote>
</td>
<td valign="top" width="33%">
<blockquote>
<p><strong><a href="./gasless-starter/anchor/">⛽ Gasless Starter / Anchor</a></strong></p>
<p>
<img src="https://img.shields.io/badge/Anchor-5243AA?style=flat-square" alt="Anchor"/>
<img src="https://img.shields.io/badge/Payments%20API-0ea5e9?style=flat-square" alt="Payments API"/>
</p>
<p><em>Make your program gasless: Payments API deposits and withdrawals, free ER transactions from a 0-SOL wallet. Tip jar example.</em></p>
<p>🌐 <a href="https://gasless-starter.vercel.app">Live demo</a></p>
</blockquote>
</td>
</tr>
</table>

Expand All @@ -294,6 +305,7 @@ Deployed frontends for the examples that ship a UI.
| [Binary Prediction / Anchor](./binary-prediction/anchor/) | https://binary-prediction.magicblock.app |
| [Rewards (Delegated VRF) / Anchor](./rewards-delegated-vrf/anchor/) | https://magicblock-rewards-dashboard.vercel.app |
| [Rock Paper Scissor / Anchor](./rock-paper-scissor/anchor/) | https://rps-example.magicblock.app |
| [Gasless Starter / Anchor](./gasless-starter/anchor/) | https://gasless-starter.vercel.app |

## Testing

Expand All @@ -302,7 +314,7 @@ To run local tests for any example project, use the following steps:
1. **Install Dependencies (Local nodes + example directory):**

```bash
npm install -g @magicblock-labs/ephemeral-validator@latest
npm install -g @magicblock-labs/ephemeral-validator@0.14.10
cd <example-directory>
yarn install
```
Expand Down
32 changes: 32 additions & 0 deletions gasless-starter/anchor/Anchor.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[toolchain]
anchor_version = "1.0.2"

[features]
resolution = true
skip-lint = false

[programs.devnet]
tip-jar = "DzY7Cgt6NJDSbM2QCjERGbnBSFvab1ZamxRWLatY8Gwm"

[programs.localnet]
tip-jar = "DzY7Cgt6NJDSbM2QCjERGbnBSFvab1ZamxRWLatY8Gwm"

[registry]
url = "https://api.apr.dev"

[provider]
cluster = "devnet"
wallet = "~/.config/solana/id.json"

[[test.genesis]]
address = "SPLxh1LVZzEkX99H6rqYizhytLWPZVV296zyYDPagv2"
program = "tests/fixtures/ephemeral_token_program.so"
upgradeable = false

[[test.genesis]]
address = "DELeGGvXpWV2fqJUhqcF5ZSYMS4JTLjteaAMARRSaeSh"
program = "tests/fixtures/dlp.so"
upgradeable = false

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/tip-jar.ts"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
Loading
Loading