* Use Si V1 in contracts (w/ PortableRegistry usage) * Type id lookups * Fix build & linting * Remove extra .toNumber() (VSCode has gone crazy) * v1 tests * Cleanup parsing * Explicit type cast for v1 types * Unneeded toNumber * Align events exposure with messages/constructors * dedupe * Re-add typedef extraction tests * with typedefs * Override for always primitives * displayName improvements * Versioned project * New structure * Fixes * Cleanups * Ensure API registry is the default used * Adjust arg & return encoding/decoding * Recursive contract * DoNotConstruct to Si type
11 lines
371 B
TypeScript
11 lines
371 B
TypeScript
// Copyright 2017-2021 @polkadot/api-contract authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
export function createVersionedExport (version: string, orig: Record<string, unknown>, exp: Record<string, unknown>): Record<string, unknown> {
|
|
Object.entries(orig).forEach(([name, json]): void => {
|
|
exp[`${version}_${name}`] = json;
|
|
});
|
|
|
|
return exp;
|
|
}
|