Skip to content

OpenEmojiBattler/shiden-dapp-staking-tools

Repository files navigation

Prerequisite

  • claim all rewards

Install

yarn install

Run

yarn ts-node ./scripts/foo.ts

How to update ./interfaces/

Only necessary when chain interface/types updated.

types

  1. Update ./interfaces/all/definitions.ts
  2. Run yarn generate:defs

meta

Dirty hack. This should be fixed.

  1. Edit ./node_modules/@polkadot/typegen/util/derived.cjs
-const s = new Clazz(registry);
-const obj = s.defKeys.map(key => `${key}?: any`).join('; ');
-possibleTypes.push(`{ ${obj} }`, 'string', 'Uint8Array');
+possibleTypes.push('string', 'Uint8Array');
  1. Run yarn generate:meta
  2. Edit ./interfaces/augment-api*
    • Remove ./interfaces/augment-api-rpc.ts
    • Delete the rpc line on ./interfaces/augment-api.ts