Write Anchor-compatible Solana programs in TypeScript

Related tags

Cryptography axolotl
Overview

Axolotl

Write Achor-compatible Solana programs using TypeScript.

Writing Rust is hard, but safe. It's also the go-to language for writing Solana programs. With Axolotl, you can utilize your web development skills to develop programs for the Solana blockchain. Solana program development has never been this easy.

This project is currently in pre-alpha and is heavily inspired by Seahorse.

Features

  • Library to help write TypeScript Solana programs
  • Compiler that produces Anchor-compatible Solana programs

Development

Axolotl is currently under development. We are working toward the following milestones. Feel free to follow along!

You might also like...
Deploy your Solana programs during high load.

solana-deployer IMPORTANT: There is a known bug with the current program that will be fixed soon. In the meantime you should deploy from Solana Playgr

Extract data from helium-programs via Solana RPC and serves it via HTTP

hnt-explorer This application extracts data from helium-programs via Solana RPC and serves it via HTTP. There are CLI commands meant to run and test t

VSCode extension to quickly write and customize well tested Solana snippets.
VSCode extension to quickly write and customize well tested Solana snippets.

Solana Snippets The Solana Snippets VSCode Extension allows you to quickly insert Solana snippets into your code. This snippets are well tested in a r

Demonstrates Solana data account versioning used in supporting the Solana Cookbook article: Account Data Versioning
Demonstrates Solana data account versioning used in supporting the Solana Cookbook article: Account Data Versioning

versioning-solana This repo demonstrates ONE rudimentary way to upgrade/migrate account data changes with solana program changes. What is data version

My attempt at learning Solana program (smart contract) development through RareSkill's Solana course.

60-days-of-solana My attempt at learning Solana program (smart contract) development through RareSkill's Solana course. Originally, I was trying to cr

Marinde Anchor-Based, first on mainnet, liquid-staking-program and mSOL-SOL swap pool

marinade-anchor Marinade-finance liquid staking program for the Solana blockchain Audits & Code Review Kudelski Security: https://marinade.finance/Kud

Simple (not simplest) UST vault that integrate with Anchor Protocol

Simple (not simplest) UST Vault Building a simple UST Vault that generate yield from Anchor while also have UST reserved for lending, and etc. This co

Anchor Design of contract - Accounts, Parameters

MarketplaceDesign Anchor Design of contract - Accounts, Parameters Main Instructions are Initialize ListForSale AcceptOffer CancelList MakeOffer Cance

Token management program (vesting and mining) implemented in Anchor
Token management program (vesting and mining) implemented in Anchor

Deep Dive into Anchor by Implementing Token Management Program Author: @ironaddicteddog, @emersonliuuu [Updated at 2022.5.21] You can find the full co

Comments
  • Create CLI scaffolding

    Create CLI scaffolding

    Users of Axolotl need to be able to scaffold a new project with a CLI. This will spin up a new Anchor project with the right dependencies for building an Axolotl project.

    opened by amorriscode 0
  • Handle libraries with the compiler

    Handle libraries with the compiler

    Sometime before the beta we should handle the usage of TypeScript/JavaScript libraries within Axolotl TypeScript code. This will be challenging because the libraries may or may not be typed so we won't be able to lean on TypeScript nearly as much.

    Seahorse handles Python modules and still does type-checking so we should be able to draw inspiration there.

    enhancement 
    opened by amorriscode 0
  • Develop compiler

    Develop compiler

    We currently have the scaffolding for the compiler. It uses swc_ecma_parser to turn TypeScript into an AST in Rust.

    We need to take that AST and transform it into Anchor-compatible Rust. For the "Hello World" proof, we will be heavily inspired by the Seahorse compiler.

    Because we are using TypeScript, we can create custom TypeScript ESLint rules to enforce any custom compiler rules in the developer's editor.

    Compiler steps

    • [x] Parse TypeScript source into an AST
    • [ ] Compile TypeScript source to Rust
      • [ ] Type-check to ensure all code can be valid Rust
      • [ ] Convert TypeScript into Anchor-compativle Rust
    enhancement 
    opened by amorriscode 0
  • Develop TypeScript library

    Develop TypeScript library

    The Axolotl TypeScript library will be used to:

    • Provide Solana/Rust types to the user's TypeScript code
    • Provide helper functions that are useful for developing Solana programs

    Types

    Since Axolotl programs are written with TypeScript, we can provide types to the users. For Seahorse programs, the types are included in a static file next to your Anchor program.

    Rust data types

    Refer to the Rust documentation for data types.

    Anchor has defined JavaScript --> Rust types. We'll be taking as much inspiration from their implementation as possible. Integers greater than 32 bytes will utilize bn.js, common for both Anchor and Solana.

    Solana types

    • [ ] Pubkey
      • 32-byte account identifier
      • Source
    • [x] AccountInfo
    • [ ] Signer
    • [ ] Program
    • [ ] Clock
      • Information about the network's time
      • Source
    • [ ] TokenAccount
    • [ ] TokenMint

    @solana/web3.js has a lot of classes and types that we will likely be able to utilize/export from Axolotl.

    Anchor types

    Helper functions

    • [ ] declare_id / ID helpers
      • Generated by Anchor
      • Instead of a user dealing with this, let's programmatically manage it with .env or something similar
    • [ ] Helpers related to lamports?

    Release

    • [ ] Released under @axolotl/sol
    enhancement 
    opened by amorriscode 1
Owner
Anthony Morris
I only deploy bugs on days that end with Y.
Anthony Morris
Battery-included Solana/Anchor project skeleton.

Anchor Skeleton Battery-included Solana/Anchor project skeleton. Features Rust test only: All tests (integration, unit) are written in Rust, so the co

Weiyuan Wu 5 Feb 23, 2022
Solana NFT marketplace boilerplate with anchor & react & candy-machine-cli

The Heros NFT Marketplace Boilerplate project is designed to let users fork, customize, and deploy their own nft marketplace app to a custom domain, ultra fast.

null 30 Dec 15, 2022
Solana NFT marketplace boilerplate with anchor & react & candy-machine-cli

Solana_Marketplace_HerosNFT The Heros NFT Marketplace Boilerplate project is designed to let users fork, customize, and deploy their own nft marketpla

null 30 Dec 15, 2022
⛏ An open protocol for launching liquidity mining programs on Solana.

⛏ Quarry An open protocol for launching liquidity mining programs on Solana. Background Quarry was built with the intention of helping more Solana pro

Quarry Protocol 207 Dec 19, 2022
The Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel parallel runtime.

Solana Program Library The Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel parallel runtime. These programs a

null 6 Jun 12, 2022
A suite of programs for Solana key management and security.

?? goki Goki is a suite of programs for Solana key management and security. It currently features: Goki Smart Wallet: A wallet loosely based on the Se

Goki Protocol 157 Dec 8, 2022
Examples of Solana on-chain programs

spl-examples List of Solana on-chain programs which demonstrate different aspects of Solana architecture. 01__state It's a counter program. Each user

Max Block 51 Dec 6, 2022
🧑‍✈ Version control and key management for Solana programs.

captain ??‍✈️ Version control and key management for Solana programs. Automatic versioning of program binaries based on Cargo Separation of deployer a

Saber 35 Mar 1, 2022
Synchronized shadow state of Solana programs available for off-chain processing.

Solana Shadow The Solana Shadow crate adds shadows to solana on-chain accounts for off-chain processing. This create synchronises all accounts and the

null 40 Oct 30, 2022
A collection of Solana-maintained on-chain programs

Solana Program Library The Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel parallel runtime. These programs a

Solana Foundation 2.2k Jan 6, 2023