Skip to content

cratiu222/go-substrate-rpc-client

This branch is 3 commits ahead of, 1 commit behind centrifuge/go-substrate-rpc-client:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f08f0e2 · Sep 17, 2024
Nov 2, 2021
Dec 5, 2023
Apr 14, 2021
Jul 5, 2023
Sep 17, 2024
Nov 17, 2020
Sep 17, 2024
Dec 5, 2023
Nov 18, 2021
Jul 5, 2023
Dec 5, 2023
Sep 23, 2022
Jul 31, 2024
Nov 18, 2021
Jul 4, 2022
May 18, 2022
Dec 5, 2023
Sep 27, 2019
Jul 6, 2022
Oct 24, 2023
Nov 18, 2021
Dec 5, 2023
Dec 5, 2023
Dec 5, 2023
Nov 18, 2021
Dec 5, 2023

Repository files navigation

Go Substrate RPC Client (GSRPC)

License: Apache v2.0 GoDoc Reference Build Status codecov Go Report Card

Substrate RPC client in Go. It provides APIs and types around Polkadot and any Substrate-based chain RPC calls. This client is modeled after polkadot-js/api.

State

This package is feature complete, but it is relatively new and might still contain bugs. We advise to use it with caution in production. It comes without any warranties, please refer to LICENCE for details.

Documentation & Usage Examples

Please refer to https://godoc.org/github.com/centrifuge/go-substrate-rpc-client/v4

Usage test examples of Dynamic Parsing of events & extrinsics

Registry docs

Contributing

  1. Install dependencies by running make
  2. Build the project with go build
  3. Lint make lint (you can use make lint-fix to automatically fix issues)
  4. Run make run-substrate-docker to run the Substrate docker container

Testing

We run our tests against a Substrate Docker image. You can choose to run the tests within a tests-dedicated Docker container or without a container.

  1. make test-dockerized Run tests within a docker container of its own against the Substrate docker container.

  2. make test Run the tests locally against the Substrate docker container. Note that it expects the Substrate docker container to be up and running to execute the whole test suite properly.

Visit https://polkadot.js.org/apps for inspection

Note: To use a custom Substrate endpoint, first set the environment variable before running the tests: export RPC_URL="http://example.com:9934"

Adding support for new RPC methods

After adding support for new methods, update the RPC mocks.

  1. Install mockery
  2. Run go generate ./...

About

Substrate RPC client for go aka GSRPC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%