#smart-contracts #calling #solana #decimal #anchor #testing #functions-traits

gfx-solana-utils

Utility functions/traits for calling Solana smart contracts

4 releases (2 breaking)

0.3.1 Dec 22, 2021
0.3.0 Dec 22, 2021
0.2.0 Nov 25, 2021
0.1.0 Nov 16, 2021

#39 in #calling

Download history 28/week @ 2024-03-29 11/week @ 2024-04-05

72 downloads per month
Used in gfx-swap

MIT license

14KB
307 lines

gfx-solana-utils build

This repo contains some utility functions/traits for calling Solana smart contracts.

Currently, it contains the following mods:

  • anchor_extensions: AnchorClientErrorExt for easily extracting the error code and converting it to Anchor error, GetProgramAccounts for the missing get_program_accounts RPC method on Anchor.
  • decimals: DecimalApply for dealing with SPL token decimal.
  • testing: A bunch of functions for integration testing the Solana contract. e.g. create a throw-away account, create a mint etc.

Dependencies

~75MB
~1.5M SLoC