|
1 | | -# tokenocchio |
| 1 | +# <img height="70" alt="tokenocchio" src="https://github.com/user-attachments/assets/322746be-4225-40b8-b60d-6418a29a6531"/> |
2 | 2 |
|
3 | 3 | A `pinocchio`-based Token program. |
4 | 4 |
|
| 5 | +## Overview |
| 6 | + |
5 | 7 | This repository contains a proof-of-concept of a reimplementation of the SPL Token program, one of the most used programs on Solana, using `pinocchio`. The purpose is to have an implementation that optimizes the compute units, while being fully compatible with the original implementation — i.e., support the exact same instruction and account layouts as SPL Token, byte for byte. |
6 | 8 |
|
7 | 9 | ## Status |
8 | 10 |
|
9 | 11 | | Instruction | Completed | CU | CU (SPL Token) | |
10 | 12 | |----------------------------|-----------|-----|----------------| |
11 | | -| `InitializeMint` | [ x ] | 396 | 2967 | |
12 | | -| `InitializeAccount` | [ x ] | 444 | 4527 | |
13 | | -| `InitializeMultisig` | [ ] | | | |
14 | | -| `Transfer` | [ x ] | 161 | 4645 | |
15 | | -| `Approve` | [ ] | | | |
16 | | -| `Revoke` | [ ] | | | |
17 | | -| `SetAuthority` | [ ] | | | |
18 | | -| `MintTo` | [ x ] | 160 | 4538 | |
19 | | -| `Burn` | [ ] | | | |
20 | | -| `CloseAccount` | [ ] | | | |
21 | | -| `FreezeAccount` | [ ] | | | |
22 | | -| `ThawAccount` | [ ] | | | |
23 | | -| `TransferChecked` | [ ] | | | |
24 | | -| `ApproveChecked` | [ ] | | | |
25 | | -| `MintToChecked` | [ ] | | | |
26 | | -| `BurnChecked` | [ ] | | | |
27 | | -| `InitializeAccount2` | [ ] | | | |
28 | | -| `SyncNative` | [ ] | | | |
29 | | -| `InitializeAccount3` | [ ] | | | |
30 | | -| `InitializeMultisig2` | [ ] | | | |
31 | | -| `InitializeMint2` | [ ] | | | |
32 | | -| `GetAccountDataSize` | [ ] | | | |
33 | | -| `InitializeImmutableOwner` | [ ] | | | |
34 | | -| `AmountToUiAmount` | [ ] | | | |
35 | | -| `UiAmountToAmount` | [ ] | | | |
| 13 | +| `InitializeMint` | ✅ | 396 | 2967 | |
| 14 | +| `InitializeAccount` | ✅ | 444 | 4527 | |
| 15 | +| `InitializeMultisig` | | | | |
| 16 | +| `Transfer` | ✅ | 161 | 4645 | |
| 17 | +| `Approve` | | | | |
| 18 | +| `Revoke` | | | | |
| 19 | +| `SetAuthority` | | | | |
| 20 | +| `MintTo` | ✅ | 160 | 4538 | |
| 21 | +| `Burn` | | | | |
| 22 | +| `CloseAccount` | | | | |
| 23 | +| `FreezeAccount` | | | | |
| 24 | +| `ThawAccount` | | | | |
| 25 | +| `TransferChecked` | | | | |
| 26 | +| `ApproveChecked` | | | | |
| 27 | +| `MintToChecked` | | | | |
| 28 | +| `BurnChecked` | | | | |
| 29 | +| `InitializeAccount2` | | | | |
| 30 | +| `SyncNative` | | | | |
| 31 | +| `InitializeAccount3` | | | | |
| 32 | +| `InitializeMultisig2` | | | | |
| 33 | +| `InitializeMint2` | | | | |
| 34 | +| `GetAccountDataSize` | | | | |
| 35 | +| `InitializeImmutableOwner` | | | | |
| 36 | +| `AmountToUiAmount` | | | | |
| 37 | +| `UiAmountToAmount` | | | | |
| 38 | + |
| 39 | +> Test were run using Solana `v2.1.0`. |
36 | 40 |
|
37 | 41 | ## Building |
38 | 42 |
|
|
0 commit comments