Closed deuszx closed 1 year ago
It literally means what it says - the chain you are connecting to does not expose the runtime interfaces required. See the explict check -
It either means -
(a) it is a non-contract chain (e.g. Polkadot/Kusama/etc - a chain explicitly needs to have the contracts pallet included in the on-chain runtime) (b) it is an old version of the chain without the newer runtime interfaces (unlikely) (c) runtime misconfiguration if the pallet is indeed meant to be exposed
Yes, I saw the Base.ts
but I don't think that's the problem I'm having.
My setup:
Given that:
I think I've found the reason why it keeps working with ContractsUI https://github.com/paritytech/substrate/pull/12358
My chain is exposing that interface though @jacogr , see https://github.com/Cardinal-Cryptography/aleph-node/blob/main/bin/runtime/src/lib.rs#L924
Yes, the RPCs are completely unused since they are deprecated/removed in Substrate. So the API only uses the state call interfaces directly.
Tell me, please, if I get the exact same error when running substrate-contracts-node
from https://github.com/paritytech/substrate-contracts-node/releases/tag/v0.22.1 and
"@polkadot/api": "^9.11.1",
"@polkadot/api-contract": "^9.11.1",
Wouldn't that mean it's not the problem with my chain but the library?
Error:
Uncaught (in promise) Error: Your runtime does not expose the api.call.contractsApi.call runtime interfaces
at new Base (Base.js:13:1)
at new Contract (Contract.js:33:1)
at new ContractPromise (index.js:18:1)
at getHighlightedPostsAuthors (getHighlightedPostsAuthors.ts:20:1)
@jacogr , turns out that the error was caused by invalid version of npm -- failed on npm @ 9.1.1
but is "working" on 8.19.3
.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.
After upgrading network to WeightsV2, my frontend code started to fail with the following errors
link to the repository.
ContractsUI connected to that same network capable of interacting with the contracts and the chain.
Version:
Environment:
[ ] Node.js
[ ] Browser
[ ] Other (limited support for other environments)
Language:
[ ] JavaScript
[x] TypeScript (
"typescript": "^4.8.4"
)[ ] Other