capi serve --target dev switches the RPC endpoint but it doesn't switch the dev package.
As a result, transactions are sent using the non-dev package metadata.
For example, with the following nets.ts, transactions send to the polkadotDev endpoint use version 9420 (which is the version on wss://rpc.polkadot.io/) but the version should be 9380 (which is the dev binary version)
capi serve --target dev
switches the RPC endpoint but it doesn't switch the dev package. As a result, transactions are sent using the non-dev package metadata. For example, with the followingnets.ts
, transactions send to thepolkadotDev
endpoint use version9420
(which is the version onwss://rpc.polkadot.io/
) but the version should be9380
(which is the dev binary version)The same thing could happen if there is a miss alignment in some constants, for example the
SS58Prefix
.The solution could be to validate that both networks share the same metadata (or the same constants).