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

token: Add Zig implementation #15

Merged
merged 2 commits into from
Nov 15, 2024
Merged

token: Add Zig implementation #15

merged 2 commits into from
Nov 15, 2024

Conversation

joncinque
Copy link
Owner

Problem

There's only a Rust implementation of SPL Token in Rosetta, but we can write a token program in many other languages.

Summary of changes

Add a simple SPL Token clone in Zig. It does not have multisig support just yet, but it has most of the functionality needed.

CU usage is much lower than the Rust version. We might be able to improve it more if we can make pubkey comparisons cheaper. Each one seems to use ~30 CUs currently.

#### Problem

There's only a Rust implementation of SPL Token in Rosetta, but we can
write a token program in many other languages.

#### Summary of changes

Add a simple SPL Token clone in Zig. It does not have multisig support
just yet, but it has most of the functionality needed.

CU usage is much lower than the Rust version. We might be able to
improve it more if we can make pubkey comparisons cheaper. Each one
seems to use ~30 CUs currently.
@joncinque joncinque merged commit 2451bde into main Nov 15, 2024
15 checks passed
@joncinque joncinque deleted the tokenzig branch November 15, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant