Files
api/packages/api-contract/test/contracts/ink/v0/trait-flipper.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

103 lines
1.9 KiB
JSON

{
"metadataVersion": "0.1.0",
"source": {
"hash": "0x568432b99f4ebd39ec03c2caaf69992b248999cc857326174b220b5587c3515f",
"language": "ink! 3.0.0-rc1",
"compiler": "rustc 1.48.0-nightly"
},
"contract": {
"name": "flipper",
"version": "3.0.0-rc1",
"authors": [
"Parity Technologies <admin@parity.io>"
]
},
"spec": {
"constructors": [
{
"args": [],
"docs": [
" Creates a new flipper smart contract initialized to `false`."
],
"name": [
"default"
],
"selector": "0x6a3712e2"
},
{
"args": [
{
"name": "init_value",
"type": {
"displayName": [
"bool"
],
"type": 1
}
}
],
"docs": [],
"name": [
"Flip",
"new"
],
"selector": "0x818482e7"
}
],
"docs": [],
"events": [],
"messages": [
{
"args": [],
"docs": [],
"mutates": true,
"name": [
"Flip",
"flip"
],
"payable": false,
"returnType": null,
"selector": "0xad931d5f"
},
{
"args": [],
"docs": [],
"mutates": false,
"name": [
"Flip",
"get"
],
"payable": false,
"returnType": {
"displayName": [
"bool"
],
"type": 1
},
"selector": "0x6b3549bc"
}
]
},
"storage": {
"struct": {
"fields": [
{
"layout": {
"cell": {
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
"ty": 1
}
},
"name": "value"
}
]
}
},
"types": [
{
"def": {
"primitive": "bool"
}
}
]
}