1

Here is the error I am seeing:

type mismatch resolving <sp_core::sr25519::Public as IdentifyAccount>::AccountId == u64
--> pallets/src/mock.rs:76:2
|
76 | type Public = <Signature as Verify>::Signer;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found struct

1 Answer 1

3

It seems you have a type mis-configuration here. As the compiler is hinting at you, in one place, you have said that the AccountId type should be u64, whereas somewhere else, you are using a more complex signature structure.

You must pick and use just one of these types for your AccountId.

If you want to use a u64, I suggest you look at the simple mock.rs file generated for the substrate-node-template example:

https://github.com/paritytech/substrate/blob/master/bin/node-template/pallets/template/src/mock.rs

If you want to use a more complex public key for the AccountId, you can look at the parallel example:

https://github.com/paritytech/substrate/blob/master/frame/examples/parallel/src/tests.rs#L55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.