{"id":26244287,"url":"https://github.com/cryptoronaldo/spl-token-timelock","last_synced_at":"2026-04-25T22:33:59.756Z","repository":{"id":272569777,"uuid":"913873691","full_name":"CryptoRonaldo/spl-token-timelock","owner":"CryptoRonaldo","description":"This project showcases a program designed to lock arbitrary SPL tokens and release them according to a predefined unlock schedule. It includes an on-chain lockup tokens program and a series of test cases to interact with the on-chain solution.","archived":false,"fork":false,"pushed_at":"2025-01-15T09:05:33.000Z","size":55,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-04T07:05:57.742Z","etag":null,"topics":["anchor","rust","solana","solana-token","timelock"],"latest_commit_sha":null,"homepage":"https://t.me/regendarystar","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CryptoRonaldo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-08T14:16:28.000Z","updated_at":"2025-02-26T15:06:07.000Z","dependencies_parsed_at":"2025-01-15T10:57:50.626Z","dependency_job_id":null,"html_url":"https://github.com/CryptoRonaldo/spl-token-timelock","commit_stats":null,"previous_names":["brightlystar0117/spl-token-timelock","cryptoronaldo/spl-token-timelock"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CryptoRonaldo/spl-token-timelock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CryptoRonaldo%2Fspl-token-timelock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CryptoRonaldo%2Fspl-token-timelock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CryptoRonaldo%2Fspl-token-timelock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CryptoRonaldo%2Fspl-token-timelock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CryptoRonaldo","download_url":"https://codeload.github.com/CryptoRonaldo/spl-token-timelock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CryptoRonaldo%2Fspl-token-timelock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32279656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anchor","rust","solana","solana-token","timelock"],"created_at":"2025-03-13T11:19:19.221Z","updated_at":"2026-04-25T22:33:59.500Z","avatar_url":"https://github.com/CryptoRonaldo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔐 spl-token-timelock\n\n[![License](https://img.shields.io/badge/license-MIT-blue)](https://github.com/gameyoo/spl-token-timelock/blob/master/LICENSE)\n[![Contributors](https://img.shields.io/github/contributors/gameyoo/spl-token-timelock)](https://github.com/gameyoo/spl-token-timelock/graphs/contributors)\n\n\u003cp align=\"center\"\u003e\n    spl-token lockup programs on Solana.\n\u003c/p\u003e\n\nThis project demonstrates how to write a program that allows you to lock arbitrary SPL tokens and release the locked tokens with a determined unlock schedule.\n\nThe project comprises of:\n\n* An on-chain lockup tokens program\n* A set of test cases for interacting with the on-chain program\n\n## Prerequisites\n\n* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n* [NodeJS \u0026 NPM](https://nodejs.org/en/) version 14+\n* [Rust](https://rustup.rs/) - install [from here](https://www.rust-lang.org/tools/install#), it's pretty straightforward.\n* [Solana CLI](https://docs.solana.com/cli/install-solana-cli-tools) - follow this to install.\n* [Anchor](https://project-serum.github.io/anchor/) - follow the [easy installation steps](https://project-serum.github.io/anchor/getting-started/installation.html).\n\n## Install Rust \u0026\u0026 Solana Cli \u0026\u0026 Anchor\n\n* See [this doc](https://github.com/solana-labs/solana#) for more details\n\n### Install rustup\n\n```sh\n$ curl https://sh.rustup.rs -sSf | sh\n...\n\n$ rustup component add rustfmt\n...\n\n$ rustup update\n...\n\n$ rustup install 1.61.0\n...\n```\n\n### Install solana-cli\n\n* See [this doc](https://docs.solana.com/cli/install-solana-cli-tools) for more details\n\n```sh\n$ sh -c \"$(curl -sSfL https://release.solana.com/stable/install)\"\n...\n\n$ solana -V\nsolana-cli 1.8.17 (src:f63505df; feat:3263758455)\n\n$ solana-keygen new\n...\n```\n\nConfig to local cluster:\n\n```sh\nsolana config set --url localhost\n...\n```\n\n### Install `rust-analyzer` (Optional)\n\n* See [this repo](https://github.com/rust-analyzer/rust-analyzer) for more details\n\n`rust-analyzer` can be very handy if you are using Visual Studio Code. For example, the analyzer can help download the missing dependencies for you automatically.\n\n### Install avm \u0026 anchor\n\n```sh\n$ cargo install --git https://github.com/project-serum/anchor avm --locked --force\n...\n```\n\nUse latest `anchor` version:\n\n```sh\navm use 0.20.1\n```\n\n### Extra Dependencies on Linux(Optional)\n\nYou may have to install some extra dependencies on Linux(eg. Ubuntu):\n\n```sh\n$ sudo apt-get update \u0026\u0026 sudo apt-get upgrade \u0026\u0026 sudo apt-get install -y pkg-config build-essential openssl libssl-dev libudev-dev\n...\n\n```\n\n### Verify the Installation\n\nCheck if Anchor is successfully installed.\n\n```sh\n$ anchor --version\nanchor-cli 0.20.1\n```\n\n## Build and Deployment\n\n* See [this repo](https://github.com/gameyoo/spl-token-timelock) for full code base\n\nFrist,let's clone the repo:\n\n```sh\n$ git clone https://github.com/gameyoo/spl-token-timelock.git\n...\n\n$ cd spl-token-timelock\n...\n$ npm install\n...\n```\n\nRun `solana-test-validator` in another terminal session:\n\n```sh\n$ cd ~\n$ solana-test-validator\nLedger location: test-ledger\nLog: test-ledger/validator.log\nIdentity: 7YbUvia6fEB9yJZbt6o7RhrSQqUQGAAV8anF4rsfhawU\nGenesis Hash: 2Md358rLRXS9Q9rYLSzbixxm8nHisbhJAuNsDsMXi9bj\nVersion: 1.8.17\nShred Version: 56413\nGossip Address: 127.0.0.1:1024\nTPU Address: 127.0.0.1:1027\nJSON RPC URL: http://127.0.0.1:8899\n...\n```\n\nRun `solana logs` to fetch logs in another terminal session:\n\n```sh\n$ solana logs\nStreaming transaction logs. Confirmed commitment\n...\n```\n\nNext, let's compile the token-faucet program:\n\n```sh\n$ anchor build\n\nBPF SDK: ~/.local/share/solana/install/releases/stable-f63505df33b76ed694257b87231c91620f4b8d68/solana-release/bin/sdk/bpf\ncargo-build-bpf child: rustup toolchain list -v\ncargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release\n...\n```\n\nDeploy the program after compilation:\n\n```sh\n$ anchor deploy\nDeploying workspace: \u003chttp://localhost:8899\u003e\nUpgrade authority: ~/.config/solana/id.json\nDeploying program \"spl-token-timelock\"...\n...\n```\n\n\u003e If you encounter an insuffficient fund error, you may have to request for an aidrop:\n\u003e\n\u003e ```sh\n\u003e $ solana airdrop 1\n\u003e ```\n\n### Test\n\nFinally, let's run all tests by using following command:\n\n```sh\n$ anchor test\nBPF SDK: ~/.local/share/solana/install/releases/stable-f63505df33b76ed694257b87231c91620f4b8d68/solana-release/bin/sdk/bpf\ncargo-build-bpf child: rustup toolchain list -v\ncargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release\n    Finished release [optimized] target(s) in 2.36\n...\n    spl-token-timelock\n        ✔ Create vesting (444ms)\n        ✔ Withdraw (10334ms)\n        ✔ Cancel (12117ms)\n3 passing (24s)\n\n✨  Done in 38.00s.\n```\n\nWe should see all test cases passed,that's it!\n\nPlease visit our whitepaper.\n\n## License\n\nspl-token-timelock is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptoronaldo%2Fspl-token-timelock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcryptoronaldo%2Fspl-token-timelock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcryptoronaldo%2Fspl-token-timelock/lists"}