Update ink type spec for 3.0-rc1 (#2702)
* Updated ABI definitions & parsing * Run type generation * Definitions (should be ok-ish) * Cleanup names * Allow aliasses on structs (JSON parsing) * Cleanup json mapping passing * s/types/lookup/ * Parsing as per current output * InkSelector * MtRegistryIndex * String lookup tests * Remove serd ovverride comments (it works as-is) * inkRegistry tests * Extract primitive types * s/ty/id/ * Start of parsing into types (actually to be TypeDef) * Parsing * stringify struct fields * Small cleanups * Add type index to project lookup * Prefix with index * Fix interface generation * Latest contract metadata (#2118) * Add new (provisional) incrementer contract metadata * Update and regenerate type definitions * WIP: generate new format scale-info types * WIP: implementing variants * Implement variants * Fix up type resolution * Fix registry spec tests * Fix lints and some tests * Fix inkTypes tests * Fix some lints * Make imports same line like original * Comment out (temporarily) sanitize import to make CI pass * Sanitize * Remove indices * Remove index * api-contract rewrite * lint * cleanup * latest * latest * fix definition * fiz definitions * rv ink storage * Update packages/api-contract/src/base/Contract.ts Co-authored-by: Jaco Greeff <jacogr@gmail.com> * fixes * rv scripts * restore api-contract * reorder definitions, fix ink storage * fixes * def order * fixes * encodeTypeDef asRaw * update ink typ spec * latest built contracts * compare files * Apply suggestions from code review Co-authored-by: Jaco Greeff <jacogr@gmail.com> Co-authored-by: Andrew Jones <ascjones@gmail.com>
This commit is contained in:
co-authored by
Jaco Greeff
Andrew Jones
parent
64e209783a
commit
503286f7aa
@@ -54,7 +54,7 @@ export default class Abi extends ContractRegistry {
|
||||
isMutating: spec.mutates.isTrue,
|
||||
isPayable: spec.payable.isTrue,
|
||||
returnType: typeSpec
|
||||
? this.typeDefAt(typeSpec.id, { displayName: typeSpec.displayName.map((s) => s.toString()).join('::') || undefined })
|
||||
? this.typeDefAt(typeSpec.type, { displayName: typeSpec.displayName.map((s) => s.toString()).join('::') || undefined })
|
||||
: null
|
||||
});
|
||||
});
|
||||
@@ -67,7 +67,7 @@ export default class Abi extends ContractRegistry {
|
||||
|
||||
return {
|
||||
name: stringCamelCase(name.toString()),
|
||||
type: this.typeDefAt(type.id)
|
||||
type: this.typeDefAt(type.type)
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user