Questions tagged [javascript]

Questions about JavaScript in the context of Substrate and Polkadot.

Filter by
Sorted by
Tagged with
1 vote
1 answer
23 views

Are there any tools available for creating a mock version of a contract in JS/TS?

Currently, we use "live" versions of our contracts running on a substrate contracts node in our JavaScript tests. This makes them integration tests and difficult to include in simple GitHub ...
user avatar
  • 568
0 votes
0 answers
19 views

How to check the state root based on proofs for a parachain

I'm trying to verify that a parachain's state root that I'm getting using the RPC connection is correct. I'm going to use the result of the RPC call state_getReadProof. The steps are following: Call ...
user avatar
2 votes
1 answer
50 views

Dev Substrate Node at Capacity for WS Connections, how to flush?

I'm running a node in dev mode: ./substrate/target/release/substrate --dev --tmp --ws-external My client connection code: provider = new WsProvider(wsProvider) api = await new ApiPromise({ provider })....
user avatar
3 votes
2 answers
41 views

Access your NFTs using PolkadotJS API

Still very new to this ecosystem. I'm trying to build a ReactApp that can access my NFT's that I have purchased on the Singular App. High level explanation, how do I do this? Low level, point me in ...
user avatar
  • 111
5 votes
1 answer
43 views

How to programmatically get current unbonding information on the Polkadot relay chain?

Using either a Rust or JavaScript client library I would like to get the amount of DOT that is currently being unbonded on the relay chain. Some staking information is available in the Polkadot JS ...
user avatar
  • 319
7 votes
1 answer
67 views

How to get the balance of an account at a particular nonce using Polkadot.js API

I want get the balance of an account address at a particular nonce. I only know how to get the latest balance of an account address and its latest nonce (total number of transactions sent from that ...
user avatar
  • 71
1 vote
1 answer
28 views

How to use the .multi() method? (substrate-front-end-template)

I finished the substrate kitty tutorial (backend and frontend). Now I would like to build a simple frontend for the RMRK pallet. Now I stuck on the .multi(...) method. Where can I find a documentation ...
user avatar
  • 71
0 votes
1 answer
25 views

Invalid params: unknown field `storageDepositLimit` Error when getting contract data from a chain

I deploy the flipper contract to Jupiter testnet, when I try to get the contract data, I got this error message although it works just fine on a local node. (I also tested on other test networks and ...
user avatar
1 vote
1 answer
35 views

Transaction would exhaust the block limits error when calling a smart contract from Polkadot JS API

I'm trying to call a smart contract using the Polkadot JS API (like here). The contract function is really simple, it takes 2 strings: a key and a value as input parameters, then adds the key, value ...
user avatar
1 vote
1 answer
38 views

OutOfGas Error when trying to read contract data using Polkadot JS API

I'm trying to read the flipper contract data from a contract in a local node, following the code in here. This is my code: // Required imports const { ApiPromise, WsProvider } = require("@...
user avatar