use-ink / cargo-contract

Setup and deployment tool for developing Wasm based smart contracts via ink!
GNU General Public License v3.0
243 stars 119 forks source link

Invalid SS58 prefix byte #1052

Open HCastano opened 1 year ago

HCastano commented 1 year ago

I instantiated a contract with cargo contract instantiate and immediately tried to call a message using cargo contract call, which resulted in the following error:

❯ cargo contract call --contract 5ELdkUcH8gvi1cQdW3chF1nF1mjndDckSrpkzmz8bp9yLYj --message get -s //Alice
error: invalid value '5ELdkUcH8gvi1cQdW3chF1nF1mjndDckSrpkzmz8bp9yLYj' for '--contract <contract>': Invalid SS58 prefix byte.

When I re-instantiated the contract and tried with a different address the error didn't occur again.

I'm not sure how this could be reproduced, so we may want to try checking the encoding commands with that exact address that I used.

ascjones commented 1 year ago

I tried with the substrate one and it also gives the same error

sp_core::crypto::AccountId32::from_ss58check("5ELdkUcH8gvi1cQdW3chF1nF1mjndDckSrpkzmz8bp9yLYj").unwrap()

Also polkadot.js doesn't accept it either, so must be an invalid address.

image

If copied from the output of contract instantiate maybe there is a bug there.