packages/api-contract/src/test/contracts/user/v0/withString.json
{
"metadataVersion": "0.1.0",
"source": {
"hash": "0xafcd0acf1a747cca1febe5bad81a6c0244a381ceb02635ab1069a1a396adda3f",
"language": "ink! 3.0.0-rc1",
"compiler": "rustc 1.49.0-nightly"
},
"contract": {
"name": "erc20",
"version": "0.1.0",
"authors": [
"[your_name] <[your_email]>"
]
},
"spec": {
"constructors": [
{
"args": [
{
"name": "initial_supply",
"type": {
"displayName": [
"Balance"
],
"type": 1
}
},
{
"name": "_name",
"type": {
"displayName": [
"String"
],
"type": 12
}
},
{
"name": "_symbol",
"type": {
"displayName": [
"String"
],
"type": 12
}
}
],
"docs": [],
"name": [
"new"
],
"selector": "0xd183512b"
}
],
"docs": [],
"events": [
{
"args": [
{
"docs": [],
"indexed": true,
"name": "from",
"type": {
"displayName": [
"Option"
],
"type": 14
}
},
{
"docs": [],
"indexed": true,
"name": "to",
"type": {
"displayName": [
"Option"
],
"type": 14
}
},
{
"docs": [],
"indexed": true,
"name": "value",
"type": {
"displayName": [
"Balance"
],
"type": 1
}
}
],
"docs": [],
"name": "Transfer"
},
{
"args": [
{
"docs": [],
"indexed": true,
"name": "owner",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"docs": [],
"indexed": true,
"name": "spender",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"docs": [],
"indexed": true,
"name": "value",
"type": {
"displayName": [
"Balance"
],
"type": 1
}
}
],
"docs": [],
"name": "Approval"
}
],
"messages": [
{
"args": [],
"docs": [],
"mutates": false,
"name": [
"total_supply"
],
"payable": false,
"returnType": {
"displayName": [
"Balance"
],
"type": 1
},
"selector": "0xdcb736b5"
},
{
"args": [],
"docs": [],
"mutates": false,
"name": [
"name"
],
"payable": false,
"returnType": {
"displayName": [
"String"
],
"type": 12
},
"selector": "0xa0a95494"
},
{
"args": [],
"docs": [],
"mutates": false,
"name": [
"symbol"
],
"payable": false,
"returnType": {
"displayName": [
"String"
],
"type": 12
},
"selector": "0x57178a4a"
},
{
"args": [
{
"name": "owner",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
}
],
"docs": [],
"mutates": false,
"name": [
"balance_of"
],
"payable": false,
"returnType": {
"displayName": [
"Balance"
],
"type": 1
},
"selector": "0x56e929b2"
},
{
"args": [
{
"name": "owner",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"name": "spender",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
}
],
"docs": [],
"mutates": false,
"name": [
"allowance"
],
"payable": false,
"returnType": {
"displayName": [
"Balance"
],
"type": 1
},
"selector": "0xf3cfff66"
},
{
"args": [
{
"name": "to",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"name": "value",
"type": {
"displayName": [
"Balance"
],
"type": 1
}
}
],
"docs": [],
"mutates": true,
"name": [
"transfer"
],
"payable": false,
"returnType": {
"displayName": [
"bool"
],
"type": 13
},
"selector": "0xfae3a09d"
},
{
"args": [
{
"name": "spender",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"name": "value",
"type": {
"displayName": [
"Balance"
],
"type": 1
}
}
],
"docs": [],
"mutates": true,
"name": [
"approve"
],
"payable": false,
"returnType": {
"displayName": [
"bool"
],
"type": 13
},
"selector": "0x03d0e114"
},
{
"args": [
{
"name": "from",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"name": "to",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"name": "value",
"type": {
"displayName": [
"Balance"
],
"type": 1
}
}
],
"docs": [],
"mutates": true,
"name": [
"transfer_from"
],
"payable": false,
"returnType": {
"displayName": [
"bool"
],
"type": 13
},
"selector": "0xfcfb2ccd"
}
]
},
"storage": {
"struct": {
"fields": [
{
"layout": {
"cell": {
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
"ty": 1
}
},
"name": "total_supply"
},
{
"layout": {
"struct": {
"fields": [
{
"layout": {
"struct": {
"fields": [
{
"layout": {
"cell": {
"key": "0x0100000000000000000000000000000000000000000000000000000000000000",
"ty": 2
}
},
"name": "header"
},
{
"layout": {
"struct": {
"fields": [
{
"layout": {
"cell": {
"key": "0x0200000000000000000000000000000000000000000000000000000000000000",
"ty": 3
}
},
"name": "len"
},
{
"layout": {
"array": {
"cellsPerElem": 1,
"layout": {
"cell": {
"key": "0x0200000001000000000000000000000000000000000000000000000000000000",
"ty": 4
}
},
"len": 4294967295,
"offset": "0x0300000000000000000000000000000000000000000000000000000000000000"
}
},
"name": "elems"
}
]
}
},
"name": "entries"
}
]
}
},
"name": "keys"
},
{
"layout": {
"hash": {
"layout": {
"cell": {
"key": "0x0300000001000000000000000000000000000000000000000000000000000000",
"ty": 9
}
},
"offset": "0x0200000001000000000000000000000000000000000000000000000000000000",
"strategy": {
"hasher": "Blake2x256",
"postfix": "",
"prefix": "0x696e6b20686173686d6170"
}
}
},
"name": "values"
}
]
}
},
"name": "balances"
},
{
"layout": {
"struct": {
"fields": [
{
"layout": {
"struct": {
"fields": [
{
"layout": {
"cell": {
"key": "0x0300000001000000000000000000000000000000000000000000000000000000",
"ty": 2
}
},
"name": "header"
},
{
"layout": {
"struct": {
"fields": [
{
"layout": {
"cell": {
"key": "0x0400000001000000000000000000000000000000000000000000000000000000",
"ty": 3
}
},
"name": "len"
},
{
"layout": {
"array": {
"cellsPerElem": 1,
"layout": {
"cell": {
"key": "0x0400000002000000000000000000000000000000000000000000000000000000",
"ty": 10
}
},
"len": 4294967295,
"offset": "0x0500000001000000000000000000000000000000000000000000000000000000"
}
},
"name": "elems"
}
]
}
},
"name": "entries"
}
]
}
},
"name": "keys"
},
{
"layout": {
"hash": {
"layout": {
"cell": {
"key": "0x0500000002000000000000000000000000000000000000000000000000000000",
"ty": 9
}
},
"offset": "0x0400000002000000000000000000000000000000000000000000000000000000",
"strategy": {
"hasher": "Blake2x256",
"postfix": "",
"prefix": "0x696e6b20686173686d6170"
}
}
},
"name": "values"
}
]
}
},
"name": "allowances"
},
{
"layout": {
"cell": {
"key": "0x0500000002000000000000000000000000000000000000000000000000000000",
"ty": 12
}
},
"name": "name"
},
{
"layout": {
"cell": {
"key": "0x0600000002000000000000000000000000000000000000000000000000000000",
"ty": 12
}
},
"name": "symbol"
}
]
}
},
"types": [
{
"def": {
"primitive": "u128"
}
},
{
"def": {
"composite": {
"fields": [
{
"name": "last_vacant",
"type": 3
},
{
"name": "len",
"type": 3
},
{
"name": "len_entries",
"type": 3
}
]
}
},
"path": [
"ink_storage",
"collections",
"stash",
"Header"
]
},
{
"def": {
"primitive": "u32"
}
},
{
"def": {
"variant": {
"variants": [
{
"fields": [
{
"type": 8
}
],
"name": "Vacant"
},
{
"fields": [
{
"type": 5
}
],
"name": "Occupied"
}
]
}
},
"params": [
5
],
"path": [
"ink_storage",
"collections",
"stash",
"Entry"
]
},
{
"def": {
"composite": {
"fields": [
{
"type": 6
}
]
}
},
"path": [
"ink_env",
"types",
"AccountId"
]
},
{
"def": {
"array": {
"len": 32,
"type": 7
}
}
},
{
"def": {
"primitive": "u8"
}
},
{
"def": {
"composite": {
"fields": [
{
"name": "next",
"type": 3
},
{
"name": "prev",
"type": 3
}
]
}
},
"path": [
"ink_storage",
"collections",
"stash",
"VacantEntry"
]
},
{
"def": {
"composite": {
"fields": [
{
"name": "value",
"type": 1
},
{
"name": "key_index",
"type": 3
}
]
}
},
"params": [
1
],
"path": [
"ink_storage",
"collections",
"hashmap",
"ValueEntry"
]
},
{
"def": {
"variant": {
"variants": [
{
"fields": [
{
"type": 8
}
],
"name": "Vacant"
},
{
"fields": [
{
"type": 11
}
],
"name": "Occupied"
}
]
}
},
"params": [
11
],
"path": [
"ink_storage",
"collections",
"stash",
"Entry"
]
},
{
"def": {
"tuple": [
5,
5
]
}
},
{
"def": {
"primitive": "str"
}
},
{
"def": {
"primitive": "bool"
}
},
{
"def": {
"variant": {
"variants": [
{
"name": "None"
},
{
"fields": [
{
"type": 5
}
],
"name": "Some"
}
]
}
},
"params": [
5
],
"path": [
"Option"
]
}
]
}