diff --git a/packages/api-contract/src/MetaRegistry.spec.ts b/packages/api-contract/src/MetaRegistry.spec.ts index 4c6da68724..50cd1ef50d 100644 --- a/packages/api-contract/src/MetaRegistry.spec.ts +++ b/packages/api-contract/src/MetaRegistry.spec.ts @@ -2,35 +2,41 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import fs from 'fs'; -import path from 'path'; import { TypeRegistry } from '@polkadot/types'; import MetaRegistry from './MetaRegistry'; import erc20Abi from '../test/contracts/Erc20.json'; +import erc20Cmp from '../test/compare/erc20.test.json'; import sharedVecAbi from '../test/contracts/SharedVecV2.json'; +import sharedVecCmp from '../test/compare/shared-vec.test.json'; +import test001Abi from '../test/abi/test001.json'; +import test001Cmp from '../test/compare/test001.cmp.json'; + +function compare (meta: MetaRegistry, other: any): void { + try { + expect(meta.typeDefs).toEqual(other); + } catch (error) { + console.error(JSON.stringify(meta.typeDefs)); + + throw error; + } +} describe('MetaRegistry', (): void => { const registry = new TypeRegistry(); describe('construction', (): void => { it('initializes from a contract ABI (ERC20)', (): void => { - const metaRegistry = new MetaRegistry(registry, erc20Abi); - fs.writeFile(path.join(__dirname, '../test/compare/erc20.test.json'), JSON.stringify(metaRegistry.typeDefs, null, 2), function (err): void { - if (err) throw err; - }); - - expect(true).toBe(true); + compare(new MetaRegistry(registry, erc20Abi), erc20Cmp); }); it('initializes from a contract ABI (SharedVec)', (): void => { - const metaRegistry = new MetaRegistry(registry, sharedVecAbi); - fs.writeFile(path.join(__dirname, '../test/compare/shared-vec.test.json'), JSON.stringify(metaRegistry.typeDefs, null, 2), function (err): void { - if (err) throw err; - }); + compare(new MetaRegistry(registry, sharedVecAbi), sharedVecCmp); + }); - expect(true).toBe(true); + it('initializes from a contract ABI (Other, test001)', (): void => { + compare(new MetaRegistry(registry, test001Abi), test001Cmp); }); }); }); diff --git a/packages/api-contract/test/abi/test001.json b/packages/api-contract/test/abi/test001.json new file mode 100644 index 0000000000..f3915e5c79 --- /dev/null +++ b/packages/api-contract/test/abi/test001.json @@ -0,0 +1,467 @@ +{ + "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/compare/erc20.test.json b/packages/api-contract/test/compare/erc20.test.json index 67e2d1ee49..6d7a6c5a12 100644 --- a/packages/api-contract/test/compare/erc20.test.json +++ b/packages/api-contract/test/compare/erc20.test.json @@ -1,19 +1,19 @@ [ { "info": 8, - "type": "{\"total_supply\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}\\\"}\",\"balances\":\"{\\\"len\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"cell\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])<[u8;32]>\\\\\\\\\\\\\\\"}\\\\\\\"}\\\",\\\"entries\\\":\\\"{\\\\\\\"cells_key\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}<{\\\\\\\"_enum\\\\\\\":{\\\\\\\"Occupied\\\\\\\":\\\\\\\"({\\\\\\\\\\\\\\\"key\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])<[u8;32]>\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"val\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"u128\\\\\\\\\\\\\\\"}<([u8;32]), u128>)<{\\\\\\\\\\\\\\\"key\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])<[u8;32]>\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"val\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"u128\\\\\\\\\\\\\\\"}<([u8;32]), u128>>\\\\\\\",\\\\\\\"Removed\\\\\\\":\\\\\\\"Null\\\\\\\"}}<([u8;32]), u128>>\\\"}<([u8;32]), u128>\",\"allowances\":\"{\\\"len\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"cell\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])<[u8;32]>\\\\\\\\\\\\\\\"}\\\\\\\"}\\\",\\\"entries\\\":\\\"{\\\\\\\"cells_key\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}<{\\\\\\\"_enum\\\\\\\":{\\\\\\\"Occupied\\\\\\\":\\\\\\\"({\\\\\\\\\\\\\\\"key\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"val\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"u128\\\\\\\\\\\\\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>)<{\\\\\\\\\\\\\\\"key\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"val\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"u128\\\\\\\\\\\\\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>>\\\\\\\",\\\\\\\"Removed\\\\\\\":\\\\\\\"Null\\\\\\\"}}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>>\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>\"}", + "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": 8, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -54,19 +54,19 @@ }, { "info": 8, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])<[u8;32]>\\\"}<{\\\"_enum\\\":{\\\"Occupied\\\":\\\"({\\\\\\\"key\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\",\\\\\\\"val\\\\\\\":\\\\\\\"u128\\\\\\\"}<([u8;32]), u128>)<{\\\\\\\"key\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\",\\\\\\\"val\\\\\\\":\\\\\\\"u128\\\\\\\"}<([u8;32]), u128>>\\\",\\\"Removed\\\":\\\"Null\\\"}}<([u8;32]), u128>>\"}", + "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -107,11 +107,11 @@ }, { "info": 8, - "type": "{\"cells_key\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cells_key\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -136,7 +136,7 @@ "params": [ { "info": 2, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"u128\\\"}<([u8;32]), u128>)<{\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"u128\\\"}<([u8;32]), u128>>\",\"Removed\":\"Null\"}}", + "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { "info": 9, @@ -144,11 +144,11 @@ "sub": [ { "info": 8, - "type": "{\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"u128\"}", + "type": "{\"key\":\"([u8;32])\",\"val\":\"u128\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -178,7 +178,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -205,7 +205,7 @@ "index": 0 } ], - "type": "({\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"u128\"}<([u8;32]), u128>)" + "type": "({\"key\":\"([u8;32])\",\"val\":\"u128\"})" }, { "info": 5, @@ -218,7 +218,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -251,7 +251,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -278,19 +278,19 @@ }, { "info": 8, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])<[u8;32]>\\\"}<{\\\"_enum\\\":{\\\"Occupied\\\":\\\"({\\\\\\\"key\\\\\\\":\\\\\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\\\\\",\\\\\\\"val\\\\\\\":\\\\\\\"u128\\\\\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>)<{\\\\\\\"key\\\\\\\":\\\\\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\\\\\",\\\\\\\"val\\\\\\\":\\\\\\\"u128\\\\\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>>\\\",\\\"Removed\\\":\\\"Null\\\"}}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>>\"}", + "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -331,11 +331,11 @@ }, { "info": 8, - "type": "{\"cells_key\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cells_key\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -360,7 +360,7 @@ "params": [ { "info": 2, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\",\\\"val\\\":\\\"u128\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>)<{\\\"key\\\":\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\",\\\"val\\\":\\\"u128\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>>\",\"Removed\":\"Null\"}}", + "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"(([u8;32]), ([u8;32]))\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { "info": 9, @@ -368,15 +368,15 @@ "sub": [ { "info": 8, - "type": "{\"key\":\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\",\"val\":\"u128\"}", + "type": "{\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"}", "sub": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -397,7 +397,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -430,11 +430,11 @@ "params": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -455,7 +455,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -484,7 +484,7 @@ "index": 0 } ], - "type": "({\"key\":\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\",\"val\":\"u128\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>)" + "type": "({\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"})" }, { "info": 5, @@ -497,11 +497,11 @@ "params": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -522,7 +522,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -557,11 +557,11 @@ "params": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -582,7 +582,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -615,15 +615,15 @@ }, { "info": 8, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -668,11 +668,11 @@ }, { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -703,7 +703,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -740,19 +740,19 @@ }, { "info": 8, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])<[u8;32]>\\\"}<{\\\"_enum\\\":{\\\"Occupied\\\":\\\"({\\\\\\\"key\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\",\\\\\\\"val\\\\\\\":\\\\\\\"u128\\\\\\\"}<([u8;32]), u128>)<{\\\\\\\"key\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\",\\\\\\\"val\\\\\\\":\\\\\\\"u128\\\\\\\"}<([u8;32]), u128>>\\\",\\\"Removed\\\":\\\"Null\\\"}}<([u8;32]), u128>>\"}", + "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -793,11 +793,11 @@ }, { "info": 8, - "type": "{\"cells_key\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cells_key\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -822,7 +822,7 @@ "params": [ { "info": 2, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"u128\\\"}<([u8;32]), u128>)<{\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"u128\\\"}<([u8;32]), u128>>\",\"Removed\":\"Null\"}}", + "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { "info": 9, @@ -830,11 +830,11 @@ "sub": [ { "info": 8, - "type": "{\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"u128\"}", + "type": "{\"key\":\"([u8;32])\",\"val\":\"u128\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -864,7 +864,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -891,7 +891,7 @@ "index": 0 } ], - "type": "({\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"u128\"}<([u8;32]), u128>)" + "type": "({\"key\":\"([u8;32])\",\"val\":\"u128\"})" }, { "info": 5, @@ -904,7 +904,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -937,7 +937,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -964,7 +964,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -985,15 +985,15 @@ }, { "info": 8, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1038,11 +1038,11 @@ }, { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1073,11 +1073,11 @@ }, { "info": 8, - "type": "{\"cells_key\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cells_key\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1102,7 +1102,7 @@ "params": [ { "info": 2, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"u128\\\"}<([u8;32]), u128>)<{\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"u128\\\"}<([u8;32]), u128>>\",\"Removed\":\"Null\"}}", + "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { "info": 9, @@ -1110,11 +1110,11 @@ "sub": [ { "info": 8, - "type": "{\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"u128\"}", + "type": "{\"key\":\"([u8;32])\",\"val\":\"u128\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1144,7 +1144,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1171,7 +1171,7 @@ "index": 0 } ], - "type": "({\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"u128\"}<([u8;32]), u128>)" + "type": "({\"key\":\"([u8;32])\",\"val\":\"u128\"})" }, { "info": 5, @@ -1184,7 +1184,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1213,7 +1213,7 @@ }, { "info": 2, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"u128\\\"}<([u8;32]), u128>)<{\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"u128\\\"}<([u8;32]), u128>>\",\"Removed\":\"Null\"}}", + "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { "info": 9, @@ -1221,11 +1221,11 @@ "sub": [ { "info": 8, - "type": "{\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"u128\"}", + "type": "{\"key\":\"([u8;32])\",\"val\":\"u128\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1255,7 +1255,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1282,7 +1282,7 @@ "index": 0 } ], - "type": "({\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"u128\"}<([u8;32]), u128>)" + "type": "({\"key\":\"([u8;32])\",\"val\":\"u128\"})" }, { "info": 5, @@ -1295,7 +1295,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1322,11 +1322,11 @@ }, { "info": 8, - "type": "{\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"u128\"}", + "type": "{\"key\":\"([u8;32])\",\"val\":\"u128\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1356,7 +1356,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1383,19 +1383,19 @@ }, { "info": 8, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])<[u8;32]>\\\"}<{\\\"_enum\\\":{\\\"Occupied\\\":\\\"({\\\\\\\"key\\\\\\\":\\\\\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\\\\\",\\\\\\\"val\\\\\\\":\\\\\\\"u128\\\\\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>)<{\\\\\\\"key\\\\\\\":\\\\\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\\\\\",\\\\\\\"val\\\\\\\":\\\\\\\"u128\\\\\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>>\\\",\\\"Removed\\\":\\\"Null\\\"}}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>>\"}", + "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1436,11 +1436,11 @@ }, { "info": 8, - "type": "{\"cells_key\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cells_key\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1465,7 +1465,7 @@ "params": [ { "info": 2, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\",\\\"val\\\":\\\"u128\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>)<{\\\"key\\\":\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\",\\\"val\\\":\\\"u128\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>>\",\"Removed\":\"Null\"}}", + "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"(([u8;32]), ([u8;32]))\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { "info": 9, @@ -1473,15 +1473,15 @@ "sub": [ { "info": 8, - "type": "{\"key\":\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\",\"val\":\"u128\"}", + "type": "{\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"}", "sub": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1502,7 +1502,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1535,11 +1535,11 @@ "params": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1560,7 +1560,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1589,7 +1589,7 @@ "index": 0 } ], - "type": "({\"key\":\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\",\"val\":\"u128\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>)" + "type": "({\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"})" }, { "info": 5, @@ -1602,11 +1602,11 @@ "params": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1627,7 +1627,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1662,11 +1662,11 @@ "params": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1687,7 +1687,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1716,11 +1716,11 @@ }, { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1741,7 +1741,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1764,11 +1764,11 @@ }, { "info": 8, - "type": "{\"cells_key\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cells_key\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1793,7 +1793,7 @@ "params": [ { "info": 2, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\",\\\"val\\\":\\\"u128\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>)<{\\\"key\\\":\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\",\\\"val\\\":\\\"u128\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>>\",\"Removed\":\"Null\"}}", + "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"(([u8;32]), ([u8;32]))\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { "info": 9, @@ -1801,15 +1801,15 @@ "sub": [ { "info": 8, - "type": "{\"key\":\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\",\"val\":\"u128\"}", + "type": "{\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"}", "sub": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1830,7 +1830,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1863,11 +1863,11 @@ "params": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1888,7 +1888,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1917,7 +1917,7 @@ "index": 0 } ], - "type": "({\"key\":\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\",\"val\":\"u128\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>)" + "type": "({\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"})" }, { "info": 5, @@ -1930,11 +1930,11 @@ "params": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1955,7 +1955,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1986,7 +1986,7 @@ }, { "info": 2, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\",\\\"val\\\":\\\"u128\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>)<{\\\"key\\\":\\\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\\\",\\\"val\\\":\\\"u128\\\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>>\",\"Removed\":\"Null\"}}", + "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"(([u8;32]), ([u8;32]))\\\",\\\"val\\\":\\\"u128\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { "info": 9, @@ -1994,15 +1994,15 @@ "sub": [ { "info": 8, - "type": "{\"key\":\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\",\"val\":\"u128\"}", + "type": "{\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"}", "sub": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -2023,7 +2023,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -2056,11 +2056,11 @@ "params": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -2081,7 +2081,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -2110,7 +2110,7 @@ "index": 0 } ], - "type": "({\"key\":\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\",\"val\":\"u128\"}<(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>), u128>)" + "type": "({\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"})" }, { "info": 5, @@ -2123,11 +2123,11 @@ "params": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -2148,7 +2148,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -2177,15 +2177,15 @@ }, { "info": 8, - "type": "{\"key\":\"(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)<([u8;32]), ([u8;32])>\",\"val\":\"u128\"}", + "type": "{\"key\":\"(([u8;32]), ([u8;32]))\",\"val\":\"u128\"}", "sub": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -2206,7 +2206,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -2239,11 +2239,11 @@ "params": [ { "info": 9, - "type": "(([u8;32])<[u8;32]>, ([u8;32])<[u8;32]>)", + "type": "(([u8;32]), ([u8;32]))", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -2264,7 +2264,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -2297,10 +2297,10 @@ }, { "info": 4, - "type": "Option<([u8;32])>", + "type": "Option<([u8;32])>", "sub": { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -2323,7 +2323,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -2344,4 +2344,4 @@ } ] } -] \ No newline at end of file +] diff --git a/packages/api-contract/test/compare/shared-vec.test.json b/packages/api-contract/test/compare/shared-vec.test.json index 4a134a6684..c9485e4c07 100644 --- a/packages/api-contract/test/compare/shared-vec.test.json +++ b/packages/api-contract/test/compare/shared-vec.test.json @@ -1,23 +1,23 @@ [ { "info": 8, - "type": "{\"mutators\":\"{\\\"len\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"cell\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])<[u8;32]>\\\\\\\\\\\\\\\"}\\\\\\\"}\\\",\\\"entries\\\":\\\"{\\\\\\\"cells_key\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}<{\\\\\\\"_enum\\\\\\\":{\\\\\\\"Occupied\\\\\\\":\\\\\\\"({\\\\\\\\\\\\\\\"key\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])<[u8;32]>\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"val\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"begin\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"end\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"}, Option>\\\\\\\\\\\\\\\"}<([u8;32]), {\\\\\\\\\\\\\\\"begin\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"end\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\"}, Option>>)<{\\\\\\\\\\\\\\\"key\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])<[u8;32]>\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"val\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"begin\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"end\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"}, Option>\\\\\\\\\\\\\\\"}<([u8;32]), {\\\\\\\\\\\\\\\"begin\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"end\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\"}, Option>>>\\\\\\\",\\\\\\\"Removed\\\\\\\":\\\\\\\"Null\\\\\\\"}}<([u8;32]), {\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>>>\\\"}<([u8;32]), {\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>>\",\"vec\":\"{\\\"len\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"cell\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"([u8;32])<[u8;32]>\\\\\\\\\\\\\\\"}\\\\\\\"}\\\",\\\"cells\\\":\\\"{\\\\\\\"cells_key\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}\\\"}\"}", + "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": 8, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])<[u8;32]>\\\"}<{\\\"_enum\\\":{\\\"Occupied\\\":\\\"({\\\\\\\"key\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\",\\\\\\\"val\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"begin\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"end\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\"}, Option>\\\\\\\"}<([u8;32]), {\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>>)<{\\\\\\\"key\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\",\\\\\\\"val\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"begin\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"end\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\"}, Option>\\\\\\\"}<([u8;32]), {\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>>>\\\",\\\"Removed\\\":\\\"Null\\\"}}<([u8;32]), {\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>>>\"}", + "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -58,11 +58,11 @@ }, { "info": 8, - "type": "{\"cells_key\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cells_key\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -87,7 +87,7 @@ "params": [ { "info": 2, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>\\\"}<([u8;32]), {\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>>)<{\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>\\\"}<([u8;32]), {\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>>>\",\"Removed\":\"Null\"}}", + "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { "info": 9, @@ -95,11 +95,11 @@ "sub": [ { "info": 8, - "type": "{\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>\"}", + "type": "{\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -120,7 +120,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -162,7 +162,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -183,7 +183,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -223,7 +223,7 @@ "index": 0 } ], - "type": "({\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>\"}<([u8;32]), {\"begin\":\"Option\",\"end\":\"Option\"}, Option>>)" + "type": "({\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"})" }, { "info": 5, @@ -236,7 +236,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -257,7 +257,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -303,7 +303,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -324,7 +324,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -364,19 +364,19 @@ }, { "info": 8, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}\\\"}\",\"cells\":\"{\\\"cells_key\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"cells\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -417,11 +417,11 @@ }, { "info": 8, - "type": "{\"cells_key\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cells_key\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -466,19 +466,19 @@ }, { "info": 8, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])<[u8;32]>\\\"}<{\\\"_enum\\\":{\\\"Occupied\\\":\\\"({\\\\\\\"key\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\",\\\\\\\"val\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"begin\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"end\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\"}, Option>\\\\\\\"}<([u8;32]), {\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>>)<{\\\\\\\"key\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\",\\\\\\\"val\\\\\\\":\\\\\\\"{\\\\\\\\\\\\\\\"begin\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"end\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"Option\\\\\\\\\\\\\\\"}, Option>\\\\\\\"}<([u8;32]), {\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>>>\\\",\\\"Removed\\\":\\\"Null\\\"}}<([u8;32]), {\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>>>\"}", + "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"entries\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -519,11 +519,11 @@ }, { "info": 8, - "type": "{\"cells_key\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cells_key\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -548,7 +548,7 @@ "params": [ { "info": 2, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>\\\"}<([u8;32]), {\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>>)<{\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>\\\"}<([u8;32]), {\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>>>\",\"Removed\":\"Null\"}}", + "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { "info": 9, @@ -556,11 +556,11 @@ "sub": [ { "info": 8, - "type": "{\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>\"}", + "type": "{\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -581,7 +581,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -623,7 +623,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -644,7 +644,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -684,7 +684,7 @@ "index": 0 } ], - "type": "({\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>\"}<([u8;32]), {\"begin\":\"Option\",\"end\":\"Option\"}, Option>>)" + "type": "({\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"})" }, { "info": 5, @@ -697,7 +697,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -718,7 +718,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -764,7 +764,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -785,7 +785,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -825,7 +825,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -862,7 +862,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -919,15 +919,15 @@ }, { "info": 8, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -968,11 +968,11 @@ }, { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1003,7 +1003,7 @@ }, { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1024,11 +1024,11 @@ }, { "info": 8, - "type": "{\"cells_key\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cells_key\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1053,7 +1053,7 @@ "params": [ { "info": 2, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>\\\"}<([u8;32]), {\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>>)<{\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>\\\"}<([u8;32]), {\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>>>\",\"Removed\":\"Null\"}}", + "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { "info": 9, @@ -1061,11 +1061,11 @@ "sub": [ { "info": 8, - "type": "{\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>\"}", + "type": "{\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1086,7 +1086,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -1128,7 +1128,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1149,7 +1149,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -1189,7 +1189,7 @@ "index": 0 } ], - "type": "({\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>\"}<([u8;32]), {\"begin\":\"Option\",\"end\":\"Option\"}, Option>>)" + "type": "({\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"})" }, { "info": 5, @@ -1202,7 +1202,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1223,7 +1223,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -1265,7 +1265,7 @@ }, { "info": 2, - "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>\\\"}<([u8;32]), {\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>>)<{\\\"key\\\":\\\"([u8;32])<[u8;32]>\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}, Option>\\\"}<([u8;32]), {\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>>>\",\"Removed\":\"Null\"}}", + "type": "{\"_enum\":{\"Occupied\":\"({\\\"key\\\":\\\"([u8;32])\\\",\\\"val\\\":\\\"{\\\\\\\"begin\\\\\\\":\\\\\\\"Option\\\\\\\",\\\\\\\"end\\\\\\\":\\\\\\\"Option\\\\\\\"}\\\"})\",\"Removed\":\"Null\"}}", "sub": [ { "info": 9, @@ -1273,11 +1273,11 @@ "sub": [ { "info": 8, - "type": "{\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>\"}", + "type": "{\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1298,7 +1298,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -1340,7 +1340,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1361,7 +1361,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -1401,7 +1401,7 @@ "index": 0 } ], - "type": "({\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>\"}<([u8;32]), {\"begin\":\"Option\",\"end\":\"Option\"}, Option>>)" + "type": "({\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"})" }, { "info": 5, @@ -1414,7 +1414,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1435,7 +1435,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -1475,11 +1475,11 @@ }, { "info": 8, - "type": "{\"key\":\"([u8;32])<[u8;32]>\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}, Option>\"}", + "type": "{\"key\":\"([u8;32])\",\"val\":\"{\\\"begin\\\":\\\"Option\\\",\\\"end\\\":\\\"Option\\\"}\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1500,7 +1500,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -1542,7 +1542,7 @@ "params": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1563,7 +1563,7 @@ }, { "info": 8, - "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", + "type": "{\"begin\":\"Option\",\"end\":\"Option\"}", "sub": [ { "info": 4, @@ -1603,19 +1603,19 @@ }, { "info": 8, - "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])<[u8;32]>\\\\\\\"}\\\"}\",\"cells\":\"{\\\"cells_key\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"len\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"cells\":\"{\\\"cells_key\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])<[u8;32]>\\\"}\"}", + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", "sub": [ { "info": 8, - "type": "{\"cell\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cell\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1656,11 +1656,11 @@ }, { "info": 8, - "type": "{\"cells_key\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cells_key\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1705,11 +1705,11 @@ }, { "info": 8, - "type": "{\"cells_key\":\"([u8;32])<[u8;32]>\"}", + "type": "{\"cells_key\":\"([u8;32])\"}", "sub": [ { "info": 9, - "type": "([u8;32])", + "type": "([u8;32])", "sub": [ { "info": 11, @@ -1810,4 +1810,4 @@ } ] } -] \ No newline at end of file +] diff --git a/packages/api-contract/test/compare/test001.cmp.json b/packages/api-contract/test/compare/test001.cmp.json new file mode 100644 index 0000000000..2857e0a2f5 --- /dev/null +++ b/packages/api-contract/test/compare/test001.cmp.json @@ -0,0 +1,1002 @@ +[ + { + "info": 8, + "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": 8, + "type": "{\"value\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"name\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"cell\":\"([u8;32])\"}", + "sub": [ + { + "info": 9, + "type": "([u8;32])", + "sub": [ + { + "info": 11, + "type": "[u8;32]", + "ext": { + "length": 32, + "type": "u8" + }, + "sub": { + "info": 5, + "type": "u8" + }, + "index": 0 + } + ], + "name": "cell", + "namespace": "ink_core::storage::key" + } + ], + "name": "cell", + "namespace": "ink_core::storage::cell::sync_cell", + "params": [ + { + "info": 5, + "type": "bool" + } + ] + } + ], + "name": "value", + "namespace": "ink_core::storage::value", + "params": [ + { + "info": 5, + "type": "bool" + } + ] + }, + { + "info": 8, + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"cell\":\"([u8;32])\"}", + "sub": [ + { + "info": 9, + "type": "([u8;32])", + "sub": [ + { + "info": 11, + "type": "[u8;32]", + "ext": { + "length": 32, + "type": "u8" + }, + "sub": { + "info": 5, + "type": "u8" + }, + "index": 0 + } + ], + "name": "cell", + "namespace": "ink_core::storage::key" + } + ], + "name": "cell", + "namespace": "ink_core::storage::cell::sync_cell", + "params": [ + { + "info": 8, + "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"elems\":\"Vec\"}", + "sub": [ + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + }, + "name": "elems" + } + ], + "name": "vec", + "params": [ + { + "info": 5, + "type": "u8" + } + ] + } + ] + } + ] + } + ], + "name": "name", + "namespace": "ink_core::storage::value", + "params": [ + { + "info": 8, + "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"elems\":\"Vec\"}", + "sub": [ + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + }, + "name": "elems" + } + ], + "name": "vec", + "params": [ + { + "info": 5, + "type": "u8" + } + ] + } + ] + } + ] + } + ], + "name": "__storage", + "namespace": "app::app::__ink_private::__ink_storage" + }, + { + "info": 8, + "type": "{\"access\":\"{\\\"env\\\":\\\"()\\\",\\\"buffer\\\":\\\"{\\\\\\\"elems\\\\\\\":\\\\\\\"Vec\\\\\\\"}\\\",\\\"has_interacted\\\":\\\"bool\\\",\\\"has_returned_value\\\":\\\"bool\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"env\":\"()\",\"buffer\":\"{\\\"elems\\\":\\\"Vec\\\"}\",\"has_interacted\":\"bool\",\"has_returned_value\":\"bool\"}", + "sub": [ + { + "info": 9, + "type": "()", + "sub": [], + "name": "env", + "params": [ + { + "info": 8, + "type": "{}", + "sub": [], + "name": "TestEnv", + "namespace": "ink_core::env2::test::accessor", + "params": [ + { + "info": 2, + "type": "[]", + "sub": [], + "name": "DefaultSrmlTypes", + "namespace": "ink_core::env2::types" + } + ] + } + ] + }, + { + "info": 8, + "type": "{\"elems\":\"Vec\"}", + "sub": [ + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + }, + "name": "elems" + } + ], + "name": "buffer", + "params": [ + { + "info": 5, + "type": "u8" + } + ] + }, + { + "info": 5, + "type": "bool", + "name": "has_interacted" + }, + { + "info": 5, + "type": "bool", + "name": "has_returned_value" + } + ], + "name": "access", + "namespace": "ink_core::env2::env_access::mutable", + "params": [ + { + "info": 8, + "type": "{}", + "sub": [], + "name": "TestEnv", + "namespace": "ink_core::env2::test::accessor", + "params": [ + { + "info": 2, + "type": "[]", + "sub": [], + "name": "DefaultSrmlTypes", + "namespace": "ink_core::env2::types" + } + ] + } + ] + } + ], + "name": "__env", + "namespace": "ink_core::env2::env_access::immutable", + "params": [ + { + "info": 8, + "type": "{}", + "sub": [], + "name": "TestEnv", + "namespace": "ink_core::env2::test::accessor", + "params": [ + { + "info": 2, + "type": "[]", + "sub": [], + "name": "DefaultSrmlTypes", + "namespace": "ink_core::env2::types" + } + ] + } + ] + } + ], + "name": "StorageAndEnv", + "namespace": "app::app::__ink_private::__ink_storage" + }, + { + "info": 8, + "type": "{\"value\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\",\"name\":\"{\\\"cell\\\":\\\"{\\\\\\\"cell\\\\\\\":\\\\\\\"([u8;32])\\\\\\\"}\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"cell\":\"([u8;32])\"}", + "sub": [ + { + "info": 9, + "type": "([u8;32])", + "sub": [ + { + "info": 11, + "type": "[u8;32]", + "ext": { + "length": 32, + "type": "u8" + }, + "sub": { + "info": 5, + "type": "u8" + }, + "index": 0 + } + ], + "name": "cell", + "namespace": "ink_core::storage::key" + } + ], + "name": "cell", + "namespace": "ink_core::storage::cell::sync_cell", + "params": [ + { + "info": 5, + "type": "bool" + } + ] + } + ], + "name": "value", + "namespace": "ink_core::storage::value", + "params": [ + { + "info": 5, + "type": "bool" + } + ] + }, + { + "info": 8, + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"cell\":\"([u8;32])\"}", + "sub": [ + { + "info": 9, + "type": "([u8;32])", + "sub": [ + { + "info": 11, + "type": "[u8;32]", + "ext": { + "length": 32, + "type": "u8" + }, + "sub": { + "info": 5, + "type": "u8" + }, + "index": 0 + } + ], + "name": "cell", + "namespace": "ink_core::storage::key" + } + ], + "name": "cell", + "namespace": "ink_core::storage::cell::sync_cell", + "params": [ + { + "info": 8, + "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"elems\":\"Vec\"}", + "sub": [ + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + }, + "name": "elems" + } + ], + "name": "vec", + "params": [ + { + "info": 5, + "type": "u8" + } + ] + } + ] + } + ] + } + ], + "name": "name", + "namespace": "ink_core::storage::value", + "params": [ + { + "info": 8, + "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"elems\":\"Vec\"}", + "sub": [ + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + }, + "name": "elems" + } + ], + "name": "vec", + "params": [ + { + "info": 5, + "type": "u8" + } + ] + } + ] + } + ] + } + ], + "name": "Storage", + "namespace": "app::app::__ink_private::__ink_storage" + }, + { + "info": 8, + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"cell\":\"([u8;32])\"}", + "sub": [ + { + "info": 9, + "type": "([u8;32])", + "sub": [ + { + "info": 11, + "type": "[u8;32]", + "ext": { + "length": 32, + "type": "u8" + }, + "sub": { + "info": 5, + "type": "u8" + }, + "index": 0 + } + ], + "name": "cell", + "namespace": "ink_core::storage::key" + } + ], + "name": "cell", + "namespace": "ink_core::storage::cell::sync_cell", + "params": [ + { + "info": 5, + "type": "bool" + } + ] + } + ], + "name": "Value", + "namespace": "ink_core::storage::value", + "params": [ + { + "info": 5, + "type": "bool" + } + ] + }, + { + "info": 5, + "type": "bool" + }, + { + "info": 8, + "type": "{\"cell\":\"([u8;32])\"}", + "sub": [ + { + "info": 9, + "type": "([u8;32])", + "sub": [ + { + "info": 11, + "type": "[u8;32]", + "ext": { + "length": 32, + "type": "u8" + }, + "sub": { + "info": 5, + "type": "u8" + }, + "index": 0 + } + ], + "name": "cell", + "namespace": "ink_core::storage::key" + } + ], + "name": "SyncCell", + "namespace": "ink_core::storage::cell::sync_cell", + "params": [ + { + "info": 5, + "type": "bool" + } + ] + }, + { + "info": 9, + "type": "([u8;32])", + "sub": [ + { + "info": 11, + "type": "[u8;32]", + "ext": { + "length": 32, + "type": "u8" + }, + "sub": { + "info": 5, + "type": "u8" + }, + "index": 0 + } + ], + "name": "Key", + "namespace": "ink_core::storage::key" + }, + { + "info": 11, + "type": "[u8;32]", + "ext": { + "length": 32, + "type": "u8" + }, + "sub": { + "info": 5, + "type": "u8" + } + }, + { + "info": 5, + "type": "u8" + }, + { + "info": 8, + "type": "{\"cell\":\"{\\\"cell\\\":\\\"([u8;32])\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"cell\":\"([u8;32])\"}", + "sub": [ + { + "info": 9, + "type": "([u8;32])", + "sub": [ + { + "info": 11, + "type": "[u8;32]", + "ext": { + "length": 32, + "type": "u8" + }, + "sub": { + "info": 5, + "type": "u8" + }, + "index": 0 + } + ], + "name": "cell", + "namespace": "ink_core::storage::key" + } + ], + "name": "cell", + "namespace": "ink_core::storage::cell::sync_cell", + "params": [ + { + "info": 8, + "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"elems\":\"Vec\"}", + "sub": [ + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + }, + "name": "elems" + } + ], + "name": "vec", + "params": [ + { + "info": 5, + "type": "u8" + } + ] + } + ] + } + ] + } + ], + "name": "Value", + "namespace": "ink_core::storage::value", + "params": [ + { + "info": 8, + "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"elems\":\"Vec\"}", + "sub": [ + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + }, + "name": "elems" + } + ], + "name": "vec", + "params": [ + { + "info": 5, + "type": "u8" + } + ] + } + ] + } + ] + }, + { + "info": 8, + "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"elems\":\"Vec\"}", + "sub": [ + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + }, + "name": "elems" + } + ], + "name": "vec", + "params": [ + { + "info": 5, + "type": "u8" + } + ] + } + ] + }, + { + "info": 8, + "type": "{\"elems\":\"Vec\"}", + "sub": [ + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + }, + "name": "elems" + } + ], + "name": "Vec", + "params": [ + { + "info": 5, + "type": "u8" + } + ] + }, + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + } + }, + { + "info": 8, + "type": "{\"cell\":\"([u8;32])\"}", + "sub": [ + { + "info": 9, + "type": "([u8;32])", + "sub": [ + { + "info": 11, + "type": "[u8;32]", + "ext": { + "length": 32, + "type": "u8" + }, + "sub": { + "info": 5, + "type": "u8" + }, + "index": 0 + } + ], + "name": "cell", + "namespace": "ink_core::storage::key" + } + ], + "name": "SyncCell", + "namespace": "ink_core::storage::cell::sync_cell", + "params": [ + { + "info": 8, + "type": "{\"vec\":\"{\\\"elems\\\":\\\"Vec\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"elems\":\"Vec\"}", + "sub": [ + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + }, + "name": "elems" + } + ], + "name": "vec", + "params": [ + { + "info": 5, + "type": "u8" + } + ] + } + ] + } + ] + }, + { + "info": 8, + "type": "{\"access\":\"{\\\"env\\\":\\\"()\\\",\\\"buffer\\\":\\\"{\\\\\\\"elems\\\\\\\":\\\\\\\"Vec\\\\\\\"}\\\",\\\"has_interacted\\\":\\\"bool\\\",\\\"has_returned_value\\\":\\\"bool\\\"}\"}", + "sub": [ + { + "info": 8, + "type": "{\"env\":\"()\",\"buffer\":\"{\\\"elems\\\":\\\"Vec\\\"}\",\"has_interacted\":\"bool\",\"has_returned_value\":\"bool\"}", + "sub": [ + { + "info": 9, + "type": "()", + "sub": [], + "name": "env", + "params": [ + { + "info": 8, + "type": "{}", + "sub": [], + "name": "TestEnv", + "namespace": "ink_core::env2::test::accessor", + "params": [ + { + "info": 2, + "type": "[]", + "sub": [], + "name": "DefaultSrmlTypes", + "namespace": "ink_core::env2::types" + } + ] + } + ] + }, + { + "info": 8, + "type": "{\"elems\":\"Vec\"}", + "sub": [ + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + }, + "name": "elems" + } + ], + "name": "buffer", + "params": [ + { + "info": 5, + "type": "u8" + } + ] + }, + { + "info": 5, + "type": "bool", + "name": "has_interacted" + }, + { + "info": 5, + "type": "bool", + "name": "has_returned_value" + } + ], + "name": "access", + "namespace": "ink_core::env2::env_access::mutable", + "params": [ + { + "info": 8, + "type": "{}", + "sub": [], + "name": "TestEnv", + "namespace": "ink_core::env2::test::accessor", + "params": [ + { + "info": 2, + "type": "[]", + "sub": [], + "name": "DefaultSrmlTypes", + "namespace": "ink_core::env2::types" + } + ] + } + ] + } + ], + "name": "EnvAccess", + "namespace": "ink_core::env2::env_access::immutable", + "params": [ + { + "info": 8, + "type": "{}", + "sub": [], + "name": "TestEnv", + "namespace": "ink_core::env2::test::accessor", + "params": [ + { + "info": 2, + "type": "[]", + "sub": [], + "name": "DefaultSrmlTypes", + "namespace": "ink_core::env2::types" + } + ] + } + ] + }, + { + "info": 8, + "type": "{}", + "sub": [], + "name": "TestEnv", + "namespace": "ink_core::env2::test::accessor", + "params": [ + { + "info": 2, + "type": "[]", + "sub": [], + "name": "DefaultSrmlTypes", + "namespace": "ink_core::env2::types" + } + ] + }, + { + "info": 2, + "type": "[]", + "sub": [], + "name": "DefaultSrmlTypes", + "namespace": "ink_core::env2::types" + }, + { + "info": 8, + "type": "{\"env\":\"()\",\"buffer\":\"{\\\"elems\\\":\\\"Vec\\\"}\",\"has_interacted\":\"bool\",\"has_returned_value\":\"bool\"}", + "sub": [ + { + "info": 9, + "type": "()", + "sub": [], + "name": "env", + "params": [ + { + "info": 8, + "type": "{}", + "sub": [], + "name": "TestEnv", + "namespace": "ink_core::env2::test::accessor", + "params": [ + { + "info": 2, + "type": "[]", + "sub": [], + "name": "DefaultSrmlTypes", + "namespace": "ink_core::env2::types" + } + ] + } + ] + }, + { + "info": 8, + "type": "{\"elems\":\"Vec\"}", + "sub": [ + { + "info": 10, + "type": "Vec", + "sub": { + "info": 5, + "type": "u8" + }, + "name": "elems" + } + ], + "name": "buffer", + "params": [ + { + "info": 5, + "type": "u8" + } + ] + }, + { + "info": 5, + "type": "bool", + "name": "has_interacted" + }, + { + "info": 5, + "type": "bool", + "name": "has_returned_value" + } + ], + "name": "EnvAccessMut", + "namespace": "ink_core::env2::env_access::mutable", + "params": [ + { + "info": 8, + "type": "{}", + "sub": [], + "name": "TestEnv", + "namespace": "ink_core::env2::test::accessor", + "params": [ + { + "info": 2, + "type": "[]", + "sub": [], + "name": "DefaultSrmlTypes", + "namespace": "ink_core::env2::types" + } + ] + } + ] + }, + { + "info": 9, + "type": "()", + "sub": [], + "name": "PhantomData", + "params": [ + { + "info": 8, + "type": "{}", + "sub": [], + "name": "TestEnv", + "namespace": "ink_core::env2::test::accessor", + "params": [ + { + "info": 2, + "type": "[]", + "sub": [], + "name": "DefaultSrmlTypes", + "namespace": "ink_core::env2::types" + } + ] + } + ] + } +] diff --git a/packages/types/src/codec/utils/encodeTypes.ts b/packages/types/src/codec/utils/encodeTypes.ts index 9fccc9c285..a74ffc8c90 100644 --- a/packages/types/src/codec/utils/encodeTypes.ts +++ b/packages/types/src/codec/utils/encodeTypes.ts @@ -6,8 +6,6 @@ import { TypeDef, TypeDefInfo, TypeDefExtVecFixed } from '../types'; import { assert } from '@polkadot/util'; -import { getTypeDef } from '../create'; - export const SPECIAL_TYPES = ['AccountId', 'AccountIndex', 'Address', 'Balance']; const identity = (value: string): string => value; @@ -38,7 +36,8 @@ function encodeSubTypes (sub: TypeDef[], asEnum?: boolean): string { (result: Record, type: TypeDef): Record => { return { ...result, - [type.name as string]: encodeWithParams(type) + // eslint-disable-next-line @typescript-eslint/no-use-before-define + [type.name as string]: encodeType(type) }; }, {} @@ -87,7 +86,8 @@ function encodeTuple (typeDef: Pick): string { return `(${ sub - .map((type: TypeDef): string => encodeWithParams(type)) + // eslint-disable-next-line @typescript-eslint/no-use-before-define + .map((type: TypeDef): string => encodeType(type)) .join(', ') })`; } @@ -97,11 +97,7 @@ function encodeVecFixed (typeDef: Pick): string { const { type, length } = typeDef.ext as TypeDefExtVecFixed; - return `[${ - encodeWithParams(getTypeDef(type)) - };${ - length - }]`; + return `[${type};${length}]`; } // We setup a record here to ensure we have comprehensive coverage (any item not covered will result