From 453dd9e49a2adc6ccb616c48ee411fde87128375 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 9 Oct 2020 18:33:31 +0200 Subject: [PATCH] Updated ABI definitions & parsing (#1662) * Updated ABI definitions & parsing * Run type generation * Definitions (should be ok-ish) * Cleanup names * Allow aliasses on structs (JSON parsing) * Cleanup json mapping passing * s/types/lookup/ * Parsing as per current output * InkSelector * MtRegistryIndex * String lookup tests * Remove serd ovverride comments (it works as-is) * inkRegistry tests * Extract primitive types * s/ty/id/ * Start of parsing into types (actually to be TypeDef) * Parsing * stringify struct fields * Small cleanups * Add type index to project lookup * Prefix with index * Fix interface generation * Latest contract metadata (#2118) * Add new (provisional) incrementer contract metadata * Update and regenerate type definitions * WIP: generate new format scale-info types * WIP: implementing variants * Implement variants * Fix up type resolution * Fix registry spec tests * Fix lints and some tests * Fix inkTypes tests * Fix some lints * Make imports same line like original * Comment out (temporarily) sanitize import to make CI pass * Sanitize * Remove indices * Remove index * Adjust ContractAbi interface (empty rpc) * linting * Pull in Andrew's changes * Cleanups * Some more cleanups * Update with v3 contracts * Adjust with actual types * Regenerate * Update ABI parsing (#2695) * Adjust ABI code * Cleanup * Merge non-code * Type naming * Simplify Base * Rename 1 * rename 2 * Rename 3 * Simplify * Add index to AbiMessage * Pass actual message or index for call * Rename param * Simplify * Expose call & exec * s/call/read/ * Cleanup asserts * AccountId as per spec * displayName is path * Update definitions * Flatten ABIType into TypeDef * Rewrite * Fix tests * Updates Co-authored-by: Andrew Jones --- packages/api-contract/src/Abi.spec.ts | 93 +- packages/api-contract/src/Abi.ts | 105 +- .../api-contract/src/ContractRegistry.spec.ts | 68 + packages/api-contract/src/ContractRegistry.ts | 365 ++- packages/api-contract/src/MetaRegistry.ts | 354 --- packages/api-contract/src/base/Base.ts | 34 + packages/api-contract/src/base/Blueprint.ts | 44 +- packages/api-contract/src/base/Code.ts | 39 +- packages/api-contract/src/base/Contract.ts | 123 +- packages/api-contract/src/base/util.ts | 79 +- .../src/promise/PromiseBlueprint.ts | 4 +- .../api-contract/src/promise/PromiseCode.ts | 5 +- .../src/promise/PromiseContract.ts | 4 +- packages/api-contract/src/rx/RxBlueprint.ts | 4 +- packages/api-contract/src/rx/RxCode.ts | 4 +- packages/api-contract/src/rx/RxContract.ts | 4 +- packages/api-contract/src/types.ts | 197 +- packages/api-contract/src/util.ts | 14 +- packages/api-contract/src/v2.test.json | 1414 ----------- packages/api-contract/test/abi/test001.json | 467 ---- packages/api-contract/test/abi/types.json | 142 -- .../api-contract/test/compare/dns.test.json | 259 ++ .../api-contract/test/compare/erc20.test.json | 2208 ++--------------- .../test/compare/erc721.test.json | 571 +++++ .../test/compare/flipper.test.json | 165 +- .../test/compare/incrementer.test.json | 173 +- .../test/compare/multisigPlain.test.json | 680 +++++ .../test/compare/shared-vec.test.json | 1720 ------------- .../test/compare/test001.cmp.json | 972 -------- .../api-contract/test/contracts/Erc20.json | 1007 -------- .../api-contract/test/contracts/Flipper.json | 1 - .../test/contracts/FlipperV2.json | 201 -- .../test/contracts/SharedVec.json | 1 - .../test/contracts/SharedVecV2.json | 935 ------- packages/api-contract/test/contracts/V2.json | 697 ------ .../test/contracts/delegator.json | 252 ++ .../test/contracts/delegator.wasm | Bin 0 -> 30306 bytes packages/api-contract/test/contracts/dns.json | 713 ++++++ packages/api-contract/test/contracts/dns.wasm | Bin 0 -> 44989 bytes .../test/contracts/erc20-pruned.wasm | Bin 39375 -> 0 bytes .../api-contract/test/contracts/erc20.json | 704 ++++++ .../api-contract/test/contracts/erc20.wasm | Bin 0 -> 54033 bytes .../api-contract/test/contracts/erc721.json | 1197 +++++++++ .../api-contract/test/contracts/erc721.wasm | Bin 0 -> 71848 bytes .../test/contracts/flipper-pruned.wasm | Bin 12802 -> 0 bytes .../api-contract/test/contracts/flipper.json | 106 + .../api-contract/test/contracts/flipper.wasm | Bin 0 -> 19055 bytes .../test/contracts/incrementer-pruned.wasm | Bin 14523 -> 0 bytes .../test/contracts/incrementer.json | 307 +-- .../test/contracts/incrementer.wasm | Bin 0 -> 19026 bytes packages/api-contract/test/contracts/index.ts | 10 + .../test/contracts/multisig_plain.json | 1466 +++++++++++ .../test/contracts/multisig_plain.wasm | Bin 0 -> 87372 bytes .../test/contracts/shared_vec-pruned.wasm | Bin 54608 -> 0 bytes .../test/contracts/trait-flipper.json | 103 + .../test/contracts/trait-flipper.wasm | Bin 0 -> 19050 bytes packages/types/src/augment/registry.ts | 20 +- packages/types/src/codec/utils/encodeTypes.ts | 22 +- packages/types/src/create/types.ts | 4 + .../interfaces/contractsAbi/definitions.ts | 37 +- .../src/interfaces/contractsAbi/types.ts | 47 +- 61 files changed, 6978 insertions(+), 11163 deletions(-) create mode 100644 packages/api-contract/src/ContractRegistry.spec.ts delete mode 100644 packages/api-contract/src/MetaRegistry.ts create mode 100644 packages/api-contract/src/base/Base.ts delete mode 100644 packages/api-contract/src/v2.test.json delete mode 100644 packages/api-contract/test/abi/test001.json delete mode 100644 packages/api-contract/test/abi/types.json create mode 100644 packages/api-contract/test/compare/dns.test.json create mode 100644 packages/api-contract/test/compare/erc721.test.json create mode 100644 packages/api-contract/test/compare/multisigPlain.test.json delete mode 100644 packages/api-contract/test/compare/shared-vec.test.json delete mode 100644 packages/api-contract/test/compare/test001.cmp.json delete mode 100644 packages/api-contract/test/contracts/Erc20.json delete mode 100644 packages/api-contract/test/contracts/Flipper.json delete mode 100644 packages/api-contract/test/contracts/FlipperV2.json delete mode 100644 packages/api-contract/test/contracts/SharedVec.json delete mode 100644 packages/api-contract/test/contracts/SharedVecV2.json delete mode 100644 packages/api-contract/test/contracts/V2.json create mode 100644 packages/api-contract/test/contracts/delegator.json create mode 100644 packages/api-contract/test/contracts/delegator.wasm create mode 100644 packages/api-contract/test/contracts/dns.json create mode 100644 packages/api-contract/test/contracts/dns.wasm delete mode 100644 packages/api-contract/test/contracts/erc20-pruned.wasm create mode 100644 packages/api-contract/test/contracts/erc20.json create mode 100644 packages/api-contract/test/contracts/erc20.wasm create mode 100644 packages/api-contract/test/contracts/erc721.json create mode 100644 packages/api-contract/test/contracts/erc721.wasm delete mode 100644 packages/api-contract/test/contracts/flipper-pruned.wasm create mode 100644 packages/api-contract/test/contracts/flipper.json create mode 100644 packages/api-contract/test/contracts/flipper.wasm delete mode 100644 packages/api-contract/test/contracts/incrementer-pruned.wasm create mode 100644 packages/api-contract/test/contracts/incrementer.wasm create mode 100644 packages/api-contract/test/contracts/index.ts create mode 100644 packages/api-contract/test/contracts/multisig_plain.json create mode 100644 packages/api-contract/test/contracts/multisig_plain.wasm delete mode 100644 packages/api-contract/test/contracts/shared_vec-pruned.wasm create mode 100644 packages/api-contract/test/contracts/trait-flipper.json create mode 100644 packages/api-contract/test/contracts/trait-flipper.wasm diff --git a/packages/api-contract/src/Abi.spec.ts b/packages/api-contract/src/Abi.spec.ts index 67dc020286..f7d6268230 100644 --- a/packages/api-contract/src/Abi.spec.ts +++ b/packages/api-contract/src/Abi.spec.ts @@ -3,23 +3,92 @@ import { TypeRegistry } from '@polkadot/types'; -import incrementerAbi from '../test/contracts/incrementer.json'; -import { Abi } from '.'; +import Abi from './Abi'; + +import * as testContracts from '../test/contracts'; + +const abis: Record = { ...testContracts }; + +function compare (name: string, registry: TypeRegistry, messageIds: string[]): void { + try { + const inkAbi = new Abi(registry, abis[name]); + + expect(inkAbi.messages.map(({ identifier }) => identifier)).toEqual(messageIds); + } catch (error) { + console.error(error); + + throw error; + } +} describe('Abi', (): void => { - const registry = new TypeRegistry(); + describe('construction', (): void => { + const registry = new TypeRegistry(); - describe('incrementer', (): void => { - let abi: Abi; - - beforeEach((): void => { - abi = new Abi(registry, incrementerAbi); + it('initializes from a contract ABI (flipper)', (): void => { + compare('flipper', registry, ['flip', 'get']); }); - it('has the attached methods', (): void => { - expect(Object.values(abi.abi.contract.messages).map(({ name }): string => name)).toEqual( - ['inc', 'get', 'compare'] - ); + it('initializes from a contract ABI (incrementer)', (): void => { + compare('incrementer', registry, ['inc', 'get']); + }); + + it('initializes from a contract ABI (erc20)', (): void => { + compare('erc20', registry, [ + 'total_supply', + 'balance_of', + 'allowance', + 'transfer', + 'approve', + 'transfer_from' + ]); + }); + + it('initializes from a contract ABI (delegator)', (): void => { + compare('delegator', registry, [ + 'get', + 'change', + 'switch' + ]); + }); + + it('initializes from a contract ABI (dns)', (): void => { + compare('dns', registry, [ + 'register', + 'set_address', + 'transfer', + 'get_address' + ]); + }); + + it('initializes from a contract ABI (erc721)', (): void => { + compare('erc721', registry, [ + 'balance_of', + 'owner_of', + 'get_approved', + 'is_approved_for_all', + 'set_approval_for_all', + 'approve', + 'transfer', + 'transfer_from', + 'mint', + 'burn' + ]); + }); + + it('initializes from a contract ABI (multisig_plain)', (): void => { + compare('multisigPlain', registry, [ + 'add_owner', + 'remove_owner', + 'replace_owner', + 'change_requirement', + 'submit_transaction', + 'cancel_transaction', + 'confirm_transaction', + 'revoke_confirmation', + 'invoke_transaction', + 'eval_transaction' + ]); }); }); }); diff --git a/packages/api-contract/src/Abi.ts b/packages/api-contract/src/Abi.ts index 5366139c10..03262d69d6 100644 --- a/packages/api-contract/src/Abi.ts +++ b/packages/api-contract/src/Abi.ts @@ -1,47 +1,94 @@ // Copyright 2017-2020 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Registry } from '@polkadot/types/types'; -import { AbiConstructors, AbiMessages, ContractABI, ContractABIPre, ContractABIFn, InterfaceAbi } from './types'; +import { AnyJson, CodecArg, Constructor, Registry } from '@polkadot/types/types'; +import { InkConstructorSpec, InkMessageSpec } from '@polkadot/types/interfaces'; +import { AbiConstructor, AbiMessage, AbiMessageParam } from './types'; -import { stringCamelCase } from '@polkadot/util'; +import { Compact, createClass, encodeTypeDef } from '@polkadot/types'; +import { assert, isObject, isUndefined, stringCamelCase } from '@polkadot/util'; import ContractRegistry from './ContractRegistry'; -export default class ContractAbi extends ContractRegistry implements InterfaceAbi { - public readonly abi: ContractABI; +function createArgClass (registry: Registry, args: AbiMessageParam[], baseDef: Record): Constructor { + return createClass( + registry, + JSON.stringify( + args.reduce((base: Record, { name, type }): Record => { + base[name] = type.displayName || encodeTypeDef(type); - public readonly constructors: AbiConstructors; + return base; + }, baseDef) + ) + ); +} - public readonly messages: AbiMessages; +function extendBase (fn: AbiMessage, add: Partial = {}): AbiMessage { + return Object.entries(add).reduce((fn: AbiMessage, [key, value]): AbiMessage => { + // do some magic + fn[key as 'args'] = value as AbiMessageParam[]; - constructor (registry: Registry, abi: ContractABIPre) { - super(registry, abi); - [this.abi, this.constructors, this.messages] = this._decodeAbi(abi); + return fn; + }, fn); +} + +export default class Abi extends ContractRegistry { + public readonly constructors: AbiConstructor[]; + + public readonly messages: AbiMessage[]; + + constructor (registry: Registry, json: AnyJson) { + super(registry, json); + + this.constructors = this.project.spec.constructors.map((spec: InkConstructorSpec, index) => + this._createBase(spec, { + index, + isConstructor: true + }) + ); + this.messages = this.project.spec.messages.map((spec: InkMessageSpec, index): AbiMessage => { + const typeSpec = spec.returnType.unwrapOr(null); + + return this._createBase(spec, { + index, + isMutating: spec.mutates.isTrue, + isPayable: spec.payable.isTrue, + returnType: typeSpec + ? this.typeDefAt(typeSpec.id, { displayName: typeSpec.displayName.map((s) => s.toString()).join('::') || undefined }) + : null + }); + }); } - private _decodeAbi (abiPre: ContractABIPre): [ContractABI, ContractABIFn[], AbiMessages] { - this.validateAbi(abiPre); + private _createBase (spec: InkMessageSpec | InkConstructorSpec, add: Partial = {}): AbiMessage { + const identifier = spec.name.toString(); + const args = spec.args.map(({ name, type }): AbiMessageParam => { + assert(isObject(type), `Invalid type at index ${type.toString()}`); - const abi = this.convertAbi(abiPre); - const constructors = abi.contract.constructors.map( - (constructor, index): ContractABIFn => { - return this.createMessage(`constructor ${index}`, constructor); - } - ); + return { + name: stringCamelCase(name.toString()), + type: this.typeDefAt(type.id) + }; + }); - const messages: AbiMessages = abi.contract.messages.reduce( - (result: AbiMessages, message): AbiMessages => { - const name = stringCamelCase(message.name); + const Clazz = createArgClass(this.registry, args, isUndefined(spec.selector) ? {} : { __selector: 'u32' }); + const baseStruct: { [index: string]: any } = { __selector: this.registry.createType('u32', spec.selector) }; - return { - ...result, - [name]: this.createMessage(`messages.${name}`, message) - }; - }, - {} - ); + const fn = ((...params: CodecArg[]): Uint8Array => { + assert(params.length === args.length, `Expected ${args.length} arguments to contract message '${identifier}', found ${params.length}`); - return [abi, constructors, messages]; + return Compact.addLengthPrefix(new Clazz(this.registry, args.reduce((mapped, { name }, index): Record => { + mapped[name] = params[index]; + + return mapped; + }, { ...baseStruct })).toU8a()); + }) as AbiMessage; + + return extendBase(fn, { + ...add, + args, + docs: spec.docs.map((doc) => doc.toString()), + identifier + }); } } diff --git a/packages/api-contract/src/ContractRegistry.spec.ts b/packages/api-contract/src/ContractRegistry.spec.ts new file mode 100644 index 0000000000..e700c53bff --- /dev/null +++ b/packages/api-contract/src/ContractRegistry.spec.ts @@ -0,0 +1,68 @@ +// Copyright 2017-2020 @polkadot/types authors & contributors +// SPDX-License-Identifier: Apache-2.0 +/* eslint-disable @typescript-eslint/no-var-requires */ + +import fs from 'fs'; +import path from 'path'; + +import { TypeRegistry } from '@polkadot/types'; + +import ContractRegistry from './ContractRegistry'; + +import * as testContracts from '../test/contracts'; + +const abis: Record = { ...testContracts }; + +function compare (name: string, registry: TypeRegistry): void { + const inkRegistry = new ContractRegistry(registry, abis[name]); + + try { + const cmpPath = path.join(__dirname, `../test/compare/${name}.test.json`); + + if (!fs.existsSync(cmpPath)) { + fs.writeFileSync(cmpPath, JSON.stringify(inkRegistry.typeDefs, null, 2), { flag: 'w' }); + } + + expect(inkRegistry.typeDefs).toEqual(require(cmpPath)); + } catch (error) { + console.error(JSON.stringify(inkRegistry.typeDefs)); + + throw error; + } +} + +describe('ContractRegistry', (): void => { + describe('construction', (): void => { + const registry = new TypeRegistry(); + + it('initializes from a contract ABI (flipper)', (): void => { + compare('flipper', registry); + }); + + it('initializes from a contract ABI (incrementer)', (): void => { + compare('incrementer', registry); + }); + + it('initializes from a contract ABI (erc20)', (): void => { + compare('erc20', registry); + }); + + it('initializes from a contract ABI (dns)', (): void => { + compare('dns', registry); + }); + + it('initializes from a contract ABI (erc721)', (): void => { + compare('erc721', registry); + }); + + it('initializes from a contract ABI (multisig_plain)', (): void => { + compare('multisigPlain', registry); + }); + + it('stores base project as JSON', (): void => { + const inkRegistry = new ContractRegistry(registry, abis.dns); + + expect(inkRegistry.json).toEqual(abis.dns); + }); + }); +}); diff --git a/packages/api-contract/src/ContractRegistry.ts b/packages/api-contract/src/ContractRegistry.ts index b3044f76fb..cd52b0da54 100644 --- a/packages/api-contract/src/ContractRegistry.ts +++ b/packages/api-contract/src/ContractRegistry.ts @@ -1,227 +1,218 @@ // Copyright 2017-2020 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { CodecArg, Constructor, Registry, TypeDef } from '@polkadot/types/types'; -import { ContractABIArgBasePre, ContractABIContract, ContractABIContractPre, ContractABIEvent, ContractABIEventPre, ContractABIFn, ContractABIFnArg, ContractABIMessage, ContractABIMessageBase, ContractABIMessagePre, ContractABI, ContractABIMessageCommon, ContractABIPre, ContractABIRange, ContractABIRangePre, ContractABIStorage, ContractABIStorageLayout, ContractABIStorageLayoutPre, ContractABIStoragePre, ContractABIStorageStruct, ContractABIStorageStructPre, ContractABITypePre } from './types'; +import { InkProject, MtField, MtLookupTypeId, MtType, MtTypeDefArray, MtTypeDefVariant, MtTypeDefSequence, MtTypeDefTuple, MtVariant } from '@polkadot/types/interfaces'; +import { AnyJson, Registry, TypeDef, TypeDefInfo } from '@polkadot/types/types'; -import { Compact, u32, createClass, encodeTypeDef } from '@polkadot/types'; -import { assert, hexToU8a, isNumber, isString, isNull, isObject, isUndefined, stringCamelCase, isHex, hexToNumber } from '@polkadot/util'; +import { assert, isObject, isUndefined } from '@polkadot/util'; +import { withTypeString } from '@polkadot/types'; -import MetaRegistry from './MetaRegistry'; +// convert the offset into project-specific, index-1 +export function getRegistryOffset (id: MtLookupTypeId): number { + return id.toNumber() - 1; +} -// parse a selector, this can be a number (older) or of [, , ...]. However, -// just catch everything (since this is now non-standard for u32 anyway) -function parseSelector (registry: Registry, fnname: string, input: ContractABIMessageCommon['selector']): u32 { - if (isNumber(input)) { - return registry.createType('u32', input); - } else if (isHex(input)) { - return registry.createType('u32', hexToU8a(input)); - } else if (typeof input === 'string') { - try { - const array = JSON.parse(input) as unknown[]; +export default class ContractRegistry { + public typeDefs: TypeDef[] = []; - assert(array.length === 4, `${fnname}: Invalid selector length`); + public registry: Registry; - return registry.createType('u32', Uint8Array.from( - // the as number[] is here to pacify TS, it doesn't quite know how to handle the cb - (array as number[]).map((value: string | number): number => - isHex(value) - ? hexToNumber(value.toString()) - : value - ) - )); - } catch (e) { - console.error(e); + public project: InkProject; + + public json: AnyJson; + + constructor (registry: Registry, json: AnyJson) { + assert(isObject(json) && !Array.isArray(json) && json.metadataVersion && isObject(json.spec) && !Array.isArray(json.spec) && Array.isArray(json.spec.constructors) && Array.isArray(json.spec.messages), 'Invalid JSON ABI structure supplied, expected a recent metadata version'); + + this.registry = registry; + this.json = json; + this.project = registry.createType('InkProject', json); + + // Generate TypeDefs for each provided registry type + this.project.types.forEach((_, index) => this.setTypeDef(this.registry.createType('MtLookupTypeId', index + 1))); + } + + public getAbiType (id: MtLookupTypeId): MtType { + const offset = getRegistryOffset(id); + const type = this.project.types[offset]; + + assert(!isUndefined(type), `getAbiType:: Unable to find ${id.toNumber()} in type values`); + + return this.registry.createType('MtType', type); + } + + public typeDefAt (id: MtLookupTypeId, extra: Pick = {}): TypeDef { + if (!this.typeDefs[getRegistryOffset(id)]) { + this.setTypeDef(id); } + + return { + ...this.typeDefs[getRegistryOffset(id)], + ...extra + }; } - throw new Error(`${fnname}: Unable to parse selector`); -} + public setTypeDef (id: MtLookupTypeId): void { + this.typeDefs[getRegistryOffset(id)] = this.extractType(this.getAbiType(id), id) as TypeDef; + } -function createArgClass (registry: Registry, args: ContractABIFnArg[], baseDef: Record): Constructor { - return createClass( - registry, - JSON.stringify( - args.reduce((base: Record, { name, type }): Record => { - base[name] = type.displayName || encodeTypeDef(type); + private extractType (inkType: MtType, id: MtLookupTypeId): Pick { + const path = [...inkType.path]; + let typeDef; - return base; - }, baseDef) - ) - ); -} + if (inkType.path.join('::').startsWith('ink_env::types::') || inkType.def.isPrimitive) { + typeDef = this.extractPrimitive(inkType); + } else if (inkType.def.isComposite) { + typeDef = this.extractFields(inkType.def.asComposite.fields); + } else if (inkType.def.isVariant) { + typeDef = this.extractVariant(inkType.def.asVariant, id); + } else if (inkType.def.isArray) { + typeDef = this.extractArray(inkType.def.asArray); + } else if (inkType.def.isSequence) { + typeDef = this.extractSequence(inkType.def.asSequence, id); + } else if (inkType.def.isTuple) { + typeDef = this.extractTuple(inkType.def.asTuple); + } else { + throw new Error(`Invalid ink! type at index ${id.toString()}`); + } -export default class ContractRegistry extends MetaRegistry { - // Contract ABI helpers - public validateArgs (name: string, args: ContractABIArgBasePre[]): void { - assert(Array.isArray(args), `Expected 'args' to exist on ${name}`); + const displayName = path.pop()?.toString(); - args.forEach((arg): void => { - const unknownKeys = Object.keys(arg).filter((key): boolean => !['name', 'type'].includes(key)); - - assert(unknownKeys.length === 0, `Unknown keys ${unknownKeys.join(', ')} found in ABI args for ${name}`); - assert(isNumber(arg.name) && isString(this._stringAt(arg.name)), `${name} args should have valid name `); - assert(isNumber(arg.type.ty) && isObject(this.typeDefAt(arg.type.ty)), `${name} args should have valid type`); + return withTypeString({ + ...(displayName + ? { displayName } + : {} + ), + ...(path.length > 1 + ? { namespace: path.map((segment) => segment.toString()).join('::') } + : {} + ), + ...(inkType.params.length > 0 + ? { params: inkType.params.map((id) => this.typeDefAt(id)) } + : {} + ), + ...typeDef }); } - public validateConstructors ({ contract: { constructors } }: ContractABIPre): void { - constructors.forEach((constructor: ContractABIMessagePre, index): void => { - const unknownKeys = Object.keys(constructor).filter((key): boolean => !['args', 'docs', 'name', 'selector'].includes(key)); - - assert(unknownKeys.length === 0, `Unknown keys ${unknownKeys.join(', ')} found in ABI constructor`); - - this.validateArgs(`constructor ${index}`, constructor.args); - }); - } - - public validateMessages ({ contract: { messages } }: ContractABIPre): void { - messages.forEach((message): void => { - const unknownKeys = Object.keys(message).filter((key): boolean => !['args', 'docs', 'mutates', 'name', 'selector', 'return_type'].includes(key)); - const fnname = `messages.${message.name}`; - - assert(unknownKeys.length === 0, `Unknown keys ${unknownKeys.join(', ')} found in ABI args for messages.${message.name}`); - - const { name, return_type: returnType, selector } = message; - - assert(isNumber(name) && isString(this._stringAt(name)), `Expected name for ${fnname}`); - assert(isNull(returnType) || (isNumber(returnType.ty) && isObject(this.typeDefAt(returnType.ty))), `Expected return_type for ${fnname}`); - - parseSelector(this.registry, fnname, selector); - this.validateArgs(fnname, message.args); - }); - } - - public validateAbi (abi: ContractABIPre): void { - const unknownKeys = Object.keys(abi.contract).filter((key): boolean => !['constructors', 'docs', 'events', 'messages', 'name'].includes(key)); - - assert(unknownKeys.length === 0, `Unknown fields ${unknownKeys.join(', ')} found in ABI`); - - const { contract: { constructors, messages, name } } = abi; - - assert(constructors && messages && isString(this._stringAt(name)), 'ABI should have constructors, messages & name sections'); - - this.validateConstructors(abi); - this.validateMessages(abi); - } - - public createMessage (name: string, message: Partial & ContractABIMessageBase): ContractABIFn { - const args = message.args.map(({ name, type }): ContractABIFnArg => { - assert(isObject(type), `Invalid type at index ${type.toString()}`); + private extractVariant ({ variants }: MtTypeDefVariant, id: MtLookupTypeId): Pick { + const { params, path } = this.getAbiType(id); + const specialVariant = path[0].toString(); + if (specialVariant === 'Option') { return { - name: stringCamelCase(name), - type + info: TypeDefInfo.Option, + sub: this.typeDefAt(params[0]) + }; + } else if (specialVariant === 'Result') { + return { + info: TypeDefInfo.Result, + sub: params.map((param, index) => ({ + name: ['Ok', 'Error'][index], + ...this.typeDefAt(param) + })) + }; + } + + return { + info: TypeDefInfo.Enum, + sub: this.extractVariantSub(variants) + }; + } + + private extractVariantSub (variants: MtVariant[]): Pick[] { + const isAllUnitVariants = variants.every(({ fields }) => fields.length === 0); + + if (isAllUnitVariants) { + return variants.map(({ discriminant, name }) => ({ + ...( + discriminant.isSome + ? { ext: { discriminant: discriminant.unwrap().toNumber() } } + : {} + ), + info: TypeDefInfo.Plain, + name: name.toString(), + type: 'Null' + })); + } + + return variants.map(({ fields, name }) => ({ + ...this.extractFields(fields), + name: name.toString() + })); + } + + private extractFields (fields: MtField[]): Pick { + const [isStruct, isTuple] = fields.reduce(([isAllNamed, isAllUnnamed], { name }) => ([ + isAllNamed && name.isSome, + isAllUnnamed && name.isNone + ]), + [true, true]); + + let info; + + // check for tuple first (no fields may be available) + if (isTuple) { + info = TypeDefInfo.Tuple; + } else if (isStruct) { + info = TypeDefInfo.Struct; + } else { + throw new Error('Invalid fields type detected, expected either Tuple or Struct'); + } + + const sub = fields.map(({ name, type }) => { + return { + ...this.typeDefAt(type), + ...(name.isSome ? { name: name.unwrap().toString() } : {}) }; }); - const Clazz = createArgClass(this.registry, args, isUndefined(message.selector) ? {} : { __selector: 'u32' }); - const baseStruct: { [index: string]: any } = { __selector: isUndefined(message.selector) ? undefined : parseSelector(this.registry, name, message.selector) }; - - const encoder = (...params: CodecArg[]): Uint8Array => { - assert(params.length === args.length, `Expected ${args.length} arguments to contract ${name}, found ${params.length}`); - - const u8a = new Clazz( - this.registry, - args.reduce((mapped, { name }, index): Record => { - mapped[name] = params[index]; - - return mapped; - }, { ...baseStruct }) - ).toU8a(); - - return Compact.addLengthPrefix(u8a); - }; - - const fn = (encoder as ContractABIFn); - - fn.args = args; - fn.isConstant = !(message.mutates || false); - fn.type = message.returnType || null; - - return fn; + return isTuple && sub.length === 1 + ? sub[0] + : { info, sub }; } - public convertAbi ({ contract, storage }: ContractABIPre): ContractABI { + private extractArray ({ len: length, type }: MtTypeDefArray): Pick { + assert(!length || length.toNumber() <= 256, 'ContractRegistry: Only support for [Type; ], where length > 256'); + return { - contract: this.convertContract(contract), - storage: this.convertStorage(storage) + info: TypeDefInfo.VecFixed, + length: length.toNumber(), + sub: this.typeDefAt(type) }; } - public convertArgs (args: ContractABIArgBasePre[]): any[] { - return args.map(({ name, type, ...arg }) => ({ ...arg, name: this._stringAt(name), type: this.convertType(type) })); - } + private extractSequence ({ type }: MtTypeDefSequence, id: MtLookupTypeId): Pick { + assert(!!type, `ContractRegistry: Invalid sequence type found at id ${id.toString()}`); - public convertType ({ display_name: displayNameIndices, ty }: ContractABITypePre): TypeDef { - const displayName = this.stringsAt(displayNameIndices).join('::'); - - return this.typeDefAt(ty, { displayName }); - } - - public convertContract ({ constructors, events, messages, name, ...contract }: ContractABIContractPre): ContractABIContract { return { - constructors: this.convertConstructors(constructors), - messages: messages.map((message) => this.convertMessage(message)), - name: this._stringAt(name), - ...(events - ? { events: events.map((event) => this.convertEvent(event)) } - : {}), - ...contract + info: TypeDefInfo.Vec, + sub: this.typeDefAt(type) }; } - public convertConstructors (constructors: ContractABIMessagePre[]): ContractABIMessage[] { - return constructors.map( - (constructor: ContractABIMessagePre): ContractABIMessage => { - return this.convertMessage(constructor); - } - ); + private extractTuple (ids: MtTypeDefTuple): Pick { + return ids.length === 1 + ? this.typeDefAt(ids[0]) + : { + info: TypeDefInfo.Tuple, + sub: ids.map((id) => this.typeDefAt(id)) + }; } - public convertMessage ({ args, name, return_type: returnType, ...message }: ContractABIMessagePre): ContractABIMessage { - return { - ...message, - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - args: this.convertArgs(args), - name: this._stringAt(name), - returnType: returnType ? this.convertType(returnType) : null - }; - } - - public convertEvent ({ args }: ContractABIEventPre): ContractABIEvent { - return { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - args: this.convertArgs(args) - }; - } - - public convertStorage (storage: ContractABIStoragePre): ContractABIStorage { - return this.convertStorageStruct(storage); - } - - public convertStorageLayout (storageLayout: ContractABIStorageLayoutPre): ContractABIStorageLayout { - if ((storageLayout as ContractABIStorageStructPre)['struct.type']) { - return this.convertStorageStruct(storageLayout as ContractABIStorageStructPre); - } else { - return this.convertStorageRange(storageLayout as ContractABIRangePre); + private extractPrimitive (inkType: MtType): Pick { + if (inkType.def.isPrimitive) { + return { + info: TypeDefInfo.Plain, + type: inkType.def.asPrimitive.type.toLowerCase() + }; + } else if (inkType.path.length > 1) { + return { + info: TypeDefInfo.Plain, + type: inkType.path[inkType.path.length - 1].toString() + }; } - } - public convertStorageStruct ({ 'struct.fields': structFields, 'struct.type': structType }: ContractABIStorageStructPre): ContractABIStorageStruct { - return { - 'struct.fields': structFields.map(({ layout, name }) => ({ - layout: this.convertStorageLayout(layout), - name: this._stringAt(name) - })), - 'struct.type': this.typeDefAt(structType) - }; - } - - public convertStorageRange ({ 'range.elem_type': type, ...range }: ContractABIRangePre): ContractABIRange { - return { - ...range, - 'range.elem_type': this.typeDefAt(type) - }; + throw new Error('Invalid primitive type'); } } diff --git a/packages/api-contract/src/MetaRegistry.ts b/packages/api-contract/src/MetaRegistry.ts deleted file mode 100644 index 179464f50d..0000000000 --- a/packages/api-contract/src/MetaRegistry.ts +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright 2017-2020 @polkadot/api-contract authors & contributors -// SPDX-License-Identifier: Apache-2.0 - -import { MetaRegistryItem, MetaRegistryJson, MetaTypeDefClikeEnum, MetaType, MetaTypeDefEnum, MetaTypeDefEnumVariant, MetaTypeDefEnumVariantStruct, MetaTypeDefEnumVariantTupleStruct, MetaTypeDefEnumVariantUnit, MetaTypeDefStruct, MetaTypeDefStructField, MetaTypeDefTupleStruct, MetaTypeDefUnion, MetaTypeIdCustom, MetaTypeIdVec, MetaTypeIdVecFixed, MetaTypeInfo, Registry, StringIndex, TypeDef, TypeDefInfo, TypeIndex } from '@polkadot/types/types'; - -import { assert } from '@polkadot/util'; -import { encodeTypeDef, withTypeString } from '@polkadot/types'; - -const builtinMap: [(id: unknown | unknown[] | { 'array.type': unknown } | { 'slice.type': unknown }) => boolean, MetaTypeInfo][] = [ - [(id: any) => typeof id === 'string', MetaTypeInfo.BuiltinPlain], - [(id: any) => Array.isArray(id), MetaTypeInfo.BuiltinTuple], - [(id: any) => !!((id as { 'array.type': unknown })['array.type']), MetaTypeInfo.BuiltinVecFixed], - [(id: any) => !!((id as { 'slice.type': unknown })['slice.type']), MetaTypeInfo.BuiltinVec] -]; - -const typeMap: [string, MetaTypeInfo][] = [ - ['enum.variants', MetaTypeInfo.Enum], - ['clike_enum.variants', MetaTypeInfo.ClikeEnum], - ['struct.fields', MetaTypeInfo.Struct], - ['tuple_struct.types', MetaTypeInfo.TupleStruct] -]; - -function detectedType ({ def, id }: MetaType): MetaTypeInfo { - assert(!(def as MetaTypeDefUnion)['union.fields'], 'Invalid union type definition found'); - - const lookup = def === 'builtin' - ? builtinMap.find(([test]) => test(id)) - : typeMap.find(([test]) => !!(def as unknown as Record)[test]); - - return lookup - ? lookup[1] - : MetaTypeInfo.Null; -} - -class MetadataRegistryLookup { - public readonly registry: Registry; - - protected _strings: string[] = []; - - protected _types: MetaType[] = []; - - public typeDefs: TypeDef[] = []; - - constructor (registry: Registry, { registry: { strings, types } }: MetaRegistryJson) { - this.registry = registry; - this._strings = strings; - this._types = types; - } - - protected _hasItemAt (index: number, variant: MetaRegistryItem): boolean { - switch (variant) { - case MetaRegistryItem.String: - return this._strings && !!this._strings[index - 1]; - case MetaRegistryItem.Type: - return this._types && !!this._types[index - 1]; - case MetaRegistryItem.TypeDef: - return this.typeDefs && !!this.typeDefs[index - 1]; - } - } - - protected _itemAt (index: number, variant: MetaRegistryItem): string | MetaType | TypeDef { - assert(this._hasItemAt(index, variant), `MetaRegistry: Invalid ${variant} index ${index} found in metadata`); - - switch (variant) { - case MetaRegistryItem.String: - return this._strings[index - 1]; - case MetaRegistryItem.Type: - return this._types[index - 1]; - case MetaRegistryItem.TypeDef: - return this.typeDefs[index - 1]; - } - } - - protected _itemsAt (indices: number[], variant: MetaRegistryItem): (string | MetaType | TypeDef)[] { - return indices.map((index: number) => this._itemAt(index, variant)); - } - - protected _stringAt (index: StringIndex): string { - return this._itemAt(index, MetaRegistryItem.String) as string; - } - - public stringsAt (indices: StringIndex[]): string[] { - return this._itemsAt(indices, MetaRegistryItem.String) as string[]; - } - - public typeAt (index: TypeIndex): MetaType { - return this._itemAt(index, MetaRegistryItem.Type) as MetaType; - } - - public typesAt (indices: TypeIndex[]): MetaType[] { - return this._itemsAt(indices, MetaRegistryItem.Type) as MetaType[]; - } - - public hasTypeDefAt (index: TypeIndex): boolean { - return this._hasItemAt(index, MetaRegistryItem.TypeDef); - } - - public typeDefAt (index: TypeIndex, extra: Pick = {}): TypeDef { - return { - ...this._itemAt(index, MetaRegistryItem.TypeDef) as TypeDef, - ...extra - }; - } -} - -export default class MetaRegistry extends MetadataRegistryLookup { - constructor (registry: Registry, json: MetaRegistryJson) { - super(registry, json); - - // Generate TypeDefs for each provided registry type - this._types.forEach((_, index: number): void => this.setTypeDefAtIndex(index + 1)); - } - - public setTypeDefAtIndex (typeIndex: TypeIndex): void { - this.typeDefs[typeIndex - 1] = this.typeDefFromMetaType(this.typeAt(typeIndex), typeIndex); - } - - private _typeDefIdFields ({ id }: MetaType): Pick { - const { 'custom.name': nameIndex, 'custom.namespace': namespaceIndices, 'custom.params': paramsIndices } = id as MetaTypeIdCustom; - - if (!nameIndex) { - return {}; - } - - return { - name: this._stringAt(nameIndex), - ...(namespaceIndices && namespaceIndices.length - ? { namespace: this.stringsAt(namespaceIndices).join('::') } - : {} - ), - ...(paramsIndices && paramsIndices.length - ? { params: this.typesAt(paramsIndices).map((type): TypeDef => this.typeDefFromMetaType(type)) } - : {} - ) - }; - } - - private _typeDefDefFields (metaType: MetaType, typeIndex: TypeIndex = -1): Pick { - let typeDef; - - switch (detectedType(metaType)) { - case MetaTypeInfo.BuiltinPlain: - typeDef = this._typeDefForBuiltinPlain(metaType.id as string); - break; - case MetaTypeInfo.BuiltinTuple: - typeDef = this._typeDefForBuiltinTuple(metaType.id as TypeIndex[]); - break; - case MetaTypeInfo.BuiltinVec: - typeDef = this._typeDefForBuiltinVec(metaType.id as MetaTypeIdVec, typeIndex); - break; - case MetaTypeInfo.BuiltinVecFixed: - typeDef = this._typeDefForBuiltinVecFixed(metaType.id as MetaTypeIdVecFixed, typeIndex); - break; - case MetaTypeInfo.Enum: - typeDef = this._typeDefForEnum(metaType.def as MetaTypeDefEnum, metaType.id as MetaTypeIdCustom, typeIndex); - break; - case MetaTypeInfo.ClikeEnum: - typeDef = this._typeDefForClikeEnum(metaType.def as MetaTypeDefClikeEnum); - break; - case MetaTypeInfo.Struct: - typeDef = this.typeDefForStruct(metaType.def as MetaTypeDefStruct); - break; - case MetaTypeInfo.TupleStruct: - typeDef = this._typeDefForTupleStruct(metaType.def as MetaTypeDefTupleStruct); - break; - case MetaTypeInfo.Null: - default: - throw new Error(`Invalid type detected at index ${typeIndex}`); - } - - return typeDef; - } - - public typeDefFromMetaType (metaType: MetaType, typeIndex?: TypeIndex): TypeDef { - return withTypeString({ - info: TypeDefInfo.Null, - type: '', - ...this._typeDefDefFields(metaType, typeIndex), - ...this._typeDefIdFields(metaType) - }) as TypeDef; - } - - public typeDefFromMetaTypeAt (typeIndex: TypeIndex): TypeDef { - if (!this.hasTypeDefAt(typeIndex)) { - this.setTypeDefAtIndex(typeIndex); - } - - return this.typeDefAt(typeIndex); - } - - private _typeDefForEnumVariant (variant: MetaTypeDefEnumVariant): Pick { - const { 'unit_variant.name': unitNameIndex } = variant as MetaTypeDefEnumVariantUnit; - - if (unitNameIndex) { - return { - info: TypeDefInfo.Plain, - name: this._stringAt(unitNameIndex), - type: 'Null' - }; - } - - const { 'tuple_struct_variant.name': tupleStructVariantNameIndex } = variant as MetaTypeDefEnumVariantTupleStruct; - - if (tupleStructVariantNameIndex) { - return this._typeDefForTupleStruct(variant as MetaTypeDefEnumVariantTupleStruct); - } - - const { 'struct_variant.name': structVariantNameIndex } = variant as MetaTypeDefEnumVariantStruct; - - if (structVariantNameIndex) { - return this.typeDefForStruct(variant as MetaTypeDefEnumVariantStruct); - } - - return { - info: TypeDefInfo.Null, - type: 'Null' - }; - } - - private _typeDefForBuiltinPlain (id: string): Pick { - return { - info: TypeDefInfo.Plain, - type: id - }; - } - - private _typeDefForBuiltinTuple (id: TypeIndex[]): Pick { - const sub = id.map((tupleTypeIndex: number): TypeDef => this.typeDefFromMetaTypeAt(tupleTypeIndex)); - - return { - info: TypeDefInfo.Tuple, - sub - }; - } - - private _typeDefForBuiltinVec (id: MetaTypeIdVec, typeIndex: TypeIndex = -1): Pick { - const { 'slice.type': vecTypeIndex } = id; - - assert(!typeIndex || vecTypeIndex !== typeIndex, `MetaRegistry: self-referencing registry type at index ${typeIndex}`); - - const type = encodeTypeDef(this.typeDefFromMetaTypeAt(vecTypeIndex)); - - assert(type && type.length > 0, `MetaRegistry: Invalid builtin Vec type found at index ${typeIndex}`); - - return { - info: TypeDefInfo.Vec, - sub: this.typeDefFromMetaTypeAt(vecTypeIndex), - type: `Vec<${type}>` - }; - } - - private _typeDefForBuiltinVecFixed (id: MetaTypeIdVecFixed, typeIndex: TypeIndex = -1): Pick { - const { 'array.len': vecLength, 'array.type': vecTypeIndex } = id; - - assert(!vecLength || vecLength <= 256, 'MetaRegistry: Only support for [Type; ], where length <= 256'); - assert(!typeIndex || vecTypeIndex !== typeIndex, `MetaRegistry: self-referencing registry type at index ${typeIndex}`); - - const type = encodeTypeDef(this.typeDefFromMetaTypeAt(vecTypeIndex)); - - assert(type && type.length > 0, `MetaRegistry: Invalid vector type found at index ${typeIndex}`); - - return { - info: TypeDefInfo.VecFixed, - length: vecLength, // ex: { type: type } - sub: this.typeDefFromMetaTypeAt(vecTypeIndex), - type: `[${type};${vecLength}]` - }; - } - - private _typeDefForEnum (def: MetaTypeDefEnum, id: MetaTypeIdCustom, typeIndex?: TypeIndex): Pick { - const name = id && this._stringAt(id['custom.name']); - - switch (name) { - case 'Option': - return this.typeDefForOption(id, typeIndex); - - case 'Result': - return this.typeDefForResult(id, typeIndex); - - default: { - const sub = def['enum.variants'].map((variant) => this._typeDefForEnumVariant(variant)); - - return { - info: TypeDefInfo.Enum, - sub - }; - } - } - } - - private _typeDefForClikeEnum (def: MetaTypeDefClikeEnum): Pick { - return { - info: TypeDefInfo.Enum, - sub: def['clike_enum.variants'].map(({ discriminant, name: nameIndex }): TypeDef => ({ - ext: { discriminant }, - info: TypeDefInfo.Plain, - name: this._stringAt(nameIndex), - type: 'Null' - })) - }; - } - - public typeDefForOption (id: MetaTypeIdCustom, typeIndex: TypeIndex = -1): Pick { - assert(id['custom.params'] && id['custom.params'][0], `Invalid Option type defined at index ${typeIndex}`); - - return { - info: TypeDefInfo.Option, - sub: this.typeDefFromMetaTypeAt(id['custom.params']![0]) - }; - } - - public typeDefForResult (id: MetaTypeIdCustom, typeIndex: TypeIndex = -1): Pick { - assert(id['custom.params'] && id['custom.params'][0] && id['custom.params'][1], `Invalid Result type defined at index ${typeIndex}`); - - return { - info: TypeDefInfo.Result, - sub: id['custom.params']!.map((typeIndex): TypeDef => this.typeDefFromMetaTypeAt(typeIndex)) - }; - } - - public typeDefForStruct (def: MetaTypeDefStruct | MetaTypeDefEnumVariantStruct): Pick { - const structFields = (def as MetaTypeDefStruct)['struct.fields'] || (def as MetaTypeDefEnumVariantStruct)['struct_variant.fields']; - const structNameIndex = (def as MetaTypeDefEnumVariantStruct)['struct_variant.name']; - - return withTypeString({ - info: TypeDefInfo.Struct, - ...(structNameIndex - ? { name: this._stringAt(structNameIndex) } - : {} - ), - sub: structFields.map((field: MetaTypeDefStructField): TypeDef => ({ - ...this.typeDefFromMetaTypeAt(field.type), - name: this._stringAt(field.name) - })) - }); - } - - private _typeDefForTupleStruct (def: MetaTypeDefTupleStruct | MetaTypeDefEnumVariantTupleStruct): Pick { - const tupleStructTypes = (def as MetaTypeDefTupleStruct)['tuple_struct.types'] || (def as MetaTypeDefEnumVariantTupleStruct)['tuple_struct_variant.types']; - const tupleStructNameIndex = (def as MetaTypeDefEnumVariantTupleStruct)['tuple_struct_variant.name']; - - return withTypeString({ - info: TypeDefInfo.Tuple, - ...(tupleStructNameIndex - ? { name: this._stringAt(tupleStructNameIndex) } - : {} - ), - sub: tupleStructTypes.map((fieldIndex: number, index: number): TypeDef => ({ - ...this.typeDefFromMetaTypeAt(fieldIndex), - index - })) - }); - } -} diff --git a/packages/api-contract/src/base/Base.ts b/packages/api-contract/src/base/Base.ts new file mode 100644 index 0000000000..ba2504e190 --- /dev/null +++ b/packages/api-contract/src/base/Base.ts @@ -0,0 +1,34 @@ +// Copyright 2017-2020 @polkadot/api authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +import { ApiTypes, DecorateMethod, SubmittableModuleExtrinsics } from '@polkadot/api/types'; +import { AnyJson, Registry } from '@polkadot/types/types'; +import { ApiObject } from '../types'; + +import { assert } from '@polkadot/util'; +import Abi from '../Abi'; + +export default abstract class Base { + public readonly abi: Abi; + + public readonly api: ApiObject; + + public readonly registry: Registry; + + protected readonly _decorateMethod: DecorateMethod; + + constructor (api: ApiObject, abi: AnyJson | Abi, decorateMethod: DecorateMethod) { + this.abi = abi instanceof Abi + ? abi + : new Abi(api.registry, abi); + this.api = api; + this.registry = api.registry; + this._decorateMethod = decorateMethod; + + assert(this.api.rx.tx.contracts && this.api.rx.tx.contracts.putCode, 'You need to connect to a node with the contracts module, the metadata does not enable api.tx.contracts on this instance'); + } + + protected get _apiContracts (): SubmittableModuleExtrinsics<'rxjs'> { + return this.api.rx.tx.contracts; + } +} diff --git a/packages/api-contract/src/base/Blueprint.ts b/packages/api-contract/src/base/Blueprint.ts index 080b170bb4..1ac641641f 100644 --- a/packages/api-contract/src/base/Blueprint.ts +++ b/packages/api-contract/src/base/Blueprint.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import { ApiTypes, DecorateMethod } from '@polkadot/api/types'; -import { AccountId, Address, Hash } from '@polkadot/types/interfaces'; -import { IKeyringPair, ISubmittableResult } from '@polkadot/types/types'; -import { ApiObject, ContractABIPre } from '../types'; +import { AccountId, EventRecord, Hash } from '@polkadot/types/interfaces'; +import { AnyJson, IKeyringPair, ISubmittableResult } from '@polkadot/types/types'; +import { ApiObject } from '../types'; import BN from 'bn.js'; import { Observable } from 'rxjs'; @@ -13,14 +13,15 @@ import { SubmittableResult } from '@polkadot/api'; import { assert } from '@polkadot/util'; import Abi from '../Abi'; +import Base from './Base'; import Contract from './Contract'; -import { BaseWithTx } from './util'; +import { applyOnEvent } from './util'; // eslint-disable-next-line no-use-before-define type BlueprintCreateResultSubscription = Observable>; export interface BlueprintCreate { - signAndSend (account: IKeyringPair | string | AccountId | Address): BlueprintCreateResultSubscription; + signAndSend (account: IKeyringPair | string | AccountId): BlueprintCreateResultSubscription; } class BlueprintCreateResult extends SubmittableResult { @@ -34,10 +35,10 @@ class BlueprintCreateResult extends SubmittableResult } // NOTE Experimental, POC, bound to change -export default class Blueprint extends BaseWithTx { +export default class Blueprint extends Base { public readonly codeHash: Hash; - constructor (api: ApiObject, abi: ContractABIPre | Abi, decorateMethod: DecorateMethod, codeHash: string | Hash) { + constructor (api: ApiObject, abi: AnyJson | Abi, decorateMethod: DecorateMethod, codeHash: string | Hash) { super(api, abi, decorateMethod); this.codeHash = this.registry.createType('Hash', codeHash); @@ -48,28 +49,19 @@ export default class Blueprint extends BaseWithTx => { - return this._apiContracts + signAndSend: this._decorateMethod( + (account: IKeyringPair | string | AccountId): BlueprintCreateResultSubscription => + this._apiContracts .create(endowment, maxGas, this.codeHash, this.abi.constructors[constructorIndex](...params)) .signAndSend(account) - .pipe(map(this._createResult)); - } + .pipe( + map((result) => + new BlueprintCreateResult(result, applyOnEvent(result, 'Instantiated', (record: EventRecord) => + new Contract(this.api, this.abi, this._decorateMethod, record.event.data[1] as AccountId) + )) + ) + ) ) }; } - - private _createResult = (result: SubmittableResult): BlueprintCreateResult => { - let contract: Contract | undefined; - - if (result.isInBlock) { - const record = result.findRecord('contract', 'Instantiated'); - - if (record) { - contract = new Contract(this.api, this.abi, this.decorateMethod, record.event.data[1] as Address); - } - } - - return new BlueprintCreateResult(result, contract); - } } diff --git a/packages/api-contract/src/base/Code.ts b/packages/api-contract/src/base/Code.ts index d102b3c46a..5c47ac324e 100644 --- a/packages/api-contract/src/base/Code.ts +++ b/packages/api-contract/src/base/Code.ts @@ -2,9 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 import { ApiTypes, DecorateMethod } from '@polkadot/api/types'; -import { AccountId, Address, Hash } from '@polkadot/types/interfaces'; -import { IKeyringPair, ISubmittableResult } from '@polkadot/types/types'; -import { ApiObject, ContractABIPre } from '../types'; +import { AccountId, Address, EventRecord, Hash } from '@polkadot/types/interfaces'; +import { AnyJson, IKeyringPair, ISubmittableResult } from '@polkadot/types/types'; +import { ApiObject } from '../types'; import BN from 'bn.js'; import { Observable } from 'rxjs'; @@ -13,8 +13,9 @@ import { SubmittableResult } from '@polkadot/api'; import { compactAddLength, u8aToU8a } from '@polkadot/util'; import Abi from '../Abi'; +import Base from './Base'; import Blueprint from './Blueprint'; -import { BaseWithTx } from './util'; +import { applyOnEvent } from './util'; // eslint-disable-next-line no-use-before-define type CodePutCodeResultSubscription = Observable>; @@ -34,10 +35,10 @@ class CodePutCodeResult extends SubmittableResult { } // NOTE Experimental, POC, bound to change -export default class Code extends BaseWithTx { +export default class Code extends Base { public readonly code: Uint8Array; - constructor (api: ApiObject, abi: ContractABIPre | Abi, decorateMethod: DecorateMethod, wasm: string | Uint8Array) { + constructor (api: ApiObject, abi: AnyJson | Abi, decorateMethod: DecorateMethod, wasm: Uint8Array | string) { super(api, abi, decorateMethod); this.code = u8aToU8a(wasm); @@ -46,27 +47,19 @@ export default class Code extends BaseWithTx public createBlueprint = (maxGas: number | BN): CodePutCode => { return { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - signAndSend: this.decorateMethod( - (account: IKeyringPair | string | AccountId | Address): CodePutCodeResultSubscription => + signAndSend: this._decorateMethod( + (account: IKeyringPair | string | AccountId): CodePutCodeResultSubscription => this._apiContracts .putCode(maxGas, compactAddLength(this.code)) .signAndSend(account) - .pipe(map(this._createResult)) + .pipe( + map((result) => + new CodePutCodeResult(result, applyOnEvent(result, 'CodeStored', (record: EventRecord) => + new Blueprint(this.api, this.abi, this._decorateMethod, record.event.data[0] as Hash) + )) + ) + ) ) }; } - - private _createResult = (result: ISubmittableResult): CodePutCodeResult => { - let blueprint: Blueprint | undefined; - - if (result.isInBlock) { - const record = result.findRecord('contract', 'CodeStored'); - - if (record) { - blueprint = new Blueprint(this.api, this.abi, this.decorateMethod, record.event.data[0] as Hash); - } - } - - return new CodePutCodeResult(result, blueprint); - } } diff --git a/packages/api-contract/src/base/Contract.ts b/packages/api-contract/src/base/Contract.ts index 3a82d7b700..9df39b3fd7 100644 --- a/packages/api-contract/src/base/Contract.ts +++ b/packages/api-contract/src/base/Contract.ts @@ -2,17 +2,20 @@ // SPDX-License-Identifier: Apache-2.0 import { ApiTypes, DecorateMethod, ObsInnerType } from '@polkadot/api/types'; -import { AccountId, Address, ContractExecResult } from '@polkadot/types/interfaces'; -import { Codec, CodecArg, IKeyringPair } from '@polkadot/types/types'; -import { ApiObject, ContractABIMessage, ContractABIPre, ContractCallOutcome } from '../types'; +import { AccountId, ContractExecResult } from '@polkadot/types/interfaces'; +import { AnyJson, Codec, CodecArg, IKeyringPair } from '@polkadot/types/types'; +import { ApiObject, AbiMessage, ContractCallOutcome } from '../types'; import BN from 'bn.js'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { SubmittableResult } from '@polkadot/api'; +import { assert, isFunction, isNumber } from '@polkadot/util'; + import Abi from '../Abi'; import { formatData } from '../util'; -import { BaseWithTxAndRpcCall } from './util'; +import Base from './Base'; +import { SignerOptions } from '@polkadot/api/submittable/types'; type ContractCallTypes = 'tx' | 'rpc'; @@ -22,71 +25,95 @@ type ContractCallResultSubscription>>; -export interface ContractCall { - send (account: IKeyringPair | string | AccountId | Address): ContractCallResultSubscription; +export interface ContractExec { + signAndSend (account: IKeyringPair | string | AccountId, options?: Partial): ContractCallResultSubscription; +} + +export interface ContractRead { + send (account: IKeyringPair | string | AccountId): ContractCallResultSubscription; } export type ContractCallResult = CallType extends 'rpc' ? Observable : Observable; -export default class Contract extends BaseWithTxAndRpcCall { - public readonly address: Address; +export default class Contract extends Base { + public readonly address: AccountId; - constructor (api: ApiObject, abi: ContractABIPre | Abi, decorateMethod: DecorateMethod, address: string | AccountId | Address) { + constructor (api: ApiObject, abi: AnyJson | Abi, decorateMethod: DecorateMethod, address: string | AccountId) { super(api, abi, decorateMethod); - this.address = this.registry.createType('Address', address); + this.address = this.registry.createType('AccountId', address); } - public call (as: 'rpc', message: string, value: BN | number, gasLimit: BN | number, ...params: CodecArg[]): ContractCall; - public call (as: 'tx', message: string, value: BN | number, gasLimit: BN | number, ...params: CodecArg[]): ContractCall; - public call (as: CallType, message: string, value: BN | number, gasLimit: BN | number, ...params: CodecArg[]): ContractCall { - const { def, fn } = this.getMessage(message); + public get hasRpcContractsCall (): boolean { + return isFunction(this.api.rx.rpc.contracts?.call); + } + + private _createInput (message: AbiMessage | number, params: CodecArg[]): [Uint8Array, AbiMessage] { + const fn = isNumber(message) + ? this.abi.messages[message] + : message; + + assert(fn, 'Attempted to call an invalid contract message'); + + return [fn(...params), fn]; + } + + public exec = (message: AbiMessage | number, value: BN | string | number, gasLimit: BN | string | number, ...params: CodecArg[]): ContractExec => { + const [inputData] = this._createInput(message, params); return { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - send: this.decorateMethod( - as === 'rpc' && this.hasRpcContractsCall - ? (account: IKeyringPair | string | AccountId | Address): ContractCallResult<'rpc'> => - this._rpcContractsCall( - this.registry.createType('ContractCallRequest', { - dest: this.address.toString(), - gasLimit, - inputData: fn(...params), - origin: account, - value - }) - ).pipe(map((result: ContractExecResult): ContractCallOutcome => - this._createOutcome(result, this.registry.createType('AccountId', account), def, params) - )) - : (account: IKeyringPair | string | AccountId | Address): ContractCallResult<'tx'> => - this._apiContracts - .call(this.address, value, gasLimit, fn(...params)) - .signAndSend(account) + signAndSend: this._decorateMethod((account: IKeyringPair | string | AccountId, options?: Partial): ContractCallResult<'tx'> => + this._apiContracts + .call(this.address, value, gasLimit, inputData) + .signAndSend(account, options) ) }; } - private _createOutcome (result: ContractExecResult, origin: AccountId, message: ContractABIMessage, params: CodecArg[]): ContractCallOutcome { - let output: Codec | null = null; + public read = (message: AbiMessage | number, value: BN | string | number, gasLimit: BN | string | number, ...params: CodecArg[]): ContractRead => { + assert(this.hasRpcContractsCall, 'Your node does not support contract RPC read calls'); - if (result.isSuccess) { - const { data } = result.asSuccess; - - output = message.returnType - ? formatData(this.registry, data, message.returnType) - : this.registry.createType('Raw', data); - } + const [inputData, messageFn] = this._createInput(message, params); return { - isSuccess: result.isSuccess, - message, - origin, - output, - params, - result, - time: Date.now() + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + send: this._decorateMethod((account: IKeyringPair | string | AccountId): ContractCallResult<'rpc'> => + this.api.rx.rpc.contracts.call( + this.registry.createType('ContractCallRequest', { + dest: this.address, + gasLimit, + inputData, + origin: account, + value + }) + ).pipe( + map((result: ContractExecResult): ContractCallOutcome => { + let output: Codec | null = null; + + if (result.isSuccess) { + const { data } = result.asSuccess; + + output = messageFn.returnType + ? formatData(this.registry, data, messageFn.returnType) + : this.registry.createType('Raw', data); + } + + return { + isSuccess: result.isSuccess, + message: messageFn, + origin: this.registry.createType('AccountId', account), + output, + params, + result, + time: Date.now(), + type: messageFn.returnType || null + }; + }) + ) + ) }; } } diff --git a/packages/api-contract/src/base/util.ts b/packages/api-contract/src/base/util.ts index 74635ef005..4e0b7a81ff 100644 --- a/packages/api-contract/src/base/util.ts +++ b/packages/api-contract/src/base/util.ts @@ -1,78 +1,17 @@ // Copyright 2017-2020 @polkadot/api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ApiTypes, DecorateMethod, DecoratedRpc, SubmittableModuleExtrinsics } from '@polkadot/api/types'; -import { RpcInterface } from '@polkadot/rpc-core/types'; -import { Registry } from '@polkadot/types/types'; -import { ApiObject, ContractABIMessage, ContractABIPre, ContractBase, ContractMessage } from '../types'; +import { SubmittableResult } from '@polkadot/api'; +import { EventRecord } from '@polkadot/types/interfaces'; -import { assert, isFunction, stringCamelCase } from '@polkadot/util'; -import Abi from '../Abi'; +export function applyOnEvent (result: SubmittableResult, type: 'CodeStored' | 'Instantiated', fn: (record: EventRecord) => T): T | undefined { + if (result.isInBlock || result.isFinalized) { + const record = result.findRecord('contract', 'CodeStored'); -export abstract class Base implements ContractBase { - public readonly abi: Abi; - - public readonly api: ApiObject; - - public readonly decorateMethod: DecorateMethod; - - public readonly registry: Registry; - - constructor (api: ApiObject, abi: ContractABIPre | Abi, decorateMethod: DecorateMethod) { - this.abi = abi instanceof Abi - ? abi - : new Abi(api.registry, abi); - this.registry = api.registry; - this.api = api; - this.decorateMethod = decorateMethod; + if (record) { + return fn(record); + } } - public get messages (): ContractMessage[] { - return this.abi.abi.contract.messages.map( - (def: ContractABIMessage, index): ContractMessage => ({ - def, - fn: this.abi.messages[def.name] || this.abi.messages[stringCamelCase(name)], - index - }) - ); - } - - public getMessage (nameOrIndex?: string | number): ContractMessage { - const index = nameOrIndex - ? typeof nameOrIndex === 'number' - ? nameOrIndex - : this.abi.abi.contract.messages.findIndex((message): boolean => nameOrIndex === message.name || nameOrIndex === stringCamelCase(message.name)) - : 0; - const def = this.abi.abi.contract.messages[index]; - - assert(!!def, `Attempted to access a contract message that does not exist: ${typeof nameOrIndex === 'number' ? `index ${nameOrIndex}` : (nameOrIndex || 'unknown')}`); - - const fn = this.abi.messages[def.name] || this.abi.messages[stringCamelCase(def.name)]; - - return { def, fn, index }; - } -} - -export abstract class BaseWithTx extends Base { - protected get _apiContracts (): SubmittableModuleExtrinsics<'rxjs'> { - return this.api.rx.tx.contracts; - } - - constructor (api: ApiObject, abi: ContractABIPre | Abi, decorateMethod: DecorateMethod) { - super(api, abi, decorateMethod); - - assert(this.api.rx.tx.contracts && this.api.rx.tx.contracts.putCode, 'You need to connect to a node with the contracts module, the metadata does not enable api.tx.contracts on this instance'); - } -} - -export abstract class BaseWithTxAndRpcCall extends BaseWithTx { - public get hasRpcContractsCall (): boolean { - return isFunction(this.api.rx.rpc.contracts?.call); - } - - protected get _rpcContractsCall (): DecoratedRpc<'rxjs', RpcInterface>['contracts']['call'] { - assert(this.hasRpcContractsCall, 'You need to connect to a node with the contracts.call RPC method.'); - - return this.api.rx.rpc.contracts.call; - } + return undefined; } diff --git a/packages/api-contract/src/promise/PromiseBlueprint.ts b/packages/api-contract/src/promise/PromiseBlueprint.ts index 13f7135632..ca197572a7 100644 --- a/packages/api-contract/src/promise/PromiseBlueprint.ts +++ b/packages/api-contract/src/promise/PromiseBlueprint.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { Hash } from '@polkadot/types/interfaces'; -import { ContractABIPre } from '../types'; +import { AnyJson } from '@polkadot/types/types'; import { ApiPromise } from '@polkadot/api'; import { decorateMethod } from '@polkadot/api/promise'; @@ -11,7 +11,7 @@ import Abi from '../Abi'; import Blueprint from '../base/Blueprint'; export default class PromiseBlueprint extends Blueprint<'promise'> { - constructor (api: ApiPromise, abi: ContractABIPre | Abi, codeHash: string | Hash) { + constructor (api: ApiPromise, abi: AnyJson | Abi, codeHash: string | Hash) { super(api, abi, decorateMethod, codeHash); } } diff --git a/packages/api-contract/src/promise/PromiseCode.ts b/packages/api-contract/src/promise/PromiseCode.ts index af14ffadf0..ad76e2b739 100644 --- a/packages/api-contract/src/promise/PromiseCode.ts +++ b/packages/api-contract/src/promise/PromiseCode.ts @@ -1,16 +1,15 @@ // Copyright 2017-2020 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ContractABIPre } from '../types'; - import { ApiPromise } from '@polkadot/api'; import { decorateMethod } from '@polkadot/api/promise'; +import { AnyJson } from '@polkadot/types/types'; import Abi from '../Abi'; import Code from '../base/Code'; export default class PromiseCode extends Code<'promise'> { - constructor (api: ApiPromise, abi: ContractABIPre | Abi, wasm: string | Uint8Array) { + constructor (api: ApiPromise, abi: AnyJson | Abi, wasm: string | Uint8Array) { super(api, abi, decorateMethod, wasm); } } diff --git a/packages/api-contract/src/promise/PromiseContract.ts b/packages/api-contract/src/promise/PromiseContract.ts index d4ca859016..b865caca93 100644 --- a/packages/api-contract/src/promise/PromiseContract.ts +++ b/packages/api-contract/src/promise/PromiseContract.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { AccountId } from '@polkadot/types/interfaces'; -import { ContractABIPre } from '../types'; +import { AnyJson } from '@polkadot/types/types'; import { ApiPromise } from '@polkadot/api'; import { decorateMethod } from '@polkadot/api/promise'; @@ -11,7 +11,7 @@ import Abi from '../Abi'; import Contract from '../base/Contract'; export default class PromiseContract extends Contract<'promise'> { - constructor (api: ApiPromise, abi: ContractABIPre | Abi, address: string | AccountId) { + constructor (api: ApiPromise, abi: AnyJson | Abi, address: string | AccountId) { super(api, abi, decorateMethod, address); } } diff --git a/packages/api-contract/src/rx/RxBlueprint.ts b/packages/api-contract/src/rx/RxBlueprint.ts index ad23233b62..4cb1370037 100644 --- a/packages/api-contract/src/rx/RxBlueprint.ts +++ b/packages/api-contract/src/rx/RxBlueprint.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { Hash } from '@polkadot/types/interfaces'; -import { ContractABIPre } from '../types'; +import { AnyJson } from '@polkadot/types/types'; import { ApiRx } from '@polkadot/api'; import { decorateMethod } from '@polkadot/api/rx'; @@ -11,7 +11,7 @@ import Abi from '../Abi'; import Blueprint from '../base/Blueprint'; export default class RxBlueprint extends Blueprint<'rxjs'> { - constructor (api: ApiRx, abi: ContractABIPre | Abi, codeHash: string | Hash) { + constructor (api: ApiRx, abi: AnyJson | Abi, codeHash: string | Hash) { super(api, abi, decorateMethod, codeHash); } } diff --git a/packages/api-contract/src/rx/RxCode.ts b/packages/api-contract/src/rx/RxCode.ts index 91c51f39ed..ca4ce4b1a5 100644 --- a/packages/api-contract/src/rx/RxCode.ts +++ b/packages/api-contract/src/rx/RxCode.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ContractABIPre } from '../types'; +import { AnyJson } from '@polkadot/types/types'; import { ApiRx } from '@polkadot/api'; import { decorateMethod } from '@polkadot/api/rx'; @@ -10,7 +10,7 @@ import Abi from '../Abi'; import Code from '../base/Code'; export default class RxCode extends Code<'rxjs'> { - constructor (api: ApiRx, abi: ContractABIPre | Abi, wasm: string | Uint8Array) { + constructor (api: ApiRx, abi: AnyJson | Abi, wasm: string | Uint8Array) { super(api, abi, decorateMethod, wasm); } } diff --git a/packages/api-contract/src/rx/RxContract.ts b/packages/api-contract/src/rx/RxContract.ts index 12226714e7..1c2d5a6d0a 100644 --- a/packages/api-contract/src/rx/RxContract.ts +++ b/packages/api-contract/src/rx/RxContract.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import { AccountId } from '@polkadot/types/interfaces'; -import { ContractABIPre } from '../types'; +import { AnyJson } from '@polkadot/types/types'; import { ApiRx } from '@polkadot/api'; import { decorateMethod } from '@polkadot/api/rx'; @@ -11,7 +11,7 @@ import Abi from '../Abi'; import Contract from '../base/Contract'; export default class RxContract extends Contract<'rxjs'> { - constructor (api: ApiRx, abi: ContractABIPre | Abi, address: string | AccountId) { + constructor (api: ApiRx, abi: AnyJson | Abi, address: string | AccountId) { super(api, abi, decorateMethod, address); } } diff --git a/packages/api-contract/src/types.ts b/packages/api-contract/src/types.ts index 47a3525dfe..1f62d1d38f 100644 --- a/packages/api-contract/src/types.ts +++ b/packages/api-contract/src/types.ts @@ -1,195 +1,45 @@ // Copyright 2017-2020 @polkadot/api-contract authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { ApiTypes, DecorateMethod } from '@polkadot/api/types'; +import { ApiTypes } from '@polkadot/api/types'; import { AccountId, Address, ContractExecResult } from '@polkadot/types/interfaces'; -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import { Codec, CodecArg } from '@polkadot/types/types'; -import { MetaRegistryJson, StringIndex, TypeIndex, TypeDef } from '@polkadot/types/create/types'; +import { Codec, CodecArg, TypeDef } from '@polkadot/types/types'; import { ApiPromise, ApiRx } from '@polkadot/api'; - -// I give up, too hard to untangle atm... and is basically deprecated -/* eslint-disable no-use-before-define */ +import Abi from './Abi'; export type ApiObject = ApiType extends 'rxjs' ? ApiRx : ApiPromise; export interface ContractBase { - readonly abi: InterfaceAbi; + readonly abi: Abi; readonly api: ApiObject; - readonly decorateMethod: DecorateMethod; - getMessage: (name: string) => ContractMessage; - messages: ContractMessage[]; + + getMessage: (name: string) => AbiMessage; + messages: AbiMessage[]; } -export interface ContractABITypePre { - ty: TypeIndex; - // eslint-disable-next-line camelcase - display_name: StringIndex[]; -} - -export interface ContractABIArgBasePre { - name: StringIndex; - type: ContractABITypePre; -} - -export interface ContractABIArgBase { +export interface AbiMessageParam { name: string; type: TypeDef; } -export type ContractABIMessageArgPre = ContractABIArgBasePre; +export interface AbiMessage { + args: AbiMessageParam[]; + docs: string[]; + identifier: string; + index: number; + isConstructor?: boolean; + isMutating?: boolean; + isPayable?: boolean; + returnType?: TypeDef | null; + selector: string; -export type ContractABIMessageArg = ContractABIArgBase; - -export interface ContractABIMessageBase { - args: ContractABIMessageArg[]; -} - -export interface ContractABIMessageBasePre { - args: ContractABIMessageArgPre[]; -} - -export interface ContractABIMessageCommon { - docs?: ContractABIDocs; - mutates?: boolean; - selector: string | number; -} - -export interface ContractABIMessagePre extends ContractABIMessageCommon, ContractABIMessageBasePre { - name: StringIndex; - // eslint-disable-next-line camelcase - return_type: ContractABITypePre | null; -} - -export interface ContractABIMessage extends ContractABIMessageCommon { - args: ContractABIMessageArg[]; - name: string; - returnType: TypeDef | null; -} - -export interface ContractABIContractCommon { - docs?: ContractABIDocs; -} - -export interface ContractABIContractPre extends ContractABIContractCommon { - constructors: ContractABIMessagePre[]; - messages: ContractABIMessagePre[]; - name: StringIndex; - events?: ContractABIEventPre[]; - docs?: ContractABIDocs; -} - -export interface ContractABIContract extends ContractABIContractCommon { - constructors: ContractABIMessage[]; - messages: ContractABIMessage[]; - name: string; - events?: ContractABIEvent[]; - docs?: ContractABIDocs; -} - -export interface ContractABIPre extends MetaRegistryJson { - storage: ContractABIStoragePre; - contract: ContractABIContractPre; -} - -export interface ContractABI { - storage: ContractABIStorage; - contract: ContractABIContract; -} - -export interface ContractABIFnArg { - name: string; - type: TypeDef; -} - -export interface ContractABIMeta { - args: ContractABIFnArg[]; - isConstant: boolean; - type: TypeDef | null; -} - -export interface ContractABIFn extends ContractABIMeta { (...args: CodecArg[]): Uint8Array; } -export interface ContractABIEventArgBase { - indexed: boolean; -} - -export interface ContractABIEventArgPre extends ContractABIArgBasePre, ContractABIEventArgBase {} - -export interface ContractABIEventArg extends ContractABIArgBase, ContractABIEventArgBase {} - -export type ContractABIDocs = string[]; - -export interface ContractABIEventPre { - args: ContractABIEventArgPre[]; -} - -export interface ContractABIEvent { - args: ContractABIEventArg[]; -} - -export interface ContractABIRangeBase { - // can be number[] (old) or hex (new) - 'range.offset': number[] | string; - 'range.len': number; -} - -export interface ContractABIRangePre extends ContractABIRangeBase { - 'range.elem_type': TypeIndex; -} - -export interface ContractABIRange extends ContractABIRangeBase { - 'range.elem_type': TypeDef; -} - -export type ContractABIStorageLayoutPre = ContractABIStorageStructPre | ContractABIRangePre; - -export type ContractABIStorageLayout = ContractABIStorageStruct | ContractABIRange; - -export interface ContractABIStorageStructFieldPre { - name: StringIndex; - layout: ContractABIStorageLayoutPre; -} - -export interface ContractABIStorageStructField { - name: string; - layout: ContractABIStorageLayout; -} - -export interface ContractABIStorageStructPre { - 'struct.type': TypeIndex; - 'struct.fields': ContractABIStorageStructFieldPre[]; -} - -export interface ContractABIStorageStruct { - 'struct.type': TypeDef; - 'struct.fields': ContractABIStorageStructField[]; -} - -export type ContractABIStoragePre = ContractABIStorageStructPre; - -export type ContractABIStorage = ContractABIStorageStruct; - -export interface ContractMessage { - index: number; - fn: ContractABIFn; - def: ContractABIMessage; -} - -export type AbiConstructors = ContractABIFn[]; - -export type AbiMessages = Record; - -export interface InterfaceAbi { - readonly abi: ContractABI; - readonly constructors: AbiConstructors; - readonly messages: AbiMessages; -} +export type AbiConstructor = AbiMessage; export interface InterfaceContractCalls { // eslint-disable-next-line @typescript-eslint/ban-types @@ -202,11 +52,12 @@ export interface InterfaceContract { } export interface ContractCallOutcome { - time: number; - result: ContractExecResult; + isSuccess: boolean; + message: AbiMessage; origin: AccountId; output: Codec | null; params: any[]; - isSuccess: boolean; - message: ContractABIMessage; + result: ContractExecResult; + time: number; + type: TypeDef | null; } diff --git a/packages/api-contract/src/util.ts b/packages/api-contract/src/util.ts index 7542be08bc..e349007363 100644 --- a/packages/api-contract/src/util.ts +++ b/packages/api-contract/src/util.ts @@ -1,18 +1,10 @@ // Copyright 2017-2020 @polkadot/rpc-core authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { Codec, Registry, TypeDef, TypeDefInfo } from '@polkadot/types/types'; +import { Codec, Registry, TypeDef } from '@polkadot/types/types'; -import { Option, Raw, createClass, createTypeUnsafe } from '@polkadot/types'; - -export function formatData (registry: Registry, data: Raw, { info, type }: TypeDef): Codec { - if (info === TypeDefInfo.Option) { - return new Option( - registry, - createClass(registry, type), - createTypeUnsafe(registry, type, [data], true) - ); - } +import { Raw, createTypeUnsafe } from '@polkadot/types'; +export function formatData (registry: Registry, data: Raw, { type }: TypeDef): Codec { return createTypeUnsafe(registry, type, [data], true); } diff --git a/packages/api-contract/src/v2.test.json b/packages/api-contract/src/v2.test.json deleted file mode 100644 index 5c49d9a4b8..0000000000 --- a/packages/api-contract/src/v2.test.json +++ /dev/null @@ -1,1414 +0,0 @@ -[ - { - "info": 8, - "type": "{\"my_tuple_struct\": {\"cell\": {\"cell\": ([u8;32])}}, \"my_struct\": {\"cell\": {\"cell\": ([u8;32])}}, \"my_clike_enum\": {\"cell\": {\"cell\": ([u8;32])}}, \"my_enum\": {\"cell\": {\"cell\": ([u8;32])}}, \"my_union\": {\"cell\": {\"cell\": ([u8;32])}}}", - "name": "RustStructures", - "namespace": "structures::normal", - "sub": [ - { - "info": 8, - "type": "{\"cell\": {\"cell\": ([u8;32])}}", - "name": "my_tuple_struct", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 9, - "type": "(u8, u16)", - "name": "TupleStruct", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "index": 0 - }, - { - "info": 6, - "type": "u16", - "index": 1 - } - ] - } - ], - "sub": [ - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 9, - "type": "(u8, u16)", - "name": "TupleStruct", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "index": 0 - }, - { - "info": 6, - "type": "u16", - "index": 1 - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } - ] - }, - { - "info": 8, - "type": "{\"cell\": {\"cell\": ([u8;32])}}", - "name": "my_struct", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 8, - "type": "{\"first\": u8, \"seconds\": u16}", - "name": "Struct", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "seconds" - } - ] - } - ], - "sub": [ - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 8, - "type": "{\"first\": u8, \"seconds\": u16}", - "name": "Struct", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "seconds" - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } - ] - }, - { - "info": 8, - "type": "{\"cell\": {\"cell\": ([u8;32])}}", - "name": "my_clike_enum", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 3, - "type": "[\"FirstVariant\", \"SecondVariant\", \"ThirdVariant\"]", - "name": "ClikeEnum", - "namespace": "structures", - "sub": [ - { - "ext": { - "discriminant": 0 - }, - "info": 6, - "name": "FirstVariant", - "type": "Null" - }, - { - "ext": { - "discriminant": 1 - }, - "info": 6, - "name": "SecondVariant", - "type": "Null" - }, - { - "ext": { - "discriminant": 42 - }, - "info": 6, - "name": "ThirdVariant", - "type": "Null" - } - ] - } - ], - "sub": [ - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 3, - "type": "[\"FirstVariant\", \"SecondVariant\", \"ThirdVariant\"]", - "name": "ClikeEnum", - "namespace": "structures", - "sub": [ - { - "ext": { - "discriminant": 0 - }, - "info": 6, - "name": "FirstVariant", - "type": "Null" - }, - { - "ext": { - "discriminant": 1 - }, - "info": 6, - "name": "SecondVariant", - "type": "Null" - }, - { - "ext": { - "discriminant": 42 - }, - "info": 6, - "name": "ThirdVariant", - "type": "Null" - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } - ] - }, - { - "info": 8, - "type": "{\"cell\": {\"cell\": ([u8;32])}}", - "name": "my_enum", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 3, - "type": "{\"NoData\": Null, \"TupleVariant\": (u8, u16), \"StructVariant\": {\"first\": u8, \"second\": u16}}", - "name": "RustEnum", - "namespace": "structures", - "sub": [ - { - "info": 6, - "name": "NoData", - "type": "Null" - }, - { - "info": 9, - "name": "TupleVariant", - "type": "(u8, u16)", - "sub": [ - { - "info": 6, - "type": "u8", - "index": 0 - }, - { - "info": 6, - "type": "u16", - "index": 1 - } - ] - }, - { - "info": 8, - "name": "StructVariant", - "type": "{\"first\": u8, \"second\": u16}", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "second" - } - ] - } - ] - } - ], - "sub": [ - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 3, - "type": "{\"NoData\": Null, \"TupleVariant\": (u8, u16), \"StructVariant\": {\"first\": u8, \"second\": u16}}", - "name": "RustEnum", - "namespace": "structures", - "sub": [ - { - "info": 6, - "name": "NoData", - "type": "Null" - }, - { - "info": 9, - "name": "TupleVariant", - "type": "(u8, u16)", - "sub": [ - { - "info": 6, - "type": "u8", - "index": 0 - }, - { - "info": 6, - "type": "u16", - "index": 1 - } - ] - }, - { - "info": 8, - "name": "StructVariant", - "type": "{\"first\": u8, \"second\": u16}", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "second" - } - ] - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } - ] - }, - { - "info": 8, - "type": "{\"cell\": {\"cell\": ([u8;32])}}", - "name": "my_union", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 10, - "type": "{\"first\": u8, \"second\": u16}", - "name": "Union", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "second" - } - ] - } - ], - "sub": [ - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 10, - "type": "{\"first\": u8, \"second\": u16}", - "name": "Union", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "second" - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } - ] - } - ] - }, - { - "info": 8, - "type": "{\"cell\": {\"cell\": ([u8;32])}}", - "name": "Value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 9, - "type": "(u8, u16)", - "name": "TupleStruct", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "index": 0 - }, - { - "info": 6, - "type": "u16", - "index": 1 - } - ] - } - ], - "sub": [ - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 9, - "type": "(u8, u16)", - "name": "TupleStruct", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "index": 0 - }, - { - "info": 6, - "type": "u16", - "index": 1 - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } - ] - }, - { - "info": 9, - "type": "(u8, u16)", - "name": "TupleStruct", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "index": 0 - }, - { - "info": 6, - "type": "u16", - "index": 1 - } - ] - }, - { - "info": 6, - "type": "u8" - }, - { - "info": 6, - "type": "u16" - }, - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "SyncCell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 9, - "type": "(u8, u16)", - "name": "TupleStruct", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "index": 0 - }, - { - "info": 6, - "type": "u16", - "index": 1 - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - }, - { - "info": 9, - "type": "([u8;32])", - "name": "Key", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - }, - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - } - }, - { - "info": 8, - "type": "{\"cell\": {\"cell\": ([u8;32])}}", - "name": "Value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 8, - "type": "{\"first\": u8, \"seconds\": u16}", - "name": "Struct", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "seconds" - } - ] - } - ], - "sub": [ - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 8, - "type": "{\"first\": u8, \"seconds\": u16}", - "name": "Struct", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "seconds" - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } - ] - }, - { - "info": 8, - "type": "{\"first\": u8, \"seconds\": u16}", - "name": "Struct", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "seconds" - } - ] - }, - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "SyncCell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 8, - "type": "{\"first\": u8, \"seconds\": u16}", - "name": "Struct", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "seconds" - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - }, - { - "info": 8, - "type": "{\"cell\": {\"cell\": ([u8;32])}}", - "name": "Value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 3, - "type": "[\"FirstVariant\", \"SecondVariant\", \"ThirdVariant\"]", - "name": "ClikeEnum", - "namespace": "structures", - "sub": [ - { - "ext": { - "discriminant": 0 - }, - "info": 6, - "name": "FirstVariant", - "type": "Null" - }, - { - "ext": { - "discriminant": 1 - }, - "info": 6, - "name": "SecondVariant", - "type": "Null" - }, - { - "ext": { - "discriminant": 42 - }, - "info": 6, - "name": "ThirdVariant", - "type": "Null" - } - ] - } - ], - "sub": [ - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 3, - "type": "[\"FirstVariant\", \"SecondVariant\", \"ThirdVariant\"]", - "name": "ClikeEnum", - "namespace": "structures", - "sub": [ - { - "ext": { - "discriminant": 0 - }, - "info": 6, - "name": "FirstVariant", - "type": "Null" - }, - { - "ext": { - "discriminant": 1 - }, - "info": 6, - "name": "SecondVariant", - "type": "Null" - }, - { - "ext": { - "discriminant": 42 - }, - "info": 6, - "name": "ThirdVariant", - "type": "Null" - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } - ] - }, - { - "info": 3, - "type": "[\"FirstVariant\", \"SecondVariant\", \"ThirdVariant\"]", - "name": "ClikeEnum", - "namespace": "structures", - "sub": [ - { - "ext": { - "discriminant": 0 - }, - "info": 6, - "name": "FirstVariant", - "type": "Null" - }, - { - "ext": { - "discriminant": 1 - }, - "info": 6, - "name": "SecondVariant", - "type": "Null" - }, - { - "ext": { - "discriminant": 42 - }, - "info": 6, - "name": "ThirdVariant", - "type": "Null" - } - ] - }, - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "SyncCell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 3, - "type": "[\"FirstVariant\", \"SecondVariant\", \"ThirdVariant\"]", - "name": "ClikeEnum", - "namespace": "structures", - "sub": [ - { - "ext": { - "discriminant": 0 - }, - "info": 6, - "name": "FirstVariant", - "type": "Null" - }, - { - "ext": { - "discriminant": 1 - }, - "info": 6, - "name": "SecondVariant", - "type": "Null" - }, - { - "ext": { - "discriminant": 42 - }, - "info": 6, - "name": "ThirdVariant", - "type": "Null" - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - }, - { - "info": 8, - "type": "{\"cell\": {\"cell\": ([u8;32])}}", - "name": "Value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 3, - "type": "{\"NoData\": Null, \"TupleVariant\": (u8, u16), \"StructVariant\": {\"first\": u8, \"second\": u16}}", - "name": "RustEnum", - "namespace": "structures", - "sub": [ - { - "info": 6, - "name": "NoData", - "type": "Null" - }, - { - "info": 9, - "name": "TupleVariant", - "type": "(u8, u16)", - "sub": [ - { - "info": 6, - "type": "u8", - "index": 0 - }, - { - "info": 6, - "type": "u16", - "index": 1 - } - ] - }, - { - "info": 8, - "name": "StructVariant", - "type": "{\"first\": u8, \"second\": u16}", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "second" - } - ] - } - ] - } - ], - "sub": [ - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 3, - "type": "{\"NoData\": Null, \"TupleVariant\": (u8, u16), \"StructVariant\": {\"first\": u8, \"second\": u16}}", - "name": "RustEnum", - "namespace": "structures", - "sub": [ - { - "info": 6, - "name": "NoData", - "type": "Null" - }, - { - "info": 9, - "name": "TupleVariant", - "type": "(u8, u16)", - "sub": [ - { - "info": 6, - "type": "u8", - "index": 0 - }, - { - "info": 6, - "type": "u16", - "index": 1 - } - ] - }, - { - "info": 8, - "name": "StructVariant", - "type": "{\"first\": u8, \"second\": u16}", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "second" - } - ] - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } - ] - }, - { - "info": 3, - "type": "{\"NoData\": Null, \"TupleVariant\": (u8, u16), \"StructVariant\": {\"first\": u8, \"second\": u16}}", - "name": "RustEnum", - "namespace": "structures", - "sub": [ - { - "info": 6, - "name": "NoData", - "type": "Null" - }, - { - "info": 9, - "name": "TupleVariant", - "type": "(u8, u16)", - "sub": [ - { - "info": 6, - "type": "u8", - "index": 0 - }, - { - "info": 6, - "type": "u16", - "index": 1 - } - ] - }, - { - "info": 8, - "name": "StructVariant", - "type": "{\"first\": u8, \"second\": u16}", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "second" - } - ] - } - ] - }, - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "SyncCell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 3, - "type": "{\"NoData\": Null, \"TupleVariant\": (u8, u16), \"StructVariant\": {\"first\": u8, \"second\": u16}}", - "name": "RustEnum", - "namespace": "structures", - "sub": [ - { - "info": 6, - "name": "NoData", - "type": "Null" - }, - { - "info": 9, - "name": "TupleVariant", - "type": "(u8, u16)", - "sub": [ - { - "info": 6, - "type": "u8", - "index": 0 - }, - { - "info": 6, - "type": "u16", - "index": 1 - } - ] - }, - { - "info": 8, - "name": "StructVariant", - "type": "{\"first\": u8, \"second\": u16}", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "second" - } - ] - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - }, - { - "info": 8, - "type": "{\"cell\": {\"cell\": ([u8;32])}}", - "name": "Value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 10, - "type": "{\"first\": u8, \"second\": u16}", - "name": "Union", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "second" - } - ] - } - ], - "sub": [ - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 10, - "type": "{\"first\": u8, \"second\": u16}", - "name": "Union", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "second" - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } - ] - }, - { - "info": 10, - "type": "{\"first\": u8, \"second\": u16}", - "name": "Union", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "second" - } - ] - }, - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "SyncCell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 10, - "type": "{\"first\": u8, \"second\": u16}", - "name": "Union", - "namespace": "structures", - "sub": [ - { - "info": 6, - "type": "u8", - "name": "first" - }, - { - "info": 6, - "type": "u16", - "name": "second" - } - ] - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "ext": { - "length": 32, - "type": "" - }, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } -] \ No newline at end of file diff --git a/packages/api-contract/test/abi/test001.json b/packages/api-contract/test/abi/test001.json deleted file mode 100644 index f3915e5c79..0000000000 --- a/packages/api-contract/test/abi/test001.json +++ /dev/null @@ -1,467 +0,0 @@ -{ - "registry": { - "strings": [ - "StorageAndEnv", - "app", - "__ink_private", - "__ink_storage", - "__storage", - "Storage", - "value", - "Value", - "ink_core", - "storage", - "cell", - "SyncCell", - "sync_cell", - "Key", - "key", - "name", - "vec", - "Vec", - "elems", - "__env", - "EnvAccess", - "env2", - "env_access", - "immutable", - "TestEnv", - "test", - "accessor", - "DefaultSrmlTypes", - "types", - "access", - "EnvAccessMut", - "mutable", - "env", - "PhantomData", - "buffer", - "has_interacted", - "has_returned_value", - "new", - "init_value", - "bool", - "default", - "flip", - "get" - ], - "types": [ - { - "id": { - "custom.name": 1, - "custom.namespace": [ - 2, - 2, - 3, - 4 - ], - "custom.params": [] - }, - "def": { - "struct.fields": [ - { - "name": 5, - "type": 2 - }, - { - "name": 20, - "type": 14 - } - ] - } - }, - { - "id": { - "custom.name": 6, - "custom.namespace": [ - 2, - 2, - 3, - 4 - ], - "custom.params": [] - }, - "def": { - "struct.fields": [ - { - "name": 7, - "type": 3 - }, - { - "name": 16, - "type": 9 - } - ] - } - }, - { - "id": { - "custom.name": 8, - "custom.namespace": [ - 9, - 10, - 7 - ], - "custom.params": [ - 4 - ] - }, - "def": { - "struct.fields": [ - { - "name": 11, - "type": 5 - } - ] - } - }, - { - "id": "bool", - "def": "builtin" - }, - { - "id": { - "custom.name": 12, - "custom.namespace": [ - 9, - 10, - 11, - 13 - ], - "custom.params": [ - 4 - ] - }, - "def": { - "struct.fields": [ - { - "name": 11, - "type": 6 - } - ] - } - }, - { - "id": { - "custom.name": 14, - "custom.namespace": [ - 9, - 10, - 15 - ], - "custom.params": [] - }, - "def": { - "tuple_struct.types": [ - 7 - ] - } - }, - { - "id": { - "array.len": 32, - "array.type": 8 - }, - "def": "builtin" - }, - { - "id": "u8", - "def": "builtin" - }, - { - "id": { - "custom.name": 8, - "custom.namespace": [ - 9, - 10, - 7 - ], - "custom.params": [ - 10 - ] - }, - "def": { - "struct.fields": [ - { - "name": 11, - "type": 13 - } - ] - } - }, - { - "id": "str", - "def": { - "struct.fields": [ - { - "name": 17, - "type": 11 - } - ] - } - }, - { - "id": { - "custom.name": 18, - "custom.namespace": [], - "custom.params": [ - 8 - ] - }, - "def": { - "struct.fields": [ - { - "name": 19, - "type": 12 - } - ] - } - }, - { - "id": { - "slice.type": 8 - }, - "def": "builtin" - }, - { - "id": { - "custom.name": 12, - "custom.namespace": [ - 9, - 10, - 11, - 13 - ], - "custom.params": [ - 10 - ] - }, - "def": { - "struct.fields": [ - { - "name": 11, - "type": 6 - } - ] - } - }, - { - "id": { - "custom.name": 21, - "custom.namespace": [ - 9, - 22, - 23, - 24 - ], - "custom.params": [ - 15 - ] - }, - "def": { - "struct.fields": [ - { - "name": 30, - "type": 17 - } - ] - } - }, - { - "id": { - "custom.name": 25, - "custom.namespace": [ - 9, - 22, - 26, - 27 - ], - "custom.params": [ - 16 - ] - }, - "def": { - "struct.fields": [] - } - }, - { - "id": { - "custom.name": 28, - "custom.namespace": [ - 9, - 22, - 29 - ], - "custom.params": [] - }, - "def": { - "clike_enum.variants": [] - } - }, - { - "id": { - "custom.name": 31, - "custom.namespace": [ - 9, - 22, - 23, - 32 - ], - "custom.params": [ - 15 - ] - }, - "def": { - "struct.fields": [ - { - "name": 33, - "type": 18 - }, - { - "name": 35, - "type": 11 - }, - { - "name": 36, - "type": 4 - }, - { - "name": 37, - "type": 4 - } - ] - } - }, - { - "id": { - "custom.name": 34, - "custom.namespace": [], - "custom.params": [ - 15 - ] - }, - "def": { - "tuple_struct.types": [] - } - } - ] - }, - "storage": { - "struct.type": 1, - "struct.fields": [ - { - "name": 10, - "layout": { - "struct.type": 2, - "struct.fields": [ - { - "name": 7, - "layout": { - "struct.type": 3, - "struct.fields": [ - { - "name": 11, - "layout": { - "range.offset": "0x0000000000000000000000000000000000000000000000000000000000000000", - "range.len": 1, - "range.elem_type": 4 - } - } - ] - } - }, - { - "name": 16, - "layout": { - "struct.type": 9, - "struct.fields": [ - { - "name": 11, - "layout": { - "range.offset": "0x0000000000000000000000000000000000000000000000000000000000000001", - "range.len": 1, - "range.elem_type": 10 - } - } - ] - } - } - ] - } - } - ] - }, - "contract": { - "name": 2, - "constructors": [ - { - "name": 38, - "selector": "[\"0x5E\",\"0xBD\",\"0x88\",\"0xD6\"]", - "args": [ - { - "name": 16, - "type": { - "ty": 11, - "display_name": [ - 18 - ] - } - }, - { - "name": 39, - "type": { - "ty": 4, - "display_name": [ - 40 - ] - } - } - ], - "docs": [ - "Constructor that initializes the `bool` value to the given `init_value`." - ] - }, - { - "name": 41, - "selector": "[\"0x02\",\"0x22\",\"0xFF\",\"0x18\"]", - "args": [], - "docs": [ - "Constructor that initializes the `bool` value to `false`.", - "", - "Constructors can delegate to other constructors." - ] - } - ], - "messages": [ - { - "name": 42, - "selector": "[\"0x8C\",\"0x97\",\"0xDB\",\"0x39\"]", - "mutates": true, - "args": [], - "return_type": null, - "docs": [ - "A message that can be called on instantiated contracts.", - "This one flips the value of the stored `bool` from `true`", - "to `false` and vice versa." - ] - }, - { - "name": 43, - "selector": "[\"0x25\",\"0x44\",\"0x4A\",\"0xFE\"]", - "mutates": false, - "args": [], - "return_type": { - "ty": 4, - "display_name": [ - 40 - ] - }, - "docs": [ - "Simply returns the current value of our `bool`." - ] - } - ], - "events": [], - "docs": [] - } -} diff --git a/packages/api-contract/test/abi/types.json b/packages/api-contract/test/abi/types.json deleted file mode 100644 index d0ce138cf2..0000000000 --- a/packages/api-contract/test/abi/types.json +++ /dev/null @@ -1,142 +0,0 @@ -{ - "name": "Types", - "deploy": { - "args": [] - }, - "messages": [ - { - "name": "primitive", - "selector": 11111, - "mutates": true, - "args": [ - { - "name": "bool", - "type": "bool" - }, - { - "name": "u32", - "type": "u32" - } - ], - "return_type": "bool" - }, - { - "name": "vector", - "selector": 2222, - "mutates": false, - "args": [ - { - "name": "Vec_u8", - "type": { - "Vec": { - "T": "u8" - } - } - }, - { - "name": "Vec_u32", - "type": { - "Vec": { - "T": "u32" - } - } - } - ], - "return_type": { - "Vec": { - "T": "bool" - } - } - }, - { - "name": "vector_fixed", - "selector": 3333, - "mutates": false, - "args": [ - { - "name": "vec_u8_length_32", - "type": { - "[T;n]": { - "T": "u8", - "n": 32 - } - } - } - ], - "return_type": { - "[T;n]": { - "T": "u32", - "n": 8 - } - } - }, - { - "name": "option", - "selector": 4444, - "mutates": false, - "args": [ - { - "name": "Option_u32", - "type": { - "Option": { - "T": "u32" - } - } - } - ], - "return_type": { - "Option": { - "T": "bool" - } - } - }, - { - "name": "tuple", - "selector": 5555, - "mutates": false, - "args": [ - { - "name": "Tuple_u32_u64", - "type": ["u32", "u64"] - } - ], - "return_type": ["bool"] - }, - { - "name": "result", - "selector": 666, - "mutates": false, - "args": [], - "return_type": { - "Result": { - "T": "u32", - "E": "u32" - } - } - }, - { - "name": "nested", - "selector": 987654321, - "mutates": false, - "args": [ - { - "name": "option_vec", - "type": { - "Option": { - "T": { - "Vec": { - "T": "u32" - } - } - } - } - } - ], - "return_type": { - "Vec": { - "T": ["u32", "u64"] - } - } - } - ] -} diff --git a/packages/api-contract/test/compare/dns.test.json b/packages/api-contract/test/compare/dns.test.json new file mode 100644 index 0000000000..20ab7cb717 --- /dev/null +++ b/packages/api-contract/test/compare/dns.test.json @@ -0,0 +1,259 @@ +[ + { + "displayName": "Header", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "last_vacant" + }, + { + "info": 6, + "type": "u32", + "name": "len" + }, + { + "info": 6, + "type": "u32", + "name": "len_entries" + } + ], + "type": "{\"last_vacant\":\"u32\",\"len\":\"u32\",\"len_entries\":\"u32\"}" + }, + { + "info": 6, + "type": "u32" + }, + { + "displayName": "Entry", + "namespace": "ink_storage::collections::stash", + "params": [ + { + "displayName": "Hash", + "namespace": "ink_env::types", + "info": 6, + "type": "Hash" + } + ], + "info": 3, + "sub": [ + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" + } + ], + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}", + "name": "Vacant" + }, + { + "displayName": "Hash", + "namespace": "ink_env::types", + "info": 6, + "type": "Hash", + "name": "Occupied" + } + ], + "type": "{\"_enum\":{\"Vacant\":\"VacantEntry\",\"Occupied\":\"Hash\"}}" + }, + { + "displayName": "Hash", + "namespace": "ink_env::types", + "info": 6, + "type": "Hash" + }, + { + "info": 12, + "length": 32, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "[u8;32]" + }, + { + "info": 6, + "type": "u8" + }, + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" + } + ], + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}" + }, + { + "displayName": "ValueEntry", + "namespace": "ink_storage::collections::hashmap", + "params": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "info": 9, + "sub": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId", + "name": "value" + }, + { + "info": 6, + "type": "u32", + "name": "key_index" + } + ], + "type": "{\"value\":\"AccountId\",\"key_index\":\"u32\"}" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + }, + { + "displayName": "Result", + "params": [ + { + "info": 10, + "sub": [], + "type": "()" + }, + { + "displayName": "Error", + "namespace": "dns::dns", + "info": 3, + "sub": [ + { + "ext": { + "discriminant": 0 + }, + "info": 6, + "name": "NameAlreadyExists", + "type": "Null" + }, + { + "ext": { + "discriminant": 1 + }, + "info": 6, + "name": "CallerIsNotOwner", + "type": "Null" + } + ], + "type": "[\"NameAlreadyExists\", \"CallerIsNotOwner\"]" + } + ], + "info": 7, + "sub": [ + { + "name": "Ok", + "info": 10, + "sub": [], + "type": "()" + }, + { + "name": "Error", + "displayName": "Error", + "namespace": "dns::dns", + "info": 3, + "sub": [ + { + "ext": { + "discriminant": 0 + }, + "info": 6, + "name": "NameAlreadyExists", + "type": "Null" + }, + { + "ext": { + "discriminant": 1 + }, + "info": 6, + "name": "CallerIsNotOwner", + "type": "Null" + } + ], + "type": "[\"NameAlreadyExists\", \"CallerIsNotOwner\"]" + } + ], + "type": "Result<(), Error>" + }, + { + "info": 10, + "sub": [], + "type": "()" + }, + { + "displayName": "Error", + "namespace": "dns::dns", + "info": 3, + "sub": [ + { + "ext": { + "discriminant": 0 + }, + "info": 6, + "name": "NameAlreadyExists", + "type": "Null" + }, + { + "ext": { + "discriminant": 1 + }, + "info": 6, + "name": "CallerIsNotOwner", + "type": "Null" + } + ], + "type": "[\"NameAlreadyExists\", \"CallerIsNotOwner\"]" + }, + { + "displayName": "Option", + "params": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "info": 5, + "sub": { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + }, + "type": "Option" + } +] diff --git a/packages/api-contract/test/compare/erc20.test.json b/packages/api-contract/test/compare/erc20.test.json index 9070bbfad9..58a0b7d87e 100644 --- a/packages/api-contract/test/compare/erc20.test.json +++ b/packages/api-contract/test/compare/erc20.test.json @@ -1,2137 +1,243 @@ [ - { - "info": 9, - "type": "{\"total_supply\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"balances\":\"{\\\"len\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"cell\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])\\\\\\\\\\\\\\\"}\\\\\\\"}\\\",\\\"entries\\\":\\\"{\\\\\\\"cells_key\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"allowances\":\"{\\\"len\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"cell\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])\\\\\\\\\\\\\\\"}\\\\\\\"}\\\",\\\"entries\\\":\\\"{\\\\\\\"cells_key\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u128" - } - ] - } - ], - "name": "total_supply", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "u128" - } - ] - }, - { - "info": 9, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "len", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 9, - "type": "{\"cells_key\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cells_key", - "namespace": "ink_core::storage::key" - } - ], - "name": "entries", - "namespace": "ink_core::storage::chunk::sync_chunk::chunk", - "params": [ - { - "info": 3, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", - "sub": [ - { - "info": 10, - "name": "Occupied", - "sub": [ - { - "info": 9, - "type": "{\"key\":\"([u8;32])\",\"val\":\"u128\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "key", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 6, - "type": "u128", - "name": "val" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 6, - "type": "u128" - } - ], - "index": 0 - } - ], - "type": "({\"key\":\"([u8;32])\",\"val\":\"u128\"})" - }, - { - "info": 6, - "name": "Removed", - "type": "Null" - } - ], - "name": "Entry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 6, - "type": "u128" - } - ] - } - ] - } - ], - "name": "balances", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 6, - "type": "u128" - } - ] - }, - { - "info": 9, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "len", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 9, - "type": "{\"cells_key\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cells_key", - "namespace": "ink_core::storage::key" - } - ], - "name": "entries", - "namespace": "ink_core::storage::chunk::sync_chunk::chunk", - "params": [ - { - "info": 3, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"(([u8;32]), ([u8;32]))\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", - "sub": [ - { - "info": 10, - "name": "Occupied", - "sub": [ - { - "info": 9, - "type": "{\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"}", - "sub": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ], - "name": "key" - }, - { - "info": 6, - "type": "u128", - "name": "val" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ] - }, - { - "info": 6, - "type": "u128" - } - ], - "index": 0 - } - ], - "type": "({\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"})" - }, - { - "info": 6, - "name": "Removed", - "type": "Null" - } - ], - "name": "Entry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ] - }, - { - "info": 6, - "type": "u128" - } - ] - } - ] - } - ], - "name": "allowances", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ] - }, - { - "info": 6, - "type": "u128" - } - ] - } - ], - "name": "Erc20", - "namespace": "erc20::normal" - }, - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u128" - } - ] - } - ], - "name": "Value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "u128" - } - ] - }, { "info": 6, "type": "u128" }, { + "displayName": "Header", + "namespace": "ink_storage::collections::stash", "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "SyncCell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ { "info": 6, - "type": "u128" - } - ] - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "Key", - "namespace": "ink_core::storage::key" - }, - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - } - }, - { - "info": 6, - "type": "u8" - }, - { - "info": 9, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "len", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 9, - "type": "{\"cells_key\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cells_key", - "namespace": "ink_core::storage::key" - } - ], - "name": "entries", - "namespace": "ink_core::storage::chunk::sync_chunk::chunk", - "params": [ - { - "info": 3, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", - "sub": [ - { - "info": 10, - "name": "Occupied", - "sub": [ - { - "info": 9, - "type": "{\"key\":\"([u8;32])\",\"val\":\"u128\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "key", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 6, - "type": "u128", - "name": "val" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 6, - "type": "u128" - } - ], - "index": 0 - } - ], - "type": "({\"key\":\"([u8;32])\",\"val\":\"u128\"})" - }, - { - "info": 6, - "name": "Removed", - "type": "Null" - } - ], - "name": "Entry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 6, - "type": "u128" - } - ] - } - ] - } - ], - "name": "HashMap", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" + "type": "u32", + "name": "last_vacant" }, { "info": 6, - "type": "u128" - } - ] - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Value", - "namespace": "ink_core::storage::value", - "params": [ + "type": "u32", + "name": "len" + }, { "info": 6, - "type": "u32" + "type": "u32", + "name": "len_entries" } - ] + ], + "type": "{\"last_vacant\":\"u32\",\"len\":\"u32\",\"len_entries\":\"u32\"}" }, { "info": 6, "type": "u32" }, { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "SyncCell", - "namespace": "ink_core::storage::cell::sync_cell", + "displayName": "Entry", + "namespace": "ink_storage::collections::stash", "params": [ { + "displayName": "AccountId", + "namespace": "ink_env::types", "info": 6, - "type": "u32" - } - ] - }, - { - "info": 9, - "type": "{\"cells_key\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cells_key", - "namespace": "ink_core::storage::key" + "type": "AccountId" } ], - "name": "SyncChunk", - "namespace": "ink_core::storage::chunk::sync_chunk::chunk", - "params": [ - { - "info": 3, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", - "sub": [ - { - "info": 10, - "name": "Occupied", - "sub": [ - { - "info": 9, - "type": "{\"key\":\"([u8;32])\",\"val\":\"u128\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "key", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 6, - "type": "u128", - "name": "val" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 6, - "type": "u128" - } - ], - "index": 0 - } - ], - "type": "({\"key\":\"([u8;32])\",\"val\":\"u128\"})" - }, - { - "info": 6, - "name": "Removed", - "type": "Null" - } - ], - "name": "Entry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 6, - "type": "u128" - } - ] - } - ] - }, - { "info": 3, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { - "info": 10, - "name": "Occupied", + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, "sub": [ { - "info": 9, - "type": "{\"key\":\"([u8;32])\",\"val\":\"u128\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "key", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 6, - "type": "u128", - "name": "val" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 6, - "type": "u128" - } - ], - "index": 0 + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" } ], - "type": "({\"key\":\"([u8;32])\",\"val\":\"u128\"})" + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}", + "name": "Vacant" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId", + "name": "Occupied" + } + ], + "type": "{\"_enum\":{\"Vacant\":\"VacantEntry\",\"Occupied\":\"AccountId\"}}" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + }, + { + "info": 12, + "length": 32, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "[u8;32]" + }, + { + "info": 6, + "type": "u8" + }, + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" }, { "info": 6, - "name": "Removed", - "type": "Null" + "type": "u32", + "name": "prev" } ], - "name": "Entry", - "namespace": "ink_core::storage::collections::hash_map::impls", + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}" + }, + { + "displayName": "ValueEntry", + "namespace": "ink_storage::collections::hashmap", "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, { "info": 6, "type": "u128" } - ] - }, - { + ], "info": 9, - "type": "{\"key\":\"([u8;32])\",\"val\":\"u128\"}", "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "key", - "namespace": "ink_core::env::srml::types" - }, { "info": 6, "type": "u128", - "name": "val" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" + "name": "value" }, { "info": 6, - "type": "u128" + "type": "u32", + "name": "key_index" } - ] + ], + "type": "{\"value\":\"u128\",\"key_index\":\"u32\"}" }, { - "info": 9, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "len", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 9, - "type": "{\"cells_key\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cells_key", - "namespace": "ink_core::storage::key" - } - ], - "name": "entries", - "namespace": "ink_core::storage::chunk::sync_chunk::chunk", - "params": [ - { - "info": 3, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"(([u8;32]), ([u8;32]))\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", - "sub": [ - { - "info": 10, - "name": "Occupied", - "sub": [ - { - "info": 9, - "type": "{\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"}", - "sub": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ], - "name": "key" - }, - { - "info": 6, - "type": "u128", - "name": "val" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ] - }, - { - "info": 6, - "type": "u128" - } - ], - "index": 0 - } - ], - "type": "({\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"})" - }, - { - "info": 6, - "name": "Removed", - "type": "Null" - } - ], - "name": "Entry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ] - }, - { - "info": 6, - "type": "u128" - } - ] - } - ] - } - ], - "name": "HashMap", - "namespace": "ink_core::storage::collections::hash_map::impls", + "displayName": "Entry", + "namespace": "ink_storage::collections::stash", "params": [ { "info": 10, - "type": "(([u8;32]), ([u8;32]))", "sub": [ { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" }, { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" } - ] + ], + "type": "(AccountId, AccountId)" + } + ], + "info": 3, + "sub": [ + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" + } + ], + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}", + "name": "Vacant" }, { - "info": 6, - "type": "u128" + "info": 10, + "sub": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "type": "(AccountId, AccountId)", + "name": "Occupied" } - ] + ], + "type": "{\"_enum\":{\"Vacant\":\"VacantEntry\",\"Occupied\":\"(AccountId, AccountId)\"}}" }, { "info": 10, - "type": "(([u8;32]), ([u8;32]))", "sub": [ { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" }, { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ] - }, - { - "info": 9, - "type": "{\"cells_key\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cells_key", - "namespace": "ink_core::storage::key" + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" } ], - "name": "SyncChunk", - "namespace": "ink_core::storage::chunk::sync_chunk::chunk", - "params": [ - { - "info": 3, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"(([u8;32]), ([u8;32]))\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", - "sub": [ - { - "info": 10, - "name": "Occupied", - "sub": [ - { - "info": 9, - "type": "{\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"}", - "sub": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ], - "name": "key" - }, - { - "info": 6, - "type": "u128", - "name": "val" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ] - }, - { - "info": 6, - "type": "u128" - } - ], - "index": 0 - } - ], - "type": "({\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"})" - }, - { - "info": 6, - "name": "Removed", - "type": "Null" - } - ], - "name": "Entry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ] - }, - { - "info": 6, - "type": "u128" - } - ] - } - ] - }, - { - "info": 3, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"(([u8;32]), ([u8;32]))\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", - "sub": [ - { - "info": 10, - "name": "Occupied", - "sub": [ - { - "info": 9, - "type": "{\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"}", - "sub": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ], - "name": "key" - }, - { - "info": 6, - "type": "u128", - "name": "val" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ] - }, - { - "info": 6, - "type": "u128" - } - ], - "index": 0 - } - ], - "type": "({\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"})" - }, - { - "info": 6, - "name": "Removed", - "type": "Null" - } - ], - "name": "Entry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ] - }, - { - "info": 6, - "type": "u128" - } - ] - }, - { - "info": 9, - "type": "{\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"}", - "sub": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ], - "name": "key" - }, - { - "info": 6, - "type": "u128", - "name": "val" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "(([u8;32]), ([u8;32]))", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - } - ] - }, - { - "info": 6, - "type": "u128" - } - ] + "type": "(AccountId, AccountId)" }, { "info": 6, "type": "bool" }, { - "info": 5, - "type": "Option<([u8;32])>", - "sub": { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - "name": "Option", + "displayName": "Option", "params": [ { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" } - ] + ], + "info": 5, + "sub": { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + }, + "type": "Option" } ] diff --git a/packages/api-contract/test/compare/erc721.test.json b/packages/api-contract/test/compare/erc721.test.json new file mode 100644 index 0000000000..cb21a54654 --- /dev/null +++ b/packages/api-contract/test/compare/erc721.test.json @@ -0,0 +1,571 @@ +[ + { + "displayName": "Header", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "last_vacant" + }, + { + "info": 6, + "type": "u32", + "name": "len" + }, + { + "info": 6, + "type": "u32", + "name": "len_entries" + } + ], + "type": "{\"last_vacant\":\"u32\",\"len\":\"u32\",\"len_entries\":\"u32\"}" + }, + { + "info": 6, + "type": "u32" + }, + { + "displayName": "Entry", + "namespace": "ink_storage::collections::stash", + "params": [ + { + "info": 6, + "type": "u32" + } + ], + "info": 3, + "sub": [ + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" + } + ], + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}", + "name": "Vacant" + }, + { + "info": 6, + "type": "u32", + "name": "Occupied" + } + ], + "type": "{\"_enum\":{\"Vacant\":\"VacantEntry\",\"Occupied\":\"u32\"}}" + }, + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" + } + ], + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}" + }, + { + "displayName": "ValueEntry", + "namespace": "ink_storage::collections::hashmap", + "params": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "info": 9, + "sub": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId", + "name": "value" + }, + { + "info": 6, + "type": "u32", + "name": "key_index" + } + ], + "type": "{\"value\":\"AccountId\",\"key_index\":\"u32\"}" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + }, + { + "info": 12, + "length": 32, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "[u8;32]" + }, + { + "info": 6, + "type": "u8" + }, + { + "displayName": "Entry", + "namespace": "ink_storage::collections::stash", + "params": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "info": 3, + "sub": [ + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" + } + ], + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}", + "name": "Vacant" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId", + "name": "Occupied" + } + ], + "type": "{\"_enum\":{\"Vacant\":\"VacantEntry\",\"Occupied\":\"AccountId\"}}" + }, + { + "displayName": "ValueEntry", + "namespace": "ink_storage::collections::hashmap", + "params": [ + { + "info": 6, + "type": "u32" + } + ], + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "value" + }, + { + "info": 6, + "type": "u32", + "name": "key_index" + } + ], + "type": "{\"value\":\"u32\",\"key_index\":\"u32\"}" + }, + { + "displayName": "Entry", + "namespace": "ink_storage::collections::stash", + "params": [ + { + "info": 10, + "sub": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "type": "(AccountId, AccountId)" + } + ], + "info": 3, + "sub": [ + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" + } + ], + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}", + "name": "Vacant" + }, + { + "info": 10, + "sub": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "type": "(AccountId, AccountId)", + "name": "Occupied" + } + ], + "type": "{\"_enum\":{\"Vacant\":\"VacantEntry\",\"Occupied\":\"(AccountId, AccountId)\"}}" + }, + { + "info": 10, + "sub": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "type": "(AccountId, AccountId)" + }, + { + "displayName": "ValueEntry", + "namespace": "ink_storage::collections::hashmap", + "params": [ + { + "info": 6, + "type": "bool" + } + ], + "info": 9, + "sub": [ + { + "info": 6, + "type": "bool", + "name": "value" + }, + { + "info": 6, + "type": "u32", + "name": "key_index" + } + ], + "type": "{\"value\":\"bool\",\"key_index\":\"u32\"}" + }, + { + "info": 6, + "type": "bool" + }, + { + "displayName": "Option", + "params": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "info": 5, + "sub": { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + }, + "type": "Option" + }, + { + "displayName": "Result", + "params": [ + { + "info": 10, + "sub": [], + "type": "()" + }, + { + "displayName": "Error", + "namespace": "erc721::erc721", + "info": 3, + "sub": [ + { + "ext": { + "discriminant": 0 + }, + "info": 6, + "name": "NotOwner", + "type": "Null" + }, + { + "ext": { + "discriminant": 1 + }, + "info": 6, + "name": "NotApproved", + "type": "Null" + }, + { + "ext": { + "discriminant": 2 + }, + "info": 6, + "name": "TokenExists", + "type": "Null" + }, + { + "ext": { + "discriminant": 3 + }, + "info": 6, + "name": "TokenNotFound", + "type": "Null" + }, + { + "ext": { + "discriminant": 4 + }, + "info": 6, + "name": "CannotInsert", + "type": "Null" + }, + { + "ext": { + "discriminant": 5 + }, + "info": 6, + "name": "CannotRemove", + "type": "Null" + }, + { + "ext": { + "discriminant": 6 + }, + "info": 6, + "name": "CannotFetchValue", + "type": "Null" + }, + { + "ext": { + "discriminant": 7 + }, + "info": 6, + "name": "NotAllowed", + "type": "Null" + } + ], + "type": "[\"NotOwner\", \"NotApproved\", \"TokenExists\", \"TokenNotFound\", \"CannotInsert\", \"CannotRemove\", \"CannotFetchValue\", \"NotAllowed\"]" + } + ], + "info": 7, + "sub": [ + { + "name": "Ok", + "info": 10, + "sub": [], + "type": "()" + }, + { + "name": "Error", + "displayName": "Error", + "namespace": "erc721::erc721", + "info": 3, + "sub": [ + { + "ext": { + "discriminant": 0 + }, + "info": 6, + "name": "NotOwner", + "type": "Null" + }, + { + "ext": { + "discriminant": 1 + }, + "info": 6, + "name": "NotApproved", + "type": "Null" + }, + { + "ext": { + "discriminant": 2 + }, + "info": 6, + "name": "TokenExists", + "type": "Null" + }, + { + "ext": { + "discriminant": 3 + }, + "info": 6, + "name": "TokenNotFound", + "type": "Null" + }, + { + "ext": { + "discriminant": 4 + }, + "info": 6, + "name": "CannotInsert", + "type": "Null" + }, + { + "ext": { + "discriminant": 5 + }, + "info": 6, + "name": "CannotRemove", + "type": "Null" + }, + { + "ext": { + "discriminant": 6 + }, + "info": 6, + "name": "CannotFetchValue", + "type": "Null" + }, + { + "ext": { + "discriminant": 7 + }, + "info": 6, + "name": "NotAllowed", + "type": "Null" + } + ], + "type": "[\"NotOwner\", \"NotApproved\", \"TokenExists\", \"TokenNotFound\", \"CannotInsert\", \"CannotRemove\", \"CannotFetchValue\", \"NotAllowed\"]" + } + ], + "type": "Result<(), Error>" + }, + { + "info": 10, + "sub": [], + "type": "()" + }, + { + "displayName": "Error", + "namespace": "erc721::erc721", + "info": 3, + "sub": [ + { + "ext": { + "discriminant": 0 + }, + "info": 6, + "name": "NotOwner", + "type": "Null" + }, + { + "ext": { + "discriminant": 1 + }, + "info": 6, + "name": "NotApproved", + "type": "Null" + }, + { + "ext": { + "discriminant": 2 + }, + "info": 6, + "name": "TokenExists", + "type": "Null" + }, + { + "ext": { + "discriminant": 3 + }, + "info": 6, + "name": "TokenNotFound", + "type": "Null" + }, + { + "ext": { + "discriminant": 4 + }, + "info": 6, + "name": "CannotInsert", + "type": "Null" + }, + { + "ext": { + "discriminant": 5 + }, + "info": 6, + "name": "CannotRemove", + "type": "Null" + }, + { + "ext": { + "discriminant": 6 + }, + "info": 6, + "name": "CannotFetchValue", + "type": "Null" + }, + { + "ext": { + "discriminant": 7 + }, + "info": 6, + "name": "NotAllowed", + "type": "Null" + } + ], + "type": "[\"NotOwner\", \"NotApproved\", \"TokenExists\", \"TokenNotFound\", \"CannotInsert\", \"CannotRemove\", \"CannotFetchValue\", \"NotAllowed\"]" + } +] diff --git a/packages/api-contract/test/compare/flipper.test.json b/packages/api-contract/test/compare/flipper.test.json index 8ade53ab0e..23231a3700 100644 --- a/packages/api-contract/test/compare/flipper.test.json +++ b/packages/api-contract/test/compare/flipper.test.json @@ -1,169 +1,6 @@ [ - { - "info": 8, - "type": "{\"value\": {\"cell\": {\"cell\": ([u8;32])}}}", - "name": "Flipper", - "namespace": "flipper::normal", - "sub": [ - { - "info": 8, - "type": "{\"cell\": {\"cell\": ([u8;32])}}", - "name": "value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "bool" - } - ], - "sub": [ - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "bool" - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 11, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } - ] - } - ] - }, - { - "info": 8, - "type": "{\"cell\": {\"cell\": ([u8;32])}}", - "name": "Value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "bool" - } - ], - "sub": [ - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "bool" - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 11, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - } - ] - }, { "info": 6, "type": "bool" - }, - { - "info": 8, - "type": "{\"cell\": ([u8;32])}", - "name": "SyncCell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "bool" - } - ], - "sub": [ - { - "info": 9, - "type": "([u8;32])", - "name": "cell", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 11, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - } - ] - }, - { - "info": 9, - "type": "([u8;32])", - "name": "Key", - "namespace": "ink_core::storage::key", - "sub": [ - { - "info": 11, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ] - }, - { - "info": 11, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - } - }, - { - "info": 6, - "type": "u8" } -] +] \ No newline at end of file diff --git a/packages/api-contract/test/compare/incrementer.test.json b/packages/api-contract/test/compare/incrementer.test.json index 5599c21ed8..e56036bda7 100644 --- a/packages/api-contract/test/compare/incrementer.test.json +++ b/packages/api-contract/test/compare/incrementer.test.json @@ -1,173 +1,6 @@ [ { - "info": 10, - "type": "{ \"value\": \"{ \"cell\": \"{ \"cell\": \"([u8;32])\"} }\"} }\"} }", - "sub": [ - { - "info": 10, - "type": "{ \"cell\": \"{ \"cell\": \"([u8;32])\"} }\"} }", - "sub": [ - { - "info": 10, - "type": "{ \"cell\": \"([u8;32])\"} }", - "sub": [ - { - "info": 11, - "type": "([u8;32])", - "sub": [ - { - "info": 13, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 7, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 7, - "type": "u32" - } - ] - } - ], - "name": "value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 7, - "type": "u32" - } - ] - } - ], - "name": "Incrementer", - "namespace": "incrementer::normal" - }, - { - "info": 10, - "type": "{ \"cell\": \"{ \"cell\": \"([u8;32])\"} }\"} }", - "sub": [ - { - "info": 10, - "type": "{ \"cell\": \"([u8;32])\"} }", - "sub": [ - { - "info": 11, - "type": "([u8;32])", - "sub": [ - { - "info": 13, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 7, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 7, - "type": "u32" - } - ] - } - ], - "name": "Value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 7, - "type": "u32" - } - ] - }, - { - "info": 7, - "type": "u32" - }, - { - "info": 10, - "type": "{ \"cell\": \"([u8;32])\"} }", - "sub": [ - { - "info": 11, - "type": "([u8;32])", - "sub": [ - { - "info": 13, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 7, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "SyncCell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 7, - "type": "u32" - } - ] - }, - { - "info": 11, - "type": "([u8;32])", - "sub": [ - { - "info": 13, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 7, - "type": "u8" - }, - "index": 0 - } - ], - "name": "Key", - "namespace": "ink_core::storage::key" - }, - { - "info": 13, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 7, - "type": "u8" - } - }, - { - "info": 7, - "type": "u8" - }, - { - "info": 7, - "type": "bool" + "info": 6, + "type": "i32" } -] +] \ No newline at end of file diff --git a/packages/api-contract/test/compare/multisigPlain.test.json b/packages/api-contract/test/compare/multisigPlain.test.json new file mode 100644 index 0000000000..d332ca0fe9 --- /dev/null +++ b/packages/api-contract/test/compare/multisigPlain.test.json @@ -0,0 +1,680 @@ +[ + { + "displayName": "Header", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "last_vacant" + }, + { + "info": 6, + "type": "u32", + "name": "len" + }, + { + "info": 6, + "type": "u32", + "name": "len_entries" + } + ], + "type": "{\"last_vacant\":\"u32\",\"len\":\"u32\",\"len_entries\":\"u32\"}" + }, + { + "info": 6, + "type": "u32" + }, + { + "displayName": "Entry", + "namespace": "ink_storage::collections::stash", + "params": [ + { + "info": 10, + "sub": [ + { + "info": 6, + "type": "u32" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "type": "(u32, AccountId)" + } + ], + "info": 3, + "sub": [ + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" + } + ], + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}", + "name": "Vacant" + }, + { + "info": 10, + "sub": [ + { + "info": 6, + "type": "u32" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "type": "(u32, AccountId)", + "name": "Occupied" + } + ], + "type": "{\"_enum\":{\"Vacant\":\"VacantEntry\",\"Occupied\":\"(u32, AccountId)\"}}" + }, + { + "info": 10, + "sub": [ + { + "info": 6, + "type": "u32" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "type": "(u32, AccountId)" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + }, + { + "info": 12, + "length": 32, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "[u8;32]" + }, + { + "info": 6, + "type": "u8" + }, + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" + } + ], + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}" + }, + { + "displayName": "ValueEntry", + "namespace": "ink_storage::collections::hashmap", + "params": [ + { + "info": 10, + "sub": [], + "type": "()" + } + ], + "info": 9, + "sub": [ + { + "info": 10, + "sub": [], + "type": "()", + "name": "value" + }, + { + "info": 6, + "type": "u32", + "name": "key_index" + } + ], + "type": "{\"value\":\"()\",\"key_index\":\"u32\"}" + }, + { + "info": 10, + "sub": [], + "type": "()" + }, + { + "displayName": "Entry", + "namespace": "ink_storage::collections::stash", + "params": [ + { + "info": 6, + "type": "u32" + } + ], + "info": 3, + "sub": [ + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" + } + ], + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}", + "name": "Vacant" + }, + { + "info": 6, + "type": "u32", + "name": "Occupied" + } + ], + "type": "{\"_enum\":{\"Vacant\":\"VacantEntry\",\"Occupied\":\"u32\"}}" + }, + { + "displayName": "ValueEntry", + "namespace": "ink_storage::collections::hashmap", + "params": [ + { + "info": 6, + "type": "u32" + } + ], + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "value" + }, + { + "info": 6, + "type": "u32", + "name": "key_index" + } + ], + "type": "{\"value\":\"u32\",\"key_index\":\"u32\"}" + }, + { + "displayName": "Entry", + "namespace": "ink_storage::collections::stash", + "params": [ + { + "displayName": "Transaction", + "namespace": "multisig_plain::multisig_plain", + "info": 9, + "sub": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId", + "name": "callee" + }, + { + "info": 12, + "length": 4, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "[u8;4]", + "name": "selector" + }, + { + "info": 11, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "Vec", + "name": "input" + }, + { + "info": 6, + "type": "u128", + "name": "transferred_value" + }, + { + "info": 6, + "type": "u64", + "name": "gas_limit" + } + ], + "type": "{\"callee\":\"AccountId\",\"selector\":\"[u8;4]\",\"input\":\"Vec\",\"transferred_value\":\"u128\",\"gas_limit\":\"u64\"}" + } + ], + "info": 3, + "sub": [ + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" + } + ], + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}", + "name": "Vacant" + }, + { + "displayName": "Transaction", + "namespace": "multisig_plain::multisig_plain", + "info": 9, + "sub": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId", + "name": "callee" + }, + { + "info": 12, + "length": 4, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "[u8;4]", + "name": "selector" + }, + { + "info": 11, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "Vec", + "name": "input" + }, + { + "info": 6, + "type": "u128", + "name": "transferred_value" + }, + { + "info": 6, + "type": "u64", + "name": "gas_limit" + } + ], + "type": "{\"callee\":\"AccountId\",\"selector\":\"[u8;4]\",\"input\":\"Vec\",\"transferred_value\":\"u128\",\"gas_limit\":\"u64\"}", + "name": "Occupied" + } + ], + "type": "{\"_enum\":{\"Vacant\":\"VacantEntry\",\"Occupied\":\"Transaction\"}}" + }, + { + "displayName": "Transaction", + "namespace": "multisig_plain::multisig_plain", + "info": 9, + "sub": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId", + "name": "callee" + }, + { + "info": 12, + "length": 4, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "[u8;4]", + "name": "selector" + }, + { + "info": 11, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "Vec", + "name": "input" + }, + { + "info": 6, + "type": "u128", + "name": "transferred_value" + }, + { + "info": 6, + "type": "u64", + "name": "gas_limit" + } + ], + "type": "{\"callee\":\"AccountId\",\"selector\":\"[u8;4]\",\"input\":\"Vec\",\"transferred_value\":\"u128\",\"gas_limit\":\"u64\"}" + }, + { + "info": 12, + "length": 4, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "[u8;4]" + }, + { + "info": 11, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "Vec" + }, + { + "info": 6, + "type": "u128" + }, + { + "info": 6, + "type": "u64" + }, + { + "displayName": "Entry", + "namespace": "ink_storage::collections::stash", + "params": [ + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + } + ], + "info": 3, + "sub": [ + { + "displayName": "VacantEntry", + "namespace": "ink_storage::collections::stash", + "info": 9, + "sub": [ + { + "info": 6, + "type": "u32", + "name": "next" + }, + { + "info": 6, + "type": "u32", + "name": "prev" + } + ], + "type": "{\"next\":\"u32\",\"prev\":\"u32\"}", + "name": "Vacant" + }, + { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId", + "name": "Occupied" + } + ], + "type": "{\"_enum\":{\"Vacant\":\"VacantEntry\",\"Occupied\":\"AccountId\"}}" + }, + { + "info": 11, + "sub": { + "displayName": "AccountId", + "namespace": "ink_env::types", + "info": 6, + "type": "AccountId" + }, + "type": "Vec" + }, + { + "info": 10, + "sub": [ + { + "info": 6, + "type": "u32" + }, + { + "displayName": "ConfirmationStatus", + "namespace": "multisig_plain::multisig_plain", + "info": 3, + "sub": [ + { + "info": 10, + "sub": [], + "name": "Confirmed" + }, + { + "info": 6, + "type": "u32", + "name": "ConfirmationsNeeded" + } + ], + "type": "{\"_enum\":{\"Confirmed\":\"()\",\"ConfirmationsNeeded\":\"u32\"}}" + } + ], + "type": "(u32, ConfirmationStatus)" + }, + { + "displayName": "ConfirmationStatus", + "namespace": "multisig_plain::multisig_plain", + "info": 3, + "sub": [ + { + "info": 10, + "sub": [], + "name": "Confirmed" + }, + { + "info": 6, + "type": "u32", + "name": "ConfirmationsNeeded" + } + ], + "type": "{\"_enum\":{\"Confirmed\":\"()\",\"ConfirmationsNeeded\":\"u32\"}}" + }, + { + "displayName": "Result", + "params": [ + { + "info": 10, + "sub": [], + "type": "()" + }, + { + "info": 10, + "sub": [], + "type": "()" + } + ], + "info": 7, + "sub": [ + { + "name": "Ok", + "info": 10, + "sub": [], + "type": "()" + }, + { + "name": "Error", + "info": 10, + "sub": [], + "type": "()" + } + ], + "type": "Result<(), ()>" + }, + { + "displayName": "Result", + "params": [ + { + "info": 11, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "Vec" + }, + { + "info": 10, + "sub": [], + "type": "()" + } + ], + "info": 7, + "sub": [ + { + "name": "Ok", + "info": 11, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "Vec" + }, + { + "name": "Error", + "info": 10, + "sub": [], + "type": "()" + } + ], + "type": "Result, ()>" + }, + { + "displayName": "Result", + "params": [ + { + "displayName": "Option", + "params": [ + { + "info": 11, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "Vec" + } + ], + "info": 5, + "sub": { + "info": 11, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "Vec" + }, + "type": "Option>" + }, + { + "info": 10, + "sub": [], + "type": "()" + } + ], + "info": 7, + "sub": [ + { + "name": "Ok", + "displayName": "Option", + "params": [ + { + "info": 11, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "Vec" + } + ], + "info": 5, + "sub": { + "info": 11, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "Vec" + }, + "type": "Option>" + }, + { + "name": "Error", + "info": 10, + "sub": [], + "type": "()" + } + ], + "type": "Result>, ()>" + }, + { + "displayName": "Option", + "params": [ + { + "info": 11, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "Vec" + } + ], + "info": 5, + "sub": { + "info": 11, + "sub": { + "info": 6, + "type": "u8" + }, + "type": "Vec" + }, + "type": "Option>" + } +] diff --git a/packages/api-contract/test/compare/shared-vec.test.json b/packages/api-contract/test/compare/shared-vec.test.json deleted file mode 100644 index 87de9b27d7..0000000000 --- a/packages/api-contract/test/compare/shared-vec.test.json +++ /dev/null @@ -1,1720 +0,0 @@ -[ - { - "info": 9, - "type": "{\"mutators\":\"{\\\"len\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"cell\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])\\\\\\\\\\\\\\\"}\\\\\\\"}\\\",\\\"entries\\\":\\\"{\\\\\\\"cells_key\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"vec\":\"{\\\"len\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"cell\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])\\\\\\\\\\\\\\\"}\\\\\\\"}\\\",\\\"cells\\\":\\\"{\\\\\\\"cells_key\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "len", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 9, - "type": "{\"cells_key\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cells_key", - "namespace": "ink_core::storage::key" - } - ], - "name": "entries", - "namespace": "ink_core::storage::chunk::sync_chunk::chunk", - "params": [ - { - "info": 3, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}\\\"})\",\"Removed\":\"Null\"}}", - "sub": [ - { - "info": 10, - "name": "Occupied", - "sub": [ - { - "info": 9, - "type": "{\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "key", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "val", - "namespace": "shared_vec" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Access", - "namespace": "shared_vec" - } - ], - "index": 0 - } - ], - "type": "({\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"})" - }, - { - "info": 6, - "name": "Removed", - "type": "Null" - } - ], - "name": "Entry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Access", - "namespace": "shared_vec" - } - ] - } - ] - } - ], - "name": "mutators", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Access", - "namespace": "shared_vec" - } - ] - }, - { - "info": 9, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"cells\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "len", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 9, - "type": "{\"cells_key\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cells_key", - "namespace": "ink_core::storage::key" - } - ], - "name": "cells", - "namespace": "ink_core::storage::chunk::sync_chunk::chunk", - "params": [ - { - "info": 6, - "type": "i32" - } - ] - } - ], - "name": "vec", - "namespace": "ink_core::storage::collections::vec::impls", - "params": [ - { - "info": 6, - "type": "i32" - } - ] - } - ], - "name": "SharedVec", - "namespace": "shared_vec::normal" - }, - { - "info": 9, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "len", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 9, - "type": "{\"cells_key\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cells_key", - "namespace": "ink_core::storage::key" - } - ], - "name": "entries", - "namespace": "ink_core::storage::chunk::sync_chunk::chunk", - "params": [ - { - "info": 3, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}\\\"})\",\"Removed\":\"Null\"}}", - "sub": [ - { - "info": 10, - "name": "Occupied", - "sub": [ - { - "info": 9, - "type": "{\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "key", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "val", - "namespace": "shared_vec" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Access", - "namespace": "shared_vec" - } - ], - "index": 0 - } - ], - "type": "({\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"})" - }, - { - "info": 6, - "name": "Removed", - "type": "Null" - } - ], - "name": "Entry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Access", - "namespace": "shared_vec" - } - ] - } - ] - } - ], - "name": "HashMap", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Access", - "namespace": "shared_vec" - } - ] - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - } - }, - { - "info": 6, - "type": "u8" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Access", - "namespace": "shared_vec" - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "Option", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 6, - "type": "u32" - }, - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "SyncCell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "Key", - "namespace": "ink_core::storage::key" - }, - { - "info": 9, - "type": "{\"cells_key\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cells_key", - "namespace": "ink_core::storage::key" - } - ], - "name": "SyncChunk", - "namespace": "ink_core::storage::chunk::sync_chunk::chunk", - "params": [ - { - "info": 3, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}\\\"})\",\"Removed\":\"Null\"}}", - "sub": [ - { - "info": 10, - "name": "Occupied", - "sub": [ - { - "info": 9, - "type": "{\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "key", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "val", - "namespace": "shared_vec" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Access", - "namespace": "shared_vec" - } - ], - "index": 0 - } - ], - "type": "({\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"})" - }, - { - "info": 6, - "name": "Removed", - "type": "Null" - } - ], - "name": "Entry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Access", - "namespace": "shared_vec" - } - ] - } - ] - }, - { - "info": 3, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}\\\"})\",\"Removed\":\"Null\"}}", - "sub": [ - { - "info": 10, - "name": "Occupied", - "sub": [ - { - "info": 9, - "type": "{\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "key", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "val", - "namespace": "shared_vec" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Access", - "namespace": "shared_vec" - } - ], - "index": 0 - } - ], - "type": "({\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"})" - }, - { - "info": 6, - "name": "Removed", - "type": "Null" - } - ], - "name": "Entry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Access", - "namespace": "shared_vec" - } - ] - }, - { - "info": 9, - "type": "{\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "key", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "val", - "namespace": "shared_vec" - } - ], - "name": "OccupiedEntry", - "namespace": "ink_core::storage::collections::hash_map::impls", - "params": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "AccountId", - "namespace": "ink_core::env::srml::types" - }, - { - "info": 9, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", - "sub": [ - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "begin", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "u32" - }, - "name": "end", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "Access", - "namespace": "shared_vec" - } - ] - }, - { - "info": 9, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"cells\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - } - ], - "name": "len", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 9, - "type": "{\"cells_key\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cells_key", - "namespace": "ink_core::storage::key" - } - ], - "name": "cells", - "namespace": "ink_core::storage::chunk::sync_chunk::chunk", - "params": [ - { - "info": 6, - "type": "i32" - } - ] - } - ], - "name": "Vec", - "namespace": "ink_core::storage::collections::vec::impls", - "params": [ - { - "info": 6, - "type": "i32" - } - ] - }, - { - "info": 6, - "type": "i32" - }, - { - "info": 9, - "type": "{\"cells_key\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cells_key", - "namespace": "ink_core::storage::key" - } - ], - "name": "SyncChunk", - "namespace": "ink_core::storage::chunk::sync_chunk::chunk", - "params": [ - { - "info": 6, - "type": "i32" - } - ] - }, - { - "info": 7, - "type": "Result<(), u32>", - "sub": [ - { - "info": 10, - "type": "()", - "sub": [] - }, - { - "info": 6, - "type": "u32" - } - ], - "name": "Result", - "params": [ - { - "info": 10, - "type": "()", - "sub": [] - }, - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 10, - "type": "()", - "sub": [] - }, - { - "info": 7, - "type": "Result", - "sub": [ - { - "info": 6, - "type": "i32" - }, - { - "info": 6, - "type": "u32" - } - ], - "name": "Result", - "params": [ - { - "info": 6, - "type": "i32" - }, - { - "info": 6, - "type": "u32" - } - ] - }, - { - "info": 5, - "type": "Option", - "sub": { - "info": 6, - "type": "i32" - }, - "name": "Option", - "params": [ - { - "info": 6, - "type": "i32" - } - ] - } -] diff --git a/packages/api-contract/test/compare/test001.cmp.json b/packages/api-contract/test/compare/test001.cmp.json deleted file mode 100644 index 6e34e7c19d..0000000000 --- a/packages/api-contract/test/compare/test001.cmp.json +++ /dev/null @@ -1,972 +0,0 @@ -[ - { - "info": 9, - "type": "{\"__storage\":\"{\\\"value\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"cell\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])\\\\\\\\\\\\\\\"}\\\\\\\"}\\\",\\\"name\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"cell\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])\\\\\\\\\\\\\\\"}\\\\\\\"}\\\"}\",\"__env\":\"{\\\"access\\\":\\\"{\\\\\\\"env\\\\\\\":\\\\\\\"()\\\\\\\",\\\\\\\"buffer\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"elems\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Vec\\\\\\\\\\\\\\\"}\\\\\\\",\\\\\\\"has_interacted\\\\\\\":\\\\\\\"bool\\\\\\\",\\\\\\\"has_returned_value\\\\\\\":\\\\\\\"bool\\\\\\\"}\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"value\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"name\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "bool" - } - ] - } - ], - "name": "value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "bool" - } - ] - }, - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 9, - "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"elems\":\"Vec\"}", - "sub": [ - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - }, - "name": "elems" - } - ], - "name": "vec", - "params": [ - { - "info": 6, - "type": "u8" - } - ] - } - ] - } - ] - } - ], - "name": "name", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 9, - "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"elems\":\"Vec\"}", - "sub": [ - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - }, - "name": "elems" - } - ], - "name": "vec", - "params": [ - { - "info": 6, - "type": "u8" - } - ] - } - ] - } - ] - } - ], - "name": "__storage", - "namespace": "app::app::__ink_private::__ink_storage" - }, - { - "info": 9, - "type": "{\"access\":\"{\\\"env\\\":\\\"()\\\",\\\"buffer\\\":\\\"{\\\\\\\"elems\\\\\\\":\\\\\\\"Vec\\\\\\\"}\\\",\\\"has_interacted\\\":\\\"bool\\\",\\\"has_returned_value\\\":\\\"bool\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"env\":\"()\",\"buffer\":\"{\\\"elems\\\":\\\"Vec\\\"}\",\"has_interacted\":\"bool\",\"has_returned_value\":\"bool\"}", - "sub": [ - { - "info": 10, - "type": "()", - "sub": [], - "name": "env", - "params": [ - { - "info": 9, - "type": "{}", - "sub": [], - "name": "TestEnv", - "namespace": "ink_core::env2::test::accessor", - "params": [ - { - "info": 3, - "type": "[]", - "sub": [], - "name": "DefaultSrmlTypes", - "namespace": "ink_core::env2::types" - } - ] - } - ] - }, - { - "info": 9, - "type": "{\"elems\":\"Vec\"}", - "sub": [ - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - }, - "name": "elems" - } - ], - "name": "buffer", - "params": [ - { - "info": 6, - "type": "u8" - } - ] - }, - { - "info": 6, - "type": "bool", - "name": "has_interacted" - }, - { - "info": 6, - "type": "bool", - "name": "has_returned_value" - } - ], - "name": "access", - "namespace": "ink_core::env2::env_access::mutable", - "params": [ - { - "info": 9, - "type": "{}", - "sub": [], - "name": "TestEnv", - "namespace": "ink_core::env2::test::accessor", - "params": [ - { - "info": 3, - "type": "[]", - "sub": [], - "name": "DefaultSrmlTypes", - "namespace": "ink_core::env2::types" - } - ] - } - ] - } - ], - "name": "__env", - "namespace": "ink_core::env2::env_access::immutable", - "params": [ - { - "info": 9, - "type": "{}", - "sub": [], - "name": "TestEnv", - "namespace": "ink_core::env2::test::accessor", - "params": [ - { - "info": 3, - "type": "[]", - "sub": [], - "name": "DefaultSrmlTypes", - "namespace": "ink_core::env2::types" - } - ] - } - ] - } - ], - "name": "StorageAndEnv", - "namespace": "app::app::__ink_private::__ink_storage" - }, - { - "info": 9, - "type": "{\"value\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"name\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "bool" - } - ] - } - ], - "name": "value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "bool" - } - ] - }, - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 9, - "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"elems\":\"Vec\"}", - "sub": [ - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - }, - "name": "elems" - } - ], - "name": "vec", - "params": [ - { - "info": 6, - "type": "u8" - } - ] - } - ] - } - ] - } - ], - "name": "name", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 9, - "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"elems\":\"Vec\"}", - "sub": [ - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - }, - "name": "elems" - } - ], - "name": "vec", - "params": [ - { - "info": 6, - "type": "u8" - } - ] - } - ] - } - ] - } - ], - "name": "Storage", - "namespace": "app::app::__ink_private::__ink_storage" - }, - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "bool" - } - ] - } - ], - "name": "Value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 6, - "type": "bool" - } - ] - }, - { - "info": 6, - "type": "bool" - }, - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "SyncCell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 6, - "type": "bool" - } - ] - }, - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "Key", - "namespace": "ink_core::storage::key" - }, - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - } - }, - { - "info": 6, - "type": "u8" - }, - { - "info": 9, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "cell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 9, - "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"elems\":\"Vec\"}", - "sub": [ - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - }, - "name": "elems" - } - ], - "name": "vec", - "params": [ - { - "info": 6, - "type": "u8" - } - ] - } - ] - } - ] - } - ], - "name": "Value", - "namespace": "ink_core::storage::value", - "params": [ - { - "info": 9, - "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"elems\":\"Vec\"}", - "sub": [ - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - }, - "name": "elems" - } - ], - "name": "vec", - "params": [ - { - "info": 6, - "type": "u8" - } - ] - } - ] - } - ] - }, - { - "info": 9, - "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"elems\":\"Vec\"}", - "sub": [ - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - }, - "name": "elems" - } - ], - "name": "vec", - "params": [ - { - "info": 6, - "type": "u8" - } - ] - } - ] - }, - { - "info": 9, - "type": "{\"elems\":\"Vec\"}", - "sub": [ - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - }, - "name": "elems" - } - ], - "name": "Vec", - "params": [ - { - "info": 6, - "type": "u8" - } - ] - }, - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - } - }, - { - "info": 9, - "type": "{\"cell\":\"([u8;32])\"}", - "sub": [ - { - "info": 10, - "type": "([u8;32])", - "sub": [ - { - "info": 12, - "type": "[u8;32]", - "length": 32, - "sub": { - "info": 6, - "type": "u8" - }, - "index": 0 - } - ], - "name": "cell", - "namespace": "ink_core::storage::key" - } - ], - "name": "SyncCell", - "namespace": "ink_core::storage::cell::sync_cell", - "params": [ - { - "info": 9, - "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"elems\":\"Vec\"}", - "sub": [ - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - }, - "name": "elems" - } - ], - "name": "vec", - "params": [ - { - "info": 6, - "type": "u8" - } - ] - } - ] - } - ] - }, - { - "info": 9, - "type": "{\"access\":\"{\\\"env\\\":\\\"()\\\",\\\"buffer\\\":\\\"{\\\\\\\"elems\\\\\\\":\\\\\\\"Vec\\\\\\\"}\\\",\\\"has_interacted\\\":\\\"bool\\\",\\\"has_returned_value\\\":\\\"bool\\\"}\"}", - "sub": [ - { - "info": 9, - "type": "{\"env\":\"()\",\"buffer\":\"{\\\"elems\\\":\\\"Vec\\\"}\",\"has_interacted\":\"bool\",\"has_returned_value\":\"bool\"}", - "sub": [ - { - "info": 10, - "type": "()", - "sub": [], - "name": "env", - "params": [ - { - "info": 9, - "type": "{}", - "sub": [], - "name": "TestEnv", - "namespace": "ink_core::env2::test::accessor", - "params": [ - { - "info": 3, - "type": "[]", - "sub": [], - "name": "DefaultSrmlTypes", - "namespace": "ink_core::env2::types" - } - ] - } - ] - }, - { - "info": 9, - "type": "{\"elems\":\"Vec\"}", - "sub": [ - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - }, - "name": "elems" - } - ], - "name": "buffer", - "params": [ - { - "info": 6, - "type": "u8" - } - ] - }, - { - "info": 6, - "type": "bool", - "name": "has_interacted" - }, - { - "info": 6, - "type": "bool", - "name": "has_returned_value" - } - ], - "name": "access", - "namespace": "ink_core::env2::env_access::mutable", - "params": [ - { - "info": 9, - "type": "{}", - "sub": [], - "name": "TestEnv", - "namespace": "ink_core::env2::test::accessor", - "params": [ - { - "info": 3, - "type": "[]", - "sub": [], - "name": "DefaultSrmlTypes", - "namespace": "ink_core::env2::types" - } - ] - } - ] - } - ], - "name": "EnvAccess", - "namespace": "ink_core::env2::env_access::immutable", - "params": [ - { - "info": 9, - "type": "{}", - "sub": [], - "name": "TestEnv", - "namespace": "ink_core::env2::test::accessor", - "params": [ - { - "info": 3, - "type": "[]", - "sub": [], - "name": "DefaultSrmlTypes", - "namespace": "ink_core::env2::types" - } - ] - } - ] - }, - { - "info": 9, - "type": "{}", - "sub": [], - "name": "TestEnv", - "namespace": "ink_core::env2::test::accessor", - "params": [ - { - "info": 3, - "type": "[]", - "sub": [], - "name": "DefaultSrmlTypes", - "namespace": "ink_core::env2::types" - } - ] - }, - { - "info": 3, - "type": "[]", - "sub": [], - "name": "DefaultSrmlTypes", - "namespace": "ink_core::env2::types" - }, - { - "info": 9, - "type": "{\"env\":\"()\",\"buffer\":\"{\\\"elems\\\":\\\"Vec\\\"}\",\"has_interacted\":\"bool\",\"has_returned_value\":\"bool\"}", - "sub": [ - { - "info": 10, - "type": "()", - "sub": [], - "name": "env", - "params": [ - { - "info": 9, - "type": "{}", - "sub": [], - "name": "TestEnv", - "namespace": "ink_core::env2::test::accessor", - "params": [ - { - "info": 3, - "type": "[]", - "sub": [], - "name": "DefaultSrmlTypes", - "namespace": "ink_core::env2::types" - } - ] - } - ] - }, - { - "info": 9, - "type": "{\"elems\":\"Vec\"}", - "sub": [ - { - "info": 11, - "type": "Vec", - "sub": { - "info": 6, - "type": "u8" - }, - "name": "elems" - } - ], - "name": "buffer", - "params": [ - { - "info": 6, - "type": "u8" - } - ] - }, - { - "info": 6, - "type": "bool", - "name": "has_interacted" - }, - { - "info": 6, - "type": "bool", - "name": "has_returned_value" - } - ], - "name": "EnvAccessMut", - "namespace": "ink_core::env2::env_access::mutable", - "params": [ - { - "info": 9, - "type": "{}", - "sub": [], - "name": "TestEnv", - "namespace": "ink_core::env2::test::accessor", - "params": [ - { - "info": 3, - "type": "[]", - "sub": [], - "name": "DefaultSrmlTypes", - "namespace": "ink_core::env2::types" - } - ] - } - ] - }, - { - "info": 10, - "type": "()", - "sub": [], - "name": "PhantomData", - "params": [ - { - "info": 9, - "type": "{}", - "sub": [], - "name": "TestEnv", - "namespace": "ink_core::env2::test::accessor", - "params": [ - { - "info": 3, - "type": "[]", - "sub": [], - "name": "DefaultSrmlTypes", - "namespace": "ink_core::env2::types" - } - ] - } - ] - } -] diff --git a/packages/api-contract/test/contracts/Erc20.json b/packages/api-contract/test/contracts/Erc20.json deleted file mode 100644 index 79f16146b2..0000000000 --- a/packages/api-contract/test/contracts/Erc20.json +++ /dev/null @@ -1,1007 +0,0 @@ -{ - "registry": { - "strings": [ - "Erc20", - "erc20", - "normal", - "total_supply", - "Value", - "ink_core", - "storage", - "value", - "cell", - "SyncCell", - "sync_cell", - "Key", - "key", - "balances", - "HashMap", - "collections", - "hash_map", - "impls", - "AccountId", - "env", - "srml", - "types", - "len", - "entries", - "SyncChunk", - "chunk", - "sync_chunk", - "Entry", - "Occupied", - "OccupiedEntry", - "val", - "Removed", - "cells_key", - "allowances", - "on_deploy", - "init_value", - "Balance", - "balance_of", - "owner", - "allowance", - "spender", - "transfer", - "to", - "bool", - "approve", - "transfer_from", - "from", - "Approval", - "Transfer", - "Option", - "None", - "Some" - ], - "types": [ - { - "id": { - "custom.name": 1, - "custom.namespace": [ - 2, - 3 - ], - "custom.params": [] - }, - "def": { - "struct.fields": [ - { - "name": 4, - "type": 2 - }, - { - "name": 14, - "type": 8 - }, - { - "name": 34, - "type": 16 - } - ] - } - }, - { - "id": { - "custom.name": 5, - "custom.namespace": [ - 6, - 7, - 8 - ], - "custom.params": [ - 3 - ] - }, - "def": { - "struct.fields": [ - { - "name": 9, - "type": 4 - } - ] - } - }, - { - "id": "u128", - "def": "builtin" - }, - { - "id": { - "custom.name": 10, - "custom.namespace": [ - 6, - 7, - 9, - 11 - ], - "custom.params": [ - 3 - ] - }, - "def": { - "struct.fields": [ - { - "name": 9, - "type": 5 - } - ] - } - }, - { - "id": { - "custom.name": 12, - "custom.namespace": [ - 6, - 7, - 13 - ], - "custom.params": [] - }, - "def": { - "tuple_struct.types": [ - 6 - ] - } - }, - { - "id": { - "array.len": 32, - "array.type": 7 - }, - "def": "builtin" - }, - { - "id": "u8", - "def": "builtin" - }, - { - "id": { - "custom.name": 15, - "custom.namespace": [ - 6, - 7, - 16, - 17, - 18 - ], - "custom.params": [ - 9, - 3 - ] - }, - "def": { - "struct.fields": [ - { - "name": 23, - "type": 10 - }, - { - "name": 24, - "type": 13 - } - ] - } - }, - { - "id": { - "custom.name": 19, - "custom.namespace": [ - 6, - 20, - 21, - 22 - ], - "custom.params": [] - }, - "def": { - "tuple_struct.types": [ - 6 - ] - } - }, - { - "id": { - "custom.name": 5, - "custom.namespace": [ - 6, - 7, - 8 - ], - "custom.params": [ - 11 - ] - }, - "def": { - "struct.fields": [ - { - "name": 9, - "type": 12 - } - ] - } - }, - { - "id": "u32", - "def": "builtin" - }, - { - "id": { - "custom.name": 10, - "custom.namespace": [ - 6, - 7, - 9, - 11 - ], - "custom.params": [ - 11 - ] - }, - "def": { - "struct.fields": [ - { - "name": 9, - "type": 5 - } - ] - } - }, - { - "id": { - "custom.name": 25, - "custom.namespace": [ - 6, - 7, - 26, - 27, - 26 - ], - "custom.params": [ - 14 - ] - }, - "def": { - "struct.fields": [ - { - "name": 33, - "type": 5 - } - ] - } - }, - { - "id": { - "custom.name": 28, - "custom.namespace": [ - 6, - 7, - 16, - 17, - 18 - ], - "custom.params": [ - 9, - 3 - ] - }, - "def": { - "enum.variants": [ - { - "tuple_struct_variant.name": 29, - "tuple_struct_variant.types": [ - 15 - ] - }, - { - "unit_variant.name": 32 - } - ] - } - }, - { - "id": { - "custom.name": 30, - "custom.namespace": [ - 6, - 7, - 16, - 17, - 18 - ], - "custom.params": [ - 9, - 3 - ] - }, - "def": { - "struct.fields": [ - { - "name": 13, - "type": 9 - }, - { - "name": 31, - "type": 3 - } - ] - } - }, - { - "id": { - "custom.name": 15, - "custom.namespace": [ - 6, - 7, - 16, - 17, - 18 - ], - "custom.params": [ - 17, - 3 - ] - }, - "def": { - "struct.fields": [ - { - "name": 23, - "type": 10 - }, - { - "name": 24, - "type": 18 - } - ] - } - }, - { - "id": [ - 9, - 9 - ], - "def": "builtin" - }, - { - "id": { - "custom.name": 25, - "custom.namespace": [ - 6, - 7, - 26, - 27, - 26 - ], - "custom.params": [ - 19 - ] - }, - "def": { - "struct.fields": [ - { - "name": 33, - "type": 5 - } - ] - } - }, - { - "id": { - "custom.name": 28, - "custom.namespace": [ - 6, - 7, - 16, - 17, - 18 - ], - "custom.params": [ - 17, - 3 - ] - }, - "def": { - "enum.variants": [ - { - "tuple_struct_variant.name": 29, - "tuple_struct_variant.types": [ - 20 - ] - }, - { - "unit_variant.name": 32 - } - ] - } - }, - { - "id": { - "custom.name": 30, - "custom.namespace": [ - 6, - 7, - 16, - 17, - 18 - ], - "custom.params": [ - 17, - 3 - ] - }, - "def": { - "struct.fields": [ - { - "name": 13, - "type": 17 - }, - { - "name": 31, - "type": 3 - } - ] - } - }, - { - "id": "bool", - "def": "builtin" - }, - { - "id": { - "custom.name": 50, - "custom.namespace": [], - "custom.params": [ - 9 - ] - }, - "def": { - "enum.variants": [ - { - "unit_variant.name": 51 - }, - { - "tuple_struct_variant.name": 52, - "tuple_struct_variant.types": [ - 9 - ] - } - ] - } - } - ] - }, - "storage": { - "struct.type": 1, - "struct.fields": [ - { - "name": 4, - "layout": { - "struct.type": 2, - "struct.fields": [ - { - "name": 9, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "range.len": 1, - "range.elem_type": 3 - } - } - ] - } - }, - { - "name": 14, - "layout": { - "struct.type": 8, - "struct.fields": [ - { - "name": 23, - "layout": { - "struct.type": 10, - "struct.fields": [ - { - "name": 9, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1 - ], - "range.len": 1, - "range.elem_type": 11 - } - } - ] - } - }, - { - "name": 24, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 2 - ], - "range.len": 4294967295, - "range.elem_type": 14 - } - } - ] - } - }, - { - "name": 34, - "layout": { - "struct.type": 16, - "struct.fields": [ - { - "name": 23, - "layout": { - "struct.type": 10, - "struct.fields": [ - { - "name": 9, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "range.len": 1, - "range.elem_type": 11 - } - } - ] - } - }, - { - "name": 24, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 2 - ], - "range.len": 4294967295, - "range.elem_type": 19 - } - } - ] - } - } - ] - }, - "contract": { - "name": 1, - "constructors": [ - { - "name": 35, - "selector": 0, - "args": [ - { - "name": 36, - "type": { - "ty": 3, - "display_name": [ - 37 - ] - } - } - ], - "docs": [] - } - ], - "messages": [ - { - "name": 4, - "selector": 949181842, - "mutates": false, - "args": [], - "return_type": { - "ty": 3, - "display_name": [ - 37 - ] - }, - "docs": [ - "Returns the total number of tokens in existence." - ] - }, - { - "name": 38, - "selector": 3827153702, - "mutates": false, - "args": [ - { - "name": 39, - "type": { - "ty": 9, - "display_name": [ - 19 - ] - } - } - ], - "return_type": { - "ty": 3, - "display_name": [ - 37 - ] - }, - "docs": [ - "Returns the balance of the given AccountId." - ] - }, - { - "name": 40, - "selector": 3057219184, - "mutates": false, - "args": [ - { - "name": 39, - "type": { - "ty": 9, - "display_name": [ - 19 - ] - } - }, - { - "name": 41, - "type": { - "ty": 9, - "display_name": [ - 19 - ] - } - } - ], - "return_type": { - "ty": 3, - "display_name": [ - 37 - ] - }, - "docs": [ - "Returns the amount of tokens that an owner allowed to a spender." - ] - }, - { - "name": 42, - "selector": 3374842663, - "mutates": true, - "args": [ - { - "name": 43, - "type": { - "ty": 9, - "display_name": [ - 19 - ] - } - }, - { - "name": 8, - "type": { - "ty": 3, - "display_name": [ - 37 - ] - } - } - ], - "return_type": { - "ty": 21, - "display_name": [ - 44 - ] - }, - "docs": [ - "Transfers token from the sender to the `to` AccountId." - ] - }, - { - "name": 45, - "selector": 431186122, - "mutates": true, - "args": [ - { - "name": 41, - "type": { - "ty": 9, - "display_name": [ - 19 - ] - } - }, - { - "name": 8, - "type": { - "ty": 3, - "display_name": [ - 37 - ] - } - } - ], - "return_type": { - "ty": 21, - "display_name": [ - 44 - ] - }, - "docs": [ - "Approve the passed AccountId to spend the specified amount of tokens", - "on the behalf of the message\\'s sender." - ] - }, - { - "name": 46, - "selector": 197482595, - "mutates": true, - "args": [ - { - "name": 47, - "type": { - "ty": 9, - "display_name": [ - 19 - ] - } - }, - { - "name": 43, - "type": { - "ty": 9, - "display_name": [ - 19 - ] - } - }, - { - "name": 8, - "type": { - "ty": 3, - "display_name": [ - 37 - ] - } - } - ], - "return_type": { - "ty": 21, - "display_name": [ - 44 - ] - }, - "docs": [ - "Transfer tokens from one AccountId to another." - ] - } - ], - "events": [ - { - "name": 48, - "args": [ - { - "name": 39, - "indexed": false, - "type": { - "ty": 9, - "display_name": [ - 19 - ] - } - }, - { - "name": 41, - "indexed": false, - "type": { - "ty": 9, - "display_name": [ - 19 - ] - } - }, - { - "name": 8, - "indexed": false, - "type": { - "ty": 3, - "display_name": [ - 37 - ] - } - } - ], - "docs": [] - }, - { - "name": 49, - "args": [ - { - "name": 47, - "indexed": false, - "type": { - "ty": 22, - "display_name": [ - 50 - ] - } - }, - { - "name": 43, - "indexed": false, - "type": { - "ty": 22, - "display_name": [ - 50 - ] - } - }, - { - "name": 8, - "indexed": false, - "type": { - "ty": 3, - "display_name": [ - 37 - ] - } - } - ], - "docs": [] - } - ], - "docs": [] - } -} diff --git a/packages/api-contract/test/contracts/Flipper.json b/packages/api-contract/test/contracts/Flipper.json deleted file mode 100644 index 6019350ee5..0000000000 --- a/packages/api-contract/test/contracts/Flipper.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"Flipper","deploy":{"args":[]},"messages":[{"name":"flip","selector":970692492,"mutates":true,"args":[],"return_type":null},{"name":"get","selector":4266279973,"mutates":false,"args":[],"return_type":"bool"}]} \ No newline at end of file diff --git a/packages/api-contract/test/contracts/FlipperV2.json b/packages/api-contract/test/contracts/FlipperV2.json deleted file mode 100644 index 0ee77a64ec..0000000000 --- a/packages/api-contract/test/contracts/FlipperV2.json +++ /dev/null @@ -1,201 +0,0 @@ -{ - "registry": { - "strings": [ - "Flipper", - "flipper", - "normal", - "value", - "Value", - "ink_core", - "storage", - "cell", - "SyncCell", - "sync_cell", - "Key", - "key", - "flip", - "get" - ], - "types": [ - { - "id": { - "custom.name": 1, - "custom.namespace": [ - 2, - 3 - ], - "custom.params": [] - }, - "def": { - "struct.fields": [ - { - "name": 4, - "type": 2 - } - ] - } - }, - { - "id": { - "custom.name": 5, - "custom.namespace": [ - 6, - 7, - 4 - ], - "custom.params": [ - 3 - ] - }, - "def": { - "struct.fields": [ - { - "name": 8, - "type": 4 - } - ] - } - }, - { - "id": "bool", - "def": "builtin" - }, - { - "id": { - "custom.name": 9, - "custom.namespace": [ - 6, - 7, - 8, - 10 - ], - "custom.params": [ - 3 - ] - }, - "def": { - "struct.fields": [ - { - "name": 8, - "type": 5 - } - ] - } - }, - { - "id": { - "custom.name": 11, - "custom.namespace": [ - 6, - 7, - 12 - ], - "custom.params": [] - }, - "def": { - "tuple_struct.types": [ - 6 - ] - } - }, - { - "id": { - "array.len": 32, - "array.type": 7 - }, - "def": "builtin" - }, - { - "id": "u8", - "def": "builtin" - } - ] - }, - "storage": { - "struct.type": 1, - "struct.fields": [ - { - "name": 4, - "layout": { - "struct.type": 2, - "struct.fields": [ - { - "name": 8, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "range.len": 1, - "range.elem_type": 3 - } - } - ] - } - } - ] - }, - "contract": { - "name": 1, - "deploy": { - "args": [], - "docs": [ - "Initializes our state to `false` upon deploying our smart contract." - ] - }, - "messages": [ - { - "name": 13, - "selector": 970692492, - "mutates": true, - "args": [], - "return_type": null, - "docs": [ - "Flips the current state of our smart contract." - ] - }, - { - "name": 14, - "selector": 4266279973, - "mutates": false, - "args": [], - "return_type": 3, - "docs": [ - "Returns the current state." - ] - } - ], - "events": [], - "docs": [] - } -} diff --git a/packages/api-contract/test/contracts/SharedVec.json b/packages/api-contract/test/contracts/SharedVec.json deleted file mode 100644 index 5e7a11a793..0000000000 --- a/packages/api-contract/test/contracts/SharedVec.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"SharedVec","deploy":{"args":[]},"messages":[{"name":"push","selector":865577567,"mutates":true,"args":[{"name":"value","type":"i32"}],"return_type":{"Result":{"T":[],"E":"u32"}}},{"name":"register","selector":572030971,"mutates":true,"args":[{"name":"mutator","type":"AccountId"},{"name":"begin","type":{"Option":{"T":"u32"}}},{"name":"end","type":{"Option":{"T":"u32"}}}],"return_type":{"Result":{"T":[],"E":"u32"}}},{"name":"set","selector":2028185770,"mutates":true,"args":[{"name":"at","type":"u32"},{"name":"to","type":"i32"}],"return_type":{"Result":{"T":"i32","E":"u32"}}},{"name":"get","selector":4266279973,"mutates":false,"args":[{"name":"at","type":"u32"}],"return_type":{"Option":{"T":"i32"}}},{"name":"len","selector":1403873684,"mutates":false,"args":[],"return_type":"u32"}]} \ No newline at end of file diff --git a/packages/api-contract/test/contracts/SharedVecV2.json b/packages/api-contract/test/contracts/SharedVecV2.json deleted file mode 100644 index b3416dd53b..0000000000 --- a/packages/api-contract/test/contracts/SharedVecV2.json +++ /dev/null @@ -1,935 +0,0 @@ -{ - "registry": { - "strings": [ - "SharedVec", - "shared_vec", - "normal", - "mutators", - "HashMap", - "ink_core", - "storage", - "collections", - "hash_map", - "impls", - "AccountId", - "env", - "srml", - "types", - "Access", - "begin", - "Option", - "None", - "Some", - "end", - "len", - "Value", - "value", - "cell", - "SyncCell", - "sync_cell", - "Key", - "key", - "entries", - "SyncChunk", - "chunk", - "sync_chunk", - "Entry", - "Occupied", - "OccupiedEntry", - "val", - "Removed", - "cells_key", - "vec", - "Vec", - "cells", - "on_deploy", - "push", - "i32", - "Result", - "Ok", - "Err", - "register", - "mutator", - "set", - "at", - "u32", - "to", - "get", - "Mutate", - "Push", - "Register" - ], - "types": [ - { - "id": { - "custom.name": 1, - "custom.namespace": [ - 2, - 3 - ], - "custom.params": [] - }, - "def": { - "struct.fields": [ - { - "name": 4, - "type": 2 - }, - { - "name": 39, - "type": 15 - } - ] - } - }, - { - "id": { - "custom.name": 5, - "custom.namespace": [ - 6, - 7, - 8, - 9, - 10 - ], - "custom.params": [ - 3, - 6 - ] - }, - "def": { - "struct.fields": [ - { - "name": 21, - "type": 9 - }, - { - "name": 29, - "type": 12 - } - ] - } - }, - { - "id": { - "custom.name": 11, - "custom.namespace": [ - 6, - 12, - 13, - 14 - ], - "custom.params": [] - }, - "def": { - "tuple_struct.types": [ - 4 - ] - } - }, - { - "id": { - "array.len": 32, - "array.type": 5 - }, - "def": "builtin" - }, - { - "id": "u8", - "def": "builtin" - }, - { - "id": { - "custom.name": 15, - "custom.namespace": [ - 2 - ], - "custom.params": [] - }, - "def": { - "struct.fields": [ - { - "name": 16, - "type": 7 - }, - { - "name": 20, - "type": 7 - } - ] - } - }, - { - "id": { - "custom.name": 17, - "custom.namespace": [], - "custom.params": [ - 8 - ] - }, - "def": { - "enum.variants": [ - { - "unit_variant.name": 18 - }, - { - "tuple_struct_variant.name": 19, - "tuple_struct_variant.types": [ - 8 - ] - } - ] - } - }, - { - "id": "u32", - "def": "builtin" - }, - { - "id": { - "custom.name": 22, - "custom.namespace": [ - 6, - 7, - 23 - ], - "custom.params": [ - 8 - ] - }, - "def": { - "struct.fields": [ - { - "name": 24, - "type": 10 - } - ] - } - }, - { - "id": { - "custom.name": 25, - "custom.namespace": [ - 6, - 7, - 24, - 26 - ], - "custom.params": [ - 8 - ] - }, - "def": { - "struct.fields": [ - { - "name": 24, - "type": 11 - } - ] - } - }, - { - "id": { - "custom.name": 27, - "custom.namespace": [ - 6, - 7, - 28 - ], - "custom.params": [] - }, - "def": { - "tuple_struct.types": [ - 4 - ] - } - }, - { - "id": { - "custom.name": 30, - "custom.namespace": [ - 6, - 7, - 31, - 32, - 31 - ], - "custom.params": [ - 13 - ] - }, - "def": { - "struct.fields": [ - { - "name": 38, - "type": 11 - } - ] - } - }, - { - "id": { - "custom.name": 33, - "custom.namespace": [ - 6, - 7, - 8, - 9, - 10 - ], - "custom.params": [ - 3, - 6 - ] - }, - "def": { - "enum.variants": [ - { - "tuple_struct_variant.name": 34, - "tuple_struct_variant.types": [ - 14 - ] - }, - { - "unit_variant.name": 37 - } - ] - } - }, - { - "id": { - "custom.name": 35, - "custom.namespace": [ - 6, - 7, - 8, - 9, - 10 - ], - "custom.params": [ - 3, - 6 - ] - }, - "def": { - "struct.fields": [ - { - "name": 28, - "type": 3 - }, - { - "name": 36, - "type": 6 - } - ] - } - }, - { - "id": { - "custom.name": 40, - "custom.namespace": [ - 6, - 7, - 8, - 39, - 10 - ], - "custom.params": [ - 16 - ] - }, - "def": { - "struct.fields": [ - { - "name": 21, - "type": 9 - }, - { - "name": 41, - "type": 17 - } - ] - } - }, - { - "id": "i32", - "def": "builtin" - }, - { - "id": { - "custom.name": 30, - "custom.namespace": [ - 6, - 7, - 31, - 32, - 31 - ], - "custom.params": [ - 16 - ] - }, - "def": { - "struct.fields": [ - { - "name": 38, - "type": 11 - } - ] - } - }, - { - "id": { - "custom.name": 45, - "custom.namespace": [], - "custom.params": [ - 19, - 8 - ] - }, - "def": { - "enum.variants": [ - { - "tuple_struct_variant.name": 46, - "tuple_struct_variant.types": [ - 19 - ] - }, - { - "tuple_struct_variant.name": 47, - "tuple_struct_variant.types": [ - 8 - ] - } - ] - } - }, - { - "id": [], - "def": "builtin" - }, - { - "id": { - "custom.name": 45, - "custom.namespace": [], - "custom.params": [ - 16, - 8 - ] - }, - "def": { - "enum.variants": [ - { - "tuple_struct_variant.name": 46, - "tuple_struct_variant.types": [ - 16 - ] - }, - { - "tuple_struct_variant.name": 47, - "tuple_struct_variant.types": [ - 8 - ] - } - ] - } - }, - { - "id": { - "custom.name": 17, - "custom.namespace": [], - "custom.params": [ - 16 - ] - }, - "def": { - "enum.variants": [ - { - "unit_variant.name": 18 - }, - { - "tuple_struct_variant.name": 19, - "tuple_struct_variant.types": [ - 16 - ] - } - ] - } - } - ] - }, - "storage": { - "struct.type": 1, - "struct.fields": [ - { - "name": 4, - "layout": { - "struct.type": 2, - "struct.fields": [ - { - "name": 21, - "layout": { - "struct.type": 9, - "struct.fields": [ - { - "name": 24, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "range.len": 1, - "range.elem_type": 8 - } - } - ] - } - }, - { - "name": 29, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1 - ], - "range.len": 4294967295, - "range.elem_type": 13 - } - } - ] - } - }, - { - "name": 39, - "layout": { - "struct.type": 15, - "struct.fields": [ - { - "name": 21, - "layout": { - "struct.type": 9, - "struct.fields": [ - { - "name": 24, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 0 - ], - "range.len": 1, - "range.elem_type": 8 - } - } - ] - } - }, - { - "name": 41, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - 0, - 1 - ], - "range.len": 4294967295, - "range.elem_type": 16 - } - } - ] - } - } - ] - }, - "contract": { - "name": 1, - "constructors": [ - { - "name": 42, - "selector": 0, - "args": [], - "docs": [ - "Initializes the value to the initial value." - ] - } - ], - "messages": [ - { - "name": 43, - "selector": 865577567, - "mutates": true, - "args": [ - { - "name": 23, - "type": { - "ty": 16, - "display_name": [ - 44 - ] - } - } - ], - "return_type": { - "ty": 18, - "display_name": [ - 45 - ] - }, - "docs": [ - "Pushes a new value to the shared vector.", - "", - "# Errors", - "", - "- If the caller does not have unlimited access rights." - ] - }, - { - "name": 48, - "selector": 572030971, - "mutates": true, - "args": [ - { - "name": 49, - "type": { - "ty": 3, - "display_name": [ - 11 - ] - } - }, - { - "name": 16, - "type": { - "ty": 7, - "display_name": [ - 17 - ] - } - }, - { - "name": 20, - "type": { - "ty": 7, - "display_name": [ - 17 - ] - } - } - ], - "return_type": { - "ty": 18, - "display_name": [ - 45 - ] - }, - "docs": [ - "Registers a new user with the given access rights.", - "", - "Can also be used to change access rights of an already existing user.", - "", - "# Errors", - "", - "- If the caller does not have unlimited access rights." - ] - }, - { - "name": 50, - "selector": 2028185770, - "mutates": true, - "args": [ - { - "name": 51, - "type": { - "ty": 8, - "display_name": [ - 52 - ] - } - }, - { - "name": 53, - "type": { - "ty": 16, - "display_name": [ - 44 - ] - } - } - ], - "return_type": { - "ty": 20, - "display_name": [ - 45 - ] - }, - "docs": [ - "Sets the value at the given position to the given value.", - "", - "Returns the previous value.", - "", - "# Errors", - "", - "- If the given position is out of bounds.", - "- If the caller does not have the required access rights." - ] - }, - { - "name": 54, - "selector": 4266279973, - "mutates": false, - "args": [ - { - "name": 51, - "type": { - "ty": 8, - "display_name": [ - 52 - ] - } - } - ], - "return_type": { - "ty": 21, - "display_name": [ - 17 - ] - }, - "docs": [ - "Returns the value of the shared vector at the given position", - "or `None` if the access is out of bounds." - ] - }, - { - "name": 21, - "selector": 1403873684, - "mutates": false, - "args": [], - "return_type": { - "ty": 8, - "display_name": [ - 52 - ] - }, - "docs": [ - "Returns the length of the shared vector." - ] - } - ], - "events": [ - { - "name": 55, - "args": [ - { - "name": 51, - "indexed": false, - "type": { - "ty": 8, - "display_name": [ - 52 - ] - } - }, - { - "name": 23, - "indexed": false, - "type": { - "ty": 16, - "display_name": [ - 44 - ] - } - } - ], - "docs": [ - "Fires whenever a mutator changes the vector." - ] - }, - { - "name": 56, - "args": [ - { - "name": 49, - "indexed": false, - "type": { - "ty": 3, - "display_name": [ - 11 - ] - } - }, - { - "name": 23, - "indexed": false, - "type": { - "ty": 16, - "display_name": [ - 44 - ] - } - } - ], - "docs": [ - "Fires whenever a mutator pushes the vector successfully." - ] - }, - { - "name": 57, - "args": [ - { - "name": 49, - "indexed": false, - "type": { - "ty": 3, - "display_name": [ - 11 - ] - } - }, - { - "name": 16, - "indexed": false, - "type": { - "ty": 7, - "display_name": [ - 17 - ] - } - }, - { - "name": 20, - "indexed": false, - "type": { - "ty": 7, - "display_name": [ - 17 - ] - } - } - ], - "docs": [ - "Fires whenever a new mutator is registered", - "or when a mutators access rights are changed." - ] - } - ], - "docs": [] - } -} diff --git a/packages/api-contract/test/contracts/V2.json b/packages/api-contract/test/contracts/V2.json deleted file mode 100644 index 4bb8db38e7..0000000000 --- a/packages/api-contract/test/contracts/V2.json +++ /dev/null @@ -1,697 +0,0 @@ -{ - "registry": { - "strings": [ - "RustStructures", - "structures", - "normal", - "my_tuple_struct", - "Value", - "ink_core", - "storage", - "value", - "TupleStruct", - "cell", - "SyncCell", - "sync_cell", - "Key", - "key", - "my_struct", - "Struct", - "first", - "seconds", - "my_clike_enum", - "ClikeEnum", - "FirstVariant", - "SecondVariant", - "ThirdVariant", - "my_enum", - "RustEnum", - "NoData", - "TupleVariant", - "StructVariant", - "second", - "my_union", - "Union" - ], - "types": [ - { - "id": { - "custom.name": 1, - "custom.namespace": [ - 2, - 3 - ], - "custom.params": [] - }, - "def": { - "struct.fields": [ - { - "name": 4, - "type": 2 - }, - { - "name": 15, - "type": 9 - }, - { - "name": 19, - "type": 12 - }, - { - "name": 24, - "type": 15 - }, - { - "name": 30, - "type": 18 - } - ] - } - }, - { - "id": { - "custom.name": 5, - "custom.namespace": [ - 6, - 7, - 8 - ], - "custom.params": [ - 3 - ] - }, - "def": { - "struct.fields": [ - { - "name": 10, - "type": 6 - } - ] - } - }, - { - "id": { - "custom.name": 9, - "custom.namespace": [ - 2 - ], - "custom.params": [] - }, - "def": { - "tuple_struct.types": [ - 4, - 5 - ] - } - }, - { - "id": "u8", - "def": "builtin" - }, - { - "id": "u16", - "def": "builtin" - }, - { - "id": { - "custom.name": 11, - "custom.namespace": [ - 6, - 7, - 10, - 12 - ], - "custom.params": [ - 3 - ] - }, - "def": { - "struct.fields": [ - { - "name": 10, - "type": 7 - } - ] - } - }, - { - "id": { - "custom.name": 13, - "custom.namespace": [ - 6, - 7, - 14 - ], - "custom.params": [] - }, - "def": { - "tuple_struct.types": [ - 8 - ] - } - }, - { - "id": { - "array.len": 32, - "array.type": 4 - }, - "def": "builtin" - }, - { - "id": { - "custom.name": 5, - "custom.namespace": [ - 6, - 7, - 8 - ], - "custom.params": [ - 10 - ] - }, - "def": { - "struct.fields": [ - { - "name": 10, - "type": 11 - } - ] - } - }, - { - "id": { - "custom.name": 16, - "custom.namespace": [ - 2 - ], - "custom.params": [] - }, - "def": { - "struct.fields": [ - { - "name": 17, - "type": 4 - }, - { - "name": 18, - "type": 5 - } - ] - } - }, - { - "id": { - "custom.name": 11, - "custom.namespace": [ - 6, - 7, - 10, - 12 - ], - "custom.params": [ - 10 - ] - }, - "def": { - "struct.fields": [ - { - "name": 10, - "type": 7 - } - ] - } - }, - { - "id": { - "custom.name": 5, - "custom.namespace": [ - 6, - 7, - 8 - ], - "custom.params": [ - 13 - ] - }, - "def": { - "struct.fields": [ - { - "name": 10, - "type": 14 - } - ] - } - }, - { - "id": { - "custom.name": 20, - "custom.namespace": [ - 2 - ], - "custom.params": [] - }, - "def": { - "clike_enum.variants": [ - { - "name": 21, - "discriminant": 0 - }, - { - "name": 22, - "discriminant": 1 - }, - { - "name": 23, - "discriminant": 42 - } - ] - } - }, - { - "id": { - "custom.name": 11, - "custom.namespace": [ - 6, - 7, - 10, - 12 - ], - "custom.params": [ - 13 - ] - }, - "def": { - "struct.fields": [ - { - "name": 10, - "type": 7 - } - ] - } - }, - { - "id": { - "custom.name": 5, - "custom.namespace": [ - 6, - 7, - 8 - ], - "custom.params": [ - 16 - ] - }, - "def": { - "struct.fields": [ - { - "name": 10, - "type": 17 - } - ] - } - }, - { - "id": { - "custom.name": 25, - "custom.namespace": [ - 2 - ], - "custom.params": [] - }, - "def": { - "enum.variants": [ - { - "unit_variant.name": 26 - }, - { - "tuple_struct_variant.name": 27, - "tuple_struct_variant.types": [ - 4, - 5 - ] - }, - { - "struct_variant.name": 28, - "struct_variant.fields": [ - { - "name": 17, - "type": 4 - }, - { - "name": 29, - "type": 5 - } - ] - } - ] - } - }, - { - "id": { - "custom.name": 11, - "custom.namespace": [ - 6, - 7, - 10, - 12 - ], - "custom.params": [ - 16 - ] - }, - "def": { - "struct.fields": [ - { - "name": 10, - "type": 7 - } - ] - } - }, - { - "id": { - "custom.name": 5, - "custom.namespace": [ - 6, - 7, - 8 - ], - "custom.params": [ - 19 - ] - }, - "def": { - "struct.fields": [ - { - "name": 10, - "type": 20 - } - ] - } - }, - { - "id": { - "custom.name": 31, - "custom.namespace": [ - 2 - ], - "custom.params": [] - }, - "def": { - "union.fields": [ - { - "name": 17, - "type": 4 - }, - { - "name": 29, - "type": 5 - } - ] - } - }, - { - "id": { - "custom.name": 11, - "custom.namespace": [ - 6, - 7, - 10, - 12 - ], - "custom.params": [ - 19 - ] - }, - "def": { - "struct.fields": [ - { - "name": 10, - "type": 7 - } - ] - } - } - ] - }, - "storage": { - "struct.type": 1, - "struct.fields": [ - { - "name": 4, - "layout": { - "struct.type": 2, - "struct.fields": [ - { - "name": 10, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ], - "range.len": 1, - "range.elem_type": 3 - } - } - ] - } - }, - { - "name": 15, - "layout": { - "struct.type": 9, - "struct.fields": [ - { - "name": 10, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1 - ], - "range.len": 1, - "range.elem_type": 10 - } - } - ] - } - }, - { - "name": 19, - "layout": { - "struct.type": 12, - "struct.fields": [ - { - "name": 10, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 2 - ], - "range.len": 1, - "range.elem_type": 13 - } - } - ] - } - }, - { - "name": 24, - "layout": { - "struct.type": 15, - "struct.fields": [ - { - "name": 10, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 3 - ], - "range.len": 1, - "range.elem_type": 16 - } - } - ] - } - }, - { - "name": 30, - "layout": { - "struct.type": 18, - "struct.fields": [ - { - "name": 10, - "layout": { - "range.offset": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 4 - ], - "range.len": 1, - "range.elem_type": 19 - } - } - ] - } - } - ] - }, - "contract": { - "name": 1, - "deploy": { - "args": [], - "docs": [] - }, - "messages": [], - "events": [], - "docs": [] - } -} diff --git a/packages/api-contract/test/contracts/delegator.json b/packages/api-contract/test/contracts/delegator.json new file mode 100644 index 0000000000..1489d71389 --- /dev/null +++ b/packages/api-contract/test/contracts/delegator.json @@ -0,0 +1,252 @@ +{ + "metadataVersion": "0.1.0", + "source": { + "hash": "0x87175ad8e56de12e8bac275483adb1990a61c8b8caca9ddc18f1d5ad3b5dc976", + "language": "ink! 3.0.0", + "compiler": "rustc 1.48.0-nightly" + }, + "contract": { + "name": "delegator", + "version": "3.0.0", + "authors": [ + "Parity Technologies " + ] + }, + "spec": { + "constructors": [ + { + "args": [ + { + "name": "init_value", + "type": { + "displayName": [ + "i32" + ], + "id": 4 + } + }, + { + "name": "accumulator_code_hash", + "type": { + "displayName": [ + "Hash" + ], + "id": 5 + } + }, + { + "name": "adder_code_hash", + "type": { + "displayName": [ + "Hash" + ], + "id": 5 + } + }, + { + "name": "subber_code_hash", + "type": { + "displayName": [ + "Hash" + ], + "id": 5 + } + } + ], + "docs": [ + " Instantiate a delegator with the given sub-contract codes." + ], + "name": [ + "new" + ], + "selector": "0xd183512b" + } + ], + "docs": [], + "events": [], + "messages": [ + { + "args": [], + "docs": [ + " Returns the accumulator's value." + ], + "mutates": false, + "name": [ + "get" + ], + "payable": false, + "returnType": { + "displayName": [ + "i32" + ], + "id": 4 + }, + "selector": "0x1e5ca456" + }, + { + "args": [ + { + "name": "by", + "type": { + "displayName": [ + "i32" + ], + "id": 4 + } + } + ], + "docs": [ + " Delegates the call to either `Adder` or `Subber`." + ], + "mutates": true, + "name": [ + "change" + ], + "payable": false, + "returnType": null, + "selector": "0x0af938f2" + }, + { + "args": [], + "docs": [ + " Switches the delegator." + ], + "mutates": true, + "name": [ + "switch" + ], + "payable": false, + "returnType": null, + "selector": "0x5d37c38d" + } + ] + }, + "storage": { + "struct": { + "fields": [ + { + "layout": { + "enum": { + "dispatch_key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "variants": { + "0": { + "fields": [] + }, + "1": { + "fields": [] + } + } + } + }, + "name": "which" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0100000000000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "account_id" + } + ] + } + }, + "name": "accumulator" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0200000000000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "account_id" + } + ] + } + }, + "name": "adder" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0300000000000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "account_id" + } + ] + } + }, + "name": "subber" + } + ] + } + }, + "types": [ + { + "def": { + "composite": { + "fields": [ + { + "type": 2 + } + ] + } + }, + "path": [ + "ink_env", + "types", + "AccountId" + ] + }, + { + "def": { + "array": { + "len": 32, + "type": 3 + } + } + }, + { + "def": { + "primitive": "u8" + } + }, + { + "def": { + "primitive": "i32" + } + }, + { + "def": { + "composite": { + "fields": [ + { + "type": 2 + } + ] + } + }, + "path": [ + "ink_env", + "types", + "Hash" + ] + } + ] +} \ No newline at end of file diff --git a/packages/api-contract/test/contracts/delegator.wasm b/packages/api-contract/test/contracts/delegator.wasm new file mode 100644 index 0000000000000000000000000000000000000000..6fea3580df03c6a4d78d68e3f0db4795cc3e64e4 GIT binary patch literal 30306 zcmeHOZHyh&d4A71GjnHm?)8p=;7g#%xx+TOx3I~kq4&BDUuPBLR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k0D1v_!-1dOV104!5K9THNpCAMv#LbdPawICdd46fNLvG!5W7Lhv{KeUHCGv{ zZAy~lwTaTizcl&`ehj9G$Pf|Mho3A(MARap7(ZVkqFMZ4?Eh+q=_Zp2+BKyqO=(I~ zn$nb}G^Hs`X-ZR?(v+q&r72BmN>iHBl%_PLDNSigQ<~D0rZlA~O=(I~n$nb}G^Hs` jX-ZR?(v+q&r72BmN>iHBl%_PLDNSigQ<~D0pL6+NquAwc literal 0 HcmV?d00001 diff --git a/packages/api-contract/test/contracts/dns.json b/packages/api-contract/test/contracts/dns.json new file mode 100644 index 0000000000..c511a7492b --- /dev/null +++ b/packages/api-contract/test/contracts/dns.json @@ -0,0 +1,713 @@ +{ + "metadataVersion": "0.1.0", + "source": { + "hash": "0x1f1aa9abdcef699d384445b485ed35d890c9a1185510d03d6e1142248187b247", + "language": "ink! 3.0.0", + "compiler": "rustc 1.48.0-nightly" + }, + "contract": { + "name": "dns", + "version": "3.0.0", + "authors": [ + "Parity Technologies " + ] + }, + "spec": { + "constructors": [ + { + "args": [], + "docs": [ + " Creates a new domain name service contract." + ], + "name": [ + "new" + ], + "selector": "0xd183512b" + } + ], + "docs": [], + "events": [ + { + "args": [ + { + "docs": [], + "indexed": true, + "name": "name", + "type": { + "displayName": [ + "Hash" + ], + "id": 4 + } + }, + { + "docs": [], + "indexed": true, + "name": "from", + "type": { + "displayName": [ + "AccountId" + ], + "id": 9 + } + } + ], + "docs": [ + " Emitted whenever a new name is being registered." + ], + "name": "Register" + }, + { + "args": [ + { + "docs": [], + "indexed": true, + "name": "name", + "type": { + "displayName": [ + "Hash" + ], + "id": 4 + } + }, + { + "docs": [], + "indexed": false, + "name": "from", + "type": { + "displayName": [ + "AccountId" + ], + "id": 9 + } + }, + { + "docs": [], + "indexed": true, + "name": "old_address", + "type": { + "displayName": [ + "Option" + ], + "id": 13 + } + }, + { + "docs": [], + "indexed": true, + "name": "new_address", + "type": { + "displayName": [ + "AccountId" + ], + "id": 9 + } + } + ], + "docs": [ + " Emitted whenever an address changes." + ], + "name": "SetAddress" + }, + { + "args": [ + { + "docs": [], + "indexed": true, + "name": "name", + "type": { + "displayName": [ + "Hash" + ], + "id": 4 + } + }, + { + "docs": [], + "indexed": false, + "name": "from", + "type": { + "displayName": [ + "AccountId" + ], + "id": 9 + } + }, + { + "docs": [], + "indexed": true, + "name": "old_owner", + "type": { + "displayName": [ + "Option" + ], + "id": 13 + } + }, + { + "docs": [], + "indexed": true, + "name": "new_owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 9 + } + } + ], + "docs": [ + " Emitted whenver a name is being transferred." + ], + "name": "Transfer" + } + ], + "messages": [ + { + "args": [ + { + "name": "name", + "type": { + "displayName": [ + "Hash" + ], + "id": 4 + } + } + ], + "docs": [ + " Register specific name with caller as owner." + ], + "mutates": true, + "name": [ + "register" + ], + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "id": 10 + }, + "selector": "0x7fb0aded" + }, + { + "args": [ + { + "name": "name", + "type": { + "displayName": [ + "Hash" + ], + "id": 4 + } + }, + { + "name": "new_address", + "type": { + "displayName": [ + "AccountId" + ], + "id": 9 + } + } + ], + "docs": [ + " Set address for specific name." + ], + "mutates": true, + "name": [ + "set_address" + ], + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "id": 10 + }, + "selector": "0x220ac6e3" + }, + { + "args": [ + { + "name": "name", + "type": { + "displayName": [ + "Hash" + ], + "id": 4 + } + }, + { + "name": "to", + "type": { + "displayName": [ + "AccountId" + ], + "id": 9 + } + } + ], + "docs": [ + " Transfer owner to another address." + ], + "mutates": true, + "name": [ + "transfer" + ], + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "id": 10 + }, + "selector": "0xfae3a09d" + }, + { + "args": [ + { + "name": "name", + "type": { + "displayName": [ + "Hash" + ], + "id": 4 + } + } + ], + "docs": [ + " Get address for specific name." + ], + "mutates": false, + "name": [ + "get_address" + ], + "payable": false, + "returnType": { + "displayName": [ + "AccountId" + ], + "id": 9 + }, + "selector": "0xb9ee7664" + } + ] + }, + "storage": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "header" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0100000000000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0100000001000000000000000000000000000000000000000000000000000000", + "ty": 3 + } + }, + "len": 4294967295, + "offset": "0x0200000000000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "entries" + } + ] + } + }, + "name": "keys" + }, + { + "layout": { + "hash": { + "layout": { + "cell": { + "key": "0x0200000001000000000000000000000000000000000000000000000000000000", + "ty": 8 + } + }, + "offset": "0x0100000001000000000000000000000000000000000000000000000000000000", + "strategy": { + "hasher": "Blake2x256", + "postfix": "", + "prefix": "0x696e6b20686173686d6170" + } + } + }, + "name": "values" + } + ] + } + }, + "name": "name_to_address" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0200000001000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "header" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0300000001000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0300000002000000000000000000000000000000000000000000000000000000", + "ty": 3 + } + }, + "len": 4294967295, + "offset": "0x0400000001000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "entries" + } + ] + } + }, + "name": "keys" + }, + { + "layout": { + "hash": { + "layout": { + "cell": { + "key": "0x0400000002000000000000000000000000000000000000000000000000000000", + "ty": 8 + } + }, + "offset": "0x0300000002000000000000000000000000000000000000000000000000000000", + "strategy": { + "hasher": "Blake2x256", + "postfix": "", + "prefix": "0x696e6b20686173686d6170" + } + } + }, + "name": "values" + } + ] + } + }, + "name": "name_to_owner" + }, + { + "layout": { + "cell": { + "key": "0x0400000002000000000000000000000000000000000000000000000000000000", + "ty": 9 + } + }, + "name": "default_address" + } + ] + } + }, + "types": [ + { + "def": { + "composite": { + "fields": [ + { + "name": "last_vacant", + "type": 2 + }, + { + "name": "len", + "type": 2 + }, + { + "name": "len_entries", + "type": 2 + } + ] + } + }, + "path": [ + "ink_storage", + "collections", + "stash", + "Header" + ] + }, + { + "def": { + "primitive": "u32" + } + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 7 + } + ], + "name": "Vacant" + }, + { + "fields": [ + { + "type": 4 + } + ], + "name": "Occupied" + } + ] + } + }, + "params": [ + 4 + ], + "path": [ + "ink_storage", + "collections", + "stash", + "Entry" + ] + }, + { + "def": { + "composite": { + "fields": [ + { + "type": 5 + } + ] + } + }, + "path": [ + "ink_env", + "types", + "Hash" + ] + }, + { + "def": { + "array": { + "len": 32, + "type": 6 + } + } + }, + { + "def": { + "primitive": "u8" + } + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "next", + "type": 2 + }, + { + "name": "prev", + "type": 2 + } + ] + } + }, + "path": [ + "ink_storage", + "collections", + "stash", + "VacantEntry" + ] + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "value", + "type": 9 + }, + { + "name": "key_index", + "type": 2 + } + ] + } + }, + "params": [ + 9 + ], + "path": [ + "ink_storage", + "collections", + "hashmap", + "ValueEntry" + ] + }, + { + "def": { + "composite": { + "fields": [ + { + "type": 5 + } + ] + } + }, + "path": [ + "ink_env", + "types", + "AccountId" + ] + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 11 + } + ], + "name": "Ok" + }, + { + "fields": [ + { + "type": 12 + } + ], + "name": "Err" + } + ] + } + }, + "params": [ + 11, + 12 + ], + "path": [ + "Result" + ] + }, + { + "def": { + "tuple": [] + } + }, + { + "def": { + "variant": { + "variants": [ + { + "discriminant": 0, + "name": "NameAlreadyExists" + }, + { + "discriminant": 1, + "name": "CallerIsNotOwner" + } + ] + } + }, + "path": [ + "dns", + "dns", + "Error" + ] + }, + { + "def": { + "variant": { + "variants": [ + { + "name": "None" + }, + { + "fields": [ + { + "type": 9 + } + ], + "name": "Some" + } + ] + } + }, + "params": [ + 9 + ], + "path": [ + "Option" + ] + } + ] +} \ No newline at end of file diff --git a/packages/api-contract/test/contracts/dns.wasm b/packages/api-contract/test/contracts/dns.wasm new file mode 100644 index 0000000000000000000000000000000000000000..60007ced4c8840df9565b41dbdad7f3a3500c2f3 GIT binary patch literal 44989 zcmeHwZ;Tz+b>ICnGjHC`d*o22J(Rk`cfX<48^89*&)paJN{AJ(k}D1d=dh(FMQThM5V%79xCZ3-xeKhUky zsD;t8MFADR-??{Y-cpw3*dN^DjUc|6Gk@;A=br!P+`H<;bD!2qDgB}Gal5v*rj93T z{4qG!Yl=|4hHJfcT;m@_;6-)ZtXg1j$_q=a8-n@%9 zpE`Nw+2=lW{>hV{J^9RerRBYXw?2O2^y!o5lo8n7gnjnJ>Cc>e^8C3I&ph{uljqKz zd@A0SuYLUV$rI<=Uf6#3KH2MDA~)vv$xl6V<}>HxXQbtGC(nQ8+%rnqQ%$O}RHbP) zNK>s;YE71!L6#X~a%+rH{Lh%o43&{1G1}sPt+me5Ib$*#4?Jv5krjzmnH>xUgDh2c zl$r!bs?Xq+T(4=rzMd3=Z6rZ5EU> zzHEHn)YfUAH;YQG*Z?e>I&s>UQ^5JAPM!AiEzoJcQP8o$)tS z88z?ld2-uieEJV{zYBVw zx}pWOt1Ie@+8O_vYA|N>t{fLmP0T7Vf(fx79_vwBI3-YBZmF`+G0rXQ{%Fi6ijeRymO z(uH!i+*+q&y%5JMFU57E}PYn1v-;uvkIIZXfge$Jh^NRj7(8(Qv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z-;|+XUTflesCC48N7wy9vhI0R9MEQsV##1Gv2ccW*%YdiFiHyTsiJs!T^pDLNwI*x!)KIIRw)IcnJT3+rPM$vm8)=|!m0SeI-Z>!vtxG5 zj@dCgX2siYcFd01F*|0*?3f+1V|L7r*)cn2$LyFLvtxG5 zj@dCgX2siYcFd01F*|0*?3f+1V|L7r*)cn2$Irm=e*vL3 B4j%vj literal 0 HcmV?d00001 diff --git a/packages/api-contract/test/contracts/erc20-pruned.wasm b/packages/api-contract/test/contracts/erc20-pruned.wasm deleted file mode 100644 index 7b9973615c2848cfb287acf83abb9d56571ec276..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 39375 zcmeIbeUKd2bsu`~?e3YL=^1Q;1jxk)h0_g)oR#pg02Z^06(!=10#Gz1lTv7hjw}Pq z#gIT_u?x&DNW!MDLlH{@k{rX1EYl7ZBhN|*zlaW$Fb)$d^`K`y2T9Q>RGt&_54{Ah ztXBoUV)?;UdMP+hHeUVCx!p6n00dH`9sLoYfa$({`+l5z?)ko_)x_*!t(4O9EBATx z^YeOspK<@6P<(k}pPttz_WASk^YaSV^ZS&Z=gM3`?Ne%>If3#3b#S5QmAoJoPbl|@ zE2@3o{D~9ze?D*cgq}CQqbpu}`svc)_Tib%aidL)+ky78b9-mob9-m!W;zp3wN+4* zKGj!RLTSu(Cp!~!lLz+B9{kz1D&J5%IdkN=3Q-)P_L0uP>A9(C#a%B)$^Q0{nc0JL zd)rU9r{|=%D#|Z)E^7U)W# z>RRJLP^px(4)j16h9Uo_LtQb;E7f`(UHP7;wKjKD>h(%Vdv~s=RH_wp&cF3aT`8sf zKp)X}-(3pzytdu0AC>PkrTy(AQ!~faDeYrk>VMLe4O&?p-L?N0^%?z3`j_?J)nC!S zqF>hAKJzyp`-uZj9n20*9iFZ}|BL1u`T_0DTa_5Ii*&=N)WeVeNL`UvKlSiaOMPqRvNW)@i~<{GX+Yiw^vn0z8yoq8ZUW=?AR2)!8>_;c7AAZup}y;cj@#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TCG-U>AO!%OySMFGfx&TD>b}KGw!?g=Vs<6ruNPrI|6?EQF=#9 zad>8bdy1LU*N~!-cpqci3RtpW9oS2$w@27o_9KntsA3rwzOlRUq iV`v}EOw$DI`|+9S_C6VQKlz*C>Of43k0F7wssA50B?bim diff --git a/packages/api-contract/test/contracts/erc20.json b/packages/api-contract/test/contracts/erc20.json new file mode 100644 index 0000000000..aa4c2fe96b --- /dev/null +++ b/packages/api-contract/test/contracts/erc20.json @@ -0,0 +1,704 @@ +{ + "metadataVersion": "0.1.0", + "source": { + "hash": "0xae28fa9f075f218d559a36f720b0704b2c09326590fe19d7d76a7eaa40d079b3", + "language": "ink! 3.0.0", + "compiler": "rustc 1.48.0-nightly" + }, + "contract": { + "name": "erc20", + "version": "3.0.0", + "authors": [ + "Parity Technologies " + ] + }, + "spec": { + "constructors": [ + { + "args": [ + { + "name": "initial_supply", + "type": { + "displayName": [ + "Balance" + ], + "id": 1 + } + } + ], + "docs": [], + "name": [ + "new" + ], + "selector": "0xd183512b" + } + ], + "docs": [], + "events": [ + { + "args": [ + { + "docs": [], + "indexed": true, + "name": "from", + "type": { + "displayName": [ + "Option" + ], + "id": 13 + } + }, + { + "docs": [], + "indexed": true, + "name": "to", + "type": { + "displayName": [ + "Option" + ], + "id": 13 + } + }, + { + "docs": [], + "indexed": true, + "name": "value", + "type": { + "displayName": [ + "Balance" + ], + "id": 1 + } + } + ], + "docs": [], + "name": "Transfer" + }, + { + "args": [ + { + "docs": [], + "indexed": true, + "name": "owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + }, + { + "docs": [], + "indexed": true, + "name": "spender", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + }, + { + "docs": [], + "indexed": true, + "name": "value", + "type": { + "displayName": [ + "Balance" + ], + "id": 1 + } + } + ], + "docs": [], + "name": "Approval" + } + ], + "messages": [ + { + "args": [], + "docs": [], + "mutates": false, + "name": [ + "total_supply" + ], + "payable": false, + "returnType": { + "displayName": [ + "Balance" + ], + "id": 1 + }, + "selector": "0xdcb736b5" + }, + { + "args": [ + { + "name": "owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + } + ], + "docs": [], + "mutates": false, + "name": [ + "balance_of" + ], + "payable": false, + "returnType": { + "displayName": [ + "Balance" + ], + "id": 1 + }, + "selector": "0x56e929b2" + }, + { + "args": [ + { + "name": "owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + }, + { + "name": "spender", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + } + ], + "docs": [], + "mutates": false, + "name": [ + "allowance" + ], + "payable": false, + "returnType": { + "displayName": [ + "Balance" + ], + "id": 1 + }, + "selector": "0xf3cfff66" + }, + { + "args": [ + { + "name": "to", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + }, + { + "name": "value", + "type": { + "displayName": [ + "Balance" + ], + "id": 1 + } + } + ], + "docs": [], + "mutates": true, + "name": [ + "transfer" + ], + "payable": false, + "returnType": { + "displayName": [ + "bool" + ], + "id": 12 + }, + "selector": "0xfae3a09d" + }, + { + "args": [ + { + "name": "spender", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + }, + { + "name": "value", + "type": { + "displayName": [ + "Balance" + ], + "id": 1 + } + } + ], + "docs": [], + "mutates": true, + "name": [ + "approve" + ], + "payable": false, + "returnType": { + "displayName": [ + "bool" + ], + "id": 12 + }, + "selector": "0x03d0e114" + }, + { + "args": [ + { + "name": "from", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + }, + { + "name": "to", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + }, + { + "name": "value", + "type": { + "displayName": [ + "Balance" + ], + "id": 1 + } + } + ], + "docs": [], + "mutates": true, + "name": [ + "transfer_from" + ], + "payable": false, + "returnType": { + "displayName": [ + "bool" + ], + "id": 12 + }, + "selector": "0xfcfb2ccd" + } + ] + }, + "storage": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "total_supply" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0100000000000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "header" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0200000000000000000000000000000000000000000000000000000000000000", + "ty": 3 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0200000001000000000000000000000000000000000000000000000000000000", + "ty": 4 + } + }, + "len": 4294967295, + "offset": "0x0300000000000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "entries" + } + ] + } + }, + "name": "keys" + }, + { + "layout": { + "hash": { + "layout": { + "cell": { + "key": "0x0300000001000000000000000000000000000000000000000000000000000000", + "ty": 9 + } + }, + "offset": "0x0200000001000000000000000000000000000000000000000000000000000000", + "strategy": { + "hasher": "Blake2x256", + "postfix": "", + "prefix": "0x696e6b20686173686d6170" + } + } + }, + "name": "values" + } + ] + } + }, + "name": "balances" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0300000001000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "header" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0400000001000000000000000000000000000000000000000000000000000000", + "ty": 3 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0400000002000000000000000000000000000000000000000000000000000000", + "ty": 10 + } + }, + "len": 4294967295, + "offset": "0x0500000001000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "entries" + } + ] + } + }, + "name": "keys" + }, + { + "layout": { + "hash": { + "layout": { + "cell": { + "key": "0x0500000002000000000000000000000000000000000000000000000000000000", + "ty": 9 + } + }, + "offset": "0x0400000002000000000000000000000000000000000000000000000000000000", + "strategy": { + "hasher": "Blake2x256", + "postfix": "", + "prefix": "0x696e6b20686173686d6170" + } + } + }, + "name": "values" + } + ] + } + }, + "name": "allowances" + } + ] + } + }, + "types": [ + { + "def": { + "primitive": "u128" + } + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "last_vacant", + "type": 3 + }, + { + "name": "len", + "type": 3 + }, + { + "name": "len_entries", + "type": 3 + } + ] + } + }, + "path": [ + "ink_storage", + "collections", + "stash", + "Header" + ] + }, + { + "def": { + "primitive": "u32" + } + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 8 + } + ], + "name": "Vacant" + }, + { + "fields": [ + { + "type": 5 + } + ], + "name": "Occupied" + } + ] + } + }, + "params": [ + 5 + ], + "path": [ + "ink_storage", + "collections", + "stash", + "Entry" + ] + }, + { + "def": { + "composite": { + "fields": [ + { + "type": 6 + } + ] + } + }, + "path": [ + "ink_env", + "types", + "AccountId" + ] + }, + { + "def": { + "array": { + "len": 32, + "type": 7 + } + } + }, + { + "def": { + "primitive": "u8" + } + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "next", + "type": 3 + }, + { + "name": "prev", + "type": 3 + } + ] + } + }, + "path": [ + "ink_storage", + "collections", + "stash", + "VacantEntry" + ] + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "value", + "type": 1 + }, + { + "name": "key_index", + "type": 3 + } + ] + } + }, + "params": [ + 1 + ], + "path": [ + "ink_storage", + "collections", + "hashmap", + "ValueEntry" + ] + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 8 + } + ], + "name": "Vacant" + }, + { + "fields": [ + { + "type": 11 + } + ], + "name": "Occupied" + } + ] + } + }, + "params": [ + 11 + ], + "path": [ + "ink_storage", + "collections", + "stash", + "Entry" + ] + }, + { + "def": { + "tuple": [ + 5, + 5 + ] + } + }, + { + "def": { + "primitive": "bool" + } + }, + { + "def": { + "variant": { + "variants": [ + { + "name": "None" + }, + { + "fields": [ + { + "type": 5 + } + ], + "name": "Some" + } + ] + } + }, + "params": [ + 5 + ], + "path": [ + "Option" + ] + } + ] +} \ No newline at end of file diff --git a/packages/api-contract/test/contracts/erc20.wasm b/packages/api-contract/test/contracts/erc20.wasm new file mode 100644 index 0000000000000000000000000000000000000000..726bb0b5e9afea46062599a1c7363e099df5b068 GIT binary patch literal 54033 zcmeHwf3O|bUEle!yLa#1d!@DGIM05LeeU`J_kmTtD9(L~WI#u?EE_w-CI$=yTTU!c zR*qxIN^ro|dm$!PNDBJHor(#}sDnFkhkC|S$W)z#$qVrmrQ;4_!VdwSsc17rX-YBR znF^YYJD<<@oV|OWWLw6exXfK!@9v)6JwLwZ`~9Bpuk&4X??WHdN-2F$xyP=otf)Q7 z3V#gF^@?JtUP1BU!wSWEWsk-mrS{mvhvf<0IjmRq7(Ar(%ARxuFNBko6=nWH_w3#W zK9YTK?*~70@S{eXGJR<8z4tGb_`3_wT*;VABiR?%q$fx|hg}9;^Jo0}p=qP^?B;KDhVL zhYvoWl>MZBTpN>SD#QPsTxAv)yfn6JlrqW~V|tk}x#^frr_(V-YD`bcm9Zu5T$=D=L@x8H8UJY&Gl(S=l+RA!C74On!(gYrG#;dXEn;m9{)6V#Q?UVAB z*pTk)0_~$3&B~{0`=wl`sP2^6UnL6)m6#n)`I8Dg?^o%fRXg<$43tZqS+==Lz1pUn zOMO{8yKGfo7cTMr+G)S0%73P>lqy0sH`F7es?;gJrf|A@pj_flshaPEH(cVMQ?)mB zmAS-sakfdRZA!VsC7V@uyS~jO{-~~<@}t_N<$$#(BXd-HeG{uZp;6_N8jS#0iGPMA zzpU#;qn0h}S~O4SW&4!&CzVgi4OPc$w9@f>^pt8k)WINcbRGX?Rl6*7rsI;$`nK)L zyTm`GYu70^UMZtL#%5iD)<#BobEx)9I2(3cf;OJg@{ZRBW%!eke?w1NNc`8)6Sjit zR!xmo(OOv+PL0e~^cisKynCSg877sbX?e+o+v=}tY8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%ZG|Qh9t9K|RG|t9W*H%#PVHJ7&l1 zm>siYcFd01F*|0*?3f+1V|L7r*)cn2$LyFLvtxG5j@dCgX2siYcFd01F*|0*?3f+1V|L7r*)cn2$LyFLvtxG5j@dCgX2" + ] + }, + "spec": { + "constructors": [ + { + "args": [], + "docs": [ + " Creates a new ERC721 token contract." + ], + "name": [ + "new" + ], + "selector": "0xd183512b" + } + ], + "docs": [], + "events": [ + { + "args": [ + { + "docs": [], + "indexed": true, + "name": "from", + "type": { + "displayName": [ + "Option" + ], + "id": 15 + } + }, + { + "docs": [], + "indexed": true, + "name": "to", + "type": { + "displayName": [ + "Option" + ], + "id": 15 + } + }, + { + "docs": [], + "indexed": true, + "name": "id", + "type": { + "displayName": [ + "TokenId" + ], + "id": 2 + } + } + ], + "docs": [ + " Event emitted when a token transfer occurs." + ], + "name": "Transfer" + }, + { + "args": [ + { + "docs": [], + "indexed": true, + "name": "from", + "type": { + "displayName": [ + "AccountId" + ], + "id": 6 + } + }, + { + "docs": [], + "indexed": true, + "name": "to", + "type": { + "displayName": [ + "AccountId" + ], + "id": 6 + } + }, + { + "docs": [], + "indexed": true, + "name": "id", + "type": { + "displayName": [ + "TokenId" + ], + "id": 2 + } + } + ], + "docs": [ + " Event emited when a token approve occurs." + ], + "name": "Approval" + }, + { + "args": [ + { + "docs": [], + "indexed": true, + "name": "owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 6 + } + }, + { + "docs": [], + "indexed": true, + "name": "operator", + "type": { + "displayName": [ + "AccountId" + ], + "id": 6 + } + }, + { + "docs": [], + "indexed": false, + "name": "approved", + "type": { + "displayName": [ + "bool" + ], + "id": 14 + } + } + ], + "docs": [ + " Event emitted when an operator is enabled or disabled for an owner.", + " The operator can manage all NFTs of the owner." + ], + "name": "ApprovalForAll" + } + ], + "messages": [ + { + "args": [ + { + "name": "owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 6 + } + } + ], + "docs": [ + " Returns the balance of the owner.", + "", + " This represents the amount of unique tokens the owner has." + ], + "mutates": false, + "name": [ + "balance_of" + ], + "payable": false, + "returnType": { + "displayName": [ + "u32" + ], + "id": 2 + }, + "selector": "0x56e929b2" + }, + { + "args": [ + { + "name": "id", + "type": { + "displayName": [ + "TokenId" + ], + "id": 2 + } + } + ], + "docs": [ + " Returns the owner of the token." + ], + "mutates": false, + "name": [ + "owner_of" + ], + "payable": false, + "returnType": { + "displayName": [ + "Option" + ], + "id": 15 + }, + "selector": "0xf7860ada" + }, + { + "args": [ + { + "name": "id", + "type": { + "displayName": [ + "TokenId" + ], + "id": 2 + } + } + ], + "docs": [ + " Returns the approved account ID for this token if any." + ], + "mutates": false, + "name": [ + "get_approved" + ], + "payable": false, + "returnType": { + "displayName": [ + "Option" + ], + "id": 15 + }, + "selector": "0xb09dc487" + }, + { + "args": [ + { + "name": "owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 6 + } + }, + { + "name": "operator", + "type": { + "displayName": [ + "AccountId" + ], + "id": 6 + } + } + ], + "docs": [ + " Returns `true` if the operator is approved by the owner." + ], + "mutates": false, + "name": [ + "is_approved_for_all" + ], + "payable": false, + "returnType": { + "displayName": [ + "bool" + ], + "id": 14 + }, + "selector": "0xc666bf03" + }, + { + "args": [ + { + "name": "to", + "type": { + "displayName": [ + "AccountId" + ], + "id": 6 + } + }, + { + "name": "approved", + "type": { + "displayName": [ + "bool" + ], + "id": 14 + } + } + ], + "docs": [ + " Approves or disapproves the operator for all tokens of the caller." + ], + "mutates": true, + "name": [ + "set_approval_for_all" + ], + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "id": 16 + }, + "selector": "0x51176f12" + }, + { + "args": [ + { + "name": "to", + "type": { + "displayName": [ + "AccountId" + ], + "id": 6 + } + }, + { + "name": "id", + "type": { + "displayName": [ + "TokenId" + ], + "id": 2 + } + } + ], + "docs": [ + " Approves the account to transfer the specified token on behalf of the caller." + ], + "mutates": true, + "name": [ + "approve" + ], + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "id": 16 + }, + "selector": "0x03d0e114" + }, + { + "args": [ + { + "name": "destination", + "type": { + "displayName": [ + "AccountId" + ], + "id": 6 + } + }, + { + "name": "id", + "type": { + "displayName": [ + "TokenId" + ], + "id": 2 + } + } + ], + "docs": [ + " Transfers the token from the caller to the given destination." + ], + "mutates": true, + "name": [ + "transfer" + ], + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "id": 16 + }, + "selector": "0xfae3a09d" + }, + { + "args": [ + { + "name": "from", + "type": { + "displayName": [ + "AccountId" + ], + "id": 6 + } + }, + { + "name": "to", + "type": { + "displayName": [ + "AccountId" + ], + "id": 6 + } + }, + { + "name": "id", + "type": { + "displayName": [ + "TokenId" + ], + "id": 2 + } + } + ], + "docs": [ + " Transfer approved or owned token." + ], + "mutates": true, + "name": [ + "transfer_from" + ], + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "id": 16 + }, + "selector": "0xfcfb2ccd" + }, + { + "args": [ + { + "name": "id", + "type": { + "displayName": [ + "TokenId" + ], + "id": 2 + } + } + ], + "docs": [ + " Creates a new token." + ], + "mutates": true, + "name": [ + "mint" + ], + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "id": 16 + }, + "selector": "0xf8885eeb" + }, + { + "args": [ + { + "name": "id", + "type": { + "displayName": [ + "TokenId" + ], + "id": 2 + } + } + ], + "docs": [ + " Deletes an existing token. Only the owner can burn the token." + ], + "mutates": true, + "name": [ + "burn" + ], + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "id": 16 + }, + "selector": "0x120bc564" + } + ] + }, + "storage": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "header" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0100000000000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0100000001000000000000000000000000000000000000000000000000000000", + "ty": 3 + } + }, + "len": 4294967295, + "offset": "0x0200000000000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "entries" + } + ] + } + }, + "name": "keys" + }, + { + "layout": { + "hash": { + "layout": { + "cell": { + "key": "0x0200000001000000000000000000000000000000000000000000000000000000", + "ty": 5 + } + }, + "offset": "0x0100000001000000000000000000000000000000000000000000000000000000", + "strategy": { + "hasher": "Blake2x256", + "postfix": "", + "prefix": "0x696e6b20686173686d6170" + } + } + }, + "name": "values" + } + ] + } + }, + "name": "token_owner" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0200000001000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "header" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0300000001000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0300000002000000000000000000000000000000000000000000000000000000", + "ty": 3 + } + }, + "len": 4294967295, + "offset": "0x0400000001000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "entries" + } + ] + } + }, + "name": "keys" + }, + { + "layout": { + "hash": { + "layout": { + "cell": { + "key": "0x0400000002000000000000000000000000000000000000000000000000000000", + "ty": 5 + } + }, + "offset": "0x0300000002000000000000000000000000000000000000000000000000000000", + "strategy": { + "hasher": "Blake2x256", + "postfix": "", + "prefix": "0x696e6b20686173686d6170" + } + } + }, + "name": "values" + } + ] + } + }, + "name": "token_approvals" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0400000002000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "header" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0500000002000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0500000003000000000000000000000000000000000000000000000000000000", + "ty": 9 + } + }, + "len": 4294967295, + "offset": "0x0600000002000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "entries" + } + ] + } + }, + "name": "keys" + }, + { + "layout": { + "hash": { + "layout": { + "cell": { + "key": "0x0600000003000000000000000000000000000000000000000000000000000000", + "ty": 10 + } + }, + "offset": "0x0500000003000000000000000000000000000000000000000000000000000000", + "strategy": { + "hasher": "Blake2x256", + "postfix": "", + "prefix": "0x696e6b20686173686d6170" + } + } + }, + "name": "values" + } + ] + } + }, + "name": "owned_tokens_count" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0600000003000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "header" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0700000003000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0700000004000000000000000000000000000000000000000000000000000000", + "ty": 11 + } + }, + "len": 4294967295, + "offset": "0x0800000003000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "entries" + } + ] + } + }, + "name": "keys" + }, + { + "layout": { + "hash": { + "layout": { + "cell": { + "key": "0x0800000004000000000000000000000000000000000000000000000000000000", + "ty": 13 + } + }, + "offset": "0x0700000004000000000000000000000000000000000000000000000000000000", + "strategy": { + "hasher": "Blake2x256", + "postfix": "", + "prefix": "0x696e6b20686173686d6170" + } + } + }, + "name": "values" + } + ] + } + }, + "name": "operator_approvals" + } + ] + } + }, + "types": [ + { + "def": { + "composite": { + "fields": [ + { + "name": "last_vacant", + "type": 2 + }, + { + "name": "len", + "type": 2 + }, + { + "name": "len_entries", + "type": 2 + } + ] + } + }, + "path": [ + "ink_storage", + "collections", + "stash", + "Header" + ] + }, + { + "def": { + "primitive": "u32" + } + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 4 + } + ], + "name": "Vacant" + }, + { + "fields": [ + { + "type": 2 + } + ], + "name": "Occupied" + } + ] + } + }, + "params": [ + 2 + ], + "path": [ + "ink_storage", + "collections", + "stash", + "Entry" + ] + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "next", + "type": 2 + }, + { + "name": "prev", + "type": 2 + } + ] + } + }, + "path": [ + "ink_storage", + "collections", + "stash", + "VacantEntry" + ] + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "value", + "type": 6 + }, + { + "name": "key_index", + "type": 2 + } + ] + } + }, + "params": [ + 6 + ], + "path": [ + "ink_storage", + "collections", + "hashmap", + "ValueEntry" + ] + }, + { + "def": { + "composite": { + "fields": [ + { + "type": 7 + } + ] + } + }, + "path": [ + "ink_env", + "types", + "AccountId" + ] + }, + { + "def": { + "array": { + "len": 32, + "type": 8 + } + } + }, + { + "def": { + "primitive": "u8" + } + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 4 + } + ], + "name": "Vacant" + }, + { + "fields": [ + { + "type": 6 + } + ], + "name": "Occupied" + } + ] + } + }, + "params": [ + 6 + ], + "path": [ + "ink_storage", + "collections", + "stash", + "Entry" + ] + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "value", + "type": 2 + }, + { + "name": "key_index", + "type": 2 + } + ] + } + }, + "params": [ + 2 + ], + "path": [ + "ink_storage", + "collections", + "hashmap", + "ValueEntry" + ] + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 4 + } + ], + "name": "Vacant" + }, + { + "fields": [ + { + "type": 12 + } + ], + "name": "Occupied" + } + ] + } + }, + "params": [ + 12 + ], + "path": [ + "ink_storage", + "collections", + "stash", + "Entry" + ] + }, + { + "def": { + "tuple": [ + 6, + 6 + ] + } + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "value", + "type": 14 + }, + { + "name": "key_index", + "type": 2 + } + ] + } + }, + "params": [ + 14 + ], + "path": [ + "ink_storage", + "collections", + "hashmap", + "ValueEntry" + ] + }, + { + "def": { + "primitive": "bool" + } + }, + { + "def": { + "variant": { + "variants": [ + { + "name": "None" + }, + { + "fields": [ + { + "type": 6 + } + ], + "name": "Some" + } + ] + } + }, + "params": [ + 6 + ], + "path": [ + "Option" + ] + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 17 + } + ], + "name": "Ok" + }, + { + "fields": [ + { + "type": 18 + } + ], + "name": "Err" + } + ] + } + }, + "params": [ + 17, + 18 + ], + "path": [ + "Result" + ] + }, + { + "def": { + "tuple": [] + } + }, + { + "def": { + "variant": { + "variants": [ + { + "discriminant": 0, + "name": "NotOwner" + }, + { + "discriminant": 1, + "name": "NotApproved" + }, + { + "discriminant": 2, + "name": "TokenExists" + }, + { + "discriminant": 3, + "name": "TokenNotFound" + }, + { + "discriminant": 4, + "name": "CannotInsert" + }, + { + "discriminant": 5, + "name": "CannotRemove" + }, + { + "discriminant": 6, + "name": "CannotFetchValue" + }, + { + "discriminant": 7, + "name": "NotAllowed" + } + ] + } + }, + "path": [ + "erc721", + "erc721", + "Error" + ] + } + ] +} \ No newline at end of file diff --git a/packages/api-contract/test/contracts/erc721.wasm b/packages/api-contract/test/contracts/erc721.wasm new file mode 100644 index 0000000000000000000000000000000000000000..6273eedcb40000e8a2a370dc3e5bca1d181ebed0 GIT binary patch literal 71848 zcmeIb4U`?nbskth{rdHres549Kyt`|#Ck2nd2oOLW~dn$U>r0<0;C~Dv`uFbhY>+b zu;>Ow5g;UkHq9ADv^hp#L^l`#288BHDuEfWYHFsqdkE(OpN4ccR`!p zg-)bnW)G9lC-!R3_uZ=QeuKdu2}-oi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vyo8M%LZM6#- z5YP*zUt#8@1gCi==oWs;df_?q2f&hGP(Xwy4iu?Z=vUG8>F$B?T`06|{WL@7GiI^| zi;-A!a@1dIOl!AUCy$9++@|wMOGUc^B0M9a?1eitd+JhLdVqz!XL!*iB?H*X4 z`DA~QB40N0E*!4V6+}uX&?2ZOW4dben3F2YKg9s3~mLLV@%sBl_TsN)nS)-Y>B9%nnwEx`3`f&8cT4m{-nf_{Bj%rIb~}4&u9@w*p#b z1PN>e#4zri*anGb0Rv}|mP@%WQ1b|Ui`WC4iVbNw%MHm2St&=|9h_lV@7EsS=)nA<-89!cq@B*83{oq0Iuxjlm2d z$3AOgQ%HpaTMC^&DsCriF!6Th087Z*{dxZRMQ!L@oo`g((n=|#l(I@Gkj9QuDpg8# zl~P%J32Almrxx+<a!szuHMu6&a!szuHM!md*Z&WWh0R9* literal 0 HcmV?d00001 diff --git a/packages/api-contract/test/contracts/flipper-pruned.wasm b/packages/api-contract/test/contracts/flipper-pruned.wasm deleted file mode 100644 index 65f81162fe648dccc3a377d5fff0bce4ab7f0d27..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12802 zcmd5@U5s2;egB`2nR{pMjQ2VTWRnf?|K1oF6WcrcHT%Iwd=}Qmm|z+eghZ*mUQe98 zyWaKAj-9x2JzFrTTM`jc9o_o&!{J+1>2`z4(RYasdv+Jbk^?IszQp>06(Mgp*(n(T1 zc}*v6uh+u>;rTM1EaACFC-r4a_D`zkr>UNPUInJTcAeRjQbQ7aweF={{4J#ntH zyw+V^Ba4w3Bb!T|#qQEmCpMRVt4*alhL_gQU8FLGhcNq0yL)1@yWUwm(hlHwbtq|tOnLnXf-LNl(nRc z(WH%yYIUWpC0kPGRJB?TRZqFCEgJ>9b@_Dr-0J#8deAN{uCCISnmBhI=K(?}ddKL}K<$JEeqV)UV%|L`JAty4$p z#HOxl<%rEfT}7-H>WUTXEGaR$`?7{6*V|0Wj*@^?Vpt`iImE`PEU9dRWwW0stvdR6 z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Khb;0Poj+8N5%NJ^z2fog6wt Hh?ev}Y25(i diff --git a/packages/api-contract/test/contracts/flipper.json b/packages/api-contract/test/contracts/flipper.json new file mode 100644 index 0000000000..4a2ed7cd18 --- /dev/null +++ b/packages/api-contract/test/contracts/flipper.json @@ -0,0 +1,106 @@ +{ + "metadataVersion": "0.1.0", + "source": { + "hash": "0x98f9fc872ae9db158c8f695018a1b3c5a2fb863f9bed7c83ec039f05ea67fc57", + "language": "ink! 3.0.0", + "compiler": "rustc 1.48.0-nightly" + }, + "contract": { + "name": "flipper", + "version": "3.0.0", + "authors": [ + "Parity Technologies " + ] + }, + "spec": { + "constructors": [ + { + "args": [ + { + "name": "init_value", + "type": { + "displayName": [ + "bool" + ], + "id": 1 + } + } + ], + "docs": [ + " Creates a new flipper smart contract initialized with the given value." + ], + "name": [ + "new" + ], + "selector": "0xd183512b" + }, + { + "args": [], + "docs": [ + " Creates a new flipper smart contract initialized to `false`." + ], + "name": [ + "default" + ], + "selector": "0x6a3712e2" + } + ], + "docs": [], + "events": [], + "messages": [ + { + "args": [], + "docs": [ + " Flips the current value of the Flipper's bool." + ], + "mutates": true, + "name": [ + "flip" + ], + "payable": false, + "returnType": null, + "selector": "0xc096a5f3" + }, + { + "args": [], + "docs": [ + " Returns the current value of the Flipper's bool." + ], + "mutates": false, + "name": [ + "get" + ], + "payable": false, + "returnType": { + "displayName": [ + "bool" + ], + "id": 1 + }, + "selector": "0x1e5ca456" + } + ] + }, + "storage": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "value" + } + ] + } + }, + "types": [ + { + "def": { + "primitive": "bool" + } + } + ] +} \ No newline at end of file diff --git a/packages/api-contract/test/contracts/flipper.wasm b/packages/api-contract/test/contracts/flipper.wasm new file mode 100644 index 0000000000000000000000000000000000000000..61e0a9f2da46bd7fdc67347bd784641d465940ed GIT binary patch literal 19055 zcmeH}O=~3A6^7q)ZdI#1x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0&1Q4H*=jD#H|D42r{`zpXXoeUoAdMYt@(vk zqczot>AwImG5tUQ diff --git a/packages/api-contract/test/contracts/incrementer.json b/packages/api-contract/test/contracts/incrementer.json index e7d8c57ef8..16d9af4f67 100644 --- a/packages/api-contract/test/contracts/incrementer.json +++ b/packages/api-contract/test/contracts/incrementer.json @@ -1,233 +1,108 @@ { - "registry": { - "strings": [ - "Incrementer", - "incrementer", - "normal", - "value", - "Value", - "ink_core", - "storage", - "cell", - "SyncCell", - "sync_cell", - "Key", - "key", - "on_deploy", - "init_value", - "u32", - "inc", - "by", - "get", - "compare", - "with", - "bool" + "metadataVersion": "0.1.0", + "source": { + "hash": "0xafe9cfb918e19fc701470017985ab0324017c66dbcfb13cb3ceca39e68cddd86", + "language": "ink! 3.0.0", + "compiler": "rustc 1.48.0-nightly" + }, + "contract": { + "name": "incrementer", + "version": "3.0.0", + "authors": [ + "Parity Technologies " + ] + }, + "spec": { + "constructors": [ + { + "args": [ + { + "name": "init_value", + "type": { + "displayName": [ + "i32" + ], + "id": 1 + } + } + ], + "docs": [], + "name": [ + "new" + ], + "selector": "0xd183512b" + }, + { + "args": [], + "docs": [], + "name": [ + "default" + ], + "selector": "0x6a3712e2" + } ], - "types": [ + "docs": [], + "events": [], + "messages": [ { - "id": { - "custom.name": 1, - "custom.namespace": [ - 2, - 3 - ], - "custom.params": [] - }, - "def": { - "struct.fields": [ - { - "name": 4, - "type": 2 + "args": [ + { + "name": "by", + "type": { + "displayName": [ + "i32" + ], + "id": 1 } - ] - } + } + ], + "docs": [], + "mutates": true, + "name": [ + "inc" + ], + "payable": false, + "returnType": null, + "selector": "0x2fb8d143" }, { - "id": { - "custom.name": 5, - "custom.namespace": [ - 6, - 7, - 4 + "args": [], + "docs": [], + "mutates": false, + "name": [ + "get" + ], + "payable": false, + "returnType": { + "displayName": [ + "i32" ], - "custom.params": [ - 3 - ] + "id": 1 }, - "def": { - "struct.fields": [ - { - "name": 8, - "type": 4 - } - ] - } - }, - { - "id": "u32", - "def": "builtin" - }, - { - "id": { - "custom.name": 9, - "custom.namespace": [ - 6, - 7, - 8, - 10 - ], - "custom.params": [ - 3 - ] - }, - "def": { - "struct.fields": [ - { - "name": 8, - "type": 5 - } - ] - } - }, - { - "id": { - "custom.name": 11, - "custom.namespace": [ - 6, - 7, - 12 - ], - "custom.params": [] - }, - "def": { - "tuple_struct.types": [ - 6 - ] - } - }, - { - "id": { - "array.len": 32, - "array.type": 7 - }, - "def": "builtin" - }, - { - "id": "u8", - "def": "builtin" - }, - { - "id": "bool", - "def": "builtin" + "selector": "0x1e5ca456" } ] }, "storage": { - "struct.type": 1, - "struct.fields": [ - { - "name": 4, - "layout": { - "struct.type": 2, - "struct.fields": [ - { - "name": 8, - "layout": { - "range.offset": "0x0000000000000000000000000000000000000000000000000000000000000000", - "range.len": 1, - "range.elem_type": 3 - } + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "ty": 1 } - ] + }, + "name": "value" } - } - ] + ] + } }, - "contract": { - "name": 1, - "constructors": [ - { - "name": 13, - "selector": "[\"0x00\",\"0x00\",\"0x00\",\"0x00\"]", - "args": [ - { - "name": 14, - "type": { - "ty": 3, - "display_name": [ - 15 - ] - } - } - ], - "docs": [ - "Initializes the value to the initial value." - ] + "types": [ + { + "def": { + "primitive": "i32" } - ], - "messages": [ - { - "name": 16, - "selector": "[\"0x0F\",\"0x59\",\"0xD0\",\"0xE7\"]", - "mutates": true, - "args": [ - { - "name": 17, - "type": { - "ty": 3, - "display_name": [ - 15 - ] - } - } - ], - "return_type": null, - "docs": [ - "Flips the current state of our smart contract." - ] - }, - { - "name": 18, - "selector": "[\"0xFE\",\"0x4A\",\"0x44\",\"0x25\"]", - "mutates": false, - "args": [], - "return_type": { - "ty": 3, - "display_name": [ - 15 - ] - }, - "docs": [ - "Returns the current state." - ] - }, - { - "name": 19, - "selector": "[\"0x15\",\"0xB0\",\"0xC5\",\"0x0C\"]", - "mutates": false, - "args": [ - { - "name": 20, - "type": { - "ty": 3, - "display_name": [ - 15 - ] - } - } - ], - "return_type": { - "ty": 8, - "display_name": [ - 21 - ] - }, - "docs": [ - "Returns `true` if the internal value is greater than or equal to the provided value." - ] - } - ], - "events": [], - "docs": [] - } + } + ] } \ No newline at end of file diff --git a/packages/api-contract/test/contracts/incrementer.wasm b/packages/api-contract/test/contracts/incrementer.wasm new file mode 100644 index 0000000000000000000000000000000000000000..0f315e0faaa9626e606487771b70598b3f7f7a52 GIT binary patch literal 19026 zcmeH}&ud&&6vxjw_rA%q_f6-v_D7OdId7W9loE_6nGghX3u!8)py0jz22Ijpv_t*J#&l%d>nH8cHo??c(k?iaCGZnZ)+f~?=y3!}_ zwo~lXSbuoP%ks8zdUoiSWoar|QG!G{tu&Er=2D|Pkd-(iYwbtrq-P?bKopdfFT16o zTfrMvm6%TJU5>9%h$k>*Al|lmPR#--g-v!(p_JCFbd`rrl_qNT7mB4I+=cgiXs zerv+A6~?|OtD6X8E1aFo8@gGgaDyE@7`OX^1984nO0+Bf#wC zmCLRi+CXd;DBNT@+AC4*RIpJ6XW-COHOa?rmsAE))m(8%T)P01>^ybtF}9m0qW0_S zV_}AtlA?u~kHT!C*eD-`*+eBoFTyMc^O6bzK|>d9PVCgs&BFYSN*m@CGgc+7G)l38 z_5&$R?}*tJpYRR8@Sa2Z!F$LE^B!Vb7t_2Ubt=nJsY{f+7V6^}^NSmZPky6Ic(bo+ znas&>32OnD_~dSO8JT6SLC$JQZnvRmXW$4#GN|i?c!9!~M<&aH4JE2Q_IGP4>Q<>zpZv8hyhN+in}ojC zByK~GnD|Czk$S5{>Jm4#Q;&zQI0U7{81U&2ey~2>r>Yovf+#E#BSTklrx4@?3K!ct z5GQ3ok#)+cYGR}?LrU=!g|6i{?24x;3}0T-#vhC9nwNG*Q6vz2I19mzuTlt+xeIcXD5Cay(!k!BMkG`vU`Ylp`LB0rIT)KNJNrh1!E(;O<6r-|IN8}b8-jOFPiO1j-Abf`A%k9DPqBw9B{n~%74 zG>{l)+KxvKgR+W|2?{CuOvv5W;tdEO3es3;2U5MC6DFdlp30A)*-~Dro{77Y+|GHlzGMP*!lgVT" + ] + }, + "spec": { + "constructors": [ + { + "args": [ + { + "name": "requirement", + "type": { + "displayName": [ + "u32" + ], + "id": 2 + } + }, + { + "name": "owners", + "type": { + "displayName": [ + "Vec" + ], + "id": 20 + } + } + ], + "docs": [ + " The only constructor of the contract.", + "", + " A list of owners must be supplied and a number of how many of them must", + " confirm a transaction. Duplicate owners are silently dropped.", + "", + " # Panics", + "", + " If `requirement` violates our invariant." + ], + "name": [ + "new" + ], + "selector": "0xd183512b" + } + ], + "docs": [], + "events": [ + { + "args": [ + { + "docs": [ + " The transaction that was confirmed." + ], + "indexed": true, + "name": "transaction", + "type": { + "displayName": [ + "TransactionId" + ], + "id": 2 + } + }, + { + "docs": [ + " The owner that sent the confirmation." + ], + "indexed": true, + "name": "from", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + }, + { + "docs": [ + " The confirmation status after this confirmation was applied." + ], + "indexed": true, + "name": "status", + "type": { + "displayName": [ + "ConfirmationStatus" + ], + "id": 22 + } + } + ], + "docs": [ + " Emitted when an owner confirms a transaction." + ], + "name": "Confirmation" + }, + { + "args": [ + { + "docs": [ + " The transaction that was revoked." + ], + "indexed": true, + "name": "transaction", + "type": { + "displayName": [ + "TransactionId" + ], + "id": 2 + } + }, + { + "docs": [ + " The owner that sent the revokation." + ], + "indexed": true, + "name": "from", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + } + ], + "docs": [ + " Emitted when an owner revoked a confirmation." + ], + "name": "Revokation" + }, + { + "args": [ + { + "docs": [ + " The transaction that was submitted." + ], + "indexed": true, + "name": "transaction", + "type": { + "displayName": [ + "TransactionId" + ], + "id": 2 + } + } + ], + "docs": [ + " Emitted when an owner submits a transaction." + ], + "name": "Submission" + }, + { + "args": [ + { + "docs": [ + " The transaction that was canceled." + ], + "indexed": true, + "name": "transaction", + "type": { + "displayName": [ + "TransactionId" + ], + "id": 2 + } + } + ], + "docs": [ + " Emitted when a transaction was canceled." + ], + "name": "Cancelation" + }, + { + "args": [ + { + "docs": [ + " The transaction that was executed." + ], + "indexed": true, + "name": "transaction", + "type": { + "displayName": [ + "TransactionId" + ], + "id": 2 + } + }, + { + "docs": [ + " Indicates whether the transaction executed successfully. If so the `Ok` value holds", + " the output in bytes. The Option is `None` when the transaction was executed through", + " `invoke_transaction` rather than `evaluate_transaction`." + ], + "indexed": true, + "name": "result", + "type": { + "displayName": [ + "Result" + ], + "id": 25 + } + } + ], + "docs": [ + " Emitted when a transaction was executed." + ], + "name": "Execution" + }, + { + "args": [ + { + "docs": [ + " The owner that was added." + ], + "indexed": true, + "name": "owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + } + ], + "docs": [ + " Emitted when an owner is added to the wallet." + ], + "name": "OwnerAddition" + }, + { + "args": [ + { + "docs": [ + " The owner that was removed." + ], + "indexed": true, + "name": "owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + } + ], + "docs": [ + " Emitted when an owner is removed from the wallet." + ], + "name": "OwnerRemoval" + }, + { + "args": [ + { + "docs": [ + " The new requirement value." + ], + "indexed": false, + "name": "new_requirement", + "type": { + "displayName": [ + "u32" + ], + "id": 2 + } + } + ], + "docs": [ + " Emitted when the requirement changed." + ], + "name": "RequirementChange" + } + ], + "messages": [ + { + "args": [ + { + "name": "new_owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + } + ], + "docs": [ + " Add a new owner to the contract.", + "", + " Only callable by the wallet itself.", + "", + " # Panics", + "", + " If the owner already exists.", + "", + " # Examples", + "", + " Since this message must be send by the wallet itself it has to be build as a", + " `Transaction` and dispatched through `submit_transaction` + `invoke_transaction`:", + " ```no_run", + " use ink_env::{DefaultEnvTypes as Env, AccountId, call::{CallParams, Selector}, test::CallData};", + " use multisig_plain::{Transaction, ConfirmationStatus};", + "", + " // address of an existing MultiSigPlain contract", + " let wallet_id: AccountId = [7u8; 32].into();", + "", + " // first create the transaction that adds `alice` through `add_owner`", + " let alice: AccountId = [1u8; 32].into();", + " let mut call = CallData::new(Selector::new([166, 229, 27, 154])); // add_owner", + " call.push_arg(&alice);", + " let transaction = Transaction {", + " callee: wallet_id,", + " selector: call.selector().to_bytes(),", + " input: call.params().to_owned(),", + " transferred_value: 0,", + " gas_limit: 0", + " };", + "", + " // submit the transaction for confirmation", + " let mut submit = CallParams::::eval(", + " wallet_id,", + " Selector::new([86, 244, 13, 223]) // submit_transaction", + " );", + " let (id, _): (u32, ConfirmationStatus) = submit.push_arg(&transaction)", + " .fire()", + " .expect(\"submit_transaction won't panic.\");", + "", + " // wait until all required owners have confirmed and then execute the transaction", + " let mut invoke = CallParams::::invoke(", + " wallet_id,", + " Selector::new([185, 50, 225, 236]) // invoke_transaction", + " );", + " invoke.push_arg(&id).fire();", + " ```" + ], + "mutates": true, + "name": [ + "add_owner" + ], + "payable": false, + "returnType": null, + "selector": "0xf3fcef36" + }, + { + "args": [ + { + "name": "owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + } + ], + "docs": [ + " Remove an owner from the contract.", + "", + " Only callable by the wallet itself. If by doing this the amount of owners", + " would be smaller than the requirement it is adjusted to be exactly the", + " number of owners.", + "", + " # Panics", + "", + " If `owner` is no owner of the wallet." + ], + "mutates": true, + "name": [ + "remove_owner" + ], + "payable": false, + "returnType": null, + "selector": "0xe397f829" + }, + { + "args": [ + { + "name": "old_owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + }, + { + "name": "new_owner", + "type": { + "displayName": [ + "AccountId" + ], + "id": 5 + } + } + ], + "docs": [ + " Replace an owner from the contract with a new one.", + "", + " Only callable by the wallet itself.", + "", + " # Panics", + "", + " If `old_owner` is no owner or if `new_owner` already is one." + ], + "mutates": true, + "name": [ + "replace_owner" + ], + "payable": false, + "returnType": null, + "selector": "0xab4bc64a" + }, + { + "args": [ + { + "name": "new_requirement", + "type": { + "displayName": [ + "u32" + ], + "id": 2 + } + } + ], + "docs": [ + " Change the requirement to a new value.", + "", + " Only callable by the wallet itself.", + "", + " # Panics", + "", + " If the `new_requirement` violates our invariant." + ], + "mutates": true, + "name": [ + "change_requirement" + ], + "payable": false, + "returnType": null, + "selector": "0x7347595d" + }, + { + "args": [ + { + "name": "transaction", + "type": { + "displayName": [ + "Transaction" + ], + "id": 14 + } + } + ], + "docs": [ + " Add a new transaction candiate to the contract.", + "", + " This also confirms the transaction for the caller. This can be called by any owner." + ], + "mutates": true, + "name": [ + "submit_transaction" + ], + "payable": false, + "returnType": { + "displayName": [], + "id": 21 + }, + "selector": "0x349db9e8" + }, + { + "args": [ + { + "name": "trans_id", + "type": { + "displayName": [ + "TransactionId" + ], + "id": 2 + } + } + ], + "docs": [ + " Remove a transaction from the contract.", + " Only callable by the wallet itself.", + "", + " # Panics", + "", + " If `trans_id` is no valid transaction id." + ], + "mutates": true, + "name": [ + "cancel_transaction" + ], + "payable": false, + "returnType": null, + "selector": "0xd31b7656" + }, + { + "args": [ + { + "name": "trans_id", + "type": { + "displayName": [ + "TransactionId" + ], + "id": 2 + } + } + ], + "docs": [ + " Confirm a transaction for the sender that was submitted by any owner.", + "", + " This can be called by any owner.", + "", + " # Panics", + "", + " If `trans_id` is no valid transaction id." + ], + "mutates": true, + "name": [ + "confirm_transaction" + ], + "payable": false, + "returnType": { + "displayName": [ + "ConfirmationStatus" + ], + "id": 22 + }, + "selector": "0xea923d30" + }, + { + "args": [ + { + "name": "trans_id", + "type": { + "displayName": [ + "TransactionId" + ], + "id": 2 + } + } + ], + "docs": [ + " Revoke the senders confirmation.", + "", + " This can be called by any owner.", + "", + " # Panics", + "", + " If `trans_id` is no valid transaction id." + ], + "mutates": true, + "name": [ + "revoke_confirmation" + ], + "payable": false, + "returnType": null, + "selector": "0x13ee3e97" + }, + { + "args": [ + { + "name": "trans_id", + "type": { + "displayName": [ + "TransactionId" + ], + "id": 2 + } + } + ], + "docs": [ + " Invoke a confirmed execution without getting its output.", + "", + " Its return value indicates whether the called transaction was successful.", + " This can be called by anyone." + ], + "mutates": true, + "name": [ + "invoke_transaction" + ], + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "id": 23 + }, + "selector": "0x6131abbb" + }, + { + "args": [ + { + "name": "trans_id", + "type": { + "displayName": [ + "TransactionId" + ], + "id": 2 + } + } + ], + "docs": [ + " Evaluate a confirmed execution and return its output as bytes.", + "", + " Its return value indicates whether the called transaction was successful and contains", + " its output when sucesful.", + " This can be called by anyone." + ], + "mutates": true, + "name": [ + "eval_transaction" + ], + "payable": false, + "returnType": { + "displayName": [ + "Result" + ], + "id": 24 + }, + "selector": "0xe667c7ac" + } + ] + }, + "storage": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "header" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0100000000000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0100000001000000000000000000000000000000000000000000000000000000", + "ty": 3 + } + }, + "len": 4294967295, + "offset": "0x0200000000000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "entries" + } + ] + } + }, + "name": "keys" + }, + { + "layout": { + "hash": { + "layout": { + "cell": { + "key": "0x0200000001000000000000000000000000000000000000000000000000000000", + "ty": 9 + } + }, + "offset": "0x0100000001000000000000000000000000000000000000000000000000000000", + "strategy": { + "hasher": "Blake2x256", + "postfix": "", + "prefix": "0x696e6b20686173686d6170" + } + } + }, + "name": "values" + } + ] + } + }, + "name": "confirmations" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0200000001000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "header" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0300000001000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0300000002000000000000000000000000000000000000000000000000000000", + "ty": 11 + } + }, + "len": 4294967295, + "offset": "0x0400000001000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "entries" + } + ] + } + }, + "name": "keys" + }, + { + "layout": { + "hash": { + "layout": { + "cell": { + "key": "0x0400000002000000000000000000000000000000000000000000000000000000", + "ty": 12 + } + }, + "offset": "0x0300000002000000000000000000000000000000000000000000000000000000", + "strategy": { + "hasher": "Blake2x256", + "postfix": "", + "prefix": "0x696e6b20686173686d6170" + } + } + }, + "name": "values" + } + ] + } + }, + "name": "confirmation_count" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0400000002000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "header" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0500000002000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0500000003000000000000000000000000000000000000000000000000000000", + "ty": 13 + } + }, + "len": 4294967295, + "offset": "0x0600000002000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "entries" + } + ] + } + }, + "name": "transactions" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0500000003000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0500000004000000000000000000000000000000000000000000000000000000", + "ty": 5 + } + }, + "len": 4294967295, + "offset": "0x0600000003000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "owners" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0500000004000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "header" + }, + { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0600000004000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "len" + }, + { + "layout": { + "array": { + "cells_per_elem": 1, + "layout": { + "cell": { + "key": "0x0600000005000000000000000000000000000000000000000000000000000000", + "ty": 19 + } + }, + "len": 4294967295, + "offset": "0x0700000004000000000000000000000000000000000000000000000000000000" + } + }, + "name": "elems" + } + ] + } + }, + "name": "entries" + } + ] + } + }, + "name": "keys" + }, + { + "layout": { + "hash": { + "layout": { + "cell": { + "key": "0x0700000005000000000000000000000000000000000000000000000000000000", + "ty": 9 + } + }, + "offset": "0x0600000005000000000000000000000000000000000000000000000000000000", + "strategy": { + "hasher": "Blake2x256", + "postfix": "", + "prefix": "0x696e6b20686173686d6170" + } + } + }, + "name": "values" + } + ] + } + }, + "name": "is_owner" + }, + { + "layout": { + "cell": { + "key": "0x0700000005000000000000000000000000000000000000000000000000000000", + "ty": 2 + } + }, + "name": "requirement" + } + ] + } + }, + "types": [ + { + "def": { + "composite": { + "fields": [ + { + "name": "last_vacant", + "type": 2 + }, + { + "name": "len", + "type": 2 + }, + { + "name": "len_entries", + "type": 2 + } + ] + } + }, + "path": [ + "ink_storage", + "collections", + "stash", + "Header" + ] + }, + { + "def": { + "primitive": "u32" + } + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 8 + } + ], + "name": "Vacant" + }, + { + "fields": [ + { + "type": 4 + } + ], + "name": "Occupied" + } + ] + } + }, + "params": [ + 4 + ], + "path": [ + "ink_storage", + "collections", + "stash", + "Entry" + ] + }, + { + "def": { + "tuple": [ + 2, + 5 + ] + } + }, + { + "def": { + "composite": { + "fields": [ + { + "type": 6 + } + ] + } + }, + "path": [ + "ink_env", + "types", + "AccountId" + ] + }, + { + "def": { + "array": { + "len": 32, + "type": 7 + } + } + }, + { + "def": { + "primitive": "u8" + } + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "next", + "type": 2 + }, + { + "name": "prev", + "type": 2 + } + ] + } + }, + "path": [ + "ink_storage", + "collections", + "stash", + "VacantEntry" + ] + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "value", + "type": 10 + }, + { + "name": "key_index", + "type": 2 + } + ] + } + }, + "params": [ + 10 + ], + "path": [ + "ink_storage", + "collections", + "hashmap", + "ValueEntry" + ] + }, + { + "def": { + "tuple": [] + } + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 8 + } + ], + "name": "Vacant" + }, + { + "fields": [ + { + "type": 2 + } + ], + "name": "Occupied" + } + ] + } + }, + "params": [ + 2 + ], + "path": [ + "ink_storage", + "collections", + "stash", + "Entry" + ] + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "value", + "type": 2 + }, + { + "name": "key_index", + "type": 2 + } + ] + } + }, + "params": [ + 2 + ], + "path": [ + "ink_storage", + "collections", + "hashmap", + "ValueEntry" + ] + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 8 + } + ], + "name": "Vacant" + }, + { + "fields": [ + { + "type": 14 + } + ], + "name": "Occupied" + } + ] + } + }, + "params": [ + 14 + ], + "path": [ + "ink_storage", + "collections", + "stash", + "Entry" + ] + }, + { + "def": { + "composite": { + "fields": [ + { + "name": "callee", + "type": 5 + }, + { + "name": "selector", + "type": 15 + }, + { + "name": "input", + "type": 16 + }, + { + "name": "transferred_value", + "type": 17 + }, + { + "name": "gas_limit", + "type": 18 + } + ] + } + }, + "path": [ + "multisig_plain", + "multisig_plain", + "Transaction" + ] + }, + { + "def": { + "array": { + "len": 4, + "type": 7 + } + } + }, + { + "def": { + "sequence": { + "type": 7 + } + } + }, + { + "def": { + "primitive": "u128" + } + }, + { + "def": { + "primitive": "u64" + } + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 8 + } + ], + "name": "Vacant" + }, + { + "fields": [ + { + "type": 5 + } + ], + "name": "Occupied" + } + ] + } + }, + "params": [ + 5 + ], + "path": [ + "ink_storage", + "collections", + "stash", + "Entry" + ] + }, + { + "def": { + "sequence": { + "type": 5 + } + } + }, + { + "def": { + "tuple": [ + 2, + 22 + ] + } + }, + { + "def": { + "variant": { + "variants": [ + { + "name": "Confirmed" + }, + { + "fields": [ + { + "type": 2 + } + ], + "name": "ConfirmationsNeeded" + } + ] + } + }, + "path": [ + "multisig_plain", + "multisig_plain", + "ConfirmationStatus" + ] + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 10 + } + ], + "name": "Ok" + }, + { + "fields": [ + { + "type": 10 + } + ], + "name": "Err" + } + ] + } + }, + "params": [ + 10, + 10 + ], + "path": [ + "Result" + ] + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 16 + } + ], + "name": "Ok" + }, + { + "fields": [ + { + "type": 10 + } + ], + "name": "Err" + } + ] + } + }, + "params": [ + 16, + 10 + ], + "path": [ + "Result" + ] + }, + { + "def": { + "variant": { + "variants": [ + { + "fields": [ + { + "type": 26 + } + ], + "name": "Ok" + }, + { + "fields": [ + { + "type": 10 + } + ], + "name": "Err" + } + ] + } + }, + "params": [ + 26, + 10 + ], + "path": [ + "Result" + ] + }, + { + "def": { + "variant": { + "variants": [ + { + "name": "None" + }, + { + "fields": [ + { + "type": 16 + } + ], + "name": "Some" + } + ] + } + }, + "params": [ + 16 + ], + "path": [ + "Option" + ] + } + ] +} \ No newline at end of file diff --git a/packages/api-contract/test/contracts/multisig_plain.wasm b/packages/api-contract/test/contracts/multisig_plain.wasm new file mode 100644 index 0000000000000000000000000000000000000000..2f6fcf90c8db5d9da7a17f1405d8fe1fa8dfe315 GIT binary patch literal 87372 zcmeIb51d`sT_1S<-1pvnbKlb(+p-yZAf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z4sr!4KZIujqRXq5)nW zXgc97q?-6N^LB4B@EIPZ_zIIVfq(jb0^&#?{BJRYARw_vLqG7HeMKJ%w4R^XH|&6N z2g)WymBbBXi7CbUXkDRo>oc!#oJWRhluId-j-_7hAd}B+G*pPS2A9#tNMLFOnZtn} z`=%ixDc=WYh@@j)?GN%fvOl2!6qassAiN;*A>0VH@qO3^&;qLCF5yl2LnP3W-lthP zQ5}SJEK}r*gMX=4QZH!^@QOsbtx8aIX)E=MaV1Zirf$FeHu%+1E;bKg+Gyg#3QY=?8HhWC012bBp18{RQ9k zHhSJSUwnYn05dAoL**8U0J-yWmYW7()2wg+9iqaF2(P%r8ZK7xJLZN#8l5_#y!F1y zwrjIUTr*f>rqV)fYzmS;5?5eXqP{LPn0V|H8UF6gvd=7O19L}`&1j{RQA$~*6u763 zQmU(z>M5mC6@D-_WDhRk-L>D^Z|%4CTl=m3)_!Zhwcpxr?YH(@`>p-fervzA-`a2O zxAt56t^L-1YrnPM+HdW*_FMa{{nmbKzqQ}mZ|%4CTl=m3)_!Zhwcpxr?YH(@`>p-f nervzA-`a2OxAt56t^L-1YrnPM+HdW*_FMa{{nmc3gWrD#juP0C literal 0 HcmV?d00001 diff --git a/packages/api-contract/test/contracts/shared_vec-pruned.wasm b/packages/api-contract/test/contracts/shared_vec-pruned.wasm deleted file mode 100644 index 38422f7d2a74d0a6e6dd76b60941afb42f26a080..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 54608 zcmeIb3w#|{bvL>nGv~}Xb7XBNPNKvP*=G>s2>g(3S(23i-h#YHXi`ckZQ;hUbQ0@W zmh2-r4?Y?x!~&ZnU?4z%Kn(;E9ti=$SGP@D(^3c}P}8O*KuSVO+whgIbtx_3gWKHS zf2}=pMlaiWG(YaWm483anVCKNx%PUmwZ+inPAP$IbfCh>%&eY3Zw*qf>Q3t+!Jx^{LAzrzV<1SJt^PdU|ENJpg*ztcZFp|5b2 zI+7xcRQfXir*#-=DZ?;|!VryUtyT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*VEs#c~keM^_wVjc;W" + ] + }, + "spec": { + "constructors": [ + { + "args": [], + "docs": [ + " Creates a new flipper smart contract initialized to `false`." + ], + "name": [ + "default" + ], + "selector": "0x6a3712e2" + }, + { + "args": [ + { + "name": "init_value", + "type": { + "displayName": [ + "bool" + ], + "id": 1 + } + } + ], + "docs": [], + "name": [ + "Flip", + "new" + ], + "selector": "0x818482e7" + } + ], + "docs": [], + "events": [], + "messages": [ + { + "args": [], + "docs": [], + "mutates": true, + "name": [ + "Flip", + "flip" + ], + "payable": false, + "returnType": null, + "selector": "0xad931d5f" + }, + { + "args": [], + "docs": [], + "mutates": false, + "name": [ + "Flip", + "get" + ], + "payable": false, + "returnType": { + "displayName": [ + "bool" + ], + "id": 1 + }, + "selector": "0x6b3549bc" + } + ] + }, + "storage": { + "struct": { + "fields": [ + { + "layout": { + "cell": { + "key": "0x0000000000000000000000000000000000000000000000000000000000000000", + "ty": 1 + } + }, + "name": "value" + } + ] + } + }, + "types": [ + { + "def": { + "primitive": "bool" + } + } + ] +} \ No newline at end of file diff --git a/packages/api-contract/test/contracts/trait-flipper.wasm b/packages/api-contract/test/contracts/trait-flipper.wasm new file mode 100644 index 0000000000000000000000000000000000000000..53720c421777c8584ad57470718630166737078a GIT binary patch literal 19050 zcmeHJO>1Pw6+QRX>(=vBKX-ZjC6DZIUt5bFj6fl=S`2}x21X(bfdsN23ALEFXP3ez<)2`1CUsO{25r(aCn==Yvm{ z=MT=#AD?<0SUEa0b+cy4YRIy`kzv>{&GK|3Rsi~s zKfMrGQq!C~uyP$(7p2ax9AfRFnxd<~Dg(Q1O4nl%lIx^#E2e#5e`eYTcGoR5&ATK% zp`Yej^J9{z?Qw~JmMfP9CLCSH9B`KjT{gPR6j(65gQ~3Vk5e{y4MJuombr;&C+oLSv)+wT5yL>V|vqb?3Y(T&`o5t!8GFzrv5Ii zn08sxI}J>?Fl}WbF-sdF^Xd-7V1ZQV$W6qru8ke8%V;a!74}T2Ir^KbAshOBhlEHU@siQIeZ8ll+zmTA zG0BrICB!ut(rbu~r!uyHbQ5v$@{vC3JmlqEvnstAFysseLz-Skj9_Y-qzdupxOCwC z2D)dJ=`U!a$?>c*z2B(8JbDbe$7veV24Z^8!{UkkCNk37G&buwyIMC_#P3EjV%==J zNqoki!oB9I_b|VlEZN-Z+lc3~6K6@KSF^OLdtPRqT8!!>L<%NM&@Dt}<`!u>M)@DuZ^A?wIa=}IK_i3W-*C_fH8WZrw7-#q zMyNgb{0Es4+HhqCxjBC)9@#zy{?`_K;aVa8iv$K<3og|u-Xtw;!$9*p*>BVn%y+-^ zBJ4H);OpM(e{xMKy>qV`H4~kUxectF(1w^fB0>)PGi_A&@|ZQhF$-Cpe4cmgKa8aH zt6ck}NL{Wkx2Ta=9#8w{qQ~urA7xW!4#bIiF*6kgVxFw(ne;s--b)8|Jq1=m>e9%Y zQJVTR`rfhsX+VEA%h|w&ao_e)7QYeIm45y{vK`Oh)6IwK3)2O?B>70?tWGQ`%r&L8 zesW>K!Isy%nbU>AS@+e_kMq>!l-{}5F#Flsyy>^f37I@KB{FlE@}^(@$`#Yw9In~O zR6HxLi*p(|mwzp?Vmb9M&2=b#@d;^~ess$x=Pa-(cndW>?prixs43evYa?2i#`G@Y zPhM_Gew>ZW)xDbqb{': Option; 'Vec': Vec; + MtTypeDefVariant: MtTypeDefVariant; + 'Option': Option; + 'Vec': Vec; MtTypeDefPrimitive: MtTypeDefPrimitive; 'Option': Option; 'Vec': Vec; @@ -594,9 +597,6 @@ declare module '@polkadot/types/types/registry' { MtTypeDefTuple: MtTypeDefTuple; 'Option': Option; 'Vec': Vec; - MtTypeDefVariant: MtTypeDefVariant; - 'Option': Option; - 'Vec': Vec; MtVariant: MtVariant; 'Option': Option; 'Vec': Vec; @@ -627,15 +627,15 @@ declare module '@polkadot/types/types/registry' { InkTypeSpec: InkTypeSpec; 'Option': Option; 'Vec': Vec; - InkContractContract: InkContractContract; - 'Option': Option; - 'Vec': Vec; - InkContractSource: InkContractSource; - 'Option': Option; - 'Vec': Vec; InkProject: InkProject; 'Option': Option; 'Vec': Vec; + InkProjectContract: InkProjectContract; + 'Option': Option; + 'Vec': Vec; + InkProjectSource: InkProjectSource; + 'Option': Option; + 'Vec': Vec; AccountVote: AccountVote; 'Option': Option; 'Vec': Vec; diff --git a/packages/types/src/codec/utils/encodeTypes.ts b/packages/types/src/codec/utils/encodeTypes.ts index 07b82f9845..d5c0eebfc3 100644 --- a/packages/types/src/codec/utils/encodeTypes.ts +++ b/packages/types/src/codec/utils/encodeTypes.ts @@ -148,15 +148,7 @@ const encoders: Record string> = { [TypeDefInfo.VecFixed]: (typeDef: TypeDef): string => encodeVecFixed(typeDef) }; -export function encodeTypeDef (typeDef: Pick): string { - assert(!isUndefined(typeDef.info), `Invalid type definition with no instance info, ${JSON.stringify(typeDef)}`); - - if (SPECIAL_TYPES.includes(typeDef.displayName)) { - return typeDef.displayName as string; - } else if (typeDef.displayName || [TypeDefInfo.Enum, TypeDefInfo.Struct].includes(typeDef.info)) { - return encodeWithParams(typeDef); - } - +function encodeType (typeDef: Pick): string { const encoder = encoders[(typeDef as TypeDef).info]; assert(encoder, `Cannot encode type: ${JSON.stringify(typeDef)}`); @@ -164,9 +156,19 @@ export function encodeTypeDef (typeDef: Pick): string { return encoder(typeDef as TypeDef); } +export function encodeTypeDef (typeDef: Pick): string { + assert(!isUndefined(typeDef.info), `Invalid type definition with no instance info, ${JSON.stringify(typeDef)}`); + + return typeDef.displayName || [TypeDefInfo.Enum, TypeDefInfo.Struct].includes(typeDef.info) + ? encodeWithParams(typeDef) + : encodeType(typeDef); +} + export function withTypeString (typeDef: Pick): Pick { return { ...typeDef, - type: encodeTypeDef(typeDef) + type: SPECIAL_TYPES.includes(typeDef.displayName) + ? typeDef.displayName as string + : encodeType(typeDef) }; } diff --git a/packages/types/src/create/types.ts b/packages/types/src/create/types.ts index 13f5373c9c..2ec02226fb 100644 --- a/packages/types/src/create/types.ts +++ b/packages/types/src/create/types.ts @@ -34,6 +34,10 @@ export interface TypeDefExtEnumDiscriminant { discriminant: number; } +export interface TypeDefExtStructAlias { + [key: string]: string; +} + export interface TypeDef { alias?: Map; info: TypeDefInfo; diff --git a/packages/types/src/interfaces/contractsAbi/definitions.ts b/packages/types/src/interfaces/contractsAbi/definitions.ts index 63b19253ff..fc2eefc6d4 100644 --- a/packages/types/src/interfaces/contractsAbi/definitions.ts +++ b/packages/types/src/interfaces/contractsAbi/definitions.ts @@ -1,5 +1,9 @@ // Copyright 2017-2020 @polkadot/types authors & contributors // SPDX-License-Identifier: Apache-2.0 + +import { Definitions } from '../../types'; + +// order important in structs... :) /* eslint-disable sort-keys */ const layout = { @@ -90,7 +94,7 @@ const spec = { }, InkSelector: '[u8; 4]', InkTypeSpec: { - type: 'MtLookupTypeId', + id: 'MtLookupTypeId', displayName: 'InkDisplayName' } }; @@ -124,6 +128,9 @@ const registry = { MtTypeDefComposite: { fields: 'Vec' }, + MtTypeDefVariant: { + variants: 'Vec' + }, MtTypeDefPrimitive: { // this enum definition is mapped in api-contracts/inkTypes.ts _enum: ['Bool', 'Char', 'Str', 'U8', 'U16', 'U32', 'U64', 'U128', 'I8', 'I16', 'I32', 'I64', 'I128'] @@ -132,9 +139,6 @@ const registry = { type: 'MtLookupTypeId' }, MtTypeDefTuple: 'Vec', - MtTypeDefVariant: { - variants: 'Vec' - }, MtVariant: { name: 'Text', fields: 'Vec', @@ -148,7 +152,18 @@ export default { ...layout, ...registry, ...spec, - InkContractContract: { + InkProject: { + // added by ABI serialization + metadataVersion: 'Text', + source: 'InkProjectSource', + contract: 'InkProjectContract', + // expanded scale registry: RegistryReadOnly + types: 'Vec', + // renamed from layout (ignored for now, incomplete) + // storage: 'InkStorageLayout', + spec: 'InkContractSpec' + }, + InkProjectContract: { name: 'Text', version: 'Text', authors: 'Vec', @@ -158,18 +173,10 @@ export default { homepage: 'Option', license: 'Option' }, - InkContractSource: { + InkProjectSource: { hash: '[u8; 32]', language: 'Text', compiler: 'Text' - }, - InkProject: { - metadataVersion: 'Text', - source: 'InkContractSource', - contract: 'InkContractContract', - spec: 'InkContractSpec', - storage: 'InkStorageLayout', - types: 'Vec' } } -}; +} as Definitions; diff --git a/packages/types/src/interfaces/contractsAbi/types.ts b/packages/types/src/interfaces/contractsAbi/types.ts index 09f27c0203..f6cc8b8b96 100644 --- a/packages/types/src/interfaces/contractsAbi/types.ts +++ b/packages/types/src/interfaces/contractsAbi/types.ts @@ -12,25 +12,6 @@ export interface InkConstructorSpec extends Struct { readonly docs: Vec; } -/** @name InkContractContract */ -export interface InkContractContract extends Struct { - readonly name: Text; - readonly version: Text; - readonly authors: Vec; - readonly description: Option; - readonly documentation: Option; - readonly repository: Option; - readonly homepage: Option; - readonly license: Option; -} - -/** @name InkContractSource */ -export interface InkContractSource extends Struct { - readonly hash: U8aFixed; - readonly language: Text; - readonly compiler: Text; -} - /** @name InkContractSpec */ export interface InkContractSpec extends Struct { readonly constructors: Vec; @@ -135,11 +116,29 @@ export interface InkMessageSpec extends Struct { /** @name InkProject */ export interface InkProject extends Struct { readonly metadataVersion: Text; - readonly source: InkContractSource; - readonly contract: InkContractContract; - readonly spec: InkContractSpec; - readonly storage: InkStorageLayout; + readonly source: InkProjectSource; + readonly contract: InkProjectContract; readonly types: Vec; + readonly spec: InkContractSpec; +} + +/** @name InkProjectContract */ +export interface InkProjectContract extends Struct { + readonly name: Text; + readonly version: Text; + readonly authors: Vec; + readonly description: Option; + readonly documentation: Option; + readonly repository: Option; + readonly homepage: Option; + readonly license: Option; +} + +/** @name InkProjectSource */ +export interface InkProjectSource extends Struct { + readonly hash: U8aFixed; + readonly language: Text; + readonly compiler: Text; } /** @name InkSelector */ @@ -161,7 +160,7 @@ export interface InkStorageLayout extends Enum { /** @name InkTypeSpec */ export interface InkTypeSpec extends Struct { - readonly type: MtLookupTypeId; + readonly id: MtLookupTypeId; readonly displayName: InkDisplayName; }