mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-06-12 10:31:05 +00:00
Rebrand: polkadot → pezkuwi, substrate → bizinikiwi, kusama → dicle
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# @pezkuwi/api-contract
|
||||
|
||||
Interfaces to allow for the encoding and decoding of Bizinikiwi contract ABIs.
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"author": "Jaco Greeff <jacogr@gmail.com>",
|
||||
"bugs": "https://github.com/pezkuwichain/pezkuwi-api/issues",
|
||||
"description": "Interfaces for interacting with contracts and contract ABIs",
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"homepage": "https://github.com/pezkuwichain/pezkuwi-api/tree/master/packages/api-contract#readme",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@pezkuwi/api-contract",
|
||||
"repository": {
|
||||
"directory": "packages/api-contract",
|
||||
"type": "git",
|
||||
"url": "https://github.com/pezkuwichain/pezkuwi-api.git"
|
||||
},
|
||||
"sideEffects": [
|
||||
"./packageDetect.js",
|
||||
"./packageDetect.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "16.5.6",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@pezkuwi/api": "16.5.4",
|
||||
"@pezkuwi/api-augment": "16.5.4",
|
||||
"@pezkuwi/types": "16.5.4",
|
||||
"@pezkuwi/types-codec": "16.5.4",
|
||||
"@pezkuwi/types-create": "16.5.4",
|
||||
"@pezkuwi/util": "^14.0.1",
|
||||
"@pezkuwi/util-crypto": "^14.0.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"tslib": "^2.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@pezkuwi/api-augment": "16.5.4",
|
||||
"@pezkuwi/keyring": "^14.0.1",
|
||||
"@pezkuwi/types-support": "16.5.4"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
|
||||
|
||||
import type { Registry } from '@pezkuwi/types/types';
|
||||
|
||||
import fs from 'node:fs';
|
||||
import process from 'node:process';
|
||||
|
||||
import { TypeDefInfo } from '@pezkuwi/types/types';
|
||||
import rpcMetadata from '@pezkuwi/types-support/metadata/static-bizinikiwi-contracts-node';
|
||||
import { blake2AsHex } from '@pezkuwi/util-crypto';
|
||||
|
||||
import { Metadata, TypeRegistry } from '../../../types/src/bundle.js';
|
||||
import abis from '../test/contracts/index.js';
|
||||
import { Abi } from './index.js';
|
||||
|
||||
interface SpecDef {
|
||||
messages: {
|
||||
label: string;
|
||||
name: string[] | string
|
||||
}[]
|
||||
}
|
||||
|
||||
interface JSONAbi {
|
||||
source: {
|
||||
compiler: string,
|
||||
hash: string,
|
||||
language: string,
|
||||
wasm: string
|
||||
},
|
||||
spec: SpecDef;
|
||||
V1: {
|
||||
spec: SpecDef;
|
||||
},
|
||||
V2: {
|
||||
spec: SpecDef;
|
||||
},
|
||||
V3: {
|
||||
spec: SpecDef;
|
||||
},
|
||||
V4: {
|
||||
spec: SpecDef;
|
||||
}
|
||||
}
|
||||
|
||||
function stringifyInfo (key: string, value: unknown): unknown {
|
||||
return key === 'info' && typeof value === 'number'
|
||||
? TypeDefInfo[value]
|
||||
: value;
|
||||
}
|
||||
|
||||
function stringifyJson (registry: Registry): string {
|
||||
const defs = registry.lookup.types.map(({ id }) =>
|
||||
registry.lookup.getTypeDef(id)
|
||||
);
|
||||
|
||||
return JSON.stringify(defs, stringifyInfo, 2);
|
||||
}
|
||||
|
||||
describe('Abi', (): void => {
|
||||
describe('ABI', (): void => {
|
||||
Object.entries(abis).forEach(([abiName, _abi]) => {
|
||||
const abi = _abi as unknown as JSONAbi;
|
||||
|
||||
it(`initializes from a contract ABI (${abiName})`, (): void => {
|
||||
try {
|
||||
const messageIds = (abi.V4 || abi.V3 || abi.V2 || abi.V1 || abi).spec.messages.map(({ label, name }) =>
|
||||
label || (
|
||||
Array.isArray(name)
|
||||
? name.join('::')
|
||||
: name
|
||||
)
|
||||
);
|
||||
const inkAbi = new Abi(abis[abiName]);
|
||||
|
||||
expect(inkAbi.messages.map(({ identifier }) => identifier)).toEqual(messageIds);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('TypeDef', (): void => {
|
||||
for (const [abiName, abiJson] of Object.entries(abis)) {
|
||||
it(`initializes from a contract ABI: ${abiName}`, (): void => {
|
||||
const abi = new Abi(abiJson);
|
||||
const registryJson = stringifyJson(abi.registry);
|
||||
const cmpFile = new URL(`../test/compare/${abiName}.test.json`, import.meta.url);
|
||||
|
||||
try {
|
||||
expect(
|
||||
JSON.parse(registryJson)
|
||||
).toEqual(
|
||||
JSON.parse(fs.readFileSync(cmpFile, 'utf-8'))
|
||||
);
|
||||
} catch (error) {
|
||||
if (process.env['GITHUB_REPOSITORY']) {
|
||||
console.error(registryJson);
|
||||
|
||||
throw error;
|
||||
}
|
||||
|
||||
fs.writeFileSync(cmpFile, registryJson, { flag: 'w' });
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
it('has the correct hash for the source', (): void => {
|
||||
const abi = new Abi(abis['ink_v0_flipperBundle']);
|
||||
const bundle = abis['ink_v0_flipperBundle'] as unknown as JSONAbi;
|
||||
|
||||
// manual
|
||||
expect(bundle.source.hash).toEqual(blake2AsHex(bundle.source.wasm));
|
||||
|
||||
// the Codec hash
|
||||
expect(bundle.source.hash).toEqual(abi.info.source.wasm.hash.toHex());
|
||||
|
||||
// the hash as per the actual Abi
|
||||
expect(bundle.source.hash).toEqual(abi.info.source.wasmHash.toHex());
|
||||
});
|
||||
|
||||
describe('Events', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
beforeAll((): void => {
|
||||
const metadata = new Metadata(registry, rpcMetadata);
|
||||
|
||||
registry.setMetadata(metadata);
|
||||
});
|
||||
|
||||
it('decoding <=ink!v4 event', (): void => {
|
||||
const abiJson = abis['ink_v4_erc20Metadata'];
|
||||
|
||||
expect(abiJson).toBeDefined();
|
||||
const abi = new Abi(abiJson);
|
||||
|
||||
const eventRecordHex =
|
||||
'0x0001000000080360951b8baf569bca905a279c12d6ce17db7cdce23a42563870ef585129ce5dc64d010001d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb106000000000000000c0045726332303a3a5472616e7366657200000000000000000000000000000000da2d695d3b5a304e0039e7fc4419c34fa0c1f239189c99bb72a6484f1634782b2b00c7d40fe6d84d660f3e6bed90f218e022a0909f7e1a7ea35ada8b6e003564';
|
||||
const record = registry.createType('EventRecord', eventRecordHex);
|
||||
|
||||
const decodedEvent = abi.decodeEvent(record);
|
||||
|
||||
expect(decodedEvent.event.args.length).toEqual(3);
|
||||
expect(decodedEvent.args.length).toEqual(3);
|
||||
expect(decodedEvent.event.identifier).toEqual('Transfer');
|
||||
|
||||
const decodedEventHuman = decodedEvent.event.args.reduce((prev, cur, index) => {
|
||||
return {
|
||||
...prev,
|
||||
[cur.name]: decodedEvent.args[index].toHuman()
|
||||
};
|
||||
}, {});
|
||||
|
||||
const expectedEvent = {
|
||||
from: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
|
||||
to: '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty',
|
||||
value: '123.4567 MUnit'
|
||||
};
|
||||
|
||||
expect(decodedEventHuman).toEqual(expectedEvent);
|
||||
});
|
||||
|
||||
it('decoding >=ink!v5 event', (): void => {
|
||||
const abiJson = abis['ink_v5_erc20Metadata'];
|
||||
|
||||
expect(abiJson).toBeDefined();
|
||||
const abi = new Abi(abiJson);
|
||||
|
||||
const eventRecordHex =
|
||||
'0x00010000000803da17150e96b3955a4db6ad35ddeb495f722f9c1d84683113bfb096bf3faa30f2490101d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb106000000000000000cb5b61a3e6a21a16be4f044b517c28ac692492f73c5bfd3f60178ad98c767f4cbd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48';
|
||||
const record = registry.createType('EventRecord', eventRecordHex);
|
||||
|
||||
const decodedEvent = abi.decodeEvent(record);
|
||||
|
||||
expect(decodedEvent.event.args.length).toEqual(3);
|
||||
expect(decodedEvent.args.length).toEqual(3);
|
||||
expect(decodedEvent.event.identifier).toEqual('erc20::erc20::Transfer');
|
||||
|
||||
const decodedEventHuman = decodedEvent.event.args.reduce((prev, cur, index) => {
|
||||
return {
|
||||
...prev,
|
||||
[cur.name]: decodedEvent.args[index].toHuman()
|
||||
};
|
||||
}, {});
|
||||
|
||||
const expectedEvent = {
|
||||
from: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
|
||||
to: '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty',
|
||||
value: '123.4567 MUnit'
|
||||
};
|
||||
|
||||
expect(decodedEventHuman).toEqual(expectedEvent);
|
||||
});
|
||||
|
||||
it('decoding >=ink!v5 anonymous event', (): void => {
|
||||
const abiJson = abis['ink_v5_erc20AnonymousTransferMetadata'];
|
||||
|
||||
expect(abiJson).toBeDefined();
|
||||
const abi = new Abi(abiJson);
|
||||
|
||||
expect(abi.events[0].identifier).toEqual('erc20::erc20::Transfer');
|
||||
expect(abi.events[0].signatureTopic).toEqual(null);
|
||||
|
||||
const eventRecordWithAnonymousEventHex = '0x00010000000803538e726248a9c155911e7d99f4f474c3408630a2f6275dd501d4471c7067ad2c490101d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d018eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a4800505a4f7e9f4eb1060000000000000008d43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48';
|
||||
const record = registry.createType('EventRecord', eventRecordWithAnonymousEventHex);
|
||||
|
||||
const decodedEvent = abi.decodeEvent(record);
|
||||
|
||||
expect(decodedEvent.event.args.length).toEqual(3);
|
||||
expect(decodedEvent.args.length).toEqual(3);
|
||||
expect(decodedEvent.event.identifier).toEqual('erc20::erc20::Transfer');
|
||||
|
||||
const decodedEventHuman = decodedEvent.event.args.reduce((prev, cur, index) => {
|
||||
return {
|
||||
...prev,
|
||||
[cur.name]: decodedEvent.args[index].toHuman()
|
||||
};
|
||||
}, {});
|
||||
|
||||
const expectedEvent = {
|
||||
from: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',
|
||||
to: '5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty',
|
||||
value: '123.4567 MUnit'
|
||||
};
|
||||
|
||||
expect(decodedEventHuman).toEqual(expectedEvent);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,477 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Bytes, Vec } from '@pezkuwi/types';
|
||||
import type { ChainProperties, ContractConstructorSpecLatest, ContractEventParamSpecLatest, ContractMessageParamSpecLatest, ContractMessageSpecLatest, ContractMetadata, ContractMetadataV4, ContractMetadataV5, ContractMetadataV6, ContractProjectInfo, ContractTypeSpec, EventRecord } from '@pezkuwi/types/interfaces';
|
||||
import type { Codec, Registry, TypeDef } from '@pezkuwi/types/types';
|
||||
import type { AbiConstructor, AbiEvent, AbiEventParam, AbiMessage, AbiMessageParam, AbiParam, DecodedEvent, DecodedMessage } from '../types.js';
|
||||
|
||||
import { Option, TypeRegistry } from '@pezkuwi/types';
|
||||
import { TypeDefInfo } from '@pezkuwi/types-create';
|
||||
import { assertReturn, compactAddLength, compactStripLength, isBn, isNumber, isObject, isString, isUndefined, logger, stringCamelCase, stringify, u8aConcat, u8aToHex } from '@pezkuwi/util';
|
||||
|
||||
import { convertVersions, enumVersions } from './toLatestCompatible.js';
|
||||
|
||||
interface AbiJson {
|
||||
version?: string;
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
type EventOf<M> = M extends {spec: { events: Vec<infer E>}} ? E : never
|
||||
export type ContractMetadataSupported = ContractMetadataV4 | ContractMetadataV5 | ContractMetadataV6;
|
||||
type ContractEventSupported = EventOf<ContractMetadataSupported>;
|
||||
|
||||
const l = logger('Abi');
|
||||
|
||||
const PRIMITIVE_ALWAYS = ['AccountId', 'AccountId20', 'AccountIndex', 'Address', 'Balance'];
|
||||
|
||||
function findMessage <T extends AbiMessage> (list: T[], messageOrId: T | string | number): T {
|
||||
const message = isNumber(messageOrId)
|
||||
? list[messageOrId]
|
||||
: isString(messageOrId)
|
||||
? list.find(({ identifier }) => [identifier, stringCamelCase(identifier)].includes(messageOrId.toString()))
|
||||
: messageOrId;
|
||||
|
||||
return assertReturn(message, () => `Attempted to call an invalid contract interface, ${stringify(messageOrId)}`);
|
||||
}
|
||||
|
||||
function getMetadata (registry: Registry, json: AbiJson): ContractMetadataSupported {
|
||||
// this is for V1, V2, V3
|
||||
const vx = enumVersions.find((v) => isObject(json[v]));
|
||||
|
||||
// this was added in V4
|
||||
const jsonVersion = json.version;
|
||||
|
||||
if (!vx && jsonVersion && !enumVersions.find((v) => v === `V${jsonVersion}`)) {
|
||||
throw new Error(`Unable to handle version ${jsonVersion}`);
|
||||
}
|
||||
|
||||
const metadata = registry.createType<ContractMetadata>('ContractMetadata',
|
||||
vx
|
||||
? { [vx]: json[vx] }
|
||||
: jsonVersion
|
||||
? { [`V${jsonVersion}`]: json }
|
||||
: { V0: json }
|
||||
);
|
||||
|
||||
const converter = convertVersions.find(([v]) => metadata[`is${v}`]);
|
||||
|
||||
if (!converter) {
|
||||
throw new Error(`Unable to convert ABI with version ${metadata.type} to a supported version`);
|
||||
}
|
||||
|
||||
const upgradedMetadata = converter[1](registry, metadata[`as${converter[0]}`]);
|
||||
|
||||
return upgradedMetadata;
|
||||
}
|
||||
|
||||
function isRevive (json: Record<string, unknown>): boolean {
|
||||
const source = json['source'];
|
||||
const version = json['version'];
|
||||
|
||||
const hasContractBinary =
|
||||
typeof source === 'object' &&
|
||||
source !== null &&
|
||||
'contract_binary' in source;
|
||||
|
||||
const hasVersion =
|
||||
typeof version === 'number' && version >= 6;
|
||||
|
||||
return hasContractBinary || hasVersion;
|
||||
}
|
||||
|
||||
function parseJson (json: Record<string, unknown>, chainProperties?: ChainProperties): [Record<string, unknown>, Registry, ContractMetadataSupported, ContractProjectInfo, boolean] {
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
const revive = isRevive(json);
|
||||
const typeName = revive ? 'ContractReviveProjectInfo' : 'ContractProjectInfo';
|
||||
|
||||
const info = registry.createType(typeName, json) as unknown as ContractProjectInfo;
|
||||
const metadata = getMetadata(registry, json as unknown as AbiJson);
|
||||
const lookup = registry.createType('PortableRegistry', { types: metadata.types }, true);
|
||||
|
||||
// attach the lookup to the registry - now the types are known
|
||||
registry.setLookup(lookup);
|
||||
|
||||
if (chainProperties) {
|
||||
registry.setChainProperties(chainProperties);
|
||||
}
|
||||
|
||||
// warm-up the actual type, pre-use
|
||||
lookup.types.forEach(({ id }) =>
|
||||
lookup.getTypeDef(id)
|
||||
);
|
||||
|
||||
return [json, registry, metadata, info, revive];
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Determines if the given input value is a ContractTypeSpec
|
||||
*/
|
||||
function isTypeSpec (value: Codec): value is ContractTypeSpec {
|
||||
return !!value && value instanceof Map && !isUndefined((value as ContractTypeSpec).type) && !isUndefined((value as ContractTypeSpec).displayName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Determines if the given input value is an Option
|
||||
*/
|
||||
function isOption (value: Codec): value is Option<Codec> {
|
||||
return !!value && value instanceof Option;
|
||||
}
|
||||
|
||||
export class Abi {
|
||||
readonly events: AbiEvent[];
|
||||
readonly constructors: AbiConstructor[];
|
||||
readonly info: ContractProjectInfo;
|
||||
readonly json: Record<string, unknown>;
|
||||
readonly messages: AbiMessage[];
|
||||
readonly metadata: ContractMetadataSupported;
|
||||
readonly registry: Registry;
|
||||
readonly environment = new Map<string, TypeDef | Codec>();
|
||||
readonly isRevive: boolean;
|
||||
|
||||
constructor (abiJson: Record<string, unknown> | string, chainProperties?: ChainProperties) {
|
||||
[this.json, this.registry, this.metadata, this.info, this.isRevive] = parseJson(
|
||||
isString(abiJson)
|
||||
? JSON.parse(abiJson) as Record<string, unknown>
|
||||
: abiJson,
|
||||
chainProperties
|
||||
);
|
||||
this.constructors = this.metadata.spec.constructors.map((spec: ContractConstructorSpecLatest, index) =>
|
||||
this.#createMessage(spec, index, {
|
||||
isConstructor: true,
|
||||
isDefault: spec.default.isTrue,
|
||||
isPayable: spec.payable.isTrue,
|
||||
returnType: spec.returnType.isSome
|
||||
? this.registry.lookup.getTypeDef(spec.returnType.unwrap().type)
|
||||
: null
|
||||
})
|
||||
);
|
||||
this.events = this.metadata.spec.events.map((_: ContractEventSupported, index: number) =>
|
||||
this.#createEvent(index)
|
||||
);
|
||||
this.messages = this.metadata.spec.messages.map((spec: ContractMessageSpecLatest, index): AbiMessage =>
|
||||
this.#createMessage(spec, index, {
|
||||
isDefault: spec.default.isTrue,
|
||||
isMutating: spec.mutates.isTrue,
|
||||
isPayable: spec.payable.isTrue,
|
||||
returnType: spec.returnType.isSome
|
||||
? this.registry.lookup.getTypeDef(spec.returnType.unwrap().type)
|
||||
: null
|
||||
})
|
||||
);
|
||||
|
||||
// NOTE See the rationale for having Option<...> values in the actual
|
||||
// ContractEnvironmentV4 structure definition in interfaces/contractsAbi
|
||||
// (Due to conversions, the fields may not exist)
|
||||
for (const [key, opt] of this.metadata.spec.environment.entries()) {
|
||||
if (isOption(opt)) {
|
||||
if (opt.isSome) {
|
||||
const value = opt.unwrap();
|
||||
|
||||
if (isBn(value)) {
|
||||
this.environment.set(key, value);
|
||||
} else if (isTypeSpec(value)) {
|
||||
this.environment.set(key, this.registry.lookup.getTypeDef(value.type));
|
||||
} else {
|
||||
throw new Error(`Invalid environment definition for ${key}:: Expected either Number or ContractTypeSpec`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new Error(`Expected Option<*> definition for ${key} in ContractEnvironment`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning: Unstable API, bound to change
|
||||
*/
|
||||
public decodeEvent (record: EventRecord): DecodedEvent {
|
||||
switch (this.metadata.version.toString()) {
|
||||
// earlier version are hoisted to v4
|
||||
case '4':
|
||||
return this.#decodeEventV4(record);
|
||||
case '5':
|
||||
return this.#decodeEventV5(record);
|
||||
// Latest
|
||||
default:
|
||||
return this.#decodeEventV6(record);
|
||||
}
|
||||
}
|
||||
|
||||
#decodeEventV6 = (record: EventRecord): DecodedEvent => {
|
||||
const topics = record.event.data[2] as unknown as { toHex: () => string }[];
|
||||
// Try to match by signature topic (first topic)
|
||||
const signatureTopic = topics[0];
|
||||
const data = record.event.data[1] as Bytes;
|
||||
|
||||
if (signatureTopic) {
|
||||
const event = this.events.find((e) => e.signatureTopic !== undefined && e.signatureTopic !== null && e.signatureTopic === signatureTopic.toHex());
|
||||
|
||||
// Early return if event found by signature topic
|
||||
if (event) {
|
||||
return event.fromU8a(data);
|
||||
}
|
||||
}
|
||||
|
||||
// If no event returned yet, it might be anonymous
|
||||
const amountOfTopics = topics.length;
|
||||
const potentialEvents = this.events.filter((e) => {
|
||||
// event can't have a signature topic
|
||||
if (e.signatureTopic !== null && e.signatureTopic !== undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// event should have same amount of indexed fields as emitted topics
|
||||
const amountIndexed = e.args.filter((a) => a.indexed).length;
|
||||
|
||||
if (amountIndexed !== amountOfTopics) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If all conditions met, it's a potential event
|
||||
return true;
|
||||
});
|
||||
|
||||
if (potentialEvents.length === 1) {
|
||||
return potentialEvents[0].fromU8a(data);
|
||||
}
|
||||
|
||||
throw new Error('Unable to determine event');
|
||||
};
|
||||
|
||||
#decodeEventV5 = (record: EventRecord): DecodedEvent => {
|
||||
// Find event by first topic, which potentially is the signature_topic
|
||||
const signatureTopic = record.topics[0];
|
||||
const data = record.event.data[1] as Bytes;
|
||||
|
||||
if (signatureTopic) {
|
||||
const event = this.events.find((e) => e.signatureTopic !== undefined && e.signatureTopic !== null && e.signatureTopic === signatureTopic.toHex());
|
||||
|
||||
// Early return if event found by signature topic
|
||||
if (event) {
|
||||
return event.fromU8a(data);
|
||||
}
|
||||
}
|
||||
|
||||
// If no event returned yet, it might be anonymous
|
||||
const amountOfTopics = record.topics.length;
|
||||
const potentialEvents = this.events.filter((e) => {
|
||||
// event can't have a signature topic
|
||||
if (e.signatureTopic !== null && e.signatureTopic !== undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// event should have same amount of indexed fields as emitted topics
|
||||
const amountIndexed = e.args.filter((a) => a.indexed).length;
|
||||
|
||||
if (amountIndexed !== amountOfTopics) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// If all conditions met, it's a potential event
|
||||
return true;
|
||||
});
|
||||
|
||||
if (potentialEvents.length === 1) {
|
||||
return potentialEvents[0].fromU8a(data);
|
||||
}
|
||||
|
||||
throw new Error('Unable to determine event');
|
||||
};
|
||||
|
||||
#decodeEventV4 = (record: EventRecord): DecodedEvent => {
|
||||
const data = record.event.data[1] as Bytes;
|
||||
const index = data[0];
|
||||
const event = this.events[index];
|
||||
|
||||
if (!event) {
|
||||
throw new Error(`Unable to find event with index ${index}`);
|
||||
}
|
||||
|
||||
return event.fromU8a(data.subarray(1));
|
||||
};
|
||||
|
||||
/**
|
||||
* Warning: Unstable API, bound to change
|
||||
*/
|
||||
public decodeConstructor (data: Uint8Array): DecodedMessage {
|
||||
return this.#decodeMessage('message', this.constructors, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Warning: Unstable API, bound to change
|
||||
*/
|
||||
public decodeMessage (data: Uint8Array): DecodedMessage {
|
||||
return this.#decodeMessage('message', this.messages, data);
|
||||
}
|
||||
|
||||
public findConstructor (constructorOrId: AbiConstructor | string | number): AbiConstructor {
|
||||
return findMessage(this.constructors, constructorOrId);
|
||||
}
|
||||
|
||||
public findMessage (messageOrId: AbiMessage | string | number): AbiMessage {
|
||||
return findMessage(this.messages, messageOrId);
|
||||
}
|
||||
|
||||
#createArgs = (args: ContractMessageParamSpecLatest[] | ContractEventParamSpecLatest[], spec: unknown): AbiParam[] => {
|
||||
return args.map(({ label, type }, index): AbiParam => {
|
||||
try {
|
||||
if (!isObject(type)) {
|
||||
throw new Error('Invalid type definition found');
|
||||
}
|
||||
|
||||
const displayName = type.displayName.length
|
||||
? type.displayName[type.displayName.length - 1].toString()
|
||||
: undefined;
|
||||
const camelName = stringCamelCase(label);
|
||||
|
||||
if (displayName && PRIMITIVE_ALWAYS.includes(displayName)) {
|
||||
return {
|
||||
name: camelName,
|
||||
type: {
|
||||
info: TypeDefInfo.Plain,
|
||||
type: displayName
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
const typeDef = this.registry.lookup.getTypeDef(type.type);
|
||||
|
||||
return {
|
||||
name: camelName,
|
||||
type: displayName && !typeDef.type.startsWith(displayName)
|
||||
? { displayName, ...typeDef }
|
||||
: typeDef
|
||||
};
|
||||
} catch (error) {
|
||||
l.error(`Error expanding argument ${index} in ${stringify(spec)}`);
|
||||
|
||||
throw error;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
#createMessageParams = (args: ContractMessageParamSpecLatest[], spec: unknown): AbiMessageParam[] => {
|
||||
return this.#createArgs(args, spec);
|
||||
};
|
||||
|
||||
#createEventParams = (args: ContractEventParamSpecLatest[], spec: unknown): AbiEventParam[] => {
|
||||
const params = this.#createArgs(args, spec);
|
||||
|
||||
return params.map((p, index): AbiEventParam => ({ ...p, indexed: args[index].indexed.toPrimitive() }));
|
||||
};
|
||||
|
||||
#createEvent = (index: number): AbiEvent => {
|
||||
// TODO TypeScript would narrow this type to the correct version,
|
||||
// but version is `Text` so I need to call `toString()` here,
|
||||
// which breaks the type inference.
|
||||
switch (this.metadata.version.toString()) {
|
||||
case '4':
|
||||
return this.#createEventV4((this.metadata as ContractMetadataV4).spec.events[index], index);
|
||||
default:
|
||||
return this.#createEventV5((this.metadata as ContractMetadataV5).spec.events[index], index);
|
||||
}
|
||||
};
|
||||
|
||||
#createEventV5 = (spec: EventOf<ContractMetadataV5>, index: number): AbiEvent => {
|
||||
const args = this.#createEventParams(spec.args, spec);
|
||||
const event = {
|
||||
args,
|
||||
docs: spec.docs.map((d) => d.toString()),
|
||||
fromU8a: (data: Uint8Array): DecodedEvent => ({
|
||||
args: this.#decodeArgs(args, data),
|
||||
event
|
||||
}),
|
||||
identifier: [spec.module_path, spec.label].join('::'),
|
||||
index,
|
||||
signatureTopic: spec.signature_topic.isSome ? spec.signature_topic.unwrap().toHex() : null
|
||||
};
|
||||
|
||||
return event;
|
||||
};
|
||||
|
||||
#createEventV4 = (spec: EventOf<ContractMetadataV4>, index: number): AbiEvent => {
|
||||
const args = this.#createEventParams(spec.args, spec);
|
||||
const event = {
|
||||
args,
|
||||
docs: spec.docs.map((d) => d.toString()),
|
||||
fromU8a: (data: Uint8Array): DecodedEvent => ({
|
||||
args: this.#decodeArgs(args, data),
|
||||
event
|
||||
}),
|
||||
identifier: spec.label.toString(),
|
||||
index
|
||||
};
|
||||
|
||||
return event;
|
||||
};
|
||||
|
||||
#createMessage = (spec: ContractMessageSpecLatest | ContractConstructorSpecLatest, index: number, add: Partial<AbiMessage> = {}): AbiMessage => {
|
||||
const args = this.#createMessageParams(spec.args, spec);
|
||||
const identifier = spec.label.toString();
|
||||
const message = {
|
||||
...add,
|
||||
args,
|
||||
docs: spec.docs.map((d) => d.toString()),
|
||||
fromU8a: (data: Uint8Array): DecodedMessage => ({
|
||||
args: this.#decodeArgs(args, data),
|
||||
message
|
||||
}),
|
||||
identifier,
|
||||
index,
|
||||
isDefault: spec.default.isTrue,
|
||||
method: stringCamelCase(identifier),
|
||||
path: identifier.split('::').map((s) => stringCamelCase(s)),
|
||||
selector: spec.selector,
|
||||
toU8a: (params: unknown[]) =>
|
||||
this.#encodeMessageArgs(spec, args, params)
|
||||
};
|
||||
|
||||
return message;
|
||||
};
|
||||
|
||||
#decodeArgs = (args: AbiParam[], data: Uint8Array): Codec[] => {
|
||||
// for decoding we expect the input to be just the arg data, no selectors
|
||||
// no length added (this allows use with events as well)
|
||||
let offset = 0;
|
||||
|
||||
return args.map(({ type: { lookupName, type } }): Codec => {
|
||||
const value = this.registry.createType(lookupName || type, data.subarray(offset));
|
||||
|
||||
offset += value.encodedLength;
|
||||
|
||||
return value;
|
||||
});
|
||||
};
|
||||
|
||||
#decodeMessage = (type: 'constructor' | 'message', list: AbiMessage[], data: Uint8Array): DecodedMessage => {
|
||||
const [, trimmed] = compactStripLength(data);
|
||||
const selector = trimmed.subarray(0, 4);
|
||||
const message = list.find((m) => m.selector.eq(selector));
|
||||
|
||||
if (!message) {
|
||||
throw new Error(`Unable to find ${type} with selector ${u8aToHex(selector)}`);
|
||||
}
|
||||
|
||||
return message.fromU8a(trimmed.subarray(4));
|
||||
};
|
||||
|
||||
#encodeMessageArgs = ({ label, selector }: ContractMessageSpecLatest | ContractConstructorSpecLatest, args: AbiMessageParam[], data: unknown[]): Uint8Array => {
|
||||
if (data.length !== args.length) {
|
||||
throw new Error(`Expected ${args.length} arguments to contract message '${label.toString()}', found ${data.length}`);
|
||||
}
|
||||
|
||||
return compactAddLength(
|
||||
u8aConcat(
|
||||
this.registry.createType('ContractSelector', selector).toU8a(),
|
||||
...args.map(({ type: { lookupName, type } }, index) =>
|
||||
this.registry.createType(lookupName || type, data[index]).toU8a()
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,219 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
|
||||
|
||||
import { TypeRegistry } from '@pezkuwi/types';
|
||||
|
||||
import abis from '../test/contracts/index.js';
|
||||
import { v0ToLatestCompatible, v1ToLatestCompatible, v2ToLatestCompatible, v3ToLatestCompatible, v4ToLatestCompatible, v5ToLatestCompatible, v6ToLatestCompatible } from './toLatestCompatible.js';
|
||||
|
||||
describe('v0ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V0: abis['ink_v0_erc20'] });
|
||||
const latest = v0ToLatestCompatible(registry, contract.asV0);
|
||||
|
||||
it('has the correct constructors', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors.map(({ label }) => label.toString())
|
||||
).toEqual(['new']);
|
||||
});
|
||||
|
||||
it('has the correct messages', (): void => {
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
).toEqual(['total_supply', 'balance_of', 'allowance', 'transfer', 'approve', 'transfer_from']);
|
||||
});
|
||||
|
||||
it('has the correct events', (): void => {
|
||||
expect(
|
||||
latest.spec.events.map(({ label }) => label.toString())
|
||||
).toEqual(['Transfer', 'Approval']);
|
||||
});
|
||||
|
||||
it('has the correct constructor arguments', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].args.map(({ label }) => label.toString())
|
||||
).toEqual(['initial_supply']);
|
||||
});
|
||||
|
||||
it('has the correct message arguments', (): void => {
|
||||
expect(
|
||||
latest.spec.messages[1].args.map(({ label }) => label.toString())
|
||||
).toEqual(['owner']);
|
||||
});
|
||||
|
||||
it('has the correct event arguments', (): void => {
|
||||
expect(
|
||||
latest.spec.events[0].args.map(({ label }) => label.toString())
|
||||
).toEqual(['from', 'to', 'value']);
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('4');
|
||||
});
|
||||
});
|
||||
|
||||
describe('v1ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V1: abis['ink_v1_flipper']['V1'] });
|
||||
const latest = v1ToLatestCompatible(registry, contract.asV1);
|
||||
|
||||
it('has the correct constructors', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors.map(({ label }) => label.toString())
|
||||
).toEqual(['new', 'default']);
|
||||
});
|
||||
|
||||
it('has the correct messages', (): void => {
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
).toEqual(['flip', 'get']);
|
||||
});
|
||||
|
||||
it('has the correct messages with namespaced method name', (): void => {
|
||||
const contract = registry.createType('ContractMetadata', { V1: abis['ink_v1_psp22']['V1'] });
|
||||
const latest = v1ToLatestCompatible(registry, contract.asV1);
|
||||
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
).toEqual([
|
||||
'PSP22Metadata::token_name', 'PSP22Metadata::token_symbol', 'PSP22Metadata::token_decimals', 'PSP22Mintable::mint', 'PSP22::decrease_allowance', 'PSP22::transfer', 'PSP22::approve', 'PSP22::allowance', 'PSP22::transfer_from', 'PSP22::balance_of', 'PSP22::increase_allowance', 'PSP22::total_supply', 'pause', 'unpause'
|
||||
]);
|
||||
});
|
||||
|
||||
it('has the correct constructor arguments', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].args.map(({ label }) => label.toString())
|
||||
).toEqual(['init_value']);
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('4');
|
||||
});
|
||||
});
|
||||
|
||||
describe('v2ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V2: abis['ink_v2_flipper']['V2'] });
|
||||
const latest = v2ToLatestCompatible(registry, contract.asV2);
|
||||
|
||||
it('has the correct constructor flag', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].payable.isTrue
|
||||
).toEqual(true);
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('4');
|
||||
});
|
||||
});
|
||||
|
||||
describe('v3ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis['ink_v3_flipper']['V3'] });
|
||||
const latest = v3ToLatestCompatible(registry, contract.asV3);
|
||||
|
||||
it('has the correct constructor flags', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].payable.isTrue
|
||||
).toEqual(false);
|
||||
expect(
|
||||
latest.spec.constructors[1].payable.isTrue
|
||||
).toEqual(true);
|
||||
});
|
||||
|
||||
it('has the correct messages', (): void => {
|
||||
const contract = registry.createType('ContractMetadata', { V3: abis['ink_v3_traitErc20']['V3'] });
|
||||
const latest = v3ToLatestCompatible(registry, contract.asV3);
|
||||
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
).toEqual([
|
||||
'BaseErc20::total_supply', 'BaseErc20::balance_of', 'BaseErc20::allowance', 'BaseErc20::transfer', 'BaseErc20::approve', 'BaseErc20::transfer_from'
|
||||
]);
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('4');
|
||||
});
|
||||
});
|
||||
|
||||
describe('v4ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V4: abis['ink_v4_flipperContract'] });
|
||||
const latest = v4ToLatestCompatible(registry, contract.asV4);
|
||||
|
||||
it('has the correct constructor flags', (): void => {
|
||||
expect(
|
||||
latest.spec.constructors[0].payable.isTrue
|
||||
).toEqual(false);
|
||||
expect(
|
||||
latest.spec.constructors[1].payable.isTrue
|
||||
).toEqual(false);
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('4');
|
||||
});
|
||||
});
|
||||
|
||||
describe('v5ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V5: abis['ink_v5_erc20Metadata'] });
|
||||
const latest = v5ToLatestCompatible(registry, contract.asV5);
|
||||
|
||||
it('has the correct messages', (): void => {
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
).toEqual(['total_supply', 'balance_of', 'allowance', 'transfer', 'approve', 'transfer_from']);
|
||||
});
|
||||
|
||||
it('has new event fields', (): void => {
|
||||
expect(
|
||||
latest.spec.events.length
|
||||
).toEqual(2);
|
||||
|
||||
expect(
|
||||
latest.spec.events.every((e) => e.has('module_path'))
|
||||
).toEqual(true);
|
||||
|
||||
expect(latest.spec.events[0].module_path.toString()).toEqual('erc20::erc20');
|
||||
|
||||
expect(
|
||||
latest.spec.events.every((e) => e.has('signature_topic'))
|
||||
).toEqual(true);
|
||||
|
||||
expect(latest.spec.events[0].signature_topic.toHex()).toEqual('0xb5b61a3e6a21a16be4f044b517c28ac692492f73c5bfd3f60178ad98c767f4cb');
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('5');
|
||||
});
|
||||
});
|
||||
|
||||
describe('v6ToLatestCompatible', (): void => {
|
||||
const registry = new TypeRegistry();
|
||||
const contract = registry.createType('ContractMetadata', { V6: abis['ink_v6_erc20Metadata'] });
|
||||
const latest = v6ToLatestCompatible(registry, contract.asV6);
|
||||
|
||||
it('has the correct messages', (): void => {
|
||||
expect(
|
||||
latest.spec.messages.map(({ label }) => label.toString())
|
||||
).toEqual(['total_supply', 'balance_of', 'allowance', 'transfer', 'approve', 'transfer_from']);
|
||||
});
|
||||
|
||||
it('has H160 as the type of balance_of argument', (): void => {
|
||||
const arg = latest.spec.messages.find(
|
||||
(m) => m.label.toString() === 'balance_of'
|
||||
)?.args[0];
|
||||
|
||||
const name = arg?.type.displayName?.[0]?.toString();
|
||||
|
||||
expect(name).toBe('H160');
|
||||
});
|
||||
|
||||
it('has the latest compatible version number', (): void => {
|
||||
expect(latest.version.toString()).toEqual('6');
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,52 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV4, ContractMetadataV5, ContractMetadataV6 } from '@pezkuwi/types/interfaces';
|
||||
import type { Registry } from '@pezkuwi/types/types';
|
||||
import type { ContractMetadataSupported } from './index.js';
|
||||
|
||||
import { v0ToV1 } from './toV1.js';
|
||||
import { v1ToV2 } from './toV2.js';
|
||||
import { v2ToV3 } from './toV3.js';
|
||||
import { v3ToV4 } from './toV4.js';
|
||||
|
||||
// The versions where an enum is used, aka V0 is missing
|
||||
// (Order from newest, i.e. we expect more on newest vs oldest)
|
||||
export const enumVersions = ['V6', 'V5', 'V4', 'V3', 'V2', 'V1'] as const;
|
||||
|
||||
type Versions = typeof enumVersions[number] | 'V0';
|
||||
|
||||
type Converter = (registry: Registry, vx: any) => ContractMetadataSupported;
|
||||
|
||||
// Helper to convert metadata from one step to the next
|
||||
function createConverter <I, O> (next: (registry: Registry, input: O) => ContractMetadataSupported, step: (registry: Registry, input: I) => O): (registry: Registry, input: I) => ContractMetadataSupported {
|
||||
return (registry: Registry, input: I): ContractMetadataSupported =>
|
||||
next(registry, step(registry, input));
|
||||
}
|
||||
|
||||
export function v6ToLatestCompatible (_registry: Registry, v6: ContractMetadataV6): ContractMetadataV6 {
|
||||
return v6;
|
||||
}
|
||||
|
||||
export function v5ToLatestCompatible (_registry: Registry, v5: ContractMetadataV5): ContractMetadataV5 {
|
||||
return v5;
|
||||
}
|
||||
|
||||
export function v4ToLatestCompatible (_registry: Registry, v4: ContractMetadataV4): ContractMetadataV4 {
|
||||
return v4;
|
||||
}
|
||||
|
||||
export const v3ToLatestCompatible = /*#__PURE__*/ createConverter(v4ToLatestCompatible, v3ToV4);
|
||||
export const v2ToLatestCompatible = /*#__PURE__*/ createConverter(v3ToLatestCompatible, v2ToV3);
|
||||
export const v1ToLatestCompatible = /*#__PURE__*/ createConverter(v2ToLatestCompatible, v1ToV2);
|
||||
export const v0ToLatestCompatible = /*#__PURE__*/ createConverter(v1ToLatestCompatible, v0ToV1);
|
||||
|
||||
export const convertVersions: [Versions, Converter][] = [
|
||||
['V6', v6ToLatestCompatible],
|
||||
['V5', v5ToLatestCompatible],
|
||||
['V4', v4ToLatestCompatible],
|
||||
['V3', v3ToLatestCompatible],
|
||||
['V2', v2ToLatestCompatible],
|
||||
['V1', v1ToLatestCompatible],
|
||||
['V0', v0ToLatestCompatible]
|
||||
];
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV0, ContractMetadataV1 } from '@pezkuwi/types/interfaces';
|
||||
import type { Registry } from '@pezkuwi/types/types';
|
||||
|
||||
import { convertSiV0toV1 } from '@pezkuwi/types';
|
||||
import { objectSpread } from '@pezkuwi/util';
|
||||
|
||||
interface Named {
|
||||
name: unknown;
|
||||
}
|
||||
|
||||
function v0ToV1Names (all: Named[]): unknown[] {
|
||||
return all.map((e) =>
|
||||
objectSpread({}, e, {
|
||||
name: Array.isArray(e.name)
|
||||
? e.name
|
||||
: [e.name]
|
||||
}));
|
||||
}
|
||||
|
||||
export function v0ToV1 (registry: Registry, v0: ContractMetadataV0): ContractMetadataV1 {
|
||||
if (!v0.metadataVersion.length) {
|
||||
throw new Error('Invalid format for V0 (detected) contract metadata');
|
||||
}
|
||||
|
||||
return registry.createType('ContractMetadataV1', objectSpread({}, v0, {
|
||||
spec: objectSpread({}, v0.spec, {
|
||||
constructors: v0ToV1Names(v0.spec.constructors),
|
||||
messages: v0ToV1Names(v0.spec.messages)
|
||||
}),
|
||||
types: convertSiV0toV1(registry, v0.types)
|
||||
}));
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Text } from '@pezkuwi/types';
|
||||
import type { ContractConstructorSpecV0, ContractEventSpecV0, ContractMessageSpecV0, ContractMetadataV1, ContractMetadataV2 } from '@pezkuwi/types/interfaces';
|
||||
import type { Registry } from '@pezkuwi/types/types';
|
||||
|
||||
import { objectSpread } from '@pezkuwi/util';
|
||||
|
||||
type WithArgs = keyof typeof ARG_TYPES;
|
||||
|
||||
interface NamedEntry {
|
||||
name: Text | Text[];
|
||||
}
|
||||
|
||||
type GetArgsType<T extends WithArgs> = T extends 'ContractConstructorSpec'
|
||||
? ContractConstructorSpecV0
|
||||
: T extends ContractEventSpecV0
|
||||
? ContractEventSpecV0
|
||||
: ContractMessageSpecV0;
|
||||
|
||||
interface ArgsEntry <T extends WithArgs> extends NamedEntry {
|
||||
args: GetArgsType<T>['args'][0][];
|
||||
}
|
||||
|
||||
const ARG_TYPES = {
|
||||
ContractConstructorSpec: 'ContractMessageParamSpecV2',
|
||||
ContractEventSpec: 'ContractEventParamSpecV2',
|
||||
ContractMessageSpec: 'ContractMessageParamSpecV2'
|
||||
} as const;
|
||||
|
||||
function v1ToV2Label (entry: NamedEntry): { label: Text } {
|
||||
return objectSpread({}, entry, {
|
||||
label: Array.isArray(entry.name)
|
||||
? entry.name.join('::')
|
||||
: entry.name
|
||||
});
|
||||
}
|
||||
|
||||
function v1ToV2Labels <T extends WithArgs> (registry: Registry, outType: T, all: ArgsEntry<T>[]): unknown[] {
|
||||
return all.map((e) =>
|
||||
registry.createType(`${outType}V2`, objectSpread(v1ToV2Label(e), {
|
||||
args: e.args.map((a) =>
|
||||
registry.createType(ARG_TYPES[outType], v1ToV2Label(a))
|
||||
)
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
||||
export function v1ToV2 (registry: Registry, v1: ContractMetadataV1): ContractMetadataV2 {
|
||||
return registry.createType('ContractMetadataV2', objectSpread({}, v1, {
|
||||
spec: objectSpread({}, v1.spec, {
|
||||
constructors: v1ToV2Labels(registry, 'ContractConstructorSpec', v1.spec.constructors),
|
||||
events: v1ToV2Labels(registry, 'ContractEventSpec', v1.spec.events),
|
||||
messages: v1ToV2Labels(registry, 'ContractMessageSpec', v1.spec.messages)
|
||||
})
|
||||
}));
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV2, ContractMetadataV3 } from '@pezkuwi/types/interfaces';
|
||||
import type { Registry } from '@pezkuwi/types/types';
|
||||
|
||||
import { objectSpread } from '@pezkuwi/util';
|
||||
|
||||
export function v2ToV3 (registry: Registry, v2: ContractMetadataV2): ContractMetadataV3 {
|
||||
return registry.createType('ContractMetadataV3', objectSpread({}, v2, {
|
||||
spec: objectSpread({}, v2.spec, {
|
||||
constructors: v2.spec.constructors.map((c) =>
|
||||
// V3 introduces the payable flag on constructors, for <V3, it is always true
|
||||
registry.createType('ContractConstructorSpecV3', objectSpread({}, c, { payable: true }))
|
||||
)
|
||||
})
|
||||
}));
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ContractMetadataV3, ContractMetadataV4 } from '@pezkuwi/types/interfaces';
|
||||
import type { Registry } from '@pezkuwi/types/types';
|
||||
|
||||
import { objectSpread } from '@pezkuwi/util';
|
||||
|
||||
export function v3ToV4 (registry: Registry, v3: ContractMetadataV3): ContractMetadataV4 {
|
||||
return registry.createType('ContractMetadataV4', objectSpread({}, v3, {
|
||||
spec: objectSpread({}, v3.spec, {
|
||||
constructors: v3.spec.constructors.map((c) =>
|
||||
registry.createType('ContractConstructorSpecV4', objectSpread({}, c))
|
||||
),
|
||||
messages: v3.spec.messages.map((m) =>
|
||||
registry.createType('ContractMessageSpecV3', objectSpread({}, m))
|
||||
)
|
||||
}),
|
||||
version: registry.createType('Text', '4')
|
||||
}));
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import '@pezkuwi/api-augment';
|
||||
@@ -0,0 +1,52 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@pezkuwi/api/base';
|
||||
import type { ApiTypes, DecorateMethod } from '@pezkuwi/api/types';
|
||||
import type { WeightV2 } from '@pezkuwi/types/interfaces';
|
||||
import type { Registry } from '@pezkuwi/types/types';
|
||||
|
||||
import { isFunction } from '@pezkuwi/util';
|
||||
|
||||
import { Abi } from '../Abi/index.js';
|
||||
|
||||
export abstract class Base<ApiType extends ApiTypes> {
|
||||
readonly abi: Abi;
|
||||
readonly api: ApiBase<ApiType>;
|
||||
|
||||
protected readonly _decorateMethod: DecorateMethod<ApiType>;
|
||||
protected readonly _isWeightV1: boolean;
|
||||
protected readonly _isRevive: boolean;
|
||||
|
||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, decorateMethod: DecorateMethod<ApiType>) {
|
||||
if (!api || !api.isConnected || !api.tx) {
|
||||
throw new Error('Your API has not been initialized correctly and is not connected to a chain');
|
||||
}
|
||||
|
||||
this.abi = abi instanceof Abi
|
||||
? abi
|
||||
: new Abi(abi, api.registry.getChainProperties());
|
||||
this.api = api;
|
||||
this._decorateMethod = decorateMethod;
|
||||
this._isWeightV1 = !api.registry.createType<WeightV2>('Weight').proofSize;
|
||||
this._isRevive = this.abi.isRevive;
|
||||
|
||||
if (this._isRevive) {
|
||||
if (!api.tx.revive || !isFunction(api.tx.revive.instantiateWithCode) || api.tx.revive.instantiateWithCode.meta.args.length !== 6) {
|
||||
throw new Error('The runtime does not expose api.tx.revive.instantiateWithCode with storageDepositLimit');
|
||||
} else if (!api.call.reviveApi || !isFunction(api.call.reviveApi.call)) {
|
||||
throw new Error('Your runtime does not expose the api.call.reviveApi.call runtime interfaces');
|
||||
}
|
||||
} else {
|
||||
if (!api.tx.contracts || !isFunction(api.tx.contracts.instantiateWithCode) || api.tx.contracts.instantiateWithCode.meta.args.length !== 6) {
|
||||
throw new Error('The runtime does not expose api.tx.contracts.instantiateWithCode with storageDepositLimit');
|
||||
} else if (!api.call.contractsApi || !isFunction(api.call.contractsApi.call)) {
|
||||
throw new Error('Your runtime does not expose the api.call.contractsApi.call runtime interfaces');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public get registry (): Registry {
|
||||
return this.api.registry;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@pezkuwi/api/base';
|
||||
import type { SubmittableExtrinsic } from '@pezkuwi/api/submittable/types';
|
||||
import type { ApiTypes, DecorateMethod } from '@pezkuwi/api/types';
|
||||
import type { AccountId, EventRecord, Hash } from '@pezkuwi/types/interfaces';
|
||||
import type { ISubmittableResult } from '@pezkuwi/types/types';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
import type { AbiConstructor, BlueprintOptions } from '../types.js';
|
||||
import type { MapConstructorExec } from './types.js';
|
||||
|
||||
import { SubmittableResult } from '@pezkuwi/api';
|
||||
import { BN_ZERO, isUndefined } from '@pezkuwi/util';
|
||||
|
||||
import { applyOnEvent } from '../util.js';
|
||||
import { Base } from './Base.js';
|
||||
import { Contract } from './Contract.js';
|
||||
import { convertWeight, createBluePrintTx, encodeSalt } from './util.js';
|
||||
|
||||
export type BlueprintConstructor<ApiType extends ApiTypes> = new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array) => Blueprint<ApiType>;
|
||||
|
||||
export class BlueprintSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
|
||||
readonly contract?: Contract<ApiType> | undefined;
|
||||
|
||||
constructor (result: ISubmittableResult, contract?: Contract<ApiType>) {
|
||||
super(result);
|
||||
|
||||
this.contract = contract;
|
||||
}
|
||||
}
|
||||
|
||||
export class Blueprint<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
/**
|
||||
* @description The on-chain code hash for this blueprint
|
||||
*/
|
||||
readonly codeHash: Hash;
|
||||
|
||||
readonly #tx: MapConstructorExec<ApiType> = {};
|
||||
|
||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array, decorateMethod: DecorateMethod<ApiType>) {
|
||||
super(api, abi, decorateMethod);
|
||||
|
||||
this.codeHash = this.registry.createType('Hash', codeHash);
|
||||
|
||||
this.abi.constructors.forEach((c): void => {
|
||||
if (isUndefined(this.#tx[c.method])) {
|
||||
this.#tx[c.method] = createBluePrintTx(c, (o, p) => this.#deploy(c, o, p));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public get tx (): MapConstructorExec<ApiType> {
|
||||
return this.#tx;
|
||||
}
|
||||
|
||||
#deploy = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, BlueprintSubmittableResult<ApiType>> => {
|
||||
const palletTx = this._isRevive
|
||||
? this.api.tx.revive
|
||||
: this.api.tx.contracts;
|
||||
|
||||
return palletTx.instantiate(
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore jiggle v1 weights, metadata points to latest
|
||||
this._isWeightV1
|
||||
? convertWeight(gasLimit).v1Weight
|
||||
: convertWeight(gasLimit).v2Weight,
|
||||
storageDepositLimit,
|
||||
this.codeHash,
|
||||
this.abi.findConstructor(constructorOrId).toU8a(params),
|
||||
encodeSalt(salt)
|
||||
).withResultTransform((result: ISubmittableResult) =>
|
||||
new BlueprintSubmittableResult(result, applyOnEvent(result, ['Instantiated'], ([record]: EventRecord[]) =>
|
||||
new Contract<ApiType>(this.api, this.abi, record.event.data[1] as AccountId, this._decorateMethod), this._isRevive
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export function extendBlueprint <ApiType extends ApiTypes> (type: ApiType, decorateMethod: DecorateMethod<ApiType>): BlueprintConstructor<ApiType> {
|
||||
return class extends Blueprint<ApiType> {
|
||||
static __BlueprintType = type;
|
||||
|
||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash | Uint8Array) {
|
||||
super(api, abi, codeHash, decorateMethod);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/// <reference types="@pezkuwi/dev-test/globals.d.ts" />
|
||||
|
||||
import fs from 'node:fs';
|
||||
|
||||
import { toPromiseMethod } from '@pezkuwi/api';
|
||||
|
||||
import v0contractFlipper from '../test/contracts/ink/v0/flipper.contract.json' assert { type: 'json' };
|
||||
import v0abiFlipper from '../test/contracts/ink/v0/flipper.json' assert { type: 'json' };
|
||||
import v1contractFlipper from '../test/contracts/ink/v1/flipper.contract.json' assert { type: 'json' };
|
||||
import v6contractErc20 from '../test/contracts/ink/v6/erc20.contract.json' assert { type: 'json' };
|
||||
import { Code } from './Code.js';
|
||||
import { mockApi, mockReviveApi } from './mock.js';
|
||||
|
||||
const v0wasmFlipper = fs.readFileSync(new URL('../test/contracts/ink/v0/flipper.wasm', import.meta.url), 'utf-8');
|
||||
|
||||
describe('Code', (): void => {
|
||||
it('can construct with an individual ABI/WASM combo', (): void => {
|
||||
expect(
|
||||
() => new Code(mockApi, v0abiFlipper as Record<string, unknown>, v0wasmFlipper, toPromiseMethod)
|
||||
).not.toThrow();
|
||||
});
|
||||
|
||||
it('can construct with an .contract ABI (v0)', (): void => {
|
||||
expect(
|
||||
() => new Code(mockApi, v0contractFlipper as Record<string, unknown>, null, toPromiseMethod)
|
||||
).not.toThrow();
|
||||
});
|
||||
|
||||
it('can construct with an .contract ABI (v1)', (): void => {
|
||||
expect(
|
||||
() => new Code(mockApi, v1contractFlipper as Record<string, unknown>, null, toPromiseMethod)
|
||||
).not.toThrow();
|
||||
});
|
||||
|
||||
it('can construct a revive compatible contract (v6)', (): void => {
|
||||
expect(
|
||||
() => new Code(mockApi, v6contractErc20 as Record<string, unknown>, null, toPromiseMethod)
|
||||
).toThrow('The runtime does not expose api.tx.revive.instantiateWithCode with storageDepositLimit');
|
||||
|
||||
expect(
|
||||
() => new Code(mockReviveApi, v6contractErc20 as Record<string, unknown>, null, toPromiseMethod)
|
||||
).not.toThrow();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,142 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@pezkuwi/api/base';
|
||||
import type { SubmittableExtrinsic } from '@pezkuwi/api/submittable/types';
|
||||
import type { ApiTypes, DecorateMethod } from '@pezkuwi/api/types';
|
||||
import type { AccountId, EventRecord } from '@pezkuwi/types/interfaces';
|
||||
import type { ISubmittableResult } from '@pezkuwi/types/types';
|
||||
import type { Codec } from '@pezkuwi/types-codec/types';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
import type { AbiConstructor, BlueprintOptions } from '../types.js';
|
||||
import type { MapConstructorExec } from './types.js';
|
||||
|
||||
import { SubmittableResult } from '@pezkuwi/api';
|
||||
import { BN_ZERO, compactAddLength, isRiscV, isUndefined, isWasm, u8aToU8a } from '@pezkuwi/util';
|
||||
|
||||
import { applyOnEvent } from '../util.js';
|
||||
import { Base } from './Base.js';
|
||||
import { Blueprint } from './Blueprint.js';
|
||||
import { Contract } from './Contract.js';
|
||||
import { convertWeight, createBluePrintTx, encodeSalt } from './util.js';
|
||||
|
||||
export type CodeConstructor<ApiType extends ApiTypes> = new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) => Code<ApiType>;
|
||||
|
||||
export class CodeSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
|
||||
readonly blueprint?: Blueprint<ApiType> | undefined;
|
||||
readonly contract?: Contract<ApiType> | undefined;
|
||||
|
||||
constructor (result: ISubmittableResult, blueprint?: Blueprint<ApiType> | undefined, contract?: Contract<ApiType> | undefined) {
|
||||
super(result);
|
||||
|
||||
this.blueprint = blueprint;
|
||||
this.contract = contract;
|
||||
}
|
||||
}
|
||||
|
||||
// checks to see if the code (or at least the header)
|
||||
// is a valid/supported format
|
||||
function isValidCode (code: Uint8Array): boolean {
|
||||
return isWasm(code) || isRiscV(code);
|
||||
}
|
||||
|
||||
export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
readonly code: Uint8Array;
|
||||
|
||||
readonly #tx: MapConstructorExec<ApiType> = {};
|
||||
|
||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined, decorateMethod: DecorateMethod<ApiType>) {
|
||||
super(api, abi, decorateMethod);
|
||||
|
||||
this.code = isValidCode(this.abi.info.source.wasm)
|
||||
? this.abi.info.source.wasm
|
||||
: u8aToU8a(wasm);
|
||||
|
||||
if (!isValidCode(this.code)) {
|
||||
throw new Error('Invalid code provided');
|
||||
}
|
||||
|
||||
this.abi.constructors.forEach((c): void => {
|
||||
if (isUndefined(this.#tx[c.method])) {
|
||||
this.#tx[c.method] = createBluePrintTx(c, (o, p) => this.#instantiate(c, o, p));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public get tx (): MapConstructorExec<ApiType> {
|
||||
return this.#tx;
|
||||
}
|
||||
|
||||
#instantiate = (constructorOrId: AbiConstructor | string | number, { gasLimit = BN_ZERO, salt, storageDepositLimit = null, value = BN_ZERO }: BlueprintOptions, params: unknown[]): SubmittableExtrinsic<ApiType, CodeSubmittableResult<ApiType>> => {
|
||||
const palletTx = this._isRevive ? this.api.tx.revive : this.api.tx.contracts;
|
||||
|
||||
if (this._isRevive) {
|
||||
return palletTx.instantiateWithCode(
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore jiggle v1 weights, metadata points to latest
|
||||
this._isWeightV1
|
||||
? convertWeight(gasLimit).v1Weight
|
||||
: convertWeight(gasLimit).v2Weight,
|
||||
storageDepositLimit,
|
||||
compactAddLength(this.code),
|
||||
this.abi.findConstructor(constructorOrId).toU8a(params),
|
||||
encodeSalt(salt)
|
||||
).withResultTransform((result: ISubmittableResult) =>
|
||||
new CodeSubmittableResult(
|
||||
result,
|
||||
...(applyOnEvent(result, ['Instantiated'], (records: EventRecord[]) =>
|
||||
records.reduce<[Blueprint<ApiType> | undefined, Contract<ApiType> | undefined]>(
|
||||
([blueprint, contract], { event }) =>
|
||||
this.api.events.revive['Instantiated'].is(event)
|
||||
? [
|
||||
blueprint,
|
||||
new Contract<ApiType>(
|
||||
this.api,
|
||||
this.abi,
|
||||
(event as unknown as { data: [Codec, AccountId] }).data[1],
|
||||
this._decorateMethod
|
||||
)
|
||||
]
|
||||
: [blueprint, contract],
|
||||
[undefined, undefined]
|
||||
), this._isRevive
|
||||
) || [undefined, undefined])
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return palletTx.instantiateWithCode(
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore jiggle v1 weights, metadata points to latest
|
||||
this._isWeightV1
|
||||
? convertWeight(gasLimit).v1Weight
|
||||
: convertWeight(gasLimit).v2Weight,
|
||||
storageDepositLimit,
|
||||
compactAddLength(this.code),
|
||||
this.abi.findConstructor(constructorOrId).toU8a(params),
|
||||
encodeSalt(salt)
|
||||
).withResultTransform((result: ISubmittableResult) =>
|
||||
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
|
||||
records.reduce<[Blueprint<ApiType> | undefined, Contract<ApiType> | undefined]>(([blueprint, contract], { event }) =>
|
||||
this.api.events.contracts.Instantiated.is(event)
|
||||
? [blueprint, new Contract<ApiType>(this.api, this.abi, (event as unknown as { data: [Codec, AccountId] }).data[1], this._decorateMethod)]
|
||||
: this.api.events.contracts.CodeStored.is(event)
|
||||
? [new Blueprint<ApiType>(this.api, this.abi, (event as unknown as { data: [AccountId] }).data[0], this._decorateMethod), contract]
|
||||
: [blueprint, contract],
|
||||
[undefined, undefined]), this._isRevive
|
||||
) || [undefined, undefined]))
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export function extendCode <ApiType extends ApiTypes> (type: ApiType, decorateMethod: DecorateMethod<ApiType>): CodeConstructor<ApiType> {
|
||||
return class extends Code<ApiType> {
|
||||
static __CodeType = type;
|
||||
|
||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) {
|
||||
super(api, abi, wasm, decorateMethod);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@pezkuwi/api/base';
|
||||
import type { SubmittableExtrinsic } from '@pezkuwi/api/submittable/types';
|
||||
import type { ApiTypes, DecorateMethod } from '@pezkuwi/api/types';
|
||||
import type { AccountId, AccountId20, ContractExecResult, EventRecord, Weight, WeightV2 } from '@pezkuwi/types/interfaces';
|
||||
import type { ISubmittableResult } from '@pezkuwi/types/types';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent, WeightAll } from '../types.js';
|
||||
import type { ContractCallResult, ContractCallSend, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types.js';
|
||||
|
||||
import { map } from 'rxjs';
|
||||
|
||||
import { SubmittableResult } from '@pezkuwi/api';
|
||||
import { BN, BN_HUNDRED, BN_ONE, BN_ZERO, isUndefined, logger } from '@pezkuwi/util';
|
||||
|
||||
import { applyOnEvent } from '../util.js';
|
||||
import { Base } from './Base.js';
|
||||
import { convertWeight, withMeta } from './util.js';
|
||||
|
||||
export type ContractConstructor<ApiType extends ApiTypes> = new(api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId) => Contract<ApiType>;
|
||||
|
||||
// As per Rust, 5 * GAS_PER_SEC
|
||||
const MAX_CALL_GAS = new BN(5_000_000_000_000).isub(BN_ONE);
|
||||
|
||||
const l = logger('Contract');
|
||||
|
||||
function createQuery <ApiType extends ApiTypes> (meta: AbiMessage, fn: (origin: string | AccountId | Uint8Array, options: ContractOptions, params: unknown[]) => ContractCallResult<ApiType, ContractCallOutcome>): ContractQuery<ApiType> {
|
||||
return withMeta(meta, (origin: string | AccountId | Uint8Array, options: ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome> =>
|
||||
fn(origin, options, params)
|
||||
);
|
||||
}
|
||||
|
||||
function createTx <ApiType extends ApiTypes> (meta: AbiMessage, fn: (options: ContractOptions, params: unknown[]) => SubmittableExtrinsic<ApiType>): ContractTx<ApiType> {
|
||||
return withMeta(meta, (options: ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType> =>
|
||||
fn(options, params)
|
||||
);
|
||||
}
|
||||
|
||||
export class ContractSubmittableResult extends SubmittableResult {
|
||||
readonly contractEvents?: DecodedEvent[] | undefined;
|
||||
|
||||
constructor (result: ISubmittableResult, contractEvents?: DecodedEvent[]) {
|
||||
super(result);
|
||||
|
||||
this.contractEvents = contractEvents;
|
||||
}
|
||||
}
|
||||
|
||||
export class Contract<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
/**
|
||||
* @description The on-chain address for this contract
|
||||
*/
|
||||
readonly address: AccountId | AccountId20;
|
||||
|
||||
readonly #query: MapMessageQuery<ApiType> = {};
|
||||
readonly #tx: MapMessageTx<ApiType> = {};
|
||||
|
||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId | AccountId20, decorateMethod: DecorateMethod<ApiType>) {
|
||||
super(api, abi, decorateMethod);
|
||||
|
||||
this.address = this.registry.createType(this._isRevive ? 'AccountId20' : 'AccountId', address);
|
||||
|
||||
this.abi.messages.forEach((m): void => {
|
||||
if (isUndefined(this.#tx[m.method])) {
|
||||
this.#tx[m.method] = createTx(m, (o, p) => this.#exec(m, o, p));
|
||||
}
|
||||
|
||||
if (isUndefined(this.#query[m.method])) {
|
||||
this.#query[m.method] = createQuery(m, (f, o, p) => this.#read(m, o, p).send(f));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public get query (): MapMessageQuery<ApiType> {
|
||||
return this.#query;
|
||||
}
|
||||
|
||||
public get tx (): MapMessageTx<ApiType> {
|
||||
return this.#tx;
|
||||
}
|
||||
|
||||
#getGas = (_gasLimit: bigint | BN | string | number | WeightV2, isCall = false): WeightAll => {
|
||||
const weight = convertWeight(_gasLimit);
|
||||
|
||||
if (weight.v1Weight.gt(BN_ZERO)) {
|
||||
return weight;
|
||||
}
|
||||
|
||||
return convertWeight(
|
||||
isCall
|
||||
? MAX_CALL_GAS
|
||||
: convertWeight(
|
||||
this.api.consts.system.blockWeights
|
||||
? (this.api.consts.system.blockWeights as unknown as { maxBlock: WeightV2 }).maxBlock
|
||||
: this.api.consts.system['maximumBlockWeight'] as Weight
|
||||
).v1Weight.muln(64).div(BN_HUNDRED)
|
||||
);
|
||||
};
|
||||
|
||||
#exec = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): SubmittableExtrinsic<ApiType> => {
|
||||
const palletTx = this._isRevive ? this.api.tx.revive : this.api.tx.contracts;
|
||||
|
||||
return palletTx.call(
|
||||
this.address,
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore jiggle v1 weights, metadata points to latest
|
||||
this._isWeightV1
|
||||
? convertWeight(gasLimit).v1Weight
|
||||
: convertWeight(gasLimit).v2Weight,
|
||||
storageDepositLimit,
|
||||
this.abi.findMessage(messageOrId).toU8a(params)
|
||||
).withResultTransform((result: ISubmittableResult) =>
|
||||
// ContractEmitted is the current generation, ContractExecution is the previous generation
|
||||
new ContractSubmittableResult(result, applyOnEvent(result, ['ContractEmitted', 'ContractExecution'], (records: EventRecord[]) =>
|
||||
records
|
||||
// Filter to only decode events emitted by this specific contract instance.
|
||||
.filter((record): boolean => {
|
||||
try {
|
||||
const contractAddress = record.event.data[0];
|
||||
|
||||
if (this.address.eq(contractAddress)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
l.debug(`Skipping event from different contract ${contractAddress.toString()} (this contract: ${this.address.toString()})`);
|
||||
|
||||
return false;
|
||||
} catch (error) {
|
||||
l.warn(`Unable to extract contract address from event: ${(error as Error).message}`);
|
||||
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.map((record): DecodedEvent | null => {
|
||||
try {
|
||||
return this.abi.decodeEvent(record);
|
||||
} catch (error) {
|
||||
l.error(`Unable to decode contract event: ${(error as Error).message}`);
|
||||
|
||||
return null;
|
||||
}
|
||||
})
|
||||
.filter((decoded): decoded is DecodedEvent => !!decoded), this._isRevive
|
||||
))
|
||||
);
|
||||
};
|
||||
|
||||
#read = (messageOrId: AbiMessage | string | number, { gasLimit = BN_ZERO, storageDepositLimit = null, value = BN_ZERO }: ContractOptions, params: unknown[]): ContractCallSend<ApiType> => {
|
||||
const message = this.abi.findMessage(messageOrId);
|
||||
|
||||
return {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
send: this._decorateMethod((origin: string | AccountId | Uint8Array) =>
|
||||
(this._isRevive
|
||||
? this.api.rx.call.reviveApi.call
|
||||
: this.api.rx.call.contractsApi.call)<ContractExecResult>(
|
||||
origin,
|
||||
this.address,
|
||||
value,
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore jiggle v1 weights, metadata points to latest
|
||||
this._isWeightV1
|
||||
? this.#getGas(gasLimit, true).v1Weight
|
||||
: this.#getGas(gasLimit, true).v2Weight,
|
||||
storageDepositLimit,
|
||||
message.toU8a(params)
|
||||
).pipe(
|
||||
map(({ debugMessage, gasConsumed, gasRequired, result, storageDeposit }): ContractCallOutcome => ({
|
||||
debugMessage,
|
||||
gasConsumed,
|
||||
gasRequired: gasRequired && !convertWeight(gasRequired).v1Weight.isZero()
|
||||
? gasRequired
|
||||
: gasConsumed,
|
||||
output: result.isOk && message.returnType
|
||||
? this.abi.registry.createTypeUnsafe(message.returnType.lookupName || message.returnType.type, [result.asOk.data.toU8a(true)], { isPedantic: true })
|
||||
: null,
|
||||
result,
|
||||
storageDeposit
|
||||
}))
|
||||
)
|
||||
)
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export function extendContract <ApiType extends ApiTypes> (type: ApiType, decorateMethod: DecorateMethod<ApiType>): ContractConstructor<ApiType> {
|
||||
return class extends Contract<ApiType> {
|
||||
static __ContractType = type;
|
||||
|
||||
constructor (api: ApiBase<ApiType>, abi: string | Record<string, unknown> | Abi, address: string | AccountId) {
|
||||
super(api, abi, address, decorateMethod);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { Blueprint, BlueprintSubmittableResult, extendBlueprint } from './Blueprint.js';
|
||||
export { Code, CodeSubmittableResult, extendCode } from './Code.js';
|
||||
export { Contract, extendContract } from './Contract.js';
|
||||
@@ -0,0 +1,48 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiBase } from '@pezkuwi/api/base';
|
||||
|
||||
import { TypeRegistry } from '@pezkuwi/types';
|
||||
|
||||
const registry = new TypeRegistry();
|
||||
|
||||
const instantiateWithCode = (): never => {
|
||||
throw new Error('mock');
|
||||
};
|
||||
|
||||
instantiateWithCode.meta = { args: new Array(6) };
|
||||
|
||||
export const mockApi = {
|
||||
call: {
|
||||
contractsApi: {
|
||||
call: (): never => {
|
||||
throw new Error('mock');
|
||||
}
|
||||
}
|
||||
},
|
||||
isConnected: true,
|
||||
registry,
|
||||
tx: {
|
||||
contracts: {
|
||||
instantiateWithCode
|
||||
}
|
||||
}
|
||||
} as unknown as ApiBase<'promise'>;
|
||||
|
||||
export const mockReviveApi = {
|
||||
call: {
|
||||
reviveApi: {
|
||||
call: (): never => {
|
||||
throw new Error('mock');
|
||||
}
|
||||
}
|
||||
},
|
||||
isConnected: true,
|
||||
registry,
|
||||
tx: {
|
||||
revive: {
|
||||
instantiateWithCode
|
||||
}
|
||||
}
|
||||
} as unknown as ApiBase<'promise'>;
|
||||
@@ -0,0 +1,40 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { SubmittableExtrinsic } from '@pezkuwi/api/submittable/types';
|
||||
import type { ApiTypes, ObsInnerType } from '@pezkuwi/api/types';
|
||||
import type { AccountId } from '@pezkuwi/types/interfaces';
|
||||
import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions } from '../types.js';
|
||||
|
||||
export interface MessageMeta {
|
||||
readonly meta: AbiMessage;
|
||||
}
|
||||
|
||||
export interface BlueprintDeploy<ApiType extends ApiTypes> extends MessageMeta {
|
||||
(options: BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
|
||||
}
|
||||
|
||||
export interface ContractQuery<ApiType extends ApiTypes> extends MessageMeta {
|
||||
(origin: AccountId | string | Uint8Array, options: ContractOptions, ...params: unknown[]): ContractCallResult<ApiType, ContractCallOutcome>;
|
||||
}
|
||||
|
||||
export interface ContractTx<ApiType extends ApiTypes> extends MessageMeta {
|
||||
(options: ContractOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType>;
|
||||
}
|
||||
|
||||
export type ContractGeneric<O, T> = (messageOrId: AbiMessage | string | number, options: O, ...params: unknown[]) => T;
|
||||
|
||||
export type ContractCallResult<ApiType extends ApiTypes, T> = ApiType extends 'rxjs'
|
||||
? Observable<T>
|
||||
: Promise<ObsInnerType<Observable<T>>>;
|
||||
|
||||
export interface ContractCallSend<ApiType extends ApiTypes> {
|
||||
send (account: string | AccountId | Uint8Array): ContractCallResult<ApiType, ContractCallOutcome>;
|
||||
}
|
||||
|
||||
export type MapConstructorExec<ApiType extends ApiTypes> = Record<string, BlueprintDeploy<ApiType>>;
|
||||
|
||||
export type MapMessageTx<ApiType extends ApiTypes> = Record<string, ContractTx<ApiType>>;
|
||||
|
||||
export type MapMessageQuery<ApiType extends ApiTypes> = Record<string, ContractQuery<ApiType>>;
|
||||
@@ -0,0 +1,56 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { SubmittableResult } from '@pezkuwi/api';
|
||||
import type { SubmittableExtrinsic } from '@pezkuwi/api/submittable/types';
|
||||
import type { ApiTypes } from '@pezkuwi/api/types';
|
||||
import type { WeightV1, WeightV2 } from '@pezkuwi/types/interfaces';
|
||||
import type { BN } from '@pezkuwi/util';
|
||||
import type { AbiConstructor, AbiMessage, BlueprintOptions, WeightAll } from '../types.js';
|
||||
import type { BlueprintDeploy, ContractGeneric } from './types.js';
|
||||
|
||||
import { Bytes } from '@pezkuwi/types';
|
||||
import { bnToBn, compactAddLength, u8aToU8a } from '@pezkuwi/util';
|
||||
import { randomAsU8a } from '@pezkuwi/util-crypto';
|
||||
|
||||
export const EMPTY_SALT = new Uint8Array();
|
||||
|
||||
export function withMeta <T extends { meta: AbiMessage }> (meta: AbiMessage, creator: Omit<T, 'meta'>): T {
|
||||
(creator as T).meta = meta;
|
||||
|
||||
return creator as T;
|
||||
}
|
||||
|
||||
export function createBluePrintTx <ApiType extends ApiTypes, R extends SubmittableResult> (meta: AbiMessage, fn: (options: BlueprintOptions, params: unknown[]) => SubmittableExtrinsic<ApiType, R>): BlueprintDeploy<ApiType> {
|
||||
return withMeta(meta, (options: BlueprintOptions, ...params: unknown[]): SubmittableExtrinsic<ApiType, R> =>
|
||||
fn(options, params)
|
||||
);
|
||||
}
|
||||
|
||||
export function createBluePrintWithId <T> (fn: (constructorOrId: AbiConstructor | string | number, options: BlueprintOptions, params: unknown[]) => T): ContractGeneric<BlueprintOptions, T> {
|
||||
return (constructorOrId: AbiConstructor | string | number, options: BlueprintOptions, ...params: unknown[]): T =>
|
||||
fn(constructorOrId, options, params);
|
||||
}
|
||||
|
||||
export function encodeSalt (salt: Uint8Array | string | null = randomAsU8a()): Uint8Array {
|
||||
return salt instanceof Bytes
|
||||
? salt
|
||||
: salt?.length
|
||||
? compactAddLength(u8aToU8a(salt))
|
||||
: EMPTY_SALT;
|
||||
}
|
||||
|
||||
export function convertWeight (weight: WeightV1 | WeightV2 | bigint | string | number | BN): WeightAll {
|
||||
const [refTime, proofSize] = isWeightV2(weight)
|
||||
? [weight.refTime.toBn(), weight.proofSize.toBn()]
|
||||
: [bnToBn(weight), undefined];
|
||||
|
||||
return {
|
||||
v1Weight: refTime,
|
||||
v2Weight: { proofSize, refTime }
|
||||
};
|
||||
}
|
||||
|
||||
export function isWeightV2 (weight: WeightV1 | WeightV2 | bigint | string | number | BN): weight is WeightV2 {
|
||||
return !!(weight as WeightV2).proofSize;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// all named
|
||||
export { Abi } from './Abi/index.js';
|
||||
export { packageInfo } from './packageInfo.js';
|
||||
|
||||
// all starred
|
||||
export * from './promise/index.js';
|
||||
export * from './rx/index.js';
|
||||
@@ -0,0 +1,45 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Simple non-runnable checks to test type definitions in the editor itself
|
||||
|
||||
import '@pezkuwi/api-augment';
|
||||
|
||||
import type { TestKeyringMapBizinikiwi } from '@pezkuwi/keyring/testingPairs';
|
||||
|
||||
import { ApiPromise } from '@pezkuwi/api';
|
||||
import { BlueprintPromise, ContractPromise } from '@pezkuwi/api-contract';
|
||||
import { createTestPairs } from '@pezkuwi/keyring/testingPairs';
|
||||
|
||||
import abiIncrementer from './test/contracts/ink/v0/incrementer.json' assert { type: 'json' };
|
||||
|
||||
async function checkBlueprint (api: ApiPromise, pairs: TestKeyringMapBizinikiwi): Promise<void> {
|
||||
const blueprint = new BlueprintPromise(api, abiIncrementer as Record<string, unknown>, '0x1234');
|
||||
|
||||
await blueprint.tx['new']({ gasLimit: 456, salt: '0x1234', value: 123 }, 42).signAndSend(pairs.bob);
|
||||
await blueprint.tx['new']({ gasLimit: 456, value: 123 }, 42).signAndSend(pairs.bob);
|
||||
}
|
||||
|
||||
async function checkContract (api: ApiPromise, pairs: TestKeyringMapBizinikiwi): Promise<void> {
|
||||
const contract = new ContractPromise(api, abiIncrementer as Record<string, unknown>, '0x1234');
|
||||
|
||||
// queries
|
||||
await contract.query['get'](pairs.alice.address, {});
|
||||
|
||||
// execute
|
||||
await contract.tx['inc']({ gasLimit: 1234 }, 123).signAndSend(pairs.eve);
|
||||
}
|
||||
|
||||
async function main (): Promise<void> {
|
||||
const api = await ApiPromise.create({
|
||||
hasher: (data: Uint8Array): Uint8Array => data
|
||||
});
|
||||
const pairs = createTestPairs();
|
||||
|
||||
await Promise.all([
|
||||
checkBlueprint(api, pairs),
|
||||
checkContract(api, pairs)
|
||||
]);
|
||||
}
|
||||
|
||||
main().catch(console.error);
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import './packageDetect.js';
|
||||
|
||||
export * from './bundle.js';
|
||||
@@ -0,0 +1,4 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export * from './index.js';
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright 2017-2026 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @pezkuwi/dev
|
||||
// (packageInfo imports will be kept as-is, user-editable)
|
||||
|
||||
import { packageInfo as apiInfo } from '@pezkuwi/api/packageInfo';
|
||||
import { packageInfo as typesInfo } from '@pezkuwi/types/packageInfo';
|
||||
import { detectPackage } from '@pezkuwi/util';
|
||||
|
||||
import { packageInfo } from './packageInfo.js';
|
||||
|
||||
detectPackage(packageInfo, null, [apiInfo, typesInfo]);
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2026 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Do not edit, auto-generated by @pezkuwi/dev
|
||||
|
||||
export const packageInfo = { name: '@pezkuwi/api-contract', path: 'auto', type: 'auto', version: '16.5.4' };
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiPromise } from '@pezkuwi/api';
|
||||
import type { AccountId, AccountId20, Hash } from '@pezkuwi/types/interfaces';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
|
||||
import { toPromiseMethod } from '@pezkuwi/api';
|
||||
|
||||
import { Blueprint, Code, Contract } from '../base/index.js';
|
||||
|
||||
export class BlueprintPromise extends Blueprint<'promise'> {
|
||||
constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash) {
|
||||
super(api, abi, codeHash, toPromiseMethod);
|
||||
}
|
||||
}
|
||||
|
||||
export class CodePromise extends Code<'promise'> {
|
||||
constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) {
|
||||
super(api, abi, wasm, toPromiseMethod);
|
||||
}
|
||||
}
|
||||
|
||||
export class ContractPromise extends Contract<'promise'> {
|
||||
constructor (api: ApiPromise, abi: string | Record<string, unknown> | Abi, address: string | AccountId | AccountId20) {
|
||||
super(api, abi, address, toPromiseMethod);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { BlueprintSubmittableResult as BaseBlueprintSubmittableResult, CodeSubmittableResult as BaseCodeSubmittableResult } from '../base/index.js';
|
||||
|
||||
export type BlueprintSubmittableResult = BaseBlueprintSubmittableResult<'promise'>;
|
||||
export type CodeSubmittableResult = BaseCodeSubmittableResult<'promise'>;
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { ApiRx } from '@pezkuwi/api';
|
||||
import type { AccountId, Hash } from '@pezkuwi/types/interfaces';
|
||||
import type { Abi } from '../Abi/index.js';
|
||||
|
||||
import { toRxMethod } from '@pezkuwi/api';
|
||||
|
||||
import { Blueprint, Code, Contract } from '../base/index.js';
|
||||
|
||||
export class BlueprintRx extends Blueprint<'rxjs'> {
|
||||
constructor (api: ApiRx, abi: string | Record<string, unknown> | Abi, codeHash: string | Hash) {
|
||||
super(api, abi, codeHash, toRxMethod);
|
||||
}
|
||||
}
|
||||
|
||||
export class CodeRx extends Code<'rxjs'> {
|
||||
constructor (api: ApiRx, abi: string | Record<string, unknown> | Abi, wasm: Uint8Array | string | Buffer | null | undefined) {
|
||||
super(api, abi, wasm, toRxMethod);
|
||||
}
|
||||
}
|
||||
|
||||
export class ContractRx extends Contract<'rxjs'> {
|
||||
constructor (api: ApiRx, abi: string | Record<string, unknown> | Abi, address: string | AccountId) {
|
||||
super(api, abi, address, toRxMethod);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { BlueprintSubmittableResult as BaseBlueprintSubmittableResult, CodeSubmittableResult as BaseCodeSubmittableResult } from '../base/index.js';
|
||||
|
||||
export type BlueprintSubmittableResult = BaseBlueprintSubmittableResult<'promise'>;
|
||||
export type CodeSubmittableResult = BaseCodeSubmittableResult<'promise'>;
|
||||
@@ -0,0 +1,47 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 2,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "i32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::Hash",
|
||||
"lookupNameRoot": "InkEnvHash"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,232 @@
|
||||
[
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 1,
|
||||
"lookupName": "InkStorageCollectionsStashHeader",
|
||||
"type": "{\"lastVacant\":\"u32\",\"len\":\"u32\",\"lenEntries\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Header",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lastVacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "len"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lenEntries"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkStorageCollectionsStashEntry",
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"Hash\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::Hash",
|
||||
"lookupNameRoot": "InkEnvHash",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::Hash",
|
||||
"lookupNameRoot": "InkEnvHash"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "{\"next\":\"u32\",\"prev\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::VacantEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "next"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "prev"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageCollectionsHashmapValueEntry",
|
||||
"type": "{\"value\":\"AccountId\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 9,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId",
|
||||
"name": "value"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 9,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 10,
|
||||
"type": "Result<Null, DnsError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 12,
|
||||
"lookupName": "DnsError",
|
||||
"type": "Lookup12"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 12,
|
||||
"lookupName": "DnsError",
|
||||
"type": "{\"_enum\":[\"NameAlreadyExists\",\"CallerIsNotOwner\"]}",
|
||||
"docs": [],
|
||||
"namespace": "dns::dns::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "NameAlreadyExists"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CallerIsNotOwner"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 13,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 9,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,253 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 2,
|
||||
"lookupName": "InkStorageCollectionsStashHeader",
|
||||
"type": "{\"lastVacant\":\"u32\",\"len\":\"u32\",\"lenEntries\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Header",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lastVacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "len"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lenEntries"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 4,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"AccountId\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup8",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 6,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "{\"next\":\"u32\",\"prev\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::VacantEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "next"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "prev"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageCollectionsHashmapValueEntry",
|
||||
"type": "{\"value\":\"u128\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "InkStorageCollectionsStashEntry",
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(AccountId,AccountId)\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup8",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 11,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 11,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 13,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,415 @@
|
||||
[
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 1,
|
||||
"lookupName": "InkStorageCollectionsStashHeader",
|
||||
"type": "{\"lastVacant\":\"u32\",\"len\":\"u32\",\"lenEntries\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Header",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lastVacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "len"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lenEntries"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 3,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"u32\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 4,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup4",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 4,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "{\"next\":\"u32\",\"prev\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::VacantEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "next"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "prev"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 5,
|
||||
"type": "{\"value\":\"AccountId\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId",
|
||||
"name": "value"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 7,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 8,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 8,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 9,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"AccountId\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 4,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup4",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "InkStorageCollectionsHashmapValueEntryEntry",
|
||||
"type": "{\"value\":\"u32\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageCollectionsStashEntry",
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(AccountId,AccountId)\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 4,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup4",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 12,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 12,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 13,
|
||||
"lookupName": "InkStorageCollectionsHashmapValueEntryOption",
|
||||
"type": "{\"value\":\"bool\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 14,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 14,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 15,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 16,
|
||||
"type": "Result<Null, Erc721Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 17,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 18,
|
||||
"lookupName": "Erc721Error",
|
||||
"type": "Lookup18"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 17,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 18,
|
||||
"lookupName": "Erc721Error",
|
||||
"type": "{\"_enum\":[\"NotOwner\",\"NotApproved\",\"TokenExists\",\"TokenNotFound\",\"CannotInsert\",\"CannotRemove\",\"CannotFetchValue\",\"NotAllowed\"]}",
|
||||
"docs": [],
|
||||
"namespace": "erc721::erc721::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "NotOwner"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "NotApproved"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 2,
|
||||
"name": "TokenExists"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 3,
|
||||
"name": "TokenNotFound"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 4,
|
||||
"name": "CannotInsert"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 5,
|
||||
"name": "CannotRemove"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 6,
|
||||
"name": "CannotFetchValue"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 7,
|
||||
"name": "NotAllowed"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "i32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,562 @@
|
||||
[
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 1,
|
||||
"lookupName": "InkStorageCollectionsStashHeader",
|
||||
"type": "{\"lastVacant\":\"u32\",\"len\":\"u32\",\"lenEntries\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Header",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lastVacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "len"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lenEntries"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 3,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(u32,AccountId)\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup8",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 4,
|
||||
"type": "(u32,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 4,
|
||||
"type": "(u32,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 6,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "{\"next\":\"u32\",\"prev\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::VacantEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "next"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "prev"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 9,
|
||||
"type": "{\"value\":\"Null\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 11,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"u32\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup8",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 12,
|
||||
"lookupName": "InkStorageCollectionsHashmapValueEntry",
|
||||
"type": "{\"value\":\"u32\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 13,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"MultisigPlainTransaction\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup8",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 14,
|
||||
"lookupName": "MultisigPlainTransaction",
|
||||
"type": "Lookup14",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 14,
|
||||
"lookupName": "MultisigPlainTransaction",
|
||||
"type": "{\"callee\":\"AccountId\",\"selector\":\"[u8;4]\",\"input\":\"Bytes\",\"transferredValue\":\"u128\",\"gasLimit\":\"u64\"}",
|
||||
"docs": [],
|
||||
"namespace": "multisig_plain::multisig_plain::Transaction",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId",
|
||||
"name": "callee"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 15,
|
||||
"type": "[u8;4]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 4,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"name": "selector"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 16,
|
||||
"type": "Bytes",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "input"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 17,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "transferredValue"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 18,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "gasLimit"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 15,
|
||||
"type": "[u8;4]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 4,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 16,
|
||||
"type": "Bytes",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 17,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 18,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "InkStorageCollectionsStashEntry",
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"AccountId\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup8",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Vec",
|
||||
"lookupIndex": 20,
|
||||
"type": "Vec<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 21,
|
||||
"type": "(u32,MultisigPlainConfirmationStatus)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 22,
|
||||
"lookupName": "MultisigPlainConfirmationStatus",
|
||||
"type": "Lookup22"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 22,
|
||||
"lookupName": "MultisigPlainConfirmationStatus",
|
||||
"type": "{\"_enum\":{\"Confirmed\":\"Null\",\"ConfirmationsNeeded\":\"u32\"}}",
|
||||
"docs": [],
|
||||
"namespace": "multisig_plain::multisig_plain::ConfirmationStatus",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "Confirmed"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"index": 1,
|
||||
"name": "ConfirmationsNeeded"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 23,
|
||||
"type": "Result<Null, Null>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 24,
|
||||
"type": "Result<Bytes, Null>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 16,
|
||||
"type": "Bytes",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 25,
|
||||
"type": "Result<Option<Bytes>, Null>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Option",
|
||||
"lookupIndex": 26,
|
||||
"type": "Option<Bytes>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 16,
|
||||
"type": "Bytes",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 26,
|
||||
"type": "Option<Bytes>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 16,
|
||||
"type": "Bytes",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,531 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 1,
|
||||
"lookupName": "InkStorageCollectionsStashHeader",
|
||||
"type": "{\"lastVacant\":\"u32\",\"len\":\"u32\",\"lenEntries\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Header",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lastVacant",
|
||||
"typeName": "Index"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "len",
|
||||
"typeName": "u32"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lenEntries",
|
||||
"typeName": "u32"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 3,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"AccountId\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"typeName": "VacantEntry",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId",
|
||||
"typeName": "T",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "{\"next\":\"u32\",\"prev\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::VacantEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "next",
|
||||
"typeName": "Index"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "prev",
|
||||
"typeName": "Index"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 8,
|
||||
"type": "{\"value\":\"u128\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value",
|
||||
"typeName": "V"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex",
|
||||
"typeName": "KeyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 9,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(AccountId,AccountId)\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"typeName": "VacantEntry",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 10,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
],
|
||||
"typeName": "T",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 10,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 13,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"u32\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"typeName": "VacantEntry",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"typeName": "T",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 14,
|
||||
"type": "{\"value\":\"u32\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value",
|
||||
"typeName": "V"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex",
|
||||
"typeName": "KeyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkStorageCollectionsStashEntry",
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(u32,AccountId)\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup7",
|
||||
"typeName": "VacantEntry",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 16,
|
||||
"type": "(u32,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
],
|
||||
"typeName": "T",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 16,
|
||||
"type": "(u32,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkStorageCollectionsHashmapValueEntry",
|
||||
"type": "{\"value\":\"Null\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 18,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value",
|
||||
"typeName": "V"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex",
|
||||
"typeName": "KeyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 18,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 19,
|
||||
"type": "Option<Text>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 20,
|
||||
"type": "Result<Null, ContractsErrorsPsp22Psp22Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 18,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "ContractsErrorsPsp22Psp22Error",
|
||||
"type": "Lookup21"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "ContractsErrorsPsp22Psp22Error",
|
||||
"type": "{\"_enum\":{\"Custom\":\"Text\",\"InsufficientBalance\":\"Null\",\"InsufficientAllowance\":\"Null\",\"ZeroRecipientAddress\":\"Null\",\"ZeroSenderAddress\":\"Null\",\"SafeTransferCheckFailed\":\"Text\"}}",
|
||||
"docs": [],
|
||||
"namespace": "contracts::traits::errors::psp22::PSP22Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"typeName": "Text",
|
||||
"index": 0,
|
||||
"name": "Custom"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 2,
|
||||
"name": "InsufficientAllowance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 3,
|
||||
"name": "ZeroRecipientAddress"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 4,
|
||||
"name": "ZeroSenderAddress"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"typeName": "Text",
|
||||
"index": 5,
|
||||
"name": "SafeTransferCheckFailed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 22,
|
||||
"type": "Bytes",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 23,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,205 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 1,
|
||||
"type": "{\"offsetKey\":\"InkPrimitivesKey\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"sub": [
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "InkPrimitivesKey",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "Key",
|
||||
"name": "offsetKey"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 3,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "InkPrimitivesKey",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "[u8;32]"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 6,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "{\"offsetKey\":\"InkPrimitivesKey\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"sub": [
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "InkPrimitivesKey",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "Key",
|
||||
"name": "offsetKey"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 7,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 8,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup10"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 11,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,205 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 1,
|
||||
"type": "{\"offsetKey\":\"InkPrimitivesKey\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"sub": [
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "InkPrimitivesKey",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "Key",
|
||||
"name": "offsetKey"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 3,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "InkPrimitivesKey",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "[u8;32]"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 6,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "{\"offsetKey\":\"InkPrimitivesKey\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"sub": [
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "InkPrimitivesKey",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "Key",
|
||||
"name": "offsetKey"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 7,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 8,
|
||||
"type": "Result<Null, TraitErc20Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "TraitErc20Erc20Error",
|
||||
"type": "Lookup10"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "TraitErc20Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "trait_erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 11,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,253 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 1,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 4,
|
||||
"type": "Result<u128, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 6,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 8,
|
||||
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Result",
|
||||
"lookupIndex": 9,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup10"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 9,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup10"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 11,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 13,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 14,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 15,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkEnvNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,253 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 1,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 4,
|
||||
"type": "Result<u128, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 6,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 8,
|
||||
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Result",
|
||||
"lookupIndex": 9,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup10"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 9,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup10"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 11,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 13,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 14,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 15,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkEnvNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,155 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 1,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 4,
|
||||
"type": "Result<bool, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 6,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 8,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 9,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 10,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkEnvNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,155 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 1,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 2,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 4,
|
||||
"type": "Result<bool, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 3,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup3"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 6,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 8,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 9,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 10,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkEnvNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,370 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 1,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 3,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 5,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 6,
|
||||
"lookupName": "InkStorageTraitsImplsAutoKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::AutoKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 10,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageTraitsImplsResolverKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 12,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 13,
|
||||
"lookupName": "Erc20",
|
||||
"type": "{\"totalSupply\":\"u128\",\"balances\":\"Null\",\"allowances\":\"InkStorageLazyMapping\"}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Erc20",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"name": "totalSupply",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"namespace": "",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "balances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 1,
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "allowances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 14,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup15"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 16,
|
||||
"type": "Result<u128, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup15"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 17,
|
||||
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Result",
|
||||
"lookupIndex": 18,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup19"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup15"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 18,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup19"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 20,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 21,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 22,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 23,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 24,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkEnvNoChainExtension"
|
||||
}
|
||||
]
|
||||
+370
@@ -0,0 +1,370 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 1,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 3,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 5,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 6,
|
||||
"lookupName": "InkStorageTraitsImplsAutoKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::AutoKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 10,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageTraitsImplsResolverKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 12,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 13,
|
||||
"lookupName": "Erc20",
|
||||
"type": "{\"totalSupply\":\"u128\",\"balances\":\"Null\",\"allowances\":\"InkStorageLazyMapping\"}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Erc20",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"name": "totalSupply",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"namespace": "",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "balances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 1,
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "allowances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 14,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup15"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 16,
|
||||
"type": "Result<u128, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup15"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 17,
|
||||
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Result",
|
||||
"lookupIndex": 18,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup19"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup15"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 18,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup19"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 20,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 21,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 22,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 23,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 24,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkEnvNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,370 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 1,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 3,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 5,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 6,
|
||||
"lookupName": "InkStorageTraitsImplsAutoKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::AutoKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 10,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageTraitsImplsResolverKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 12,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 13,
|
||||
"lookupName": "Erc20",
|
||||
"type": "{\"totalSupply\":\"u128\",\"balances\":\"Null\",\"allowances\":\"InkStorageLazyMapping\"}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Erc20",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"name": "totalSupply",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"namespace": "",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "balances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 1,
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "allowances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 14,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup15"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 16,
|
||||
"type": "Result<u128, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup15"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 17,
|
||||
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Result",
|
||||
"lookupIndex": 18,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup19"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup15"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 18,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup19"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 20,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 21,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 22,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 23,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 24,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkEnvNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,370 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 1,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 3,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 5,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 6,
|
||||
"lookupName": "InkStorageTraitsImplsAutoKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::AutoKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 10,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageTraitsImplsResolverKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 12,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 13,
|
||||
"lookupName": "Erc20",
|
||||
"type": "{\"totalSupply\":\"u128\",\"balances\":\"Null\",\"allowances\":\"InkStorageLazyMapping\"}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Erc20",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"name": "totalSupply",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"namespace": "",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "balances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 1,
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "allowances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 14,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup15"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 16,
|
||||
"type": "Result<u128, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup15"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 17,
|
||||
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Result",
|
||||
"lookupIndex": 18,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup19"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup15"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 18,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup19"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 19,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 20,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 21,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 22,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 23,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 24,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkEnvNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,174 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 1,
|
||||
"lookupName": "Flipper",
|
||||
"type": "{\"value\":\"bool\"}",
|
||||
"docs": [],
|
||||
"namespace": "flipper::flipper::Flipper",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"name": "value",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"namespace": "",
|
||||
"typeName": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 2,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 3,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 4,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup4"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 3,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 4,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 5,
|
||||
"type": "Result<bool, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 4,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup4"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 7,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 8,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 8,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 9,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 10,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 13,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkEnvNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,174 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 1,
|
||||
"lookupName": "Flipper",
|
||||
"type": "{\"value\":\"bool\"}",
|
||||
"docs": [],
|
||||
"namespace": "flipper::flipper::Flipper",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"name": "value",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"namespace": "",
|
||||
"typeName": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 2,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 3,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 4,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup4"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 3,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 4,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 5,
|
||||
"type": "Result<bool, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 4,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup4"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 7,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 8,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 8,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 9,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 10,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 11,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 13,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkEnvNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,418 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "U256",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::U256",
|
||||
"lookupNameRoot": "PrimitiveTypesU256"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 1,
|
||||
"type": "[u64;4]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 4,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 3,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"type": "[u8;20]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 20,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 7,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageTraitsImplsAutoKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::AutoKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 12,
|
||||
"type": "(H160,H160)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 13,
|
||||
"lookupName": "InkStorageTraitsImplsResolverKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 14,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "Erc20",
|
||||
"type": "{\"totalSupply\":\"U256\",\"balances\":\"Null\",\"allowances\":\"InkStorageLazyMapping\"}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Erc20",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"name": "totalSupply",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "U256",
|
||||
"namespace": "primitive_types::U256",
|
||||
"lookupNameRoot": "PrimitiveTypesU256",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "balances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 3,
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "allowances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 16,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup17"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 18,
|
||||
"type": "Result<U256, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "U256",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::U256",
|
||||
"lookupNameRoot": "PrimitiveTypesU256"
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup17"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 19,
|
||||
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Result",
|
||||
"lookupIndex": 20,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup21"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup17"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 20,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup21"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 22,
|
||||
"type": "Option<H160>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 23,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 24,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 25,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 26,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 27,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 28,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkPrimitivesNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,418 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "U256",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::U256",
|
||||
"lookupNameRoot": "PrimitiveTypesU256"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 1,
|
||||
"type": "[u64;4]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 4,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u64",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 3,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 5,
|
||||
"type": "[u8;20]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 20,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 7,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageTraitsImplsAutoKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::AutoKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 12,
|
||||
"type": "(H160,H160)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 13,
|
||||
"lookupName": "InkStorageTraitsImplsResolverKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ResolverKey"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"lookupIndex": 14,
|
||||
"lookupName": "InkStorageTraitsImplsManualKey",
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage_traits::impls::ManualKey"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 15,
|
||||
"lookupName": "Erc20",
|
||||
"type": "{\"totalSupply\":\"U256\",\"balances\":\"Null\",\"allowances\":\"InkStorageLazyMapping\"}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Erc20",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"name": "totalSupply",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "U256",
|
||||
"namespace": "primitive_types::U256",
|
||||
"lookupNameRoot": "PrimitiveTypesU256",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "balances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 3,
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"name": "allowances",
|
||||
"info": "Null",
|
||||
"lookupIndex": 11,
|
||||
"lookupName": "InkStorageLazyMapping",
|
||||
"type": "Null",
|
||||
"namespace": "ink_storage::lazy::mapping::Mapping",
|
||||
"typeName": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 16,
|
||||
"type": "Result<Null, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup17"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::LangError",
|
||||
"sub": [
|
||||
{
|
||||
"index": 0,
|
||||
"info": "Null",
|
||||
"name": "__Unused0",
|
||||
"type": "Null"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 18,
|
||||
"type": "Result<U256, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "U256",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::U256",
|
||||
"lookupNameRoot": "PrimitiveTypesU256"
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup17"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 19,
|
||||
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Result",
|
||||
"lookupIndex": 20,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup21"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 17,
|
||||
"lookupName": "InkPrimitivesLangError",
|
||||
"type": "Lookup17"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Result",
|
||||
"lookupIndex": 20,
|
||||
"type": "Result<Null, Erc20Error>",
|
||||
"docs": [],
|
||||
"namespace": "Result",
|
||||
"sub": [
|
||||
{
|
||||
"name": "Ok",
|
||||
"info": "Null",
|
||||
"lookupIndex": 10,
|
||||
"type": "Null",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"name": "Error",
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "Lookup21"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 21,
|
||||
"lookupName": "Erc20Error",
|
||||
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
|
||||
"docs": [],
|
||||
"namespace": "erc20::erc20::Error",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 22,
|
||||
"type": "Option<H160>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "H160",
|
||||
"docs": [],
|
||||
"namespace": "primitive_types::H160",
|
||||
"lookupNameRoot": "PrimitiveTypesH160"
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 23,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::AccountId",
|
||||
"lookupNameRoot": "InkPrimitivesAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 24,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 6,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 25,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 26,
|
||||
"type": "Hash",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::Hash",
|
||||
"lookupNameRoot": "InkPrimitivesHash"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 27,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 28,
|
||||
"type": "NoChainExtension",
|
||||
"docs": [],
|
||||
"namespace": "ink_primitives::types::NoChainExtension",
|
||||
"lookupNameRoot": "InkPrimitivesNoChainExtension"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "u256",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,54 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "u256",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 3,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 4,
|
||||
"lookupName": "AccountId",
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,303 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "i32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 4,
|
||||
"lookupName": "EnumExampleVariant",
|
||||
"type": "{\"_enum\":{\"None\":\"Null\",\"Weekday\":\"EnumExampleWeekday\",\"TupleMaybeSigned\":\"EnumExampleTupleMaybeSigned\",\"NamedMaybeSigned\":\"EnumExampleNamedMaybeSigned\",\"Color\":\"EnumExampleColor\"}}",
|
||||
"docs": [],
|
||||
"namespace": "enum_example::enum_example::Variant",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "None"
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "EnumExampleWeekday",
|
||||
"type": "Lookup5",
|
||||
"index": 1,
|
||||
"name": "Weekday"
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 6,
|
||||
"lookupName": "EnumExampleTupleMaybeSigned",
|
||||
"type": "Lookup6",
|
||||
"index": 2,
|
||||
"name": "TupleMaybeSigned"
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "EnumExampleNamedMaybeSigned",
|
||||
"type": "Lookup7",
|
||||
"index": 3,
|
||||
"name": "NamedMaybeSigned"
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "EnumExampleColor",
|
||||
"type": "Lookup8",
|
||||
"index": 4,
|
||||
"name": "Color"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 5,
|
||||
"lookupName": "EnumExampleWeekday",
|
||||
"type": "{\"_enum\":[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\",\"Sunday\"]}",
|
||||
"docs": [],
|
||||
"namespace": "enum_example::enum_example::Weekday",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "Monday"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "Tuesday"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 2,
|
||||
"name": "Wednesday"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 3,
|
||||
"name": "Thursday"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 4,
|
||||
"name": "Friday"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 5,
|
||||
"name": "Saturday"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 6,
|
||||
"name": "Sunday"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 6,
|
||||
"lookupName": "EnumExampleTupleMaybeSigned",
|
||||
"type": "{\"_enum\":{\"Signed\":\"i32\",\"Unsigned\":\"u32\"}}",
|
||||
"docs": [],
|
||||
"namespace": "enum_example::enum_example::TupleMaybeSigned",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "i32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"index": 0,
|
||||
"name": "Signed"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"index": 1,
|
||||
"name": "Unsigned"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 7,
|
||||
"lookupName": "EnumExampleNamedMaybeSigned",
|
||||
"type": "{\"_enum\":{\"Signed\":\"{\\\"value\\\":\\\"i32\\\"}\",\"Unsigned\":\"{\\\"value\\\":\\\"u32\\\"}\"}}",
|
||||
"docs": [],
|
||||
"namespace": "enum_example::enum_example::NamedMaybeSigned",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Struct",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "i32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value"
|
||||
}
|
||||
],
|
||||
"type": "{\"value\":\"i32\"}",
|
||||
"index": 0,
|
||||
"name": "Signed"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 2,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value"
|
||||
}
|
||||
],
|
||||
"type": "{\"value\":\"u32\"}",
|
||||
"index": 1,
|
||||
"name": "Unsigned"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "EnumExampleColor",
|
||||
"type": "{\"_enum\":{\"Red\":\"Null\",\"Blue\":\"Null\",\"Green\":\"Null\",\"Yellow\":\"Null\",\"Rgb\":\"{\\\"r\\\":\\\"u8\\\",\\\"g\\\":\\\"u8\\\",\\\"b\\\":\\\"u8\\\"}\",\"Rgba\":\"{\\\"r\\\":\\\"u8\\\",\\\"g\\\":\\\"u8\\\",\\\"b\\\":\\\"u8\\\",\\\"a\\\":\\\"u8\\\"}\"}}",
|
||||
"docs": [],
|
||||
"namespace": "enum_example::enum_example::Color",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "Red"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 1,
|
||||
"name": "Blue"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 2,
|
||||
"name": "Green"
|
||||
},
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 3,
|
||||
"name": "Yellow"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "r"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "g"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "b"
|
||||
}
|
||||
],
|
||||
"type": "{\"r\":\"u8\",\"g\":\"u8\",\"b\":\"u8\"}",
|
||||
"index": 4,
|
||||
"name": "Rgb"
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "r"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "g"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "b"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "a"
|
||||
}
|
||||
],
|
||||
"type": "{\"r\":\"u8\",\"g\":\"u8\",\"b\":\"u8\",\"a\":\"u8\"}",
|
||||
"index": 5,
|
||||
"name": "Rgba"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,27 @@
|
||||
[
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 1,
|
||||
"lookupName": "RecursiveMyEnum",
|
||||
"type": "{\"_enum\":{\"A\":\"Null\",\"B\":\"RecursiveMyEnum\"}}",
|
||||
"docs": [],
|
||||
"namespace": "recursive::MyEnum",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Null",
|
||||
"type": "Null",
|
||||
"index": 0,
|
||||
"name": "A"
|
||||
},
|
||||
{
|
||||
"info": "Si",
|
||||
"lookupIndex": 1,
|
||||
"lookupName": "RecursiveMyEnum",
|
||||
"type": "Lookup1",
|
||||
"typeName": "MyEnum",
|
||||
"index": 1,
|
||||
"name": "B"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,260 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 2,
|
||||
"lookupName": "InkStorageCollectionsStashHeader",
|
||||
"type": "{\"lastVacant\":\"u32\",\"len\":\"u32\",\"lenEntries\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Header",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lastVacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "len"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "lenEntries"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 4,
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"AccountId\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup8",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId",
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 6,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 7,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "{\"next\":\"u32\",\"prev\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::VacantEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "next"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "prev"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 9,
|
||||
"lookupName": "InkStorageCollectionsHashmapValueEntry",
|
||||
"type": "{\"value\":\"u128\",\"keyIndex\":\"u32\"}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::hashmap::ValueEntry",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "value"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 3,
|
||||
"type": "u32",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"name": "keyIndex"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Enum",
|
||||
"lookupIndex": 10,
|
||||
"lookupName": "InkStorageCollectionsStashEntry",
|
||||
"type": "{\"_enum\":{\"Vacant\":\"InkStorageCollectionsStashVacantEntry\",\"Occupied\":\"(AccountId,AccountId)\"}}",
|
||||
"docs": [],
|
||||
"namespace": "ink_storage::collections::stash::Entry",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"info": "Si",
|
||||
"lookupIndex": 8,
|
||||
"lookupName": "InkStorageCollectionsStashVacantEntry",
|
||||
"type": "Lookup8",
|
||||
"index": 0,
|
||||
"name": "Vacant"
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 11,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Occupied"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Tuple",
|
||||
"lookupIndex": 11,
|
||||
"type": "(AccountId,AccountId)",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 12,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 13,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Option",
|
||||
"lookupIndex": 14,
|
||||
"type": "Option<AccountId>",
|
||||
"docs": [],
|
||||
"namespace": "Option",
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "AccountId",
|
||||
"docs": [],
|
||||
"namespace": "ink_env::types::AccountId",
|
||||
"lookupNameRoot": "InkEnvAccountId"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,71 @@
|
||||
[
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 1,
|
||||
"type": "Text",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 2,
|
||||
"type": "[u8;32]",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"info": "Struct",
|
||||
"lookupIndex": 3,
|
||||
"type": "{\"inner\":\"[u8;32]\"}",
|
||||
"docs": [],
|
||||
"namespace": "",
|
||||
"sub": [
|
||||
{
|
||||
"docs": [],
|
||||
"name": "inner",
|
||||
"info": "VecFixed",
|
||||
"lookupIndex": 2,
|
||||
"type": "[u8;32]",
|
||||
"namespace": "",
|
||||
"length": 32,
|
||||
"sub": {
|
||||
"info": "Plain",
|
||||
"lookupIndex": 0,
|
||||
"type": "u8",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
"typeName": "FixedArray32"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 4,
|
||||
"type": "u128",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
},
|
||||
{
|
||||
"info": "Plain",
|
||||
"lookupIndex": 5,
|
||||
"type": "bool",
|
||||
"docs": [],
|
||||
"namespace": ""
|
||||
}
|
||||
]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,20 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import ink from './ink/index.js';
|
||||
import solang from './solang/index.js';
|
||||
import user from './user/index.js';
|
||||
|
||||
const all: Record<string, Record<string, unknown>> = {};
|
||||
|
||||
Object
|
||||
.entries({ ink, solang, user })
|
||||
.forEach(([type, abis]) =>
|
||||
Object
|
||||
.entries(abis)
|
||||
.forEach(([name, abi]): void => {
|
||||
all[`${type}_${name}`] = abi;
|
||||
})
|
||||
);
|
||||
|
||||
export default all;
|
||||
@@ -0,0 +1,13 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import { createVersionedExport } from '../util.js';
|
||||
import * as v0 from './v0/index.js';
|
||||
import * as v1 from './v1/index.js';
|
||||
import * as v2 from './v2/index.js';
|
||||
import * as v3 from './v3/index.js';
|
||||
import * as v4 from './v4/index.js';
|
||||
import * as v5 from './v5/index.js';
|
||||
import * as v6 from './v6/index.js';
|
||||
|
||||
export default createVersionedExport({ v0, v1, v2, v3, v4, v5, v6 });
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,252 @@
|
||||
{
|
||||
"metadataVersion": "0.1.0",
|
||||
"source": {
|
||||
"hash": "0x939d1823be952b4d7114448bb1a27fa13bafb8c4b33149efc24e826d8e54035e",
|
||||
"language": "ink! 3.0.0-rc1",
|
||||
"compiler": "rustc 1.48.0-nightly"
|
||||
},
|
||||
"contract": {
|
||||
"name": "delegator",
|
||||
"version": "3.0.0-rc1",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "init_value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"i32"
|
||||
],
|
||||
"type": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "accumulator_code_hash",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Hash"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "adder_code_hash",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Hash"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "subber_code_hash",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Hash"
|
||||
],
|
||||
"type": 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"
|
||||
],
|
||||
"type": 4
|
||||
},
|
||||
"selector": "0x1e5ca456"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "by",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"i32"
|
||||
],
|
||||
"type": 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": {
|
||||
"dispatchKey": "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"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,713 @@
|
||||
{
|
||||
"metadataVersion": "0.1.0",
|
||||
"source": {
|
||||
"hash": "0xcf3eee6ac5d38f6f503293735a72b011960e09ec1dd09185ab3c3d28e7770009",
|
||||
"language": "ink! 3.0.0-rc1",
|
||||
"compiler": "rustc 1.48.0-nightly"
|
||||
},
|
||||
"contract": {
|
||||
"name": "dns",
|
||||
"version": "3.0.0-rc1",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"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"
|
||||
],
|
||||
"type": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "from",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 9
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Emitted whenever a new name is being registered."
|
||||
],
|
||||
"name": "Register"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "name",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Hash"
|
||||
],
|
||||
"type": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": false,
|
||||
"name": "from",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 9
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "old_address",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Option"
|
||||
],
|
||||
"type": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "new_address",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 9
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Emitted whenever an address changes."
|
||||
],
|
||||
"name": "SetAddress"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "name",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Hash"
|
||||
],
|
||||
"type": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": false,
|
||||
"name": "from",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 9
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "old_owner",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Option"
|
||||
],
|
||||
"type": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "new_owner",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 9
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Emitted whenver a name is being transferred."
|
||||
],
|
||||
"name": "Transfer"
|
||||
}
|
||||
],
|
||||
"messages": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "name",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Hash"
|
||||
],
|
||||
"type": 4
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Register specific name with caller as owner."
|
||||
],
|
||||
"mutates": true,
|
||||
"name": [
|
||||
"register"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"Result"
|
||||
],
|
||||
"type": 10
|
||||
},
|
||||
"selector": "0x7fb0aded"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "name",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Hash"
|
||||
],
|
||||
"type": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "new_address",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 9
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Set address for specific name."
|
||||
],
|
||||
"mutates": true,
|
||||
"name": [
|
||||
"set_address"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"Result"
|
||||
],
|
||||
"type": 10
|
||||
},
|
||||
"selector": "0x220ac6e3"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "name",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Hash"
|
||||
],
|
||||
"type": 4
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 9
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Transfer owner to another address."
|
||||
],
|
||||
"mutates": true,
|
||||
"name": [
|
||||
"transfer"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"Result"
|
||||
],
|
||||
"type": 10
|
||||
},
|
||||
"selector": "0xfae3a09d"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "name",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Hash"
|
||||
],
|
||||
"type": 4
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
" Get address for specific name."
|
||||
],
|
||||
"mutates": false,
|
||||
"name": [
|
||||
"get_address"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 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": {
|
||||
"cellsPerElem": 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": {
|
||||
"cellsPerElem": 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"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,704 @@
|
||||
{
|
||||
"metadataVersion": "0.1.0",
|
||||
"source": {
|
||||
"hash": "0xe9c60864c76c770865b66c79aa304bc22d2d08cc799d36310df4256db107b8fc",
|
||||
"language": "ink! 3.0.0-rc1",
|
||||
"compiler": "rustc 1.48.0-nightly"
|
||||
},
|
||||
"contract": {
|
||||
"name": "erc20",
|
||||
"version": "3.0.0-rc1",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "initial_supply",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"name": [
|
||||
"new"
|
||||
],
|
||||
"selector": "0xd183512b"
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"events": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "from",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Option"
|
||||
],
|
||||
"type": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "to",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Option"
|
||||
],
|
||||
"type": 13
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"name": "Transfer"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "owner",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "spender",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"name": "value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"name": "Approval"
|
||||
}
|
||||
],
|
||||
"messages": [
|
||||
{
|
||||
"args": [],
|
||||
"docs": [],
|
||||
"mutates": false,
|
||||
"name": [
|
||||
"total_supply"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0xdcb736b5"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "owner",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"mutates": false,
|
||||
"name": [
|
||||
"balance_of"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0x56e929b2"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "owner",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "spender",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"mutates": false,
|
||||
"name": [
|
||||
"allowance"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0xf3cfff66"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "to",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"mutates": true,
|
||||
"name": [
|
||||
"transfer"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 12
|
||||
},
|
||||
"selector": "0xfae3a09d"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "spender",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"mutates": true,
|
||||
"name": [
|
||||
"approve"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 12
|
||||
},
|
||||
"selector": "0x03d0e114"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "from",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"mutates": true,
|
||||
"name": [
|
||||
"transfer_from"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 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": {
|
||||
"cellsPerElem": 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": {
|
||||
"cellsPerElem": 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"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"metadataVersion": "0.1.0",
|
||||
"source": {
|
||||
"hash": "0x98086d5ccadd437459b812682380250f51a3034272cd1108e499acc0cafe9f42",
|
||||
"language": "ink! 3.0.0-rc2",
|
||||
"compiler": "rustc 1.49.0-nightly",
|
||||
"wasm": "0x0061736d01000000012c0860027f7f0060037f7f7f0060017f017f60017f006000017f60037f7f7f017f60047f7f7f7f0060017f017e02880106057365616c30107365616c5f6765745f73746f726167650005057365616c30107365616c5f7365745f73746f726167650001057365616c30167365616c5f76616c75655f7472616e736665727265640000057365616c300a7365616c5f696e7075740000057365616c300b7365616c5f72657475726e000103656e76066d656d6f72790201021003121102020002000100070303060402040503010608017f01418080040b071102066465706c6f7900100463616c6c00120a8e1111c90101017f230041406a22012400200141206a200041186a290300370300200141186a200041106a290300370300200141106a200041086a2903003703002001420037032820012000290300370308200141086a1006200141808001360234200141a4800436023020014180800136023841a48004200141386a10002100200141306a20012802381007024002400240024020000e0401000002000b000b20012001290330370338200141386a100841ff017122004102470d01000b000b200141406b240020004100470b6001037e200029032021012000420137032020002001200029030022027c22013703002000200029030822032001200254ad7c22013703082000200029031022022001200354ad7c2201370310200020002903182001200254ad7c37031820000b4901037f230041106b22022400200028020421032000410036020420002802002104200041a48004360200200241086a200120042003100f20002002290308370200200241106a24000b4201027f230041106b22012400200141086a2000100b20012d0009210020012d00082102200141106a240041024101410220004101461b410020001b20024101711b0b8f0101017f230041406a22022400200241206a200141186a290300370300200241186a200141106a290300370300200241106a200141086a2903003703002002420037032820022001290300370308200241086a1006200241386a41808001360200200241a48004360234200241003602302002200241306a2000100a200228020020022802041001200241406b24000b9d0101037f230041106b22032400200141086a220428020021052004410036020020012802042104200141a48004360204200320023a000f2003410120042005100f024020032802044101460440200328020020032d000f3a000020014100360208200141a480043602042005450d0120012005417f6a3602082001200441016a3602042000410136020420002004360200200341106a24000f0b000b000b4801027f230041106b22022400200241003a000f024020012002410f6a4101101345044020022d000f21010c010b410121030b200020013a0001200020033a0000200241106a24000b890101027f230041106b22012400200142003c000c200142003e0208027f0340200241044604402001280208210241000c020b20012000100b20012d0000410171450440200141086a20026a20012d00013a00002001200241016a22023a000c0c010b0b200241ff01710440200141003a000c0b4100210241010b200141106a2400ad2002ad420886840b2201017f230041106b220124002001200036020c2001410c6a2802002d0000100e000b4601017f230041206b22012400200141186a41808001360200200141a4800436021420014100360210200141086a200141106a2000100a41002001280208200128020c1004000b2300410020014d0440200320014f044020002001360204200020023602000f0b000b000b15004100101141ff0171410274418080046a2802000bd80502057f017e230041306b220124000240027f024002402000044020014180800136020c200141a48004360208200141086a10142001200129030837031041012103200141106a100c2206a722054101710440410121020c030b200642ffffffffff1f832206422088a721002006421888a721042006421088a72102200541087641ff01712205411e470440200541c00147200041f3014772200241ff017141960147720d0241002102200441ff017141a501460d030c020b200041d60047200241ff017141dc0047720d014100210241002103200441ff017141a401470d010c020b20014180800136020c200141a48004360208200141086a101420012001290308370310410321020240200141106a100c2206a722044101710d00200642ffffffffff1f832206422088a721002006421888a721032006421088a7210202400240200441087641ff0171220441ea00470440200441d101472000412b4772200241ff017141830147720d02200341ff017141d100460d010c020b200041e20147200241ff0171413747720d0141022102200341ff01714112470d010c020b41032102200141106a100841ff017122004102460d01200041004721020c010b410321020b4106200241034622030d021a4106200220031b22024102460440200141286a4200370300200141206a4200370300200141186a4200370300200142003703104100200141106a100941080c030b200141286a4200370300200141206a4200370300200141186a4200370300200142003703102002410171200141106a100941080c020b41012102410121030b410620020d001a2003450d01200141286a4200370300200141206a4200370300200141186a420037030020014200370310200141106a1005410173200141106a100941080b200141306a24000f0b200141286a4200370300200141206a4200370300200141186a4200370300200142003703102001200141106a10053a0008200141086a100d000ba90102027f027e230041206b22002400200041808001360204200041a4800436020020004180800136021041a48004200041106a100220002000280210100720002000290300370308200041186a2201420037030020004200370310027f4101200041086a200041106a411010130d001a200129030021022000290310210341000b200220038450457245044041011011200041206a240041ff0171410274418080046a2802000f0b000b45000240200028020420024f047f2001200028020020021015200028020422012002490d012000200120026b3602042000200028020020026a36020041000541010b0f0b000b3301017f230041106b220124002001200028020436020c20002802002001410c6a10032000200128020c1007200141106a24000b2c01017f037f2002200346047f200005200020036a200120036a2d00003a0000200341016a21030c010b0b1a0b0b250100418080040b1d0100000002000000030000000400000005000000060000000700000008"
|
||||
},
|
||||
"contract": {
|
||||
"name": "flipper",
|
||||
"version": "3.0.0-rc2",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "init_value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 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"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0x1e5ca456"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"cell": {
|
||||
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"ty": 1
|
||||
}
|
||||
},
|
||||
"name": "value"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"def": {
|
||||
"primitive": "bool"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"metadataVersion": "0.1.0",
|
||||
"source": {
|
||||
"hash": "0xb6b5fa9791b27da76f1046de45d57bb835a8dfc44f21b223d8d6bb88e5eb5141",
|
||||
"language": "ink! 3.0.0-rc1",
|
||||
"compiler": "rustc 1.48.0-nightly"
|
||||
},
|
||||
"contract": {
|
||||
"name": "flipper",
|
||||
"version": "3.0.0-rc1",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "init_value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 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"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0x1e5ca456"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"cell": {
|
||||
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"ty": 1
|
||||
}
|
||||
},
|
||||
"name": "value"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"def": {
|
||||
"primitive": "bool"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"metadataVersion": "0.1.0",
|
||||
"source": {
|
||||
"hash": "0x8b30429ee0f4dc19cec91b09d186c805eaac6615492c1edf3bc1efaff0b7fecf",
|
||||
"language": "ink! 3.0.0-rc1",
|
||||
"compiler": "rustc 1.48.0-nightly"
|
||||
},
|
||||
"contract": {
|
||||
"name": "incrementer",
|
||||
"version": "3.0.0-rc1",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "init_value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"i32"
|
||||
],
|
||||
"type": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"name": [
|
||||
"new"
|
||||
],
|
||||
"selector": "0xd183512b"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"docs": [],
|
||||
"name": [
|
||||
"default"
|
||||
],
|
||||
"selector": "0x6a3712e2"
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"events": [],
|
||||
"messages": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "by",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"i32"
|
||||
],
|
||||
"type": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"mutates": true,
|
||||
"name": [
|
||||
"inc"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": null,
|
||||
"selector": "0x2fb8d143"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"docs": [],
|
||||
"mutates": false,
|
||||
"name": [
|
||||
"get"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"i32"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0x1e5ca456"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"cell": {
|
||||
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"ty": 1
|
||||
}
|
||||
},
|
||||
"name": "value"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"def": {
|
||||
"primitive": "i32"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as delegator } from './delegator.json' assert { type: 'json' };
|
||||
export { default as dns } from './dns.json' assert { type: 'json' };
|
||||
export { default as erc20 } from './erc20.json' assert { type: 'json' };
|
||||
export { default as erc721 } from './erc721.json' assert { type: 'json' };
|
||||
export { default as flipperBundle } from './flipper.contract.json' assert { type: 'json' };
|
||||
export { default as flipper } from './flipper.json' assert { type: 'json' };
|
||||
export { default as incrementer } from './incrementer.json' assert { type: 'json' };
|
||||
export { default as multisigPlain } from './multisig_plain.json' assert { type: 'json' };
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,103 @@
|
||||
{
|
||||
"metadataVersion": "0.1.0",
|
||||
"source": {
|
||||
"hash": "0x568432b99f4ebd39ec03c2caaf69992b248999cc857326174b220b5587c3515f",
|
||||
"language": "ink! 3.0.0-rc1",
|
||||
"compiler": "rustc 1.48.0-nightly"
|
||||
},
|
||||
"contract": {
|
||||
"name": "flipper",
|
||||
"version": "3.0.0-rc1",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
" Creates a new flipper smart contract initialized to `false`."
|
||||
],
|
||||
"name": [
|
||||
"default"
|
||||
],
|
||||
"selector": "0x6a3712e2"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "init_value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 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"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0x6b3549bc"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"cell": {
|
||||
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"ty": 1
|
||||
}
|
||||
},
|
||||
"name": "value"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"def": {
|
||||
"primitive": "bool"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,111 @@
|
||||
{
|
||||
"source": {
|
||||
"hash": "0x7c5ff777929185b2350605e8f0163bfa25781097ad9ee2704c67021962720135",
|
||||
"language": "ink! 3.0.0-rc5",
|
||||
"compiler": "rustc 1.57.0-nightly",
|
||||
"wasm": "0x0061736d01000000012b0860027f7f0060037f7f7f0060017f017f60000060037f7f7f017f60017f0060047f7f7f7f0060017f017e02880106057365616c30107365616c5f6765745f73746f726167650004057365616c30107365616c5f7365745f73746f726167650001057365616c30167365616c5f76616c75655f7472616e736665727265640000057365616c300a7365616c5f696e7075740000057365616c300b7365616c5f72657475726e000103656e76066d656d6f727902010210030e0d020002000100070603020304050608017f01418080040b071102066465706c6f79000d0463616c6c000f0ac60f0dc60101017f230041406a22012400200141206a200041186a290300370300200141186a200041106a290300370300200141106a200041086a2903003703002001420137032820012000290300370308200141808001360234200141808004360230200141808001360238200141086a41808004200141386a10002100200141306a2001280238100602400240024020000e0402000001000b000b000b20012001290330370338200141386a100741ff017122004102470440200141406b240020004100470f0b000b3101017f230041106b22022400200241086a200120002802002000280204100c20002002290308370200200241106a24000b4201027f230041106b22012400200141086a2000100a20012d0009210020012d00082102200141106a240041024101410220004101461b410020001b20024101711b0b8d0101017f230041406a22022400200241206a200141186a290300370300200241186a200141106a290300370300200241106a200141086a2903003703002002420137032820022001290300370308200241386a41808001360200200241808004360234200241003602302002200241306a20001009200241086a200228020020022802041001200241406b24000b9d0101037f230041106b22032400200141086a220428020021052004410036020020012802042104200141808004360204200320023a000f2003410120042005100c024020032802044101460440200328020020032d000f3a0000200141003602082001418080043602042005450d012001200541016b3602082001200441016a3602042000410136020420002004360200200341106a24000f0b000b000b3f01027f230041106b22022400200241003a000f200020012002410f6a410110102201047f41000520022d000f0b3a0001200020013a0000200241106a24000b900102027f017e230041106b220124002001420037030841042102027f02400340200241084604402001410436020820012903082203a741044f0d02000b20012000100a20012d0000410171450440200141086a20026a20012d00013a0000200241016a21020c010b0b4101210241000c010b410021022003422088a70b2100200141106a24002002ad2000ad420886840b1a00200120034d044020002001360204200020023602000f0b000b11004100100e41ff01714108470440000b0ba80602057f017e230041306b22012400027f02400240200045044020014180800136020c200141808004360208200141086a10112001200129030837031041032100200141106a100b2206a722034101710d02200642ffffffffff1f832206422088a721022006421888a721002006421088a721040240200341087641ff01712203419b01470440200341ed01460d010c030b200441ff017141ae0147200041ff0171419d014772200241de0047720d024103200141106a100741ff0171220020004102461b21000c030b200441ff017141cb0047200041ff0171419d0147720d01410221002002411b470d010c020b20014180800136020c200141808004360208200141086a101120012001290308370310410121020240200141106a100b2206a722054101710440410121000c010b200642ffffffffff1f832206422088a721042006421888a721002006421088a721030240200541087641ff01712205412f470440200541e30047200341ff0171413a4772200041ff017141a50147720d0141002100200441d100470d010c020b200341ff017141860147200041ff017141db0047720d004100210041002102200441d901460d010b41012100410121020b410620000d021a20020440200141286a4200370300200141206a4200370300200141186a420037030020014200370310200141106a1005410173200141106a100841080c030b200141286a4200370300200141206a4200370300200141186a4200370300200142003703102001200141106a10053a0008230041106b220024002000200141086a36020c2000410c6a2802002d00002101230041206b22002400200041186a4180800136020020004180800436021420004100360210200041086a200041106a2001100941002000280208200028020c1004000b410321000b4106200041034622020d001a4106200020021b22004102470440200141286a4200370300200141206a4200370300200141186a4200370300200142003703102000410171200141106a100841080c010b200141286a4200370300200141206a4200370300200141186a4200370300200142003703104100200141106a100841080b200141306a24000ba30102037f017e230041206b2200240020004180800136020420004180800436020020004180800136021041808004200041106a100220002000280210100620002000290300370308200041186a22014200370300200042003703100240200041086a200041106a411010102202047e4200052000290310210320012903000b20038450452002724504404101100e41ff01714108470d01200041206a24000f0b000b000b5701057f200028020422042002492205450440200028020022062107034020022003470440200120036a200320076a2d00003a0000200341016a21030c010b0b2000200420026b3602042000200220066a3602000b20050b3301017f230041106b220124002001200028020436020c20002802002001410c6a10032000200128020c1006200141106a24000b"
|
||||
},
|
||||
"contract": {
|
||||
"name": "flipper",
|
||||
"version": "3.0.0-rc5",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"V1": {
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"name": "init_value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized with the given value."
|
||||
],
|
||||
"name": [
|
||||
"new"
|
||||
],
|
||||
"selector": "0x9bae9d5e"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized to `false`."
|
||||
],
|
||||
"name": [
|
||||
"default"
|
||||
],
|
||||
"selector": "0xed4b9d1b"
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"events": [],
|
||||
"messages": [
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
" Flips the current value of the Flipper's boolean."
|
||||
],
|
||||
"mutates": true,
|
||||
"name": [
|
||||
"flip"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": null,
|
||||
"selector": "0x633aa551"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
" Returns the current value of the Flipper's boolean."
|
||||
],
|
||||
"mutates": false,
|
||||
"name": [
|
||||
"get"
|
||||
],
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 0
|
||||
},
|
||||
"selector": "0x2f865bd9"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"cell": {
|
||||
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"ty": 0
|
||||
}
|
||||
},
|
||||
"name": "value"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"id": 0,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "bool"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as flipper } from './flipper.contract.json' assert { type: 'json' };
|
||||
// A complex contract example with traits.
|
||||
export { default as psp22 } from './psp22_minter_pauser.contract.json' assert { type: 'json' };
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as erc20 } from './erc20.contract.json' assert { type: 'json' };
|
||||
export { default as flipper } from './flipper.contract.json' assert { type: 'json' };
|
||||
@@ -0,0 +1,105 @@
|
||||
{
|
||||
"source": {
|
||||
"hash": "0xbb381c2fc980121b17c7b2bf2756d5964a12151cb846e0a9eff9cc337806456d",
|
||||
"language": "ink! 3.0.0-rc7",
|
||||
"compiler": "rustc 1.60.0-nightly",
|
||||
"wasm": "0x0061736d0100000001280860027f7f0060000060037f7f7f0060017f006000017f60017f017f60037f7f7f017f60017f017e02880106057365616c30107365616c5f7365745f73746f726167650002057365616c30107365616c5f6765745f73746f726167650006057365616c300a7365616c5f696e7075740000057365616c300b7365616c5f72657475726e0002057365616c30167365616c5f76616c75655f7472616e73666572726564000003656e76066d656d6f727902010210030a090400050103070001000608017f01418080040b071102066465706c6f7900080463616c6c000c0ac40b096102027f027e230041206b22002400200041106a22014200370300200042003703082000411036021c200041086a2000411c6a1004200028021c41114f0440000b2001290300210220002903082103200041206a2400410541042002200384501b0bc20101027f230041306b220224004101210302402000027f20014101714504404104100541ff01714105470d011a0b200241106a4200370300200241186a4200370300200241206a42003703002002420037030820024201370300200241808001360228200241086a41808004200241286a100120022802282201418180014f720d012002200136022c200241808004360228200241286a100741ff017122014102460d014100210320014100470b3a0001200020033a0000200241306a24000f0b000b4201027f230041106b22012400200141086a2000100d20012d0009210020012d00082102200141106a240041024101410220004101461b410020001b20024101711b0bd30202057f027e230041306b2200240020004180800136020c200041808004360208200041086a1009200020002903083703100240200041106a100a22054201832206a70d00200542807e8342002006501b22064280feffffff1f832205422088a721012005421888a721022005421088a7210302402006a741087641ff0171220441ed014704402004419b0147200341ff017141ae014772200241ff0171419d0147200141de004772720d02200041106a100741ff017122014102460d02100541ff01714105470d02200041286a4200370300200041206a4200370300200041186a4200370300200042003703102001410171200041106a100b0c010b200341ff017141cb0047200241ff0171419d0147722001411b47720d01200041286a4200370300200041206a4200370300200041186a4200370300200042003703104100200041106a100b0b200041306a24000f0b000b4101027f230041106b2201240020012000280204220236020c20002802002001410c6a10022002200128020c2202490440000b20002002360204200141106a24000b850102027f017e230041106b220124002001420437030841042102027f02400240034020012000100d20012d00004101710d01200141086a20026a20012d00013a0000200241016a22024108470d000b20012903082203a741044f0d01000b4101210241000c010b410021022003422088a70b2100200141106a24002002ad2000ad420886840b6b01017f230041306b220224004180800420003a0000200241286a200141186a290000370300200241206a200141106a290000370300200241186a200141086a2900003703002002420137030820022001290000370310200241106a4180800441011000200241306a24000b910302057f027e230041406a22002400024002400240100541ff01714105470d0020004180800136021c200041808004360218200041186a100920002000290318370320027f0240200041206a100a22054201832206a70d00200542807e8342002006501b22064280feffffff1f832205422088a721022005421888a721012005421088a721032006a741087641ff01712204412f470440200441e30047200341ff0171413a4772200141ff017141a50147200241d1004772720d014101210141000c020b200341ff017141860147200141ff017141db0047720d00410021014100200241d901460d011a0b4101210141010b0d00024020010440200041086a418002100620002d0009210120002d00084101710d01200041386a4200370300200041306a4200370300200041286a4200370300200042003703202001417f73410171200041206a100b0c040b200041106a4100100620002d0011210120002d0010410171450d020b20014105460d020b000b4180800420014101713a000041004180800441011003000b200041406b24000b3c01017f200020012802042202047f2001200241016b36020420012001280200220141016a36020020012d00000520010b3a000120002002453a00000b"
|
||||
},
|
||||
"contract": {
|
||||
"name": "flipper",
|
||||
"version": "3.0.0-rc7",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"V3": {
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"label": "init_value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized with the given value."
|
||||
],
|
||||
"label": "new",
|
||||
"payable": false,
|
||||
"selector": "0x9bae9d5e"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized to `false`."
|
||||
],
|
||||
"label": "default",
|
||||
"payable": true,
|
||||
"selector": "0xed4b9d1b"
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"events": [],
|
||||
"messages": [
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
" Flips the current value of the Flipper's boolean."
|
||||
],
|
||||
"label": "flip",
|
||||
"mutates": true,
|
||||
"payable": false,
|
||||
"returnType": null,
|
||||
"selector": "0x633aa551"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"docs": [
|
||||
" Returns the current value of the Flipper's boolean."
|
||||
],
|
||||
"label": "get",
|
||||
"mutates": false,
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 0
|
||||
},
|
||||
"selector": "0x2f865bd9"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"cell": {
|
||||
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"ty": 0
|
||||
}
|
||||
},
|
||||
"name": "value"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"id": 0,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "bool"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Copyright 2017-2025 @pezkuwi/api-contract authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
export { default as flipper } from './flipper.contract.json' assert { type: 'json' };
|
||||
// A complex contract example with traits.
|
||||
export { default as traitErc20 } from './trait_erc20.contract.json' assert { type: 'json' };
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,821 @@
|
||||
{
|
||||
"source": {
|
||||
"hash": "0x114f55289bcdfd0d28e0bbd1c63452b4e45901a022b1011d298fa2eb12d1711d",
|
||||
"language": "ink! 4.3.0",
|
||||
"compiler": "rustc 1.75.0",
|
||||
"build_info": {
|
||||
"build_mode": "Debug",
|
||||
"cargo_contract_version": "3.2.0",
|
||||
"rust_toolchain": "stable-aarch64-apple-darwin",
|
||||
"wasm_opt_settings": {
|
||||
"keep_debug_symbols": false,
|
||||
"optimization_passes": "Z"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contract": {
|
||||
"name": "erc20",
|
||||
"version": "4.3.0",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"label": "total_supply",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": false,
|
||||
"docs": [
|
||||
"Creates a new ERC-20 contract with the specified initial supply."
|
||||
],
|
||||
"label": "new",
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink_primitives",
|
||||
"ConstructorResult"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0x9bae9d5e"
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"environment": {
|
||||
"accountId": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
},
|
||||
"balance": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 0
|
||||
},
|
||||
"blockNumber": {
|
||||
"displayName": [
|
||||
"BlockNumber"
|
||||
],
|
||||
"type": 14
|
||||
},
|
||||
"chainExtension": {
|
||||
"displayName": [
|
||||
"ChainExtension"
|
||||
],
|
||||
"type": 15
|
||||
},
|
||||
"hash": {
|
||||
"displayName": [
|
||||
"Hash"
|
||||
],
|
||||
"type": 12
|
||||
},
|
||||
"maxEventTopics": 4,
|
||||
"timestamp": {
|
||||
"displayName": [
|
||||
"Timestamp"
|
||||
],
|
||||
"type": 13
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"label": "from",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Option"
|
||||
],
|
||||
"type": 11
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"label": "to",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Option"
|
||||
],
|
||||
"type": 11
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": false,
|
||||
"label": "value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
"Event emitted when a token transfer occurs."
|
||||
],
|
||||
"label": "Transfer"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"label": "owner",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": true,
|
||||
"label": "spender",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"docs": [],
|
||||
"indexed": false,
|
||||
"label": "value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"docs": [
|
||||
"Event emitted when an approval occurs that `spender` is allowed to withdraw",
|
||||
"up to the amount of `value` tokens from `owner`."
|
||||
],
|
||||
"label": "Approval"
|
||||
}
|
||||
],
|
||||
"lang_error": {
|
||||
"displayName": [
|
||||
"ink",
|
||||
"LangError"
|
||||
],
|
||||
"type": 3
|
||||
},
|
||||
"messages": [
|
||||
{
|
||||
"args": [],
|
||||
"default": false,
|
||||
"docs": [
|
||||
" Returns the total token supply."
|
||||
],
|
||||
"label": "total_supply",
|
||||
"mutates": false,
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink",
|
||||
"MessageResult"
|
||||
],
|
||||
"type": 4
|
||||
},
|
||||
"selector": "0xdb6375a8"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"label": "owner",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": false,
|
||||
"docs": [
|
||||
" Returns the account balance for the specified `owner`.",
|
||||
"",
|
||||
" Returns `0` if the account is non-existent."
|
||||
],
|
||||
"label": "balance_of",
|
||||
"mutates": false,
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink",
|
||||
"MessageResult"
|
||||
],
|
||||
"type": 4
|
||||
},
|
||||
"selector": "0x0f755a56"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"label": "owner",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "spender",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": false,
|
||||
"docs": [
|
||||
" Returns the amount which `spender` is still allowed to withdraw from `owner`.",
|
||||
"",
|
||||
" Returns `0` if no allowance has been set."
|
||||
],
|
||||
"label": "allowance",
|
||||
"mutates": false,
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink",
|
||||
"MessageResult"
|
||||
],
|
||||
"type": 4
|
||||
},
|
||||
"selector": "0x6a00165e"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"label": "to",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": false,
|
||||
"docs": [
|
||||
" Transfers `value` amount of tokens from the caller's account to account `to`.",
|
||||
"",
|
||||
" On success a `Transfer` event is emitted.",
|
||||
"",
|
||||
" # Errors",
|
||||
"",
|
||||
" Returns `InsufficientBalance` error if there are not enough tokens on",
|
||||
" the caller's account balance."
|
||||
],
|
||||
"label": "transfer",
|
||||
"mutates": true,
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink",
|
||||
"MessageResult"
|
||||
],
|
||||
"type": 8
|
||||
},
|
||||
"selector": "0x84a15da1"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"label": "spender",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": false,
|
||||
"docs": [
|
||||
" Allows `spender` to withdraw from the caller's account multiple times, up to",
|
||||
" the `value` amount.",
|
||||
"",
|
||||
" If this function is called again it overwrites the current allowance with",
|
||||
" `value`.",
|
||||
"",
|
||||
" An `Approval` event is emitted."
|
||||
],
|
||||
"label": "approve",
|
||||
"mutates": true,
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink",
|
||||
"MessageResult"
|
||||
],
|
||||
"type": 8
|
||||
},
|
||||
"selector": "0x681266a0"
|
||||
},
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"label": "from",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "to",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": false,
|
||||
"docs": [
|
||||
" Transfers `value` tokens on the behalf of `from` to the account `to`.",
|
||||
"",
|
||||
" This can be used to allow a contract to transfer tokens on ones behalf and/or",
|
||||
" to charge fees in sub-currencies, for example.",
|
||||
"",
|
||||
" On success a `Transfer` event is emitted.",
|
||||
"",
|
||||
" # Errors",
|
||||
"",
|
||||
" Returns `InsufficientAllowance` error if there are not enough tokens allowed",
|
||||
" for the caller to withdraw from `from`.",
|
||||
"",
|
||||
" Returns `InsufficientBalance` error if there are not enough tokens on",
|
||||
" the account balance of `from`."
|
||||
],
|
||||
"label": "transfer_from",
|
||||
"mutates": true,
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink",
|
||||
"MessageResult"
|
||||
],
|
||||
"type": 8
|
||||
},
|
||||
"selector": "0x0b396f18"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"root": {
|
||||
"layout": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"leaf": {
|
||||
"key": "0x00000000",
|
||||
"ty": 0
|
||||
}
|
||||
},
|
||||
"name": "total_supply"
|
||||
},
|
||||
{
|
||||
"layout": {
|
||||
"root": {
|
||||
"layout": {
|
||||
"leaf": {
|
||||
"key": "0x2623dce7",
|
||||
"ty": 0
|
||||
}
|
||||
},
|
||||
"root_key": "0x2623dce7"
|
||||
}
|
||||
},
|
||||
"name": "balances"
|
||||
},
|
||||
{
|
||||
"layout": {
|
||||
"root": {
|
||||
"layout": {
|
||||
"leaf": {
|
||||
"key": "0xeca021b7",
|
||||
"ty": 0
|
||||
}
|
||||
},
|
||||
"root_key": "0xeca021b7"
|
||||
}
|
||||
},
|
||||
"name": "allowances"
|
||||
}
|
||||
],
|
||||
"name": "Erc20"
|
||||
}
|
||||
},
|
||||
"root_key": "0x00000000"
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"id": 0,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "u128"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 2
|
||||
}
|
||||
],
|
||||
"index": 0,
|
||||
"name": "Ok"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Err"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"params": [
|
||||
{
|
||||
"name": "T",
|
||||
"type": 2
|
||||
},
|
||||
{
|
||||
"name": "E",
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"path": [
|
||||
"Result"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"type": {
|
||||
"def": {
|
||||
"tuple": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": [
|
||||
"ink_primitives",
|
||||
"LangError"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 0
|
||||
}
|
||||
],
|
||||
"index": 0,
|
||||
"name": "Ok"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Err"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"params": [
|
||||
{
|
||||
"name": "T",
|
||||
"type": 0
|
||||
},
|
||||
{
|
||||
"name": "E",
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"path": [
|
||||
"Result"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"type": {
|
||||
"def": {
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"type": 6,
|
||||
"typeName": "[u8; 32]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": [
|
||||
"ink_primitives",
|
||||
"types",
|
||||
"AccountId"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"type": {
|
||||
"def": {
|
||||
"array": {
|
||||
"len": 32,
|
||||
"type": 7
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "u8"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 9
|
||||
}
|
||||
],
|
||||
"index": 0,
|
||||
"name": "Ok"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Err"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"params": [
|
||||
{
|
||||
"name": "T",
|
||||
"type": 9
|
||||
},
|
||||
{
|
||||
"name": "E",
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"path": [
|
||||
"Result"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 2
|
||||
}
|
||||
],
|
||||
"index": 0,
|
||||
"name": "Ok"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 10
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Err"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"params": [
|
||||
{
|
||||
"name": "T",
|
||||
"type": 2
|
||||
},
|
||||
{
|
||||
"name": "E",
|
||||
"type": 10
|
||||
}
|
||||
],
|
||||
"path": [
|
||||
"Result"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"index": 0,
|
||||
"name": "InsufficientBalance"
|
||||
},
|
||||
{
|
||||
"index": 1,
|
||||
"name": "InsufficientAllowance"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": [
|
||||
"erc20",
|
||||
"erc20",
|
||||
"Error"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"index": 0,
|
||||
"name": "None"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 5
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Some"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"params": [
|
||||
{
|
||||
"name": "T",
|
||||
"type": 5
|
||||
}
|
||||
],
|
||||
"path": [
|
||||
"Option"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"type": {
|
||||
"def": {
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"type": 6,
|
||||
"typeName": "[u8; 32]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": [
|
||||
"ink_primitives",
|
||||
"types",
|
||||
"Hash"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "u64"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "u32"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {}
|
||||
},
|
||||
"path": [
|
||||
"ink_env",
|
||||
"types",
|
||||
"NoChainExtension"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": "4"
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -0,0 +1,396 @@
|
||||
{
|
||||
"source": {
|
||||
"hash": "0xa5b19cb655755feba8e34ab5b413ac6593ecc7e24e19af485a4d30036be9d577",
|
||||
"language": "ink! 4.2.0",
|
||||
"compiler": "rustc 1.69.0",
|
||||
"build_info": {
|
||||
"build_mode": "Debug",
|
||||
"cargo_contract_version": "2.2.1",
|
||||
"rust_toolchain": "stable-x86_64-apple-darwin",
|
||||
"wasm_opt_settings": {
|
||||
"keep_debug_symbols": false,
|
||||
"optimization_passes": "Z"
|
||||
}
|
||||
}
|
||||
},
|
||||
"contract": {
|
||||
"name": "flipper",
|
||||
"version": "4.2.0",
|
||||
"authors": [
|
||||
"Parity Technologies <admin@parity.io>"
|
||||
]
|
||||
},
|
||||
"spec": {
|
||||
"constructors": [
|
||||
{
|
||||
"args": [
|
||||
{
|
||||
"label": "init_value",
|
||||
"type": {
|
||||
"displayName": [
|
||||
"bool"
|
||||
],
|
||||
"type": 0
|
||||
}
|
||||
}
|
||||
],
|
||||
"default": false,
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized with the given value."
|
||||
],
|
||||
"label": "new",
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink_primitives",
|
||||
"ConstructorResult"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0x9bae9d5e"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"default": false,
|
||||
"docs": [
|
||||
"Creates a new flipper smart contract initialized to `false`."
|
||||
],
|
||||
"label": "new_default",
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink_primitives",
|
||||
"ConstructorResult"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0x61ef7e3e"
|
||||
}
|
||||
],
|
||||
"docs": [],
|
||||
"environment": {
|
||||
"accountId": {
|
||||
"displayName": [
|
||||
"AccountId"
|
||||
],
|
||||
"type": 5
|
||||
},
|
||||
"balance": {
|
||||
"displayName": [
|
||||
"Balance"
|
||||
],
|
||||
"type": 8
|
||||
},
|
||||
"blockNumber": {
|
||||
"displayName": [
|
||||
"BlockNumber"
|
||||
],
|
||||
"type": 11
|
||||
},
|
||||
"chainExtension": {
|
||||
"displayName": [
|
||||
"ChainExtension"
|
||||
],
|
||||
"type": 12
|
||||
},
|
||||
"hash": {
|
||||
"displayName": [
|
||||
"Hash"
|
||||
],
|
||||
"type": 9
|
||||
},
|
||||
"maxEventTopics": 4,
|
||||
"timestamp": {
|
||||
"displayName": [
|
||||
"Timestamp"
|
||||
],
|
||||
"type": 10
|
||||
}
|
||||
},
|
||||
"events": [],
|
||||
"lang_error": {
|
||||
"displayName": [
|
||||
"ink",
|
||||
"LangError"
|
||||
],
|
||||
"type": 3
|
||||
},
|
||||
"messages": [
|
||||
{
|
||||
"args": [],
|
||||
"default": false,
|
||||
"docs": [
|
||||
" Flips the current value of the Flipper's boolean."
|
||||
],
|
||||
"label": "flip",
|
||||
"mutates": true,
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink",
|
||||
"MessageResult"
|
||||
],
|
||||
"type": 1
|
||||
},
|
||||
"selector": "0x633aa551"
|
||||
},
|
||||
{
|
||||
"args": [],
|
||||
"default": false,
|
||||
"docs": [
|
||||
" Returns the current value of the Flipper's boolean."
|
||||
],
|
||||
"label": "get",
|
||||
"mutates": false,
|
||||
"payable": false,
|
||||
"returnType": {
|
||||
"displayName": [
|
||||
"ink",
|
||||
"MessageResult"
|
||||
],
|
||||
"type": 4
|
||||
},
|
||||
"selector": "0x2f865bd9"
|
||||
}
|
||||
]
|
||||
},
|
||||
"storage": {
|
||||
"root": {
|
||||
"layout": {
|
||||
"struct": {
|
||||
"fields": [
|
||||
{
|
||||
"layout": {
|
||||
"leaf": {
|
||||
"key": "0x00000000",
|
||||
"ty": 0
|
||||
}
|
||||
},
|
||||
"name": "value"
|
||||
}
|
||||
],
|
||||
"name": "Flipper"
|
||||
}
|
||||
},
|
||||
"root_key": "0x00000000"
|
||||
}
|
||||
},
|
||||
"types": [
|
||||
{
|
||||
"id": 0,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "bool"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 2
|
||||
}
|
||||
],
|
||||
"index": 0,
|
||||
"name": "Ok"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Err"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"params": [
|
||||
{
|
||||
"name": "T",
|
||||
"type": 2
|
||||
},
|
||||
{
|
||||
"name": "E",
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"path": [
|
||||
"Result"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"type": {
|
||||
"def": {
|
||||
"tuple": []
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"index": 1,
|
||||
"name": "CouldNotReadInput"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": [
|
||||
"ink_primitives",
|
||||
"LangError"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {
|
||||
"variants": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 0
|
||||
}
|
||||
],
|
||||
"index": 0,
|
||||
"name": "Ok"
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"index": 1,
|
||||
"name": "Err"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"params": [
|
||||
{
|
||||
"name": "T",
|
||||
"type": 0
|
||||
},
|
||||
{
|
||||
"name": "E",
|
||||
"type": 3
|
||||
}
|
||||
],
|
||||
"path": [
|
||||
"Result"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"type": {
|
||||
"def": {
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"type": 6,
|
||||
"typeName": "[u8; 32]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": [
|
||||
"ink_primitives",
|
||||
"types",
|
||||
"AccountId"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"type": {
|
||||
"def": {
|
||||
"array": {
|
||||
"len": 32,
|
||||
"type": 7
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "u8"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "u128"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"type": {
|
||||
"def": {
|
||||
"composite": {
|
||||
"fields": [
|
||||
{
|
||||
"type": 6,
|
||||
"typeName": "[u8; 32]"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"path": [
|
||||
"ink_primitives",
|
||||
"types",
|
||||
"Hash"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "u64"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"type": {
|
||||
"def": {
|
||||
"primitive": "u32"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"type": {
|
||||
"def": {
|
||||
"variant": {}
|
||||
},
|
||||
"path": [
|
||||
"ink_env",
|
||||
"types",
|
||||
"NoChainExtension"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": "4"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user