Files
api/packages/api-contract/test/contracts/ink/v0/incrementer.json
T
Jaco d053b86e23 Use Si V1 in contracts (w/ PortableRegistry usage) (#3988)
* Use Si V1 in contracts (w/ PortableRegistry usage)

* Type id lookups

* Fix build & linting

* Remove extra .toNumber() (VSCode has gone crazy)

* v1 tests

* Cleanup parsing

* Explicit type cast for v1 types

* Unneeded toNumber

* Align events exposure with messages/constructors

* dedupe

* Re-add typedef extraction tests

* with typedefs

* Override for always primitives

* displayName improvements

* Versioned project

* New structure

* Fixes

* Cleanups

* Ensure API registry is the default used

* Adjust arg & return encoding/decoding

* Recursive contract

* DoNotConstruct to Si type
2021-10-11 12:50:09 +03:00

108 lines
2.0 KiB
JSON

{
"metadataVersion": "0.1.0",
"source": {
"hash": "0x8b30429ee0f4dc19cec91b09d186c805eaac6615492c1edf3bc1efaff0b7fecf",
"language": "ink! 3.0.0-rc1",
"compiler": "rustc 1.48.0-nightly"
},
"contract": {
"name": "incrementer",
"version": "3.0.0-rc1",
"authors": [
"Parity Technologies <admin@parity.io>"
]
},
"spec": {
"constructors": [
{
"args": [
{
"name": "init_value",
"type": {
"displayName": [
"i32"
],
"type": 1
}
}
],
"docs": [],
"name": [
"new"
],
"selector": "0xd183512b"
},
{
"args": [],
"docs": [],
"name": [
"default"
],
"selector": "0x6a3712e2"
}
],
"docs": [],
"events": [],
"messages": [
{
"args": [
{
"name": "by",
"type": {
"displayName": [
"i32"
],
"type": 1
}
}
],
"docs": [],
"mutates": true,
"name": [
"inc"
],
"payable": false,
"returnType": null,
"selector": "0x2fb8d143"
},
{
"args": [],
"docs": [],
"mutates": false,
"name": [
"get"
],
"payable": false,
"returnType": {
"displayName": [
"i32"
],
"type": 1
},
"selector": "0x1e5ca456"
}
]
},
"storage": {
"struct": {
"fields": [
{
"layout": {
"cell": {
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
"ty": 1
}
},
"name": "value"
}
]
}
},
"types": [
{
"def": {
"primitive": "i32"
}
}
]
}