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
@@ -1,13 +1,13 @@
{
"metadataVersion": "0.1.0",
"source": {
"hash": "0x3e6dbdd71e36888e06298b7b44d3c886cd4899267bffce0ac4d5795ee9d7ede5",
"language": "ink! 3.0.0",
"hash": "0xfc0f0e88e25c5857c49f089ab8fb6a0ecdc37a69e10b9317ae71924c916cda12",
"language": "ink! 3.0.0-rc1",
"compiler": "rustc 1.48.0-nightly"
},
"contract": {
"name": "multisig_plain",
"version": "3.0.0",
"version": "3.0.0-rc1",
"authors": [
"Parity Technologies <admin@parity.io>"
]
@@ -22,7 +22,7 @@
"displayName": [
"u32"
],
"id": 2
"type": 2
}
},
{
@@ -31,7 +31,7 @@
"displayName": [
"Vec"
],
"id": 20
"type": 20
}
}
],
@@ -65,7 +65,7 @@
"displayName": [
"TransactionId"
],
"id": 2
"type": 2
}
},
{
@@ -78,7 +78,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
},
{
@@ -91,7 +91,7 @@
"displayName": [
"ConfirmationStatus"
],
"id": 22
"type": 22
}
}
],
@@ -112,7 +112,7 @@
"displayName": [
"TransactionId"
],
"id": 2
"type": 2
}
},
{
@@ -125,7 +125,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
}
],
@@ -146,7 +146,7 @@
"displayName": [
"TransactionId"
],
"id": 2
"type": 2
}
}
],
@@ -167,7 +167,7 @@
"displayName": [
"TransactionId"
],
"id": 2
"type": 2
}
}
],
@@ -188,7 +188,7 @@
"displayName": [
"TransactionId"
],
"id": 2
"type": 2
}
},
{
@@ -203,7 +203,7 @@
"displayName": [
"Result"
],
"id": 25
"type": 25
}
}
],
@@ -224,7 +224,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
}
],
@@ -245,7 +245,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
}
],
@@ -266,7 +266,7 @@
"displayName": [
"u32"
],
"id": 2
"type": 2
}
}
],
@@ -285,7 +285,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
}
],
@@ -303,7 +303,7 @@
" Since this message must be send by the wallet itself it has to be build as a",
" `Transaction` and dispatched through `submit_transaction` + `invoke_transaction`:",
" ```no_run",
" use ink_env::{DefaultEnvTypes as Env, AccountId, call::{CallParams, Selector}, test::CallData};",
" use ink_env::{DefaultEnvironment as Env, AccountId, call::{CallParams, Selector}, test::CallData};",
" use multisig_plain::{Transaction, ConfirmationStatus};",
"",
" // address of an existing MultiSigPlain contract",
@@ -354,7 +354,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
}
],
@@ -385,7 +385,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
},
{
@@ -394,7 +394,7 @@
"displayName": [
"AccountId"
],
"id": 5
"type": 5
}
}
],
@@ -423,7 +423,7 @@
"displayName": [
"u32"
],
"id": 2
"type": 2
}
}
],
@@ -452,7 +452,7 @@
"displayName": [
"Transaction"
],
"id": 14
"type": 14
}
}
],
@@ -468,7 +468,7 @@
"payable": false,
"returnType": {
"displayName": [],
"id": 21
"type": 21
},
"selector": "0x349db9e8"
},
@@ -480,7 +480,7 @@
"displayName": [
"TransactionId"
],
"id": 2
"type": 2
}
}
],
@@ -508,7 +508,7 @@
"displayName": [
"TransactionId"
],
"id": 2
"type": 2
}
}
],
@@ -530,7 +530,7 @@
"displayName": [
"ConfirmationStatus"
],
"id": 22
"type": 22
},
"selector": "0xea923d30"
},
@@ -542,7 +542,7 @@
"displayName": [
"TransactionId"
],
"id": 2
"type": 2
}
}
],
@@ -571,7 +571,7 @@
"displayName": [
"TransactionId"
],
"id": 2
"type": 2
}
}
],
@@ -590,7 +590,7 @@
"displayName": [
"Result"
],
"id": 23
"type": 23
},
"selector": "0x6131abbb"
},
@@ -602,7 +602,7 @@
"displayName": [
"TransactionId"
],
"id": 2
"type": 2
}
}
],
@@ -622,7 +622,7 @@
"displayName": [
"Result"
],
"id": 24
"type": 24
},
"selector": "0xe667c7ac"
}
@@ -664,7 +664,7 @@
{
"layout": {
"array": {
"cells_per_elem": 1,
"cellsPerElem": 1,
"layout": {
"cell": {
"key": "0x0100000001000000000000000000000000000000000000000000000000000000",
@@ -744,7 +744,7 @@
{
"layout": {
"array": {
"cells_per_elem": 1,
"cellsPerElem": 1,
"layout": {
"cell": {
"key": "0x0300000002000000000000000000000000000000000000000000000000000000",
@@ -820,7 +820,7 @@
{
"layout": {
"array": {
"cells_per_elem": 1,
"cellsPerElem": 1,
"layout": {
"cell": {
"key": "0x0500000003000000000000000000000000000000000000000000000000000000",
@@ -859,7 +859,7 @@
{
"layout": {
"array": {
"cells_per_elem": 1,
"cellsPerElem": 1,
"layout": {
"cell": {
"key": "0x0500000004000000000000000000000000000000000000000000000000000000",
@@ -910,7 +910,7 @@
{
"layout": {
"array": {
"cells_per_elem": 1,
"cellsPerElem": 1,
"layout": {
"cell": {
"key": "0x0600000005000000000000000000000000000000000000000000000000000000",