3
votes
Transaction pool management
You can set --pool-kbytes and --pool-limit in your node, to allow it to not drop some extrinsics.
But better than that I'd recommend you to keep track of the txpool size by calling the RPC method ...
1
vote
How to get event args values from contracts::contractemitted data?
I use this:
if (result.status.isInBlock) {
result.events.forEach(({event, phase, topics}) => {
if (api.events.contracts.ContractEmitted.is(event)) {
const [account_id, contract_event]...
1
vote
Accepted
Polkadot JS query response types are missing
What you are missing is to apply augmentation, for that you have to import '@polkadot/api-augment' into your codebase entry point before any imports from the API itself:
import "@polkadot/api-...
1
vote
Accepted
Substrate Node Error: Denied request: HTTP header: host value verification failed
I think this is cause by the rpc-cors rule.
Try --rpc-cors all.
1
vote
Accepted
how many ways are there to get all items stored in custom pallet
In your case with PolkadotJS it will look like this:
const consents = await api.query.yourpallet.userConsent.entries();
consents.forEach(([key, consent]) => {
console.log(consent.toHuman());
});
...
1
vote
Accepted
How to properly decode a SCALE-encoded string using polkadot-js?
You want to follow the same steps you took to generate the hex to get back.
In your example generating the hex you do:
String: "aabbcc"
toU8a: Uint8Array(7) [ 24, 97, 97, 98, 98, 99, 99 ]
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
polkadot-js × 519polkadot × 57
substrate-node-template × 44
ink × 37
api × 37
extrinsic × 31
smart-contract × 27
rpc × 25
typescript × 23
kusama × 20
polkadot-js-extension × 20
transactions × 19
substrate-front-end × 18
parachain × 17
javascript × 17
substrate-parachain-template × 12
staking × 11
custom-types × 11
custom-rpc × 11
balances × 10
substrate-contracts-node × 10
error × 9
storage × 8
rust × 8
json-rpc × 8