hicommonwealth / edgeware-node-types

Typescript bindings for our node modules.
9 stars 7 forks source link

`api.consts.{pallet}.{constant}` access not working #21

Open emostov opened 3 years ago

emostov commented 3 years ago

relates to #20 and https://github.com/paritytech/substrate-api-sidecar/issues/329

I found that accessing constants through the polkadot-js API yields errors complaining that the pallet portion in api.consts.{pallet}.{constant} is undefined. For example

console.log(api.consts.proxy.maxPending);

yields the error:

TypeError: Cannot read property 'maxPending' of undefined

I have a bare bones repo to reproduce the issue so dependencies and tsc config are clear. See: https://github.com/emostov/edgeware-types/blob/cd9116c50c7cea80aad27e4d67ec7482c9a20c33/src/main.ts#L23

I got this error while running against a v3.1.0 local node run with the command: ./target/release/edgeware --chain=edgeware