A pinocchio
-based Memo program.
A re-implementation of SPL Memo program using pinocchio
inspired by Cavey's ASMEMO program.
There are three "version" included:
- same output as SPL Memo (branch
main
)Program PMemo11111111111111111111111111111111111111 invoke [1] Program log: Signed by 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM Program log: Memo (len 60): "why does spl memo use 36000 cus to print len 60 msg of ascii" Program PMemo11111111111111111111111111111111111111 consumed 2320 of 1400000 compute units Program PMemo11111111111111111111111111111111111111 success
- same information as SPL Memo, but different formatting (branch
syscall
)Program PMemo11111111111111111111111111111111111111 invoke [1] Program log: Signed by: Program log: 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM Program log: Memo (len 60): "why does spl memo use 36000 cus to print len 60 msg of ascii" Program PMemo11111111111111111111111111111111111111 consumed 641 of 1400000 compute units Program PMemo11111111111111111111111111111111111111 success
- logs the memo message only, same as ASMEMO (branch
asmemo
)Program PMemo11111111111111111111111111111111111111 invoke [1] Program log: why does spl memo use 36000 cus to print len 60 msg of ascii Program PMemo11111111111111111111111111111111111111 consumed 125 of 1400000 compute units Program PMemo11111111111111111111111111111111111111 success
- no program output (branch
minimal
)Program PMemo11111111111111111111111111111111111111 invoke [1] Program PMemo11111111111111111111111111111111111111 consumed 22 of 1400000 compute units Program PMemo11111111111111111111111111111111111111 success
Program size: 1280
bytes
CU comsumption:
# signers | p-memo (minimal) | p-memo (asmemo) | p-memo (syscall) | p-memo | SPL Memo |
---|---|---|---|---|---|
0 | 4 | 108 | 415 | 419 | 2022 |
1 | 21 | 123 | 641 | 1813 | 13668 |
2 | 36 | 136 | 756 | 3198 | 25267 |
Note
Using Solana CLI v2.2.13
.
To build the programs from the root directory of the repository:
cargo build-sbf
To run the tests:
cargo test-sbf
The code is licensed under the Apache License Version 2.0