github.com/diadata-org/diadata@v1.4.593/pkg/dia/helpers/substrate-helper/gsrpc/README.md (about)

     1  # Go Substrate RPC Client (GSRPC)
     2  
     3  [![License: Apache v2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
     4  [![GoDoc Reference](https://godoc.org/github.com/centrifuge/go-substrate-rpc-client?status.svg)](https://godoc.org/github.com/centrifuge/go-substrate-rpc-client)
     5  [![Build Status](https://travis-ci.com/centrifuge/go-substrate-rpc-client.svg?branch=master)](https://travis-ci.com/centrifuge/go-substrate-rpc-client)
     6  [![codecov](https://codecov.io/gh/centrifuge/go-substrate-rpc-client/branch/master/graph/badge.svg)](https://codecov.io/gh/centrifuge/go-substrate-rpc-client)
     7  [![Go Report Card](https://goreportcard.com/badge/github.com/centrifuge/go-substrate-rpc-client)](https://goreportcard.com/report/github.com/centrifuge/go-substrate-rpc-client)
     8  
     9  This is a modified version of centrifuge/go-substrate-rpc-client
    10  
    11  Substrate RPC client in Go. It provides APIs and types around Polkadot and any Substrate-based chain RPC calls.
    12  This client is modeled after [polkadot-js/api](https://github.com/polkadot-js/api).
    13  
    14  ## State
    15  
    16  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.
    17  
    18  ## Documentation & Usage Examples
    19  
    20  Please refer to https://godoc.org/github.com/centrifuge/go-substrate-rpc-client
    21  
    22  ### Usage test examples of Dynamic Parsing of events & extrinsics
    23  
    24  [Registry docs](registry/REGISTRY.md)
    25  
    26  ## Contributing
    27  
    28  1. Install dependencies by running `make`
    29  2. Build the project with `go build`
    30  3. Lint `make lint` (you can use `make lint-fix` to automatically fix issues)
    31  4. Run `make run-substrate-docker` to run the Substrate docker container
    32  
    33  ### Testing
    34  
    35  We run our tests against a Substrate Docker image. You can choose to run
    36  the tests within a tests-dedicated Docker container or without a container.
    37  
    38  1. `make test-dockerized`
    39     Run tests within a docker container of its own against the Substrate docker container.
    40  
    41  2. `make test`
    42     Run the tests locally against the Substrate docker container. Note that it expects the
    43     Substrate docker container to be up and running to execute the whole test suite properly.
    44  
    45  Visit https://polkadot.js.org/apps for inspection
    46  
    47  **Note**: To use a custom Substrate endpoint, first set the environment variable before running the tests:
    48  `export RPC_URL="http://example.com:9934"`
    49  
    50  ### Adding support for new RPC methods
    51  
    52  After adding support for new methods, update the RPC mocks.
    53  
    54  1. Install [mockery](https://github.com/vektra/mockery)
    55  2. Run `go generate ./...`