-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storage Decoding error when querying system.account.at()
from a historic block
#3871
Comments
There is pre introduction of // get API instance with metadata at a specific hash
const a = await api.at('0x3361f6446c72aaa6679aa40a03e493a851161fd08cb53237968a9967902691c0');
// [accountNonce, extrinsicCount, allExtrinsicsWeight, allExtrinsicsLen, blockHash, extrinsicData, number, parentHash, extrinsicsRoot, digest, events, eventCount, eventTopics]
console.log(Object.keys(a.query.system)); Rather at this point of the chain evolution it is a const ALICE = '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY';
const a = await api.at('0x3361f6446c72aaa6679aa40a03e493a851161fd08cb53237968a9967902691c0');
// [totalIssuance, vesting, freeBalance, reservedBalance, locks]
console.log(Object.keys(a.query.balances));
console.log((await a.query.balances.freeBalance(ALICE)).toHuman())
// for extra benefit, the nonce (at this point stored in system)
console.log((await a.query.system.accountNonce(ALICE)).toHuman()) |
Thanks for the response on this! Will close due to this giving enough context to find a work around for our problem! Thanks again. |
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. |
Resproducible Example:
Resulting error:
Using
@polkadot/api 5.4.1
Rel: #634
Per the related issue:
The text was updated successfully, but these errors were encountered: