Skip to content

Instantly share code, notes, and snippets.

@qwer951123
qwer951123 / test_module_id.js
Last active April 8, 2020 11:07
Substrate ModuleId To Account
const test: Uint8Array = stringToU8a('modltet/loan'.padEnd(32, '\0'));
const AccountId = api.registry.get('AccountId')!;
const account = new AccountId(api.registry, test);
console.log(account.toString());

Keybase proof

I hereby claim:

  • I am qwer951123 on github.
  • I am qiuhao (https://keybase.io/qiuhao) on keybase.
  • I have a public key ASANl1FWaLsv01qtUDQsBsF2kDwGMfpsP7V-fveQq_muRAo

To claim this, I am signing this object: