-
Notifications
You must be signed in to change notification settings - Fork 19
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
Fix token symbol testnet #2159
Fix token symbol testnet #2159
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the new test, but it is skipped by default
@@ -175,14 +175,14 @@ export class Extrinsic<N = unknown, T extends ISubmittableResult = ISubmittableR | |||
} | |||
|
|||
// This uses automatic nonce management by default. | |||
public async signAndSend(inputNonce?: AutoNonce) { | |||
public async signAndSend(inputNonce?: AutoNonce, options: Partial<SignerOptions> = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allowing the pass-through of additional options such as in this case the metadata hash
StaleHashCheckExtension: { | ||
extrinsic: {}, | ||
payload: {}, | ||
}, | ||
StorageWeightReclaim: { | ||
extrinsic: {}, | ||
payload: {}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the additional signed extensions, but they don't need anything extra. This removes the warning.
@@ -10,6 +10,7 @@ use frame_support::{ | |||
PalletId, | |||
}; | |||
|
|||
// Duplicated in runtime/frequency/build.rs to keep build dependencies low |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did try importing it, but having runtime common as a build dependency was having issues and it was way too much for a few constants.
fn main() { | ||
substrate_wasm_builder::WasmBuilder::init_with_defaults() | ||
.enable_metadata_hash("FRQCY", 8) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here was the issue. The metadata hash was using "FRQCY" on all chains, but the chain was of course reporting different values and thus signatures were failing.
Codecov ReportAll modified and coverable lines are covered by tests ✅ |
654ae06
to
ddbeb79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Read through changes
Looks good.
@@ -0,0 +1,75 @@ | |||
import { DefinitionRpc } from '@polkadot/types/types'; | |||
|
|||
export const v1SubstrateRpcs: Record<string, Record<string, DefinitionRpc>> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this generated? If not what is the source and how it might evolve in future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not. I generated it via the list of "unknown" rpcs. I went looking for being able to pull it from somewhere, but nothing had it from what I could find on GitHub. :(
Co-authored-by: Aramik <aramikm@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Read through the changes
- Confirmed the testing results
🚢 it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read the code. Looks good!
Goal
The goal of this PR is to fix an issue with the token symbols for testnet found while testing CheckMetadataHash extension.
Part of #2011
Discussion
node/service/src/chain_spec/frequency_paseo.rs
substrate_wasm_builder::WasmBuilder::init_with_defaults().enable_metadata_hash
metadata_hash
Checklist
How to Test
With the e2e test:
metadata-hash
(EZ mode: edit line 109 ofinit.sh
to have it as one of the features)skip
ine2e/signed-extensions/checkMetadataHash.test.ts
to be onlymake js
cd e2e
npm i ../js/api-augment/dist/frequency-chain-api-augment-0.0.0.tgz
npm run test:serial
Note: You will see an warning about
PORTABLEREGISTRY: Unable to determine runtime Call type, cannot inspect sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic
However that appears to be due to an issue with the latest version of Polkadotjs/api and not related to these changes nor does it impact the running of the api.