diff --git a/packages/api-contract/src/Abi/index.ts b/packages/api-contract/src/Abi/index.ts index 5629d9af1e10..4d033b6d112d 100644 --- a/packages/api-contract/src/Abi/index.ts +++ b/packages/api-contract/src/Abi/index.ts @@ -3,7 +3,7 @@ import type { Bytes } from '@polkadot/types'; import type { ChainProperties, ContractConstructorSpecLatest, ContractEventSpecLatest, ContractMessageParamSpecLatest, ContractMessageSpecLatest, ContractMetadata, ContractMetadataLatest, ContractProjectInfo } from '@polkadot/types/interfaces'; -import type { Codec, Registry } from '@polkadot/types/types'; +import type { Codec, Registry, TypeDef } from '@polkadot/types/types'; import type { AbiConstructor, AbiEvent, AbiMessage, AbiParam, DecodedEvent, DecodedMessage } from '../types.js'; import { TypeRegistry } from '@polkadot/types'; @@ -82,6 +82,7 @@ export class Abi { readonly messages: AbiMessage[]; readonly metadata: ContractMetadataLatest; readonly registry: Registry; + readonly environment: Map = new Map(); constructor (abiJson: Record | string, chainProperties?: ChainProperties) { [this.json, this.registry, this.metadata, this.info] = parseJson( @@ -90,11 +91,18 @@ export class Abi { : abiJson, chainProperties ); - this.constructors = this.metadata.spec.constructors.map((spec: ContractConstructorSpecLatest, index) => - this.#createMessage(spec, index, { + this.constructors = this.metadata.spec.constructors.map((spec: ContractConstructorSpecLatest, index) => { + const typeSpec = spec.returnType.unwrapOr(null); + + return this.#createMessage(spec, index, { isConstructor: true, - isPayable: spec.payable.isTrue - }) + isDefault: spec.default.isTrue, + isPayable: spec.payable.isTrue, + returnType: typeSpec + ? this.registry.lookup.getTypeDef(typeSpec.type) + : null + }); + } ); this.events = this.metadata.spec.events.map((spec: ContractEventSpecLatest, index) => this.#createEvent(spec, index) @@ -103,6 +111,7 @@ export class Abi { const typeSpec = spec.returnType.unwrapOr(null); return this.#createMessage(spec, index, { + isDefault: spec.default.isTrue, isMutating: spec.mutates.isTrue, isPayable: spec.payable.isTrue, returnType: typeSpec @@ -110,6 +119,19 @@ export class Abi { : null }); }); + const rawEnv = this.metadata.spec.environment.unwrapOr(null); + + if (rawEnv) { + for (const [key, value] of rawEnv.entries()) { + const typeSpec = value.toPrimitive(); + + if (typeof typeSpec === 'object' && typeSpec !== null && 'type' in typeSpec) { + this.environment.set(key, this.registry.lookup.getTypeDef(typeSpec.type as number)); + } else { + this.environment.set(key, typeSpec as number); + } + } + } } /** @@ -215,6 +237,7 @@ export class Abi { }), identifier, index, + isDefault: spec.default.isTrue, method: stringCamelCase(identifier), path: identifier.split('::').map((s) => stringCamelCase(s)), selector: spec.selector, diff --git a/packages/api-contract/src/Abi/toV4.ts b/packages/api-contract/src/Abi/toV4.ts index fd6d04ca8668..61bd6a653035 100644 --- a/packages/api-contract/src/Abi/toV4.ts +++ b/packages/api-contract/src/Abi/toV4.ts @@ -4,6 +4,17 @@ import type { ContractMetadataV3, ContractMetadataV4 } from '@polkadot/types/interfaces'; import type { Registry } from '@polkadot/types/types'; -export function v3ToV4 (_registry: Registry, v3: ContractMetadataV3): ContractMetadataV4 { - return v3; +import { objectSpread } from '@polkadot/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)) + ) + }) + })); } diff --git a/packages/api-contract/src/test/compare/ink_v4_flipperContract.test.json b/packages/api-contract/src/test/compare/ink_v4_flipperContract.test.json index e7e9211fa21f..09a25452177a 100644 --- a/packages/api-contract/src/test/compare/ink_v4_flipperContract.test.json +++ b/packages/api-contract/src/test/compare/ink_v4_flipperContract.test.json @@ -5,5 +5,151 @@ "type": "bool", "docs": [], "namespace": "" + }, + { + "info": "Result", + "lookupIndex": 1, + "type": "Result", + "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", + "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" } ] \ No newline at end of file diff --git a/packages/api-contract/src/test/compare/ink_v4_flipperMetadata.test.json b/packages/api-contract/src/test/compare/ink_v4_flipperMetadata.test.json index e7e9211fa21f..09a25452177a 100644 --- a/packages/api-contract/src/test/compare/ink_v4_flipperMetadata.test.json +++ b/packages/api-contract/src/test/compare/ink_v4_flipperMetadata.test.json @@ -5,5 +5,151 @@ "type": "bool", "docs": [], "namespace": "" + }, + { + "info": "Result", + "lookupIndex": 1, + "type": "Result", + "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", + "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" } ] \ No newline at end of file diff --git a/packages/api-contract/src/test/contracts/ink/v4/flipper.contract.json b/packages/api-contract/src/test/contracts/ink/v4/flipper.contract.json index a00fe3ac47a8..d796e45694da 100644 --- a/packages/api-contract/src/test/contracts/ink/v4/flipper.contract.json +++ b/packages/api-contract/src/test/contracts/ink/v4/flipper.contract.json @@ -1,104 +1 @@ -{ - "source": { - "hash": "0xf051c631190ac47f82e280ba763df932210f6e2447978e24cbe0dcc6d6903c7a", - "language": "ink! 4.0.0-alpha.1", - "compiler": "rustc 1.63.0", - "wasm": "0x0061736d0100000001590e60037f7f7f017f60027f7f017f60027f7f0060047f7f7f7f0060037f7f7f0060057f7f7f7f7f0060017f0060000060017f017f60017f017e6000017f60057f7f7f7f7f017f60047f7f7f7f017f60077f7f7f7f7f7f7f017f02a30107057365616c30127365616c5f64656275675f6d6573736167650001057365616c31107365616c5f7365745f73746f726167650000057365616c30107365616c5f6765745f73746f726167650000057365616c300a7365616c5f696e7075740002057365616c300b7365616c5f72657475726e0004057365616c30167365616c5f76616c75655f7472616e73666572726564000203656e76066d656d6f727902010210034948000201060601020800020305040a0207060705010000040101000607020201090203010b010c030001050304050203080101040400010100050303030001010d0101010101030503040501700116160608017f01418080040b071102066465706c6f7900150463616c6c0017091b010041010b150b36374928243c44464728094a091b1d1e094809250ac06e482b01017f037f2002200346047f200005200020036a200120036a2d00003a0000200341016a21030c010b0b0b840101017f230041406a22022400200241286a200141186a290000370300200241206a200141106a290000370300200241186a200141086a2900003703002002420137030820022001290000370310200241386a41808001360200200241aebd0436023420024100360230200241106a200241306a20001008410110011a200241406b24000b7601037f230041106b22022400200041086a280200210320002802042104200220013a000f20024101200420031010200228020020022802042002410f6a410141dcb7041011200345044041e3b604412341ecb7041012000b2000200341016b3602082000200441016a360204200241106a240020040b0300010b4801017f230041206b22012400200141146a410136020020014201370204200141a0b9043602002001410136021c200120003602182001200141186a360210200141cc8204100c000b860101017f230041306b220224002002411c6a41013602002002420137020c200241a0b90436020820024102360224200220002d0000410274220041fcbc046a28020036022c200220004190bd046a280200360228200141186a2802002001411c6a2802002002200241206a3602182002200241286a360220200241086a103a200241306a24000bd40402087f017e230041206b22022400200241013a00182002200136021420022000360210200241ac8c0436020c200241a0b904360208230041406a220124002001200241086a36020c200141346a41013602002001420237022420014188b7043602202001410436023c2001200141386a36023020012001410c6a360238200141106a210441002100230041306b22022400200141206a220541146a28020021062005280200210302400240024002400240027f02400240200528020422080e020001030b20060d0241a0b9040c010b20060d012003280204210020032802000b2106200241106a2000102320022802102103200420022802143602042004200336020020032006200010061a200420003602080c010b200841037422090440200341046a210703402000200020072802006a22004b0d03200741086a2107200941086b22090d000b0b200541086a2105200241086a027f20002006450d001a02402008450d0020032802040d00410020004110490d011a0b4100200020006a2207200020074b1b0b10232002290308210a200441003602082004200a3702002002412c6a2006360200200241286a200541086a2802003602002002200836021c20022003360218200220052902003703202004200241186a10190d020b200241306a24000c020b41f08304411c4180b0041012000b41f085044133200241186a41b48404419087041018000b2001280210210020012802182101024041acbd042d000045044041adbd042d00004101710d010b200020011000410947044041acbd0441013a00000b41adbd0441013a00000b000b4501017f230041106b22012400200141003a000f027f20002001410f6a4101100e4504404101410220012d000f22004101461b410020001b0c010b41020b200141106a24000b6001047f230041106b22032400200028020422042002492205450440200341086a4100200220002802002206104b200120022003280208200328020c41b4bc0410112003200220042006104b200020032903003702000b200341106a240020050b4401027f230041106b220224002002410036020c024020012002410c6a4104100e4504402000200228020c3600010c010b410121030b200020033a0000200241106a24000b2000200120034d044020002001360204200020023602000f0b200120031033000b7b002001200346044020002002200110061a0f0b230041306b2200240020002003360204200020013602002000411c6a41023602002000412c6a41053602002000420337020c200041ec9704360208200041053602242000200041206a360218200020003602282000200041046a360220200041086a2004100c000b4601017f230041206b22032400200341146a4100360200200341a0b904360210200342013702042003200136021c200320003602182003200341186a36020020032002100c000b6c02027f027e230041206b22002400200041086a220142003703002000420037030020004110360214200020003602102000411036021c20002000411c6a1005200041106a200028021c10142001290300210220002903002103200041206a2400410541042002200384501b0b3101017f230041106b22022400200241086a200120002802002000280204101020002002290308370200200241106a24000b890301057f230041306b220024000240101341ff0171410546044020004180800136022c200041aebd04360228200041286a1016200020002903283703082000200041086a100f20002d00000d0120002800012201411876210220014110762103200141087621040240200141ff01712201419b01470440200141ed0147200441ff017141cb004772200341ff0171419d01472002411b4772720d03200041206a4200370300200041186a4200370300200041106a4200370300200042003703084100200041086a10070c010b200441ff017141ae0147200341ff0171419d014772200241de0047720d02200041086a100d41ff017122014102460d02200041206a4200370300200041186a4200370300200041106a4200370300200042003703082001200041086a10070b200041306a24000f0b200041043a0008200041086a100a000b200041033a00002000411c6a41013602002000420137020c200041a483043602082000410136022c2000200041286a36021820002000360228200041086a41cc8204100c000b3301017f230041106b220124002001200028020436020c20002802002001410c6a10032000200128020c1014200141106a24000bc90501057f230041d0006b22002400024002400240101341ff01712201410546044020004180800136023c200041aebd04360238200041386a101620002000290338370308200041306a200041086a100f20002d00300d0320002800312201411876210220014110762103200141087621040240200141ff01712201412f470440200141e30047200441ff0171413a4772200341ff017141a50147720d0541012101200241d100460d010c050b200441ff017141860147200341ff017141db0047720d0441002101200241d901470d040b200041186a4200370300200041206a4200370300200041286a42003703002000420037031020004201370308200041808001360234200041aebd04360230200041808001360238200041106a41aebd04200041386a10022102200041306a200028023810140240024002402002410c4f0d00200241027441ccbc046a2802000e0402000001000b200041cc006a4100360200200041a0b9043602482000420137023c200041848204360238200041386a418c8204100c000b230041106b220124002001411736020c200141f08004360208230041206b22002400200041146a410136020020004201370204200041a0b9043602002000410236021c2000200141086a3602182000200041186a360210200041888104100c000b20002000290330370338200041386a100d41ff017122024102460d022001450d0120024541dc82041007200041d0006a24000f0b200020013a0008200041086a100a000b230041106b22002400200041086a41808001360200200041aebd0436020420004100360200410020002002410047100841011004000b200041003a0038418080044127200041386a4198810441e080041018000b200041033a00302000411c6a41013602002000420137020c200041d083043602082000410136023c2000200041386a3602182000200041306a360238200041086a41cc8204100c000b7c01017f230041406a220524002005200136020c2005200036020820052003360214200520023602102005412c6a41023602002005413c6a41033602002005420237021c200541e08c04360218200541023602342005200541306a3602282005200541106a3602382005200541086a360230200541186a2004100c000b5501017f230041206b2202240020022000360204200241186a200141106a290200370300200241106a200141086a29020037030020022001290200370308200241046a41d88304200241086a101a200241206a24000bfc0301057f230041406a22032400200341346a2001360200200341033a00382003428080808080043703182003200036023041002101200341003602282003410036022002400240024020022802082200450440200241146a28020041ffffffff0171220641016a210520022802102104410021000340200541016b2205450d02200228020020006a220141046a28020022070440200328023020012802002007200328023428020c1100000d040b200020046a2101200041086a21002001280200200341186a200141046a280200110100450d000b0c020b2002410c6a28020022064105742105200641ffffff3f71210603402005450d01200228020020016a220441046a28020022070440200328023020042802002007200328023428020c1100000d030b200320002d001c3a003820032000290204422089370318200341106a20022802102204200041146a103820032003290310370320200341086a20042000410c6a103820032003290308370328200141086a2101200541206b210520002802002107200041206a2100200420074103746a2204280200200341186a2004280204110100450d000b0c010b4100210020062002280204492201450d012003280230200228020020064103746a410020011b22012802002001280204200328023428020c110000450d010b410121000b200341406b240020000b0f00200028020020012002101c41000b5801017f20022000280204200028020822036b4b0440200020032002101f1020200028020821030b200028020020036a2001200210061a2003200220036a22014b044041f08304411c41a088041012000b200020013602080bbd0201027f230041106b220224000240024002400240200028020022002002410c6a027f0240024020014180014f04402002410036020c2001418010490d012001418080044f0d0220022001413f71418001723a000e20022001410c7641e001723a000c20022001410676413f71418001723a000d41030c030b200028020822032000280204460d030c040b20022001413f71418001723a000d2002200141067641c001723a000c41020c010b20022001413f71418001723a000f2002200141127641f001723a000c20022001410676413f71418001723a000e20022001410c76413f71418001723a000d41040b101c0c020b200020034101101f1020200028020821030b200028020020036a20013a0000200341016a22012003490d01200020013602080b200241106a240041000f0b41f08304411c419088041012000b4a01017f230041206b220224002000280200200241186a200141106a290200370300200241106a200141086a29020037030020022001290200370308200241086a1019200241206a24000bdd0301077f230041206b220324000240027f41002001200120026a22014b0d001a2000280204220220026a22042002490d012004200120012004491b22014108200141084b1b210120032002047f200320023602142003200028020036021041010541000b360218200341106a210641002102230041106b220424002003027f200141004e0440027f02402006280208044020062802042208450440200441086a2001102220042802082107200428020c0c030b200141a4bd04280200220520016a22022005490d021a2006280200210641a8bd042802002002490440200141ffff036a220941107640002202417f46200241ffff0371200247720d022002411074220520094180807c716a22022005490d0241a8bd0420023602002001200120056a22022005490d031a0b41a4bd04200236020020012005450d021a2005200620081006210720010c020b2004200110222004280200210720042802040c010b20010b2102200704402003200736020441000c020b20032001360204410121020b41010b360200200341086a2002360200200441106a240020032802004504402003280204210220002001360204200020023602004181808080780c010b200341086a2802000b200341206a24000f0b41908404412141b485041012000b1b00024020004181808080784704402000450d01000b0f0b1021000b3c01017f230041206b220024002000411c6a4100360200200041a0b9043602182000420137020c200041d88504360208200041086a41e08504100c000ba90101027f027f41012001450d001a410041a4bd04280200220220016a22032002490d001a024041a8bd042802002003490440200141ffff036a22032001490d01200341107640002202417f46200241ffff0371200247720d012002411074220220034180807c716a22032002490d0141a8bd0420033602004100200120026a22032002490d021a0b41a4bd04200336020020020c010b41000b210320002001360204200020033602000b4f01027f230041106b2202240002402001450440410121030c010b200141004e0440200241086a20011022200228020822030d01000b1021000b2000200136020420002003360200200241106a24000b0e0020002802001a03400c000b000b0d0042dbfaf5cda49bcbb5f3000b10002000200141f0930441e09304104d0b1000200020012002200341b08804104c0b9d0302047f027e027f20003502002106230041306b22032400412721000240024020064290ce00540440200621070c010b0240034020064290ce008021072000200041046b22004c0d01200341096a20006a200620074290ce007e7da7220241ffff037141e4006e220441017441ee8e046a2f00003b00002000200041026a22054c0440200341096a20056a2002200441e4006c6b41ffff037141017441ee8e046a2f00003b0000200642ffc1d72f5620072106450d030c010b0b41e08804411c4190b0041012000b0c010b2007a7220241e3004b04402000200041026b22004c0d01200341096a20006a2007a72202200241ffff037141e4006e220241e4006c6b41ffff037141017441ee8e046a2f00003b00000b02402002410a4f04402000200041026b22004c0d02200341096a20006a200241017441ee8e046a2f00003b00000c010b2000200041016b22004c0d01200341096a20006a200241306a3a00000b412720006b220241274b04400c010b200141a0b9044100200341096a20006a20021029200341306a24000c010b41b0880441214190b0041012000b0b9c0401077f230041106b22072400418080c400210920042105024020002802002206410171450d002004200441016a22054d0440412b21090c010b41e08804411c41a891041012000b0240024002400240200641047145044041002101200521060c010b2001200120026a102a20056a22062005490d010b2000280208450440410121052000200920012002102b0d032000280218200320042000411c6a28020028020c11000021050c030b024002402000410c6a280200220820064b044020002d00004108710d01200820066b220620084b0d02410121052007200020064101102c20072802002206418080c400460d05200728020421082000200920012002102b0d052000280218200320042000411c6a28020028020c1100000d05200620082000102d21050c050b410121052000200920012002102b0d042000280218200320042000411c6a28020028020c11000021050c040b2000280204210a2000413036020420002d0020210b41012105200041013a00202000200920012002102b0d03200820066b220120084b0d02200741086a200020014101102c20072802082201418080c400460d03200728020c21022000280218200320042000411c6a28020028020c1100000d03200120022000102d0d032000200b3a00202000200a360204410021050c030b41b08804412141d891041012000b41e08804411c41b891041012000b41b08804412141c891041012000b200741106a240020050be705010a7f230041206b2202240002400240200120006b22054110490d00200041036a417c7120006b220120054b0d00200241086a4100200120001027200228020c210720022802082109200220012005200010274101210141042103200228020421042002280200210a0240034020012003200368762203200120034b22061b22082003200120061b22016b220320084b0d0120030d000b20010440410420016e2103200141044d0440200420042004200420036e220620036c6b22086b220b4f04402001410147200320044b72200741044b720d0420092007102e2200200a200b6a2008102e6a220420004f04400240024003402006450d09200241106a2200200a2006200641c001200641c001491b41e89504102f200228021c21062002280218210a20002002280210200228021422002000417c7141ec9604102f200228021c210920022802182107024020022802142201450440410021010c010b2002280210220020014102746a21084100210103402000220541106a2100410021030240034020012001200320056a280200220b417f73410776200b410676724181828408716a22014d0440200341046a22034110470d010c020b0b41e08804411c41c899041012000b20002008470d000b0b20042004200141087641ff81fc0771200141ff81fc07716a418180046c4110766a22044b0d012009450d000b200941027421004100210103402001200120072802002205417f734107762005410676724181828408716a22014b0d02200741046a2107200041046b22000d000b20042004200141087641ff81fc0771200141ff81fc07716a418180046c4110766a22044d0d0841e08804411c41f899041012000b41e08804411c41d899041012000b41e08804411c41e899041012000b41e08804411c41b899041012000b41b08804412141b498041012000b41e089044119419498041012000b41e089044119418498041012000b41b08804412141a498041012000b20002005102e21040b200241206a240020040b4b000240027f2001418080c4004704404101200028021820012000411c6a2802002802101101000d011a0b20020d0141000b0f0b2000280218200220032000411c6a28020028020c1100000bb20101027f20022105024002400240200320012d0020220320034103461b41ff017141016b0e03010001020b2002200241016a22034d044020034101762105200241017621040c020b41e08804411c41e891041012000b41002105200221040b200441016a21022001411c6a2802002103200128020421042001280218210102400340200241016b2202450d01200120042003280210110100450d000b418080c40021040b20002005360204200020043602000b4701027f2002411c6a28020021032002280218210441002102027f0340200120012002460d011a200241016a2102200420002003280210110100450d000b200241016b0b2001490b4601017f200145044041000f0b024003402002200220002c000041bf7f4a6a22024b0d01200041016a2100200141016b22010d000b20020f0b41e08804411c4180b0041012000b5d02017f027e230041106b22052400200220034f0440200541086a41002003200110302005290308210620052003200220011030200529030021072000200637020020002007370208200541106a24000f0b41e3b604412320041012000b3301017f2002200220016b22044f0440200020043602042000200320014102746a3602000f0b41b0880441214194bb041012000b6b01017f230041306b2203240020032001360204200320003602002003411c6a41023602002003412c6a41053602002003420237020c200341d88b04360208200341053602242003200341206a360218200320033602282003200341046a360220200341086a2002100c000bbb0101017f230041106b220524000240200120024d0440200220044d0d01200220041033000b230041306b2200240020002002360204200020013602002000411c6a41023602002000412c6a41053602002000420237020c200041d49404360208200041053602242000200041206a3602182000200041046a36022820002000360220200041086a41e49404100c000b200541086a2001200220031027200528020c21012000200528020836020020002001360204200541106a24000b10002000200141a0940441909404104d0b3f01017f024002402001450d00200120034f044020012003460d010c020b200120026a2c00004140480d010b200221040b20002001360204200020043602000bb70101047f200028020022012000280204460440418080c4000f0b2000200141016a36020020012d00002203411874411875410048047f2000200141026a36020020012d0001413f7121022003411f712104200341df014d044020044106742002720f0b2000200141036a36020020012d0002413f712002410674722102200341f00149044020022004410c74720f0b2000200141046a3602002004411274418080f0007120012d0003413f71200241067472720520030b0bf103010a7f230041206b2202240020002802042105200028020021030240024002402001280208220a4101472001280210220441014771450440024020044101470d00200141146a280200210420022003360214200241186a200320056a220636020020024100360210200241106a410472220b1035418080c400460d00200441016b21002004452109200321040340200620046b220720022802142204200228021822066b6a220820074b0d032002280210220720086a22082007490d042002200836021020094504402000452109200041016b2100200b1035418080c400460d020c010b0b200241086a2007200320051034200228020c2005200228020822001b21052000200320001b21030b200a4504402001280218200320052001411c6a28020028020c11000021000c040b2001410c6a28020022002003200320056a102a22044d04402001280218200320052001411c6a28020028020c11000021000c040b20022001200020046b4100102c4101210020022802002204418080c400460d03200228020421062001280218200320052001411c6a28020028020c1100000d03200420062001102d21000c030b2001280218200320052001411c6a28020028020c11000021000c020b41b08804412141f89a041012000b41e08804411c41889b041012000b200241206a240020000b140020002802002001200028020428020c1101000b5501027f0240027f02400240200228020041016b0e020103000b200241046a0c010b200120022802044103746a22012802044106470d0120012802000b2802002104410121030b20002004360204200020033602000b280020024181014f044020024180011026000b200041800120026b3602042000200120026a3602000b4901017f230041206b22032400200341186a200241106a290200370300200341106a200241086a2902003703002003200229020037030820002001200341086a101a200341206a24000b850201037f23004190016b22022400027f02402001280200220341107145044020034120710d012000200110280c020b2000280200210041ff0021030340200241106a20036a413041d7002000410f712204410a491b20046a3a0000200341016b21032000410f4b200041047621000d000b200241086a200241106a200341016a1039200141ec8e0441022002280208200228020c10290c010b2000280200210041ff0021030340200241106a20036a413041372000410f712204410a491b20046a3a0000200341016b21032000410f4b200041047621000d000b2002200241106a200341016a1039200141ec8e0441022002280200200228020410290b20024190016a24000b6c01027f230041206b2202240041012103024020002001103b0d002002411c6a4100360200200241a0b9043602182002420137020c200241fc8904360208200141186a2802002001411c6a280200200241086a103a0d00200041046a2001103b21030b200241206a240020030b9508010c7f230041e0006b22032400027f024020020440200341d8006a210d2000280204210b2000280200210c2000280208210a0340200a2d00000440200c41f08c044104200b28020c1100000d030b2003410a3602582003428a808080103703502003200236024c200341003602482003200236024420032001360240200341386a2001200241002002103e0240024020032802382207450d00200328023c210503400240024002400240024002402003280254220041016b220420004d0440200320046a41d8006a2d00002108200541084f0440200741036a417c7120076b2200450440410021040c030b200341306a410020052000200020054b1b220420072005103220032802342206450d0220032802302109410021000340200020096a2d00002008460d04200041016a22002006470d000b0c020b2005450d08410021000340200020076a2d00002008460d03200041016a22002005470d000b0c080b41b08804412141909d041012000b0240024002402005200541086b22004f0440200020044f0d010c020b41b08804412141ec92041012000b200841818284086c210902400340200441046a22062004490d01200420076a280200200973220e417f73200e41818284086b71200620076a2802002009732206417f73200641818284086b7172418081828478710d022004200441086a22064d04402000200622044f0d010c040b0b41e08804411c418c93041012000b41e08804411c41fc92041012000b200421060b20052006490d01200341286a2006200520071027200328022c2204450d06200328022821054100210003402008200020056a2d00004704402004200041016a2200470d010c080b0b200020066a220020064f0d0041e08804411c419c93041012000b2000200041016a22044b0d012004200328024822046a22002004490d0220032000360248200020032802542204490d03200341206a20032802402003280244200020046b22052000103e20032802202200450d0320032802242104200341186a41002003280254200d410410322004200328021c470d03027f20032802182106034041002004450d011a200441016b210420062d0000210720002d00002108200041016a2100200641016a210620072008460d000b200820076b0b0d03200a41013a0000200541016a220020054f0d0641e08804411c41e88d041012000b200620051026000b41e08804411c41a09d041012000b41e08804411c41b09d041012000b200341106a200328024020032802442003280248200328024c103e20032802142105200328021022070d000b0b200a41003a0000200221000b200341086a200120022000103f200c2003280208200328020c200b28020c1100000d022003200020012002104020032802002101200328020422020d000b0b41000c010b41010b200341e0006a24000b4c01037f230041106b220524002002200449200320044b72450440200541086a2003200420011027200528020c2107200528020821060b2000200736020420002006360200200541106a24000b4c01027f230041106b22042400200441086a20032001200210342004280208220545044020012002410020031041000b200428020c21012000200536020020002001360204200441106a24000b6401017f024002402001450d00200120034f044020012003460d010c020b200120026a2c00004140480d010b2003200320016b220449044041b088044121418c9c041012000b200020043602042000200120026a3602000f0b20022003200120031041000b8c0601027f230041106b220424002004200336020c200420023602082004200136020420042000360200200428020021052004280204210320042802082100200428020c210123004180016b220224002002200136021c20022000360218200241106a200520032005200341800210422204103f20022002290310370320200241054100200320044b22041b36022c200241af9e0441a0b90420041b36022802402002200020034d047f200120034d0d0120010520000b360238200241d4006a4103360200200241ec006a4102360200200241e4006a410236020020024203370244200241d89e043602402002410536025c2002200241d8006a3602502002200241286a3602682002200241206a3602602002200241386a360258200241406b41f09e04100c000b0240200020014d0440024002402000450d00200020034f044020002003460d010c020b200020056a2c00004140480d010b200121000b20022000360230200241086a2005200320001042220020052003104020022002280208220136025820022001200228020c6a36025c2002200241d8006a103541d49f0410432201360234027f41012001418001490d001a41022001418010490d001a41034104200141808004491b0b20006a220120004f0d0141e08804411c41e49f041012000b200241f4006a4102360200200241ec006a4102360200200241e4006a4105360200200241d4006a410436020020024204370244200241a49f043602402002410536025c2002200241d8006a3602502002200241286a3602702002200241206a36026820022002411c6a3602602002200241186a360258200241406b41c49f04100c000b2002200136023c20022000360238200241d4006a4105360200200241fc006a4102360200200241f4006a4102360200200241ec006a4107360200200241e4006a410836020020024205370244200241a8a0043602402002410536025c2002200241d8006a3602502002200241286a3602782002200241206a3602702002200241386a3602682002200241346a3602602002200241306a360258200241406b41d0a004100c000b8b0101037f230041106b220324000240200120024b0440200341086a4100200241036b220420022004491b2204200241016a200020011032200328020841016b2100200328020c2101034020010440200020016a200141016b220221012c00004140480d010b0b200220046a22012004490d010b200341106a240020010f0b41e08804411c41e0a0041012000b1a002000418080c40046044041e88b04412b20011012000b20000b930a02097f017e4101210602402001280218220741272001411c6a28020028021022081101000d00410221010240024002400240024002402000280200220241096b0e050402010103000b2002450440413021020c050b2002412746200241dc0046720d040b2002410b74210441002101412021004120210302400240024002400240024002400240024002400340200120004101766a22002001490d0302402004200041027441a0b0046a280200410b7422054d044020042005460d03200021030c010b200041016a22012000490d050b2003200320016b22004f044020012003490d010c030b0b41b088044121419c97041012000b200041016a21010b2001411f4b0d022001410274220341a0b0046a280200411576210002402001411f470440200341a4b0046a280200411576220420006b220320044d0d0141b08804412141a4ae041012000b41c30520006b220341c4054f0d040b4100210520022001200141016b22044f047f200441204f0d05200441027441a0b0046a28020041ffffff00710541000b6b220a20024b0d05200341016b220520034b0d06200020036a41016b210302402005450d00200041c305200041c3054b1b210941002101034020002009460d09024020012001200041a0b1046a2d00006a22044d04402004200a4d0d01200021030c030b41e08804411c41e4ae041012000b200041016a210020042101200541016b22050d000b0b2003410171047e200241017267410276410773ad4280808080d0008405024020024120490d0041012101200241ff00490d0d02402002418080044f04402002418080084f0d01200241bba704412a418fa80441c00141cfa90441b60310450d0f0c020b2002419ca204412841eca20441a002418ca50441af0210450d0e0c010b200241feffff0071419ef00a46200241ef83384b72200241e0ffff007141e0cd0a46200241b9ee0a6b4107497272200241b09d0b6b41714b20024180f00b6b41e0674b7220024180800c6b419d744b72720d002002418082386b41cba454490d0d0b200241017267410276410773ad4280808080d000840b210b410321010c0b0b41e08804411c41fc96041012000b41e08804411c418c97041012000b200141204184ae041031000b41b0880441214194ae041012000b2004412041f4ae041031000b41b08804412141b4ae041012000b41b08804412141c4ae041012000b200941c30541d4ae041031000b41ee0021020c020b41f20021020c010b41f40021020b0240034002402001210341002101200221000240024002400240200341016b0e03030200010b02400240024002400240200b422088a741ff017141016b0e050004010203050b200b42ffffffff8f6083210b41fd002100410321010c060b200b42ffffffff8f608342808080802084210b41fb002100410321010c050b200b42ffffffff8f608342808080803084210b41f5002100410321010c040b200b42ffffffff8f60834280808080c00084210b41dc002100410321010c030b200ba7220141ffffffff03712001470d032001410274220041204f0d0520022000411c7176410f712200413072200041d7006a2000410a491b41948b04104321002001450440200b42ffffffff8f608342808080801084210b410321010c030b200b42017d42ffffffff0f83200b4280808080708384210b410321010c020b20074127200811010021060c050b41dc002100410121010b200720002008110100450d010c030b0b41808904412141f48a041012000b41b08904412441848b041012000b20060b910301087f230041106b220a240041012107024002402002450d00200120024101746a210b20004180fe0371410876210c200141026a210820012d00012102200041ff0171210e03402002210d0240200c20012d000022014704402008200b462001200c4b720d030c010b200a41086a2009200d200320041032200a2802082102200a28020c2101024003402001450d01200141016b210120022d0000200241016a2102200e470d000b410021070c040b2008200b460d020b20082d000121022008220141026a2108200d2209200220096a22024d0d000b41e08804411c41eca1041012000b2006450d00200520066a2103200041ffff03712102024003400240200541016a210020052d00002201411874411875220441004e047f20000520002003460d0120052d0001200441ff0071410874722101200541026a0b2105200141004a2002200220016b22024a730d0220024100480d032007410173210720032005470d010c030b0b41e88b04412b41fca1041012000b41b088044121418ca2041012000b200a41106a240020074101710b5b01027f230041206b220224002001411c6a28020021032001280218200241186a2000280200220041106a290200370300200241106a200041086a290200370300200220002902003703082003200241086a101a200241206a24000b0b002000280200200110360b1b00200128021841c4bc0441052001411c6a28020028020c1100000bfe0201037f230041406a2202240020002802002103410121000240200141186a280200220441bc8c04410c2001411c6a280200220128020c1100000d0002402003280208220004402002200036020c410121002002413c6a41013602002002420237022c200241cc8c04360228200241093602142002200241106a36023820022002410c6a36021020042001200241286a103a450d010c020b20032802002200200328020428020c110900428be4e795f2b88fd7b87f520d002002200036020c410121002002413c6a41013602002002420237022c200241cc8c043602282002410a3602142002200241106a36023820022002410c6a36021020042001200241286a103a0d010b200328020c2100200241246a41033602002002413c6a410b360200200241346a410b36020020024203370214200241948c0436021020022000410c6a3602382002200041086a3602302002410236022c200220003602282002200241286a36022020042001200241106a103a21000b200241406b240020000bd90401017f230041106b22022400024002400240024002400240024002400240024002400240024020002d000041016b0e0b0102030405060708090a0b000b410121002001280218419ab90441062001411c6a28020028020c1100000d0b024020012d0000410471450440200128021841fc8d044101200128021c28020c1100000d0d200128021841c4bc044105200128021c28020c110000450d010c0d0b200128021841fa8d044102200128021c28020c1100000d0c200241013a000f200241086a2002410f6a36020020022001290218370300200241c4bc044105103d0d0c200241f88d044102103d0d0c0b200128021841f989044101200128021c28020c11000021000c0b0b2001280218418db904410d2001411c6a28020028020c11000021000c0a0b200128021841ffb804410e2001411c6a28020028020c11000021000c090b200128021841f4b804410b2001411c6a28020028020c11000021000c080b200128021841dab804411a2001411c6a28020028020c11000021000c070b200128021841ccb804410e2001411c6a28020028020c11000021000c060b200128021841bcb80441102001411c6a28020028020c11000021000c050b200128021841b0b804410c2001411c6a28020028020c11000021000c040b200128021841a5b804410b2001411c6a28020028020c11000021000c030b2001280218419eb80441072001411c6a28020028020c11000021000c020b2001280218418fb804410f2001411c6a28020028020c11000021000c010b200128021841fcb70441132001411c6a28020028020c11000021000b200241106a240020000b1000200020012002200341b0bb04104c0b2e01017f2002200220016b22054f0440200020053602042000200120036a3602000f0b200441214194bb041012000b6901017f230041306b2204240020042001360204200420003602002004411c6a41023602002004412c6a41053602002004420237020c20042003360208200441053602242004200441206a3602182004200441046a36022820042004360220200441086a2002100c000b0bf63c0600418080040bd902636f756c64206e6f742070726f7065726c79206465636f64652073746f7261676520656e7472792f686f6d652f6d696368692f70726f6a656374732f696e6b2f6372617465732f73746f726167652f7372632f7472616974732f6d6f642e72732700010039000000a20000000a00000073746f7261676520656e7472792077617320656d707479002700010039000000a30000000a0000000c00000001000000010000000d0000002f686f6d652f6d696368692f70726f6a656374732f696e6b2f6372617465732f656e762f7372632f656e67696e652f6f6e5f636861696e2f696d706c732e7273656e636f756e746572656420756e6578706563746564206572726f72e80001001c000000a800010040000000ee000000170000002f686f6d652f6d696368692f70726f6a656374732f696e6b2f6578616d706c65732f666c69707065722f6c69622e72731c0101003000000008000000050041fc82040bd5056469737061746368696e6720696e6b2120636f6e7374727563746f72206661696c65643a200000007c010100250000006469737061746368696e6720696e6b21206d657373616765206661696c65643a20000000ac010100210000000e00000004000000040000000f0000001000000011000000617474656d707420746f206164642077697468206f766572666c6f7700000000617474656d707420746f206d756c7469706c792077697468206f766572666c6f77000000120000000000000001000000130000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f616c6c6f632f7372632f7261775f7665632e727344020100700000008a0100001c0000006361706163697479206f766572666c6f77000000c402010011000000440201007000000005020000050000006120666f726d617474696e6720747261697420696d706c656d656e746174696f6e2072657475726e656420616e206572726f722f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f616c6c6f632f7372632f666d742e727300230301006c00000064020000200000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f616c6c6f632f7372632f7665632f6d6f642e7273a003010070000000e90600000d000000a0030100700000002a07000009000000617474656d707420746f2073756274726163742077697468206f766572666c6f770041e088040b41617474656d707420746f206164642077697468206f766572666c6f7700000000617474656d707420746f206d756c7469706c792077697468206f766572666c6f770041b089040b24617474656d707420746f2073686966742072696768742077697468206f766572666c6f770041e089040bc131617474656d707420746f20646976696465206279207a65726f292e2efa040100020000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f636861722f6d6f642e72730405010070000000bc000000350000000405010070000000bc000000210000000405010070000000bd00000033000000696e646578206f7574206f6620626f756e64733a20746865206c656e20697320206275742074686520696e646578206973200000a405010020000000c40501001200000063616c6c656420604f7074696f6e3a3a756e77726170282960206f6e206120604e6f6e65602076616c75653aa01c010000000000130601000100000013060100010000001400000000000000010000001500000070616e69636b65642061742027272c2048060100010000004906010003000000603a2000a01c0100000000005d06010002000000202020202f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f666d742f6275696c646572732e7273740601007400000028000000150000002c0a280a282f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f666d742f6e756d2e7273307830303031303230333034303530363037303830393130313131323133313431353136313731383139323032313232323332343235323632373238323933303331333233333334333533363337333833393430343134323433343434353436343734383439353035313532353335343535353635373538353936303631363236333634363536363637363836393730373137323733373437353736373737383739383038313832383338343835383638373838383939303931393239333934393539363937393839392f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f666d742f6d6f642e7273000000360801006f0000004e0500000d000000360801006f000000520500000d000000360801006f0000007505000031000000360801006f0000007e05000031000000360801006f000000e2050000380000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f736c6963652f6d656d6368722e7273f8080100740000004500000015000000f8080100740000004a0000001f000000f8080100740000005300000009000000f808010074000000570000003d00000072616e676520737461727420696e64657820206f7574206f662072616e676520666f7220736c696365206f66206c656e67746820ac09010012000000be09010022000000201d010073000000340000000500000072616e676520656e6420696e64657820000a010010000000be09010022000000201d0100730000004900000005000000736c69636520696e64657820737461727473206174202062757420656e64732061742000300a010016000000460a01000d000000201d0100730000005c000000050000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f736c6963652f697465722e72730000740a010072000000c6050000250000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f736c6963652f6d6f642e7273000000f80a010071000000ee0300002f000000f80a0100710000007009000017000000f80a0100710000007b09000018000000f80a0100710000008409000014000000736f7572636520736c696365206c656e67746820282920646f6573206e6f74206d617463682064657374696e6174696f6e20736c696365206c656e6774682028ac0b010015000000c10b01002b000000f904010001000000f80a0100710000004b0d000019000000f80a0100710000004f0d000016000000f80a0100710000003f0d000015000000f80a0100710000008c0d0000360000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f7374722f636f756e742e7273000000440c0100710000004700000015000000440c0100710000005400000011000000440c0100710000005a00000009000000440c0100710000006400000011000000440c010071000000660000000d0000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f7374722f697465722e7273080d0100700000009100000026000000080d01007000000091000000110000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f7374722f7472616974732e72730000980d01007200000062010000130000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f7374722f7061747465726e2e7273001c0e010073000000a0010000470000001c0e010073000000b3010000200000001c0e010073000000b3010000110000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f7374722f6d6f642e72735b2e2e2e5d6279746520696e64657820206973206f7574206f6620626f756e6473206f662060000000340f01000b0000003f0f0100160000005c06010001000000c00e01006f0000006b00000009000000626567696e203c3d20656e642028203c3d2029207768656e20736c6963696e6720600000800f01000e0000008e0f010004000000920f0100100000005c06010001000000c00e01006f0000006f00000005000000c00e01006f0000007d0000002d000000c00e01006f0000007e00000022000000206973206e6f742061206368617220626f756e646172793b20697420697320696e7369646520202862797465732029206f662060340f01000b000000f40f0100260000001a1001000800000022100100060000005c06010001000000c00e01006f0000007f00000005000000c00e01006f0000000a010000160000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f756e69636f64652f7072696e7461626c652e72730000007010010079000000080000001800000070100100790000001a0000003600000070100100790000001e0000000900000000010305050606020706080709110a1c0b190c1a0d100e0d0f0410031212130916011704180119031a071b011c021f1620032b032d0b2e01300331023201a702a902aa04ab08fa02fb05fd02fe03ff09ad78798b8da23057588b8c901cdd0e0f4b4cfbfc2e2f3f5c5d5fe2848d8e9192a9b1babbc5c6c9cadee4e5ff00041112293134373a3b3d494a5d848e92a9b1b4babbc6cacecfe4e500040d0e11122931343a3b4546494a5e646584919b9dc9cecf0d11293a3b4549575b5c5e5f64658d91a9b4babbc5c9dfe4e5f00d11454964658084b2bcbebfd5d7f0f183858ba4a6bebfc5c7cecfdadb4898bdcdc6cecf494e4f57595e5f898e8fb1b6b7bfc1c6c7d71116175b5cf6f7feff806d71dedf0e1f6e6f1c1d5f7d7eaeaf7fbbbc16171e1f46474e4f585a5c5e7e7fb5c5d4d5dcf0f1f572738f747596262e2fa7afb7bfc7cfd7df9a409798308f1fd2d4ceff4e4f5a5b07080f10272feeef6e6f373d3f42459091536775c8c9d0d1d8d9e7feff00205f2282df048244081b04061181ac0e80ab051f09811b03190801042f043404070301070607110a500f1207550703041c0a090308030703020303030c0405030b06010e15054e071b0757070206160d500443032d03010411060f0c3a041d255f206d046a2580c80582b0031a0682fd03590716091809140c140c6a060a061a0659072b05460a2c040c040103310b2c041a060b0380ac060a062f314d0380a4083c030f033c0738082b0582ff1118082f112d03210f210f808c048297190b158894052f053b07020e180980be22740c80d61a0c0580ff0580df0cf29d033709815c1480b80880cb050a183b030a06380846080c06740b1e035a0459098083181c0a16094c04808a06aba40c170431a10481da26070c050580a61081f50701202a064c04808d0480be031b030f0d000601010301040205070702080809020a050b020e041001110212051311140115021702190d1c051d0824016a046b02af03bc02cf02d102d40cd509d602d702da01e005e102e704e802ee20f004f802fa02fb010c273b3e4e4f8f9e9e9f7b8b9396a2b2ba86b1060709363d3e56f3d0d1041418363756577faaaeafbd35e01287898e9e040d0e11122931343a4546494a4e4f64655cb6b71b1c07080a0b141736393aa8a9d8d909379091a8070a3b3e66698f926f5fbfeeef5a62f4fcff9a9b2e2f2728559da0a1a3a4a7a8adbabcc4060b0c151d3a3f4551a6a7cccda007191a22253e3fe7ecefffc5c604202325262833383a484a4c50535556585a5c5e606365666b73787d7f8aa4aaafb0c0d0aeaf6e6f935e227b0503042d036603012f2e80821d03310f1c0424091e052b0544040e2a80aa06240424042808340b4e43813709160a08183b45390363080930160521031b05014038044b052f040a070907402027040c0936033a051a07040c07504937330d33072e080a8126524e28082a161a261c1417094e042409440d19070a0648082709750b3f412a063b050a0651060105100305808b621e48080a80a65e22450b0a060d133a060a362c041780b93c64530c48090a46451b4808530d498107460a1d03474937030e080a0639070a81361980b7010f320d839b66750b80c48a4c630d842f8fd18247a1b98239072a045c06260a460a28051382b05b654b0439071140050b020e97f80884d62a09a2e781332d03110408818c89046b050d0309071092604709743c80f60a7308701546809a140c570919808781470385420f1584501f80e12b80d52d031a040281401f113a050184e080f7294c040a04028311444c3d80c23c06010455051b3402810e2c04640c560a80ae381d0d2c040907020e06809a83d80510030d03740c59070c04010f0c0438080a062808224e81540c1503050307091d030b05060a0a060808070980cb250a84062f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f756e69636f64652f756e69636f64655f646174612e7273000000851601007c0000004b00000028000000851601007c0000004f00000009000000851601007c0000004d00000009000000851601007c0000005400000011000000851601007c0000005600000011000000851601007c0000005700000016000000851601007c0000005800000009000000851601007c000000520000003e0000002f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f697465722f7472616974732f616363756d2e727300000084170100790000008d00000001000000fd0601006f000000cd010000050000000003000083042000910560005d13a0001217201f0c20601fef2ca02b2a30202c6fa6e02c02a8602d1efb602e00fe20369eff6036fd01e136010a2137240de137ab0e61392f18a139301ce147f31e214cf06ae14f4f6f21509dbca15000cf615165d1a15100da215200e0e15330e16155aee2a156d0e8e15620006e57f001ff5700700007002d0101010201020101480b30151001650702060202010423011e1b5b0b3a09090118040109010301052b033c082a180120370101010408040103070a021d013a0101010204080109010a021a010202390104020402020303011e0203010b0239010405010204011402160601013a0101020104080107030a021e013b0101010c01090128010301370101030503010407020b021d013a01020102010301050207020b021c02390201010204080109010a021d0148010401020301010801510102070c08620102090b064a021b0101010101370e01050102050b0124090166040106010202021902040310040d01020206010f01000300031d021e021e02400201070801020b09012d030101750222017603040209010603db0202013a010107010101010208060a0201301f310430070101050128090c0220040202010338010102030101033a0802029803010d0107040106010302c6400001c32100038d016020000669020004010a200250020001030104011902050197021a120d012608190b2e0330010204020227014306020202020c0108012f01330101030202050201012a020801ee010201040100010010101000020001e201950500030102050428030401a50200040002990b31047b01360f290102020a033104020207013d03240501083e010c0234090a0402015f03020101020601a0010308150239020101010116010e070305c308020301011701510102060101020101020102eb010204060201021b025508020101026a0101010206010165030204010500090102f5010a0201010401900402020401200a280602040801090602032e0d010200070106010152160207010201027a060301010201070101480203010101000200053b0700013f0451010002002e0217000101030405080802071e0494030037043208010e011605010f00070111020701020105000700013d0400076d07006080f000617373657274696f6e206661696c65643a206d6964203c3d2073656c662e6c656e28290a00a01c010000000000861b0100010000002f686f6d652f6d696368692f70726f6a656374732f696e6b2f6372617465732f656e762f7372632f656e67696e652f6f6e5f636861696e2f6275666665722e7273000000981b0100410000005800000031000000981b0100410000008b0000002100000045636473615265636f766572794661696c65644c6f6767696e6744697361626c6564556e6b6e6f776e4e6f7443616c6c61626c65436f64654e6f74466f756e645f456e646f776d656e74546f6f4c6f775472616e736665724661696c65645f42656c6f7753756273697374656e63655468726573686f6c644b65794e6f74466f756e6443616c6c6565526576657274656443616c6c6565547261707065644465636f6465a01c0100000000007061696420616e20756e70617961626c65206d657373616765636f756c64206e6f74207265616420696e707574756e61626c6520746f206465636f646520696e707574656e636f756e746572656420756e6b6e6f776e2073656c6563746f72756e61626c6520746f206465636f64652073656c6563746f722f686f6d652f6d696368692f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d756e6b6e6f776e2d6c696e75782d676e752f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f736c6963652f696e6465782e727300201d0100730000001e010000470041b0bb040bf301617474656d707420746f2073756274726163742077697468206f766572666c6f772f686f6d652f6d696368692f2e636172676f2f72656769737472792f7372632f6769746875622e636f6d2d316563633632393964623965633832332f7061726974792d7363616c652d636f6465632d332e312e352f7372632f636f6465632e72730000d11d0100610000007a0000000e0000004572726f72000000000000000100000002000000030000000400000005000000060000000700000008000000090000000c0000000b000000190000001c000000160000001400000019000000071d0100eb1c0100d51c0100c11c0100a81c01" - }, - "contract": { - "name": "flipper", - "version": "4.0.0-alpha.1", - "authors": [ - "Parity Technologies " - ] - }, - "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": false, - "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" - } - } - } - ], - "version": "4" -} +{"source":{"hash":"0xa5b19cb655755feba8e34ab5b413ac6593ecc7e24e19af485a4d30036be9d577","language":"ink! 4.2.0","compiler":"rustc 1.69.0","wasm":"0x0061736d0100000001450c60027f7f017f60037f7f7f017f60027f7f0060037f7f7f0060017f0060047f7f7f7f017f60000060047f7f7f7f0060017f017f60017f017e60057f7f7f7f7f006000017f028a0107057365616c310b6765745f73746f726167650005057365616c301176616c75655f7472616e736665727265640002057365616c3005696e7075740002057365616c300d64656275675f6d6573736167650000057365616c320b7365745f73746f726167650005057365616c300b7365616c5f72657475726e000303656e76066d656d6f7279020102100337360102030b0803040002080102020604030202060600010103000300070204060202000400040900000a0507050000030a01000000000704050170010f0f0608017f01418080040b0711020463616c6c0018066465706c6f7900190914010041010b0e0d32273a29333839281c1e20372b0ac744362b01017f037f2002200346047f200005200020036a200120036a2d00003a0000200341016a21030c010b0b0b2601017f230041106b22022400200220003a000f20012002410f6a41011008200241106a24000b5c01037f02402000280208220420026a220320044f04402003200028020422054b0d01200028020020046a200320046b2001200241cc97041035200020033602080f0b41909604411c41ac9704101f000b2003200541bc9704100b000b5502027f027e230041206b22002400200041106a22014200370300200042003703082000411036021c200041086a2000411c6a10012001290300210220002903082103200041206a2400410541042002200384501b0b1b002000418180014f044020004180800141a88104100b000b20000b7501017f230041306b220324002003200136020420032000360200200341146a41023602002003411c6a41023602002003412c6a4103360200200341988f0436021020034100360208200341033602242003200341206a3602182003200341046a36022820032003360220200341086a2002100e000b5201017f230041206b220124002001410c6a4101360200200141146a41013602002001418c9504360208200141003602002001410136021c200120003602182001200141186a360210200141b08204100e000b910101017f230041306b22022400200241146a41013602002002411c6a41013602002002418c95043602102002410036020820024102360224200220002d0000410274220041ac9a046a28020036022c2002200041c09a046a280200360228200141046a28020021002002200241206a3602182002200241286a36022020012802002000200241086a1036200241306a24000b3c01017f230041206b22022400200241013a00182002200136021420022000360210200241d08a0436020c2002418c9604360208200241086a102a000b4001017f230041106b22012400200141003a000f20002001410f6a41011010047f4102054101410220012d000f22004101461b410020001b0b200141106a24000b6001047f230041106b22032400200028020422042002492205450440200341086a4100200220002802002206103b200120022003280208200328020c419c9a0410352003200220042006103b200020032903003702000b200341106a240020050b4701017f230041106b220224002002410036020c024020012002410c6a410410104504402000200228020c360001200041003a00000c010b200041013a00000b200241106a24000b3f01017f230041106b22022400200242808001370204200241dc9a0436020020022001047f20024101101741010541000b101720002002280208100a1016000b3701017f230041106b22002400200042808001370204200041dc9a0436020020004100101720004100101741002000280208100a1016000bae0102057f017e230041306b2201240020014100360218200142808001370224200141dc9a043602202001410036021c200141206a22022001411c6a4104100820012001290320370310200141086a200141106a220320012802281015200128020c2104200128020820012903102106200141003602282001200637032020002002100720012001290320370310200120032001280228101520042001280200200128020410041a200141306a24000b4501017f2002200128020422034b044041ac9604412341ec9704101f000b2001200320026b36020420012001280200220120026a36020020002002360204200020013602000b0d00200041dc9a0420011005000ba10101027f20002802082202200028020422034904402000200241016a360208200028020020026a20013a00000f0b230041306b220024002000200336020420002002360200200041146a41023602002000411c6a41023602002000412c6a4103360200200041a48a0436021020004100360208200041033602242000200041206a360218200020003602282000200041046a360220200041086a41dc9704100e000bab0501077f230041406a22002400024002400240024002400240100941ff0171410546044020004180800136022041dc9a04200041206a100220002802202201418180014f0d0120002001360224200041dc9a04360220200041106a200041206a101120002d00100d0520002800112201411876210220014110762104200141087621030240200141ff01712201412f470440200141e30047200341ff0171413a4772200441ff017141a50147720d0741012101200241d100460d010c070b200341ff017141860147200441ff017141db0047720d0641002101200241d901470d060b20004100360218200042808001370224200041dc9a043602202000410036023c200041206a22032000413c6a4104100820002000290320370310200041086a200041106a20002802281015200028020c210520002802082000280210210220002000280214220436022020052002200310002103200420002802202205490d02024002400240410c20032003410c4f1b0e0402000001000b2000412c6a4101360200200041346a4100360200200041d481043602282000418c960436023020004100360220200041206a41dc8104100e000b2000412c6a4101360200200041346a41003602002000418883043602280c070b2000200536022420002002360220200041206a100f41ff017122024102460d042001450d032002451014410041001012000b200041043a0020200041206a100c000b20014180800141cc8004100b000b2005200441cc8004100b000b230041106b22002400200042808001370204200041dc9a0436020020004100101720024100472000100741002000280208100a1016000b2000412c6a4101360200200041346a4100360200200041e882043602280c010b410141011012000b2000418c960436023020004100360220200041206a41b08204100e000b8c0201057f230041106b2200240002400240100941ff01712201410546044020004180800136020041dc9a042000100220002802002201418180014f0d0120002001360204200041dc9a04360200200041086a20001011024020002d00080d002000280009220141187621022001411076210320014108762104200141ff0171220141e1004704402001419b0147200441ff017141ae014772200341ff0171419d0147200241de004772720d012000100f41ff017122004102460d01200010141013000b200441ff017141ef0147200341ff017141fe0047720d002002413e460d030b410141011012000b200020013a00002000100c000b20014180800141cc8004100b000b410010141013000b5501017f230041206b2202240020022000360204200241186a200141106a290200370300200241106a200141086a29020037030020022001290200370308200241046a41908304200241086a101b200241206a24000bee0301057f230041406a22032400200341033a003820034280808080800437033020034100360228200341003602202003200136021c20032000360218027f0240024020022802002201450440200241146a28020022004103742105200041ffffffff017121072002280210210441002101034020012005460d02200228020820016a220041046a28020022060440200328021820002802002006200328021c28020c1101000d040b200141086a2101200428020020042802042106200441086a2104200341186a2006110000450d000b0c020b200228020422074105742100200741ffffff3f71210703402000450d01200228020820046a220541046a28020022060440200328021820052802002006200328021c28020c1101000d030b20032001411c6a2d00003a00382003200141146a290200370330200341106a200228021022052001410c6a103420032003290310370320200341086a2005200141046a103420032003290308370328200441086a2104200041206b210020012802002106200141206a2101200520064103746a2205280200200341186a2005280204110000450d000b0c010b2002410c6a28020020074b04402003280218200228020820074103746a22002802002000280204200328021c28020c1101000d010b41000c010b41010b200341406b24000b0f00200028020020012002101d41000b7701027f230041106b2204240020022000280200200028020822036b4b0440200441086a20002003200210212004280208200428020c1022200028020821030b200028020420036a2001200210061a2003200220036a22014b044041b08304411c41a08904101f000b20002001360208200441106a24000bdd0201037f230041106b220224000240024002400240200028020022002002410c6a027f0240024020014180014f04402002410036020c2001418010490d012001418080044f0d0220022001413f71418001723a000e20022001410c7641e001723a000c20022001410676413f71418001723a000d41030c030b200028020822032000280200460d030c040b20022001413f71418001723a000d2002200141067641c001723a000c41020c010b20022001413f71418001723a000f20022001410676413f71418001723a000e20022001410c76413f71418001723a000d2002200141127641077141f001723a000c41040b101d0c020b230041106b22042400200441086a20002003410110212004280208200428020c1022200441106a2400200028020821030b200028020420036a20013a0000200341016a2201450d01200020013602080b200241106a240041000f0b41b08304411c41908904101f000b5001017f230041206b220324002003410c6a4101360200200341146a41003602002003418c9604360210200341003602002003200136021c200320003602182003200341186a36020820032002100e000b4a01017f230041206b220224002000280200200241186a200141106a290200370300200241106a200141086a29020037030020022001290200370308200241086a101a200241206a24000bac0401067f230041206b2204240002402000027f4100200220036a22032002490d001a2001280200220220026a22062002490d0141082006200320032006491b2203200341084d1b2203417f73411f7621050240200204402004410136021820042002360214200420012802043602100c010b200441003602180b200441106a2107230041106b220624002004027f0240027f0240200504400240200341004e044020072802080d012006200310252006280204210220062802000c040b0c040b20072802042209450440200641086a20031025200628020c210220062802080c030b20032102410041d49a04280200220520036a22082005490d021a2007280200210741d89a042802002008490440200341ffff036a220841107640002202417f46200241ffff0371200247720d022002411074220520084180807c716a22022005490d0241d89a042002360200200321024100200320056a22082005490d031a0b41d49a04200836020041002005450d021a20052007200910060c020b200420033602040c020b2003210241000b2205044020042005360204200441086a200236020041000c020b20042003360204200441086a410136020041010c010b200441086a410036020041010b360200200641106a240020042802004504402004280204210220012003360200200120023602044181808080780c010b20042802042103200441086a2802000b36020420002003360200200441206a24000f0b41d08304412141f88404101f000b1f00024020014181808080784704402001450d0120001023000b0f0b1024000b900101017f230041306b220124002001200036020c2001411c6a4102360200200141246a4101360200200141c88604360218200141003602102001410336022c2001200141286a36022020012001410c6a360228230041206b22002400200041003a0018200041d886043602142000200141106a360210200041d08a0436020c2000418c9604360208200041086a102a000b4601017f230041206b22002400200041146a41013602002000411c6a41003602002000419c85043602102000418c960436021820004100360208200041086a41a48504100e000ba10101027f027f410041d49a04280200220220016a22032002490d001a024041d89a042802002003490440200141ffff036a22032001490d01200341107640002202417f46200241ffff0371200247720d012002411074220220034180807c716a22032002490d0141d89a0420033602004100200120026a22032002490d021a0b41d49a04200336020020020c010b41000b210320002001360204200020033602000b5301027f230041106b2202240002402001450440410121030c010b200141004e0440200241086a20011025200228020822030d0120011023000b1024000b2000200336020420002001360200200241106a24000bd806020b7f027e230041406a2203240020002802002202ad210d0240024002400240024002400240024020024190ce004f044041272100200d210e0240034020004104490d01200341196a20006a220241046b200e200e4290ce0080220d4290ce007e7da7220441ffff037141e4006e220641017441878c046a2f00003b0000200241026b2004200641e4006c6b41ffff037141017441878c046a2f00003b0000200041046b2100200e42ffc1d72f56200d210e0d000b200da7220241e3004d0d0320004102490d090c020b0c080b41272100200241e3004b0d002002410a490d040c020b200041026b2200200341196a6a200da72202200241ffff037141e4006e220241e4006c6b41ffff037141017441878c046a2f00003b00000b2002410a490d01200041024f0d000c050b200041026b2200200341196a6a200241017441878c046a2f00003b00000c020b2000450d030b200041016b2200200341196a6a200241306a3a00000b200041274b0d01412820006b412720006b22062001280218220541017122071b21024100210420054104710440418c960421042002418c9604418c9604102c20026a22024b0d010b412b418080c40020071b2107200341196a20006a2108024020012802084504404101210020012802002202200141046a280200220120072004102f0d01200220082006200128020c11010021000c010b024020022001410c6a28020022094904402005410871450d01200128021c210b2001413036021c20012d0020210c41012100200141013a002020012802002205200141046a280200220a20072004102f0d02200341106a2001200920026b4101103020032802142202418080c400460d022003280210200520082006200a28020c1101000d0220022005200a10310d022001200c3a00202001200b36021c410021000c020b4101210020012802002202200141046a280200220120072004102f0d01200220082006200128020c11010021000c010b41012100200341086a2001200920026b41011030200328020c2205418080c400460d00200328020820012802002202200141046a280200220120072004102f0d00200220082006200128020c1101000d00200520022001103121000b200341406b240020000f0b41b08904411c41c48e04101f000b41d08904412141f49404101f000b0300010b0e0020002802001a03400c000b000baa05020a7f017e230041406a220124002001200036020c2001412c6a4102360200200141346a4101360200200141d09604360228200141003602202001410436023c2001200141386a36023020012001410c6a360238200141106a210641002100230041306b22022400200141206a220441146a2802002107200428020821050240024002400240200241086a027f024002400240200241106a027f024002402004410c6a28020022080e020001040b20070d02418c9604210341000c010b20070d022005280200210320052802040b22001026200228021021042006200228021422053602042006200436020020052003200010061a200620003602080c040b200428021021090c010b200541046a21032008410374210a2004280210210903402000200020032802006a22004b0d04200341086a2103200a41086b220a0d000b20002007450d011a2000410f4b0d0041002005280204450d011a0b200020006a22034100200020034d1b0b10262002290308210b200641003602082006200b3702002002200736022c200220093602282002200836022420022005360220200220042902003703182006200241186a101a0d020b200241306a24000c020b41b08304411c41e49404101f000b230041406a220024002000413336020c200041e88604360208200041f483043602142000200241186a360210200041246a41023602002000412c6a41023602002000413c6a4106360200200041848b0436022020004100360218200041023602342000200041306a3602282000200041106a3602382000200041086a360230200041186a418c8804100e000b2001280214210020012802182101024041dc9a052d000045044041dd9a052d00004101710d010b410c20002001100322002000410c4f1b410947044041dc9a0541013a00000b41dd9a0541013a00000b000b0c0042f8f3eee1d7afe2bb350ba704010a7f230041106b2203240002400240200020016b22024110490d002002200141036a417c7120016b220049200041044b720d00200220006b22044104490d0020012000102d2206200020016a22082004417c716a2004410371102d6a220220064f0440200441027621050240024003402005450d0520032008200541c0012005200541c0014f1b41a09004102e200328020c21052003280208210820032003280200200328020422002000417c7141909204102e200328020c210920032802082107024020032802042200450440410021010c010b2003280200220420004102746a210a4100210103402004220641106a2104410021000240034020012001200020066a280200220b417f73410776200b410676724181828408716a22014d0440200041046a22004110470d010c020b0b41b08904411c41a09204101f000b2004200a470d000b0b20022002200141087641ff81fc0771200141ff81fc07716a418180046c4110766a22024b0d012009450d000b200941027421004100210103402001200120072802002204417f734107762004410676724181828408716a22014b0d02200741046a2107200041046b22000d000b20022002200141087641ff81fc0771200141ff81fc07716a418180046c4110766a22024d0d0441b08904411c41d09204101f000b41b08904411c41b09204101f000b41b08904411c41c09204101f000b41b08904411c41809204101f000b20012002102d21020b200341106a240020020b4601017f200145044041000f0b024003402002200220002c000041bf7f4a6a22024b0d01200041016a2100200141016b22010d000b20020f0b41b08904411c41e49404101f000b3e00200220034f044020002003360204200020013602002000410c6a200220036b3602002000200120034102746a3602080f0b41ac960441232004101f000b39000240027f2002418080c40047044041012000200220012802101100000d011a0b20030d0141000b0f0b200020034100200128020c1101000bae0101027f20022104024002400240200320012d0020220320034103461b41ff0171220341016b0e03010001020b200241016a2203044020034101762104200241017621030c020b41b08904411c41d48e04101f000b41002104200221030b200341016a2102200128021c2103200128020421052001280200210102400340200241016b2202450d01200120032005280210110000450d000b418080c40021030b20002003360204200020043602000b3201017f027f0340200020002004460d011a200441016a2104200220012003280210110000450d000b200441016b0b2000490bea04010b7f230041106b2209240020002802042104200028020021030240024002402001280208220b410147200128021022024101477145044020024101470d02200320046a210c200141146a28020041016a210a410021022003210003402000200c460d03027f024020002c0000220641004e0440200041016a2105200641ff017121070c010b20002d0001413f7121052006411f7121072006415f4d044020074106742005722107200041026a21050c010b20002d0002413f7120054106747221082006417049044020082007410c74722107200041036a21050c010b200041046a210520022106418080c4002007411274418080f0007120002d0003413f71200841067472722207418080c400460d011a0b2002200520006b6a22062002490d0320070b2108200a41016b220a044020052100200621022008418080c400470d010c040b0b2008418080c400460d02024002402002450d00200220044f04404100210020022004460d010c020b41002100200220036a2c00004140480d010b200321000b2002200420001b21042000200320001b21030c020b200128020020032004200128020428020c11010021000c020b41b08904411c41d49304101f000b200b450440200128020020032004200128020428020c11010021000c010b2001410c6a2802002200200320046a2003102c22024b0440200941086a2001200020026b4100103041012100200928020c2202418080c400460d0120092802082001280200220520032004200141046a280200220128020c1101000d01200220052001103121000c010b200128020020032004200128020428020c11010021000b200941106a240020000b140020002802002001200028020428020c1100000b5501027f0240027f02400240200228020041016b0e020103000b200241046a0c010b200120022802044103746a22012802044105470d0120012802000b2802002104410121030b20002004360204200020033602000b8501002001200346044020002002200110061a0f0b230041306b220024002000200336020420002001360200200041146a41033602002000411c6a41023602002000412c6a4103360200200041f0900436021020004100360208200041033602242000200041206a360218200020003602282000200041046a360220200041086a2004100e000b4901017f230041206b22032400200341186a200241106a290200370300200341106a200241086a2902003703002003200229020037030820002001200341086a101b200341206a24000b18002001280200418495044105200128020428020c1101000b5801027f230041206b22022400200128020421032001280200200241186a2000280200220041106a290200370300200241106a200041086a290200370300200220002902003703082003200241086a101b200241206a24000b0b002000280200200110320b990301037f230041406a22022400200028020021034101210002402001280200220441e08a04410c200141046a280200220128020c1101000d0002402003280208220004402002200036020c200241346a4102360200410121002002413c6a4101360200200241f08a0436023020024100360228200241073602142002200241106a36023820022002410c6a36021020042001200241286a1036450d010c020b20032802002200200328020428020c11090042c8b5e0cfca86dbd3897f520d002002200036020c200241346a4102360200410121002002413c6a4101360200200241f08a0436023020024100360228200241083602142002200241106a36023820022002410c6a36021020042001200241286a10360d010b200328020c21002002411c6a4103360200200241246a41033602002002413c6a4103360200200241346a4103360200200241b88a043602182002410036021020022000410c6a3602382002200041086a3602302002410236022c200220003602282002200241286a36022020042001200241106a103621000b200241406b240020000b2c00200120024d04402000200220016b3602042000200120036a3602000f0b41909904412141f49804101f000b0bd21a0300418080040ba5032f55736572732f616e6472656561656674656e652f776f726b2f696e6b2d342e322e302f6372617465732f656e762f7372632f656e67696e652f6f6e5f636861696e2f6578742e72730000000000010049000000e4000000140000002f55736572732f616e6472656561656674656e652f776f726b2f696e6b2d342e322e302f6372617465732f656e762f7372632f656e67696e652f6f6e5f636861696e2f696d706c732e7273005c0001004b0000002401000023000000656e636f756e746572656420756e6578706563746564206572726f72b80001001c0000005c0001004b000000ed000000170000002f55736572732f616e6472656561656674656e652f776f726b2f696e6b2d342e322e302f696e746567726174696f6e2d74657374732f666c69707065722f6c69622e7273ec000100440000000600000005000000636f756c64206e6f742070726f7065726c79206465636f64652073746f7261676520656e74727900400101002700000073746f7261676520656e7472792077617320656d7074790070010100170000000900000004000000040000000a0000000b0000000c0041b083040bd115617474656d707420746f206164642077697468206f766572666c6f7700000000617474656d707420746f206d756c7469706c792077697468206f766572666c6f770000000900000000000000010000000d0000002f55736572732f616e6472656561656674656e652f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d6170706c652d64617277696e2f6c69622f727573746c69622f7372632f727573742f6c6962726172792f616c6c6f632f7372632f7261775f7665632e727304020100740000008f0100001c0000006361706163697479206f766572666c6f77000000880201001100000004020100740000000d020000050000002f55736572732f616e6472656561656674656e652f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d6170706c652d64617277696e2f6c69622f727573746c69622f7372632f727573742f6c6962726172792f616c6c6f632f7372632f616c6c6f632e72736d656d6f727920616c6c6f636174696f6e206f6620206279746573206661696c656426030100150000003b0301000d000000b4020100720000009f0100000d0000006120666f726d617474696e6720747261697420696d706c656d656e746174696f6e2072657475726e656420616e206572726f722f55736572732f616e6472656561656674656e652f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d6170706c652d64617277696e2f6c69622f727573746c69622f7372632f727573742f6c6962726172792f616c6c6f632f7372632f666d742e7273009b0301007000000064020000200000002f55736572732f616e6472656561656674656e652f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d6170706c652d64617277696e2f6c69622f727573746c69622f7372632f727573742f6c6962726172792f616c6c6f632f7372632f7665632f6d6f642e72731c04010074000000350700000d0000001c04010074000000a307000009000000617474656d707420746f206164642077697468206f766572666c6f7700000000617474656d707420746f2073756274726163742077697468206f766572666c6f7729696e646578206f7574206f6620626f756e64733a20746865206c656e20697320206275742074686520696e64657820697320f20401002000000012050100120000003a0000000c0b010000000000340501000100000034050100010000000900000000000000010000000e00000070616e69636b65642061742027272c206c050100010000006d050100030000003a2000000c0b01000000000080050100020000002f55736572732f616e6472656561656674656e652f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d6170706c652d64617277696e2f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f666d742f6e756d2e727330303031303230333034303530363037303830393130313131323133313431353136313731383139323032313232323332343235323632373238323933303331333233333334333533363337333833393430343134323433343434353436343734383439353035313532353335343535353635373538353936303631363236333634363536363637363836393730373137323733373437353736373737383739383038313832383338343835383638373838383939303931393239333934393539363937393839392f55736572732f616e6472656561656674656e652f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d6170706c652d64617277696e2f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f666d742f6d6f642e72730000cf06010073000000750500000d000000cf060100730000000506000038000000206f7574206f662072616e676520666f7220736c696365206f66206c656e6774682072616e676520656e6420696e646578200000860701001000000064070100220000002f55736572732f616e6472656561656674656e652f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d6170706c652d64617277696e2f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f736c6963652f697465722e72730000a807010076000000c005000025000000736f7572636520736c696365206c656e67746820282920646f6573206e6f74206d617463682064657374696e6174696f6e20736c696365206c656e67746820283008010015000000450801002b000000f1040100010000002f55736572732f616e6472656561656674656e652f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d6170706c652d64617277696e2f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f7374722f636f756e742e72730000008808010075000000470000001500000088080100750000004f000000320000008808010075000000540000001100000088080100750000005a00000009000000880801007500000064000000110000008808010075000000660000000d0000002f55736572732f616e6472656561656674656e652f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d6170706c652d64617277696e2f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f7374722f697465722e7273600901007400000091000000110000002f55736572732f616e6472656561656674656e652f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d6170706c652d64617277696e2f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f697465722f7472616974732f616363756d2e7273000000e40901007d00000095000000010000009405010073000000cd010000050000004572726f720000000c0b0100000000007061696420616e20756e70617961626c65206d657373616765636f756c64206e6f74207265616420696e707574756e61626c6520746f206465636f646520696e707574656e636f756e746572656420756e6b6e6f776e2073656c6563746f72756e61626c6520746f206465636f64652073656c6563746f7200000000617474656d707420746f206164642077697468206f766572666c6f77617373657274696f6e206661696c65643a206d6964203c3d2073656c662e6c656e28290a0c0b0100000000004f0b0100010000002f55736572732f616e6472656561656674656e652f776f726b2f696e6b2d342e322e302f6372617465732f656e762f7372632f656e67696e652f6f6e5f636861696e2f6275666665722e7273600b01004c0000005a0000001c000000600b01004c0000005a00000009000000600b01004c0000005a00000031000000600b01004c0000006500000009000000600b01004c0000008d000000210000002f55736572732f616e6472656561656674656e652f2e7275737475702f746f6f6c636861696e732f737461626c652d7838365f36342d6170706c652d64617277696e2f6c69622f727573746c69622f7372632f727573742f6c6962726172792f636f72652f7372632f736c6963652f696e6465782e727300fc0b010077000000820100004700419099040bc301617474656d707420746f2073756274726163742077697468206f766572666c6f772f55736572732f616e6472656561656674656e652f2e636172676f2f72656769737472792f7372632f6769746875622e636f6d2d316563633632393964623965633832332f7061726974792d7363616c652d636f6465632d332e352e302f7372632f636f6465632e727300b10c01006a000000780000000e000000190000001c000000160000001400000019000000f30a0100d70a0100c10a0100ad0a0100940a01","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 "]},"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"} \ No newline at end of file diff --git a/packages/api-contract/src/test/contracts/ink/v4/flipper.json b/packages/api-contract/src/test/contracts/ink/v4/flipper.json index e3cbe9bf7d76..d2232d656eda 100644 --- a/packages/api-contract/src/test/contracts/ink/v4/flipper.json +++ b/packages/api-contract/src/test/contracts/ink/v4/flipper.json @@ -1,12 +1,21 @@ { "source": { - "hash": "0xf051c631190ac47f82e280ba763df932210f6e2447978e24cbe0dcc6d6903c7a", - "language": "ink! 4.0.0-alpha.1", - "compiler": "rustc 1.63.0" + "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.0.0-alpha.1", + "version": "4.2.0", "authors": [ "Parity Technologies " ] @@ -25,39 +34,109 @@ } } ], + "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": "default", + "label": "new_default", "payable": false, - "selector": "0xed4b9d1b" + "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": null, + "returnType": { + "displayName": [ + "ink", + "MessageResult" + ], + "type": 1 + }, "selector": "0x633aa551" }, { "args": [], + "default": false, "docs": [ " Returns the current value of the Flipper's boolean." ], @@ -66,27 +145,34 @@ "payable": false, "returnType": { "displayName": [ - "bool" + "ink", + "MessageResult" ], - "type": 0 + "type": 4 }, "selector": "0x2f865bd9" } ] }, "storage": { - "struct": { - "fields": [ - { - "layout": { - "cell": { - "key": "0x0000000000000000000000000000000000000000000000000000000000000000", - "ty": 0 + "root": { + "layout": { + "struct": { + "fields": [ + { + "layout": { + "leaf": { + "key": "0x00000000", + "ty": 0 + } + }, + "name": "value" } - }, - "name": "value" + ], + "name": "Flipper" } - ] + }, + "root_key": "0x00000000" } }, "types": [ @@ -97,6 +183,213 @@ "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" diff --git a/packages/api-contract/src/test/contracts/ink/v4/flipper.wasm b/packages/api-contract/src/test/contracts/ink/v4/flipper.wasm index 625c7b1667a0..3f77edb2319a 100644 Binary files a/packages/api-contract/src/test/contracts/ink/v4/flipper.wasm and b/packages/api-contract/src/test/contracts/ink/v4/flipper.wasm differ diff --git a/packages/api-contract/src/types.ts b/packages/api-contract/src/types.ts index 25d2a4392777..049dc11103a9 100644 --- a/packages/api-contract/src/types.ts +++ b/packages/api-contract/src/types.ts @@ -37,6 +37,7 @@ export interface AbiMessage { identifier: string; index: number; isConstructor?: boolean; + isDefault?: boolean; isMutating?: boolean; isPayable?: boolean; method: string; diff --git a/packages/types-augment/src/registry/interfaces.ts b/packages/types-augment/src/registry/interfaces.ts index 762a89c48b51..e5937950e0a7 100644 --- a/packages/types-augment/src/registry/interfaces.ts +++ b/packages/types-augment/src/registry/interfaces.ts @@ -24,7 +24,7 @@ import type { StatementKind } from '@polkadot/types/interfaces/claims'; import type { CollectiveOrigin, MemberCount, ProposalIndex, Votes, VotesTo230 } from '@polkadot/types/interfaces/collective'; import type { AuthorityId, RawVRFOutput } from '@polkadot/types/interfaces/consensus'; import type { AliveContractInfo, CodeHash, CodeSource, CodeUploadRequest, CodeUploadResult, CodeUploadResultValue, ContractCallFlags, ContractCallRequest, ContractExecResult, ContractExecResultOk, ContractExecResultResult, ContractExecResultSuccessTo255, ContractExecResultSuccessTo260, ContractExecResultTo255, ContractExecResultTo260, ContractExecResultTo267, ContractExecResultU64, ContractInfo, ContractInstantiateResult, ContractInstantiateResultTo267, ContractInstantiateResultTo299, ContractInstantiateResultU64, ContractReturnFlags, ContractStorageKey, DeletedContract, ExecReturnValue, Gas, HostFnWeights, HostFnWeightsTo264, InstantiateRequest, InstantiateRequestV1, InstantiateRequestV2, InstantiateReturnValue, InstantiateReturnValueOk, InstantiateReturnValueTo267, InstructionWeights, Limits, LimitsTo264, PrefabWasmModule, RentProjection, Schedule, ScheduleTo212, ScheduleTo258, ScheduleTo264, SeedOf, StorageDeposit, TombstoneContractInfo, TrieId } from '@polkadot/types/interfaces/contracts'; -import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractContractSpecV4, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractMetadataV4, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi'; +import type { ContractConstructorSpecLatest, ContractConstructorSpecV0, ContractConstructorSpecV1, ContractConstructorSpecV2, ContractConstructorSpecV3, ContractConstructorSpecV4, ContractContractSpecV0, ContractContractSpecV1, ContractContractSpecV2, ContractContractSpecV3, ContractContractSpecV4, ContractCryptoHasher, ContractDiscriminant, ContractDisplayName, ContractEnvironment, ContractEventParamSpecLatest, ContractEventParamSpecV0, ContractEventParamSpecV2, ContractEventSpecLatest, ContractEventSpecV0, ContractEventSpecV1, ContractEventSpecV2, ContractLayoutArray, ContractLayoutCell, ContractLayoutEnum, ContractLayoutHash, ContractLayoutHashingStrategy, ContractLayoutKey, ContractLayoutStruct, ContractLayoutStructField, ContractMessageParamSpecLatest, ContractMessageParamSpecV0, ContractMessageParamSpecV2, ContractMessageSpecLatest, ContractMessageSpecV0, ContractMessageSpecV1, ContractMessageSpecV2, ContractMessageSpecV3, ContractMetadata, ContractMetadataLatest, ContractMetadataV0, ContractMetadataV1, ContractMetadataV2, ContractMetadataV3, ContractMetadataV4, ContractProject, ContractProjectContract, ContractProjectInfo, ContractProjectSource, ContractProjectV0, ContractSelector, ContractStorageLayout, ContractTypeSpec } from '@polkadot/types/interfaces/contractsAbi'; import type { FundIndex, FundInfo, LastContribution, TrieIndex } from '@polkadot/types/interfaces/crowdloan'; import type { CollationInfo, CollationInfoV1, ConfigData, MessageId, OverweightIndex, PageCounter, PageIndexData } from '@polkadot/types/interfaces/cumulus'; import type { AccountVote, AccountVoteSplit, AccountVoteStandard, Conviction, Delegations, PreimageStatus, PreimageStatusAvailable, PriorLock, PropIndex, Proposal, ProxyState, ReferendumIndex, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, ReferendumStatus, Tally, Voting, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces/democracy'; @@ -253,6 +253,7 @@ declare module '@polkadot/types/types/registry' { ContractConstructorSpecV1: ContractConstructorSpecV1; ContractConstructorSpecV2: ContractConstructorSpecV2; ContractConstructorSpecV3: ContractConstructorSpecV3; + ContractConstructorSpecV4: ContractConstructorSpecV4; ContractContractSpecV0: ContractContractSpecV0; ContractContractSpecV1: ContractContractSpecV1; ContractContractSpecV2: ContractContractSpecV2; @@ -261,6 +262,7 @@ declare module '@polkadot/types/types/registry' { ContractCryptoHasher: ContractCryptoHasher; ContractDiscriminant: ContractDiscriminant; ContractDisplayName: ContractDisplayName; + ContractEnvironment: ContractEnvironment; ContractEventParamSpecLatest: ContractEventParamSpecLatest; ContractEventParamSpecV0: ContractEventParamSpecV0; ContractEventParamSpecV2: ContractEventParamSpecV2; @@ -297,6 +299,7 @@ declare module '@polkadot/types/types/registry' { ContractMessageSpecV0: ContractMessageSpecV0; ContractMessageSpecV1: ContractMessageSpecV1; ContractMessageSpecV2: ContractMessageSpecV2; + ContractMessageSpecV3: ContractMessageSpecV3; ContractMetadata: ContractMetadata; ContractMetadataLatest: ContractMetadataLatest; ContractMetadataV0: ContractMetadataV0; diff --git a/packages/types/src/interfaces/contractsAbi/definitions.ts b/packages/types/src/interfaces/contractsAbi/definitions.ts index db62ccdbbfdd..6530548b9670 100644 --- a/packages/types/src/interfaces/contractsAbi/definitions.ts +++ b/packages/types/src/interfaces/contractsAbi/definitions.ts @@ -80,6 +80,15 @@ const spec = { args: 'Vec', docs: 'Vec' }, + ContractConstructorSpecV4: { + label: 'Text', + selector: 'ContractSelector', + payable: 'bool', + args: 'Vec', + docs: 'Vec', + default: 'bool', + returnType: 'Option' + }, ContractContractSpecV0: { constructors: 'Vec', messages: 'Vec', @@ -104,7 +113,14 @@ const spec = { events: 'Vec', docs: 'Vec' }, - ContractContractSpecV4: 'ContractContractSpecV3', + ContractContractSpecV4: { + constructors: 'Vec', + messages: 'Vec', + events: 'Vec', + docs: 'Vec', + environment: 'Option' + }, + ContractDisplayName: 'SiPath', ContractEventParamSpecV0: { name: 'Text', @@ -168,6 +184,16 @@ const spec = { returnType: 'Option', docs: 'Vec' }, + ContractMessageSpecV3: { + label: 'Text', + selector: 'ContractSelector', + mutates: 'bool', + payable: 'bool', + args: 'Vec', + returnType: 'Option', + docs: 'Vec', + default: 'bool' + }, ContractSelector: '[u8; 4]', ContractTypeSpec: { type: 'SiLookupTypeId', @@ -176,11 +202,11 @@ const spec = { }; const latest = { - ContractConstructorSpecLatest: 'ContractConstructorSpecV3', + ContractConstructorSpecLatest: 'ContractConstructorSpecV4', ContractEventSpecLatest: 'ContractEventSpecV2', ContractEventParamSpecLatest: 'ContractEventParamSpecV2', ContractMessageParamSpecLatest: 'ContractMessageParamSpecV2', - ContractMessageSpecLatest: 'ContractMessageSpecV2', + ContractMessageSpecLatest: 'ContractMessageSpecV3', ContractMetadataLatest: 'ContractMetadataV4' }; @@ -211,7 +237,10 @@ export default { types: 'Vec', spec: 'ContractContractSpecV3' }, - ContractMetadataV4: 'ContractMetadataV3', + ContractMetadataV4: { + types: 'Vec', + spec: 'ContractContractSpecV4' + }, ContractMetadata: { _enum: { V0: 'ContractMetadataV0', @@ -250,6 +279,17 @@ export default { language: 'Text', compiler: 'Text', wasm: 'Raw' + }, + ContractEnvironment: { + _alias: { + hashType: 'hash' + }, + accountId: 'ContractTypeSpec', + balance: 'ContractTypeSpec', + blockNumber: 'ContractTypeSpec', + hashType: 'ContractTypeSpec', + timestamp: 'ContractTypeSpec', + maxEventTopics: 'u32' } } } as Definitions; diff --git a/packages/types/src/interfaces/contractsAbi/types.ts b/packages/types/src/interfaces/contractsAbi/types.ts index f12a2f0c82d3..d3bf6d86002d 100644 --- a/packages/types/src/interfaces/contractsAbi/types.ts +++ b/packages/types/src/interfaces/contractsAbi/types.ts @@ -7,7 +7,7 @@ import type { PortableType } from '@polkadot/types/interfaces/metadata'; import type { Si0Type, SiLookupTypeId, SiPath } from '@polkadot/types/interfaces/scaleInfo'; /** @name ContractConstructorSpecLatest */ -export interface ContractConstructorSpecLatest extends ContractConstructorSpecV3 {} +export interface ContractConstructorSpecLatest extends ContractConstructorSpecV4 {} /** @name ContractConstructorSpecV0 */ export interface ContractConstructorSpecV0 extends Struct { @@ -42,6 +42,17 @@ export interface ContractConstructorSpecV3 extends Struct { readonly docs: Vec; } +/** @name ContractConstructorSpecV4 */ +export interface ContractConstructorSpecV4 extends Struct { + readonly label: Text; + readonly selector: ContractSelector; + readonly payable: bool; + readonly args: Vec; + readonly docs: Vec; + readonly default: bool; + readonly returnType: Option; +} + /** @name ContractContractSpecV0 */ export interface ContractContractSpecV0 extends Struct { readonly constructors: Vec; @@ -75,7 +86,13 @@ export interface ContractContractSpecV3 extends Struct { } /** @name ContractContractSpecV4 */ -export interface ContractContractSpecV4 extends ContractContractSpecV3 {} +export interface ContractContractSpecV4 extends Struct { + readonly constructors: Vec; + readonly messages: Vec; + readonly events: Vec; + readonly docs: Vec; + readonly environment: Option; +} /** @name ContractCryptoHasher */ export interface ContractCryptoHasher extends Enum { @@ -91,6 +108,16 @@ export interface ContractDiscriminant extends u32 {} /** @name ContractDisplayName */ export interface ContractDisplayName extends SiPath {} +/** @name ContractEnvironment */ +export interface ContractEnvironment extends Struct { + readonly accountId: ContractTypeSpec; + readonly balance: ContractTypeSpec; + readonly blockNumber: ContractTypeSpec; + readonly hashType: ContractTypeSpec; + readonly timestamp: ContractTypeSpec; + readonly maxEventTopics: u32; +} + /** @name ContractEventParamSpecLatest */ export interface ContractEventParamSpecLatest extends ContractEventParamSpecV2 {} @@ -198,7 +225,7 @@ export interface ContractMessageParamSpecV2 extends Struct { } /** @name ContractMessageSpecLatest */ -export interface ContractMessageSpecLatest extends ContractMessageSpecV2 {} +export interface ContractMessageSpecLatest extends ContractMessageSpecV3 {} /** @name ContractMessageSpecV0 */ export interface ContractMessageSpecV0 extends Struct { @@ -233,6 +260,18 @@ export interface ContractMessageSpecV2 extends Struct { readonly docs: Vec; } +/** @name ContractMessageSpecV3 */ +export interface ContractMessageSpecV3 extends Struct { + readonly label: Text; + readonly selector: ContractSelector; + readonly mutates: bool; + readonly payable: bool; + readonly args: Vec; + readonly returnType: Option; + readonly docs: Vec; + readonly default: bool; +} + /** @name ContractMetadata */ export interface ContractMetadata extends Enum { readonly isV0: boolean; @@ -277,7 +316,10 @@ export interface ContractMetadataV3 extends Struct { } /** @name ContractMetadataV4 */ -export interface ContractMetadataV4 extends ContractMetadataV3 {} +export interface ContractMetadataV4 extends Struct { + readonly types: Vec; + readonly spec: ContractContractSpecV4; +} /** @name ContractProject */ export interface ContractProject extends ITuple<[ContractProjectInfo, ContractMetadata]> {}