Skip to content

TalismanSociety/papi-chains-feedback

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

papi-chains-feedback

Repo Creation Steps

NOTE: Please run bun upgrade before you execute these tests locally.
Even a bun version as recent as v1.1.3 will throw No response received from RPC endpoint in 60s errors.

bun init # using bun v1.1.26
bun add polkadot-api

# Note: this step does not work
# it throws with 'RpcError: Method not found: 'chainHead_unstable_follow' does not exist/is not available'
bun x papi add avail -w wss://avail-mainnet.public.blastapi.io

# Workaround for the previous step:
# Requirements: (install with brew / apt / etc)
# - `curl` make the http request
# - `jq` parse the json result
# - `xxd` convert the metadata from hex to binary
curl -sS https://avail-mainnet.public.blastapi.io \
    -H 'Content-Type: application/json' \
    -d '{"jsonrpc":"2.0","id":1,"method":"state_getMetadata","params":[]}' \
    | jq -r .result \
    | xxd -r -p \
    > avail.scale
bun x papi add avail -f avail.scale

To install dependencies:

bun install

To run:

bun run index.ts

Log to results.log:

bun run index.ts >results.log 2>&1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published