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:
Keith Ingram
2020-10-11 09:37:39 +02:00
committed by GitHub
co-authored by Jaco Greeff Andrew Jones
parent 64e209783a
commit 503286f7aa
25 changed files with 167 additions and 167 deletions
+28 -28
View File
@@ -1,13 +1,13 @@
{
"metadataVersion": "0.1.0",
"source": {
"hash": "0xae28fa9f075f218d559a36f720b0704b2c09326590fe19d7d76a7eaa40d079b3",
"language": "ink! 3.0.0",
"hash": "0xe9c60864c76c770865b66c79aa304bc22d2d08cc799d36310df4256db107b8fc",
"language": "ink! 3.0.0-rc1",
"compiler": "rustc 1.48.0-nightly"
},
"contract": {
"name": "erc20",
"version": "3.0.0",
"version": "3.0.0-rc1",
"authors": [
"Parity Technologies <admin@parity.io>"
]
@@ -22,7 +22,7 @@
"displayName": [
"Balance"
],
"id": 1
"type": 1
}
}
],
@@ -45,7 +45,7 @@
"displayName": [
"Option"
],
"id": 13
"type": 13
}
},
{
@@ -56,7 +56,7 @@
"displayName": [
"Option"
],
"id": 13
"type": 13
}
},
{
@@ -67,7 +67,7 @@
"displayName": [
"Balance"
],
"id": 1
"type": 1
}
}
],
@@ -84,7 +84,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
},
{
@@ -95,7 +95,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
},
{
@@ -106,7 +106,7 @@
"displayName": [
"Balance"
],
"id": 1
"type": 1
}
}
],
@@ -127,7 +127,7 @@
"displayName": [
"Balance"
],
"id": 1
"type": 1
},
"selector": "0xdcb736b5"
},
@@ -139,7 +139,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
}
],
@@ -153,7 +153,7 @@
"displayName": [
"Balance"
],
"id": 1
"type": 1
},
"selector": "0x56e929b2"
},
@@ -165,7 +165,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
},
{
@@ -174,7 +174,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
}
],
@@ -188,7 +188,7 @@
"displayName": [
"Balance"
],
"id": 1
"type": 1
},
"selector": "0xf3cfff66"
},
@@ -200,7 +200,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
},
{
@@ -209,7 +209,7 @@
"displayName": [
"Balance"
],
"id": 1
"type": 1
}
}
],
@@ -223,7 +223,7 @@
"displayName": [
"bool"
],
"id": 12
"type": 12
},
"selector": "0xfae3a09d"
},
@@ -235,7 +235,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
},
{
@@ -244,7 +244,7 @@
"displayName": [
"Balance"
],
"id": 1
"type": 1
}
}
],
@@ -258,7 +258,7 @@
"displayName": [
"bool"
],
"id": 12
"type": 12
},
"selector": "0x03d0e114"
},
@@ -270,7 +270,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
},
{
@@ -279,7 +279,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
},
{
@@ -288,7 +288,7 @@
"displayName": [
"Balance"
],
"id": 1
"type": 1
}
}
],
@@ -302,7 +302,7 @@
"displayName": [
"bool"
],
"id": 12
"type": 12
},
"selector": "0xfcfb2ccd"
}
@@ -353,7 +353,7 @@
{
"layout": {
"array": {
"cells_per_elem": 1,
"cellsPerElem": 1,
"layout": {
"cell": {
"key": "0x0200000001000000000000000000000000000000000000000000000000000000",
@@ -433,7 +433,7 @@
{
"layout": {
"array": {
"cells_per_elem": 1,
"cellsPerElem": 1,
"layout": {
"cell": {
"key": "0x0400000002000000000000000000000000000000000000000000000000000000",