3

I have run a local node on my local host using the substrate documentation at:

https://docs.substrate.io/tutorials/build-a-blockchain/build-local-blockchain/

Also I git cloned the UI Frontend for displaying the details.

As you know on a Polkadot blockchain, or a local node created using the substrates, addresses are in 3 different formats as below:

Chain address type Address:

Polkadot (SS58):
    15oF4uVJwmo4TdGW7VfQxNLavjCXviqxT9S1MgbjMNHr6Sp5

Kusama (SS58):
    HNZata7iMYWmk5RvZRTiAsSDhV8366zq2YGb3tLH5Upf74F

Generic Substrate chain (SS58):
    5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY

I want to know if and how we can change the format of these addresses on a Generic Substrate chain.

for example we want the addresses to begin with these three letters: "aml".

Is there any way to make that happen on a local blockchain and how?

Thanks in advance for your help.

1 Answer 1

1

Change it here.

https://github.com/paritytech/substrate/blob/f0c14f387baba0688afa9422a9bc24068d431716/bin/node-template/runtime/src/lib.rs#L200


And the letters depend on the ss58 hash algorithm.

The prefix range is 0 ~ 65535(u16::MAX). Maybe some of these numbers will derive the aml starting.

It's impossible to specify the letters manually.

Good luck!

1
  • Thank you for the response. I tried this and changed the number from 42 to 100. and even tried other numbers. Still getting the same type of addresses.
    – mohamad
    May 20, 2023 at 8:12

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.