Boyquotes / godot-solana-sdk

A GDExtention with bindings to the solana-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Godot Solana SDK

A GDExtention that gives Godot engine Solana support. This plugin provides the possibility to create Solana games for any platform supported by Godot. Utilize NFTs and Solana smart contracts in your game. The SDK has interface nodes for Anchor programs and instruction builders for Candy Machine, Candy Guard, System programs, SPL tokens and more.

godot_solana_sdk4

How to use

Download the binaries in the release section here. place the binaries anywhere in your godot project directory under res://bin/. Reload your project and you are good to go. See examples for an up to date usage example. Version 1.0 is built for 4.2 and later. Use the latest official release of godot to avoid problems.

Note! It might be dangerous to use mainnet in you applications. Crypto can be stolen. Security is not yet evaluated for the godot-solana-sdk. I can audit security if there is demand.

When the plugin is loaded, the engine will have an additional set of nodes and resources.

Nodes

These are the nodes provided by this pugin:

  • SolanaUtils
  • SolanaClient
  • Account
  • Transaction
  • WalletAdapter
  • ComputeBudget
  • SystemProgram
  • TokenProgram
  • MplTokenMetadata
  • AssociatedTokenAccountProgram
  • MplCandyMachine
  • MplCandyGuard
  • AnchorProgram

Screenshot from 2023-05-20 17-41-43

Resources

These are the resources provided by this pugin:

  • Pubkey
  • Keypair
  • CompiledInstruction
  • Message
  • Hash
  • AccountMeta
  • Instruction
  • MetaDataCreator
  • MetaDataCollection
  • MetaDataUses
  • MetaData
  • CandyGuardAccessList
  • CandyMachineData

Screenshot from 2023-05-20 17-44-00

Examples

There are example projects under the example folder. These are used to test the plugin whenever changes are made to the code. There might be some good references on how to get started. There are also a demo project on Github showcasing the plugin. The source can also be used for reference. The demo project is deployed on Github pages, go check it out. Here is how it looks.

Screenshot from 2024-05-01 18-13-29

Contributing

Feel free to open issues or feature requests. Contributions are very welcome. There is a contribution guideline but get involved by heading to discord or starting a discussion.

Setting up Build Environment

The plugin builds easily for your host platform with SCons.

git clone --recurse-submodules git@github.com:Virus-Axel/godot-solana-sdk.git
cd godot-solana-sdk
scons

This repository also includes means to build all the binaries in containers. This requires Podman to be installed.

scons --container_build

Projects using the Plugin

Hurry up, create some games and list them here!

About

A GDExtention with bindings to the solana-sdk

License:MIT License


Languages

Language:C++ 95.6%Language:GDScript 3.6%Language:Python 0.8%