dc-protocol
Version:
Start ganache and deploy our contracts
806 lines • 27.2 kB
JSON
{
"contractName": "ISignidice",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "ranges",
"type": "uint256[2][]"
},
{
"name": "_entropy",
"type": "bytes"
}
],
"name": "generateRnd",
"outputs": [
{
"name": "",
"type": "uint256[]"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "rawmsg",
"type": "bytes32"
},
{
"name": "N",
"type": "bytes"
},
{
"name": "E",
"type": "bytes"
},
{
"name": "S",
"type": "bytes"
}
],
"name": "verify",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "pragma solidity ^0.4.24;\npragma experimental ABIEncoderV2;\n\ncontract ISignidice {\n function generateRnd(uint[2][] ranges, bytes _entropy) public pure returns(uint[]);\n function verify(bytes32 rawmsg, bytes N, bytes E, bytes S) public view returns (bool);\n}",
"sourcePath": "/Users/fanyshu/Documents/Projects/DCLabs/monorepo/packages/dc-sdk-example/dapp/contracts/interfaces/ISignidice.sol",
"ast": {
"absolutePath": "/Users/fanyshu/Documents/Projects/DCLabs/monorepo/packages/dc-sdk-example/dapp/contracts/interfaces/ISignidice.sol",
"exportedSymbols": {
"ISignidice": [
1785
]
},
"id": 1786,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1757,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:8"
},
{
"id": 1758,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "25:33:8"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": false,
"id": 1785,
"linearizedBaseContracts": [
1785
],
"name": "ISignidice",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": null,
"id": 1771,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "generateRnd",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1766,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1763,
"name": "ranges",
"nodeType": "VariableDeclaration",
"scope": 1771,
"src": "107:16:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_memory_$dyn_memory_ptr",
"typeString": "uint256[2][]"
},
"typeName": {
"baseType": {
"baseType": {
"id": 1759,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "107:4:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1761,
"length": {
"argumentTypes": null,
"hexValue": "32",
"id": 1760,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "112:1:8",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
},
"value": "2"
},
"nodeType": "ArrayTypeName",
"src": "107:7:8",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
"typeString": "uint256[2]"
}
},
"id": 1762,
"length": null,
"nodeType": "ArrayTypeName",
"src": "107:9:8",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_storage_$dyn_storage_ptr",
"typeString": "uint256[2][]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1765,
"name": "_entropy",
"nodeType": "VariableDeclaration",
"scope": 1771,
"src": "125:14:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1764,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "125:5:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "106:34:8"
},
"payable": false,
"returnParameters": {
"id": 1770,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1769,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1771,
"src": "161:6:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 1767,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "161:4:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1768,
"length": null,
"nodeType": "ArrayTypeName",
"src": "161:6:8",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "160:8:8"
},
"scope": 1785,
"src": "86:83:8",
"stateMutability": "pure",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 1784,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "verify",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1780,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1773,
"name": "rawmsg",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "190:14:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 1772,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "190:7:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1775,
"name": "N",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "206:7:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1774,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "206:5:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1777,
"name": "E",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "215:7:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1776,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "215:5:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1779,
"name": "S",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "224:7:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1778,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "224:5:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "189:43:8"
},
"payable": false,
"returnParameters": {
"id": 1783,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1782,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "254:4:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1781,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "254:4:8",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "253:6:8"
},
"scope": 1785,
"src": "174:86:8",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1786,
"src": "60:202:8"
}
],
"src": "0:262:8"
},
"legacyAST": {
"absolutePath": "/Users/fanyshu/Documents/Projects/DCLabs/monorepo/packages/dc-sdk-example/dapp/contracts/interfaces/ISignidice.sol",
"exportedSymbols": {
"ISignidice": [
1785
]
},
"id": 1786,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1757,
"literals": [
"solidity",
"^",
"0.4",
".24"
],
"nodeType": "PragmaDirective",
"src": "0:24:8"
},
{
"id": 1758,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "25:33:8"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": false,
"id": 1785,
"linearizedBaseContracts": [
1785
],
"name": "ISignidice",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": null,
"id": 1771,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "generateRnd",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1766,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1763,
"name": "ranges",
"nodeType": "VariableDeclaration",
"scope": 1771,
"src": "107:16:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_memory_$dyn_memory_ptr",
"typeString": "uint256[2][]"
},
"typeName": {
"baseType": {
"baseType": {
"id": 1759,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "107:4:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1761,
"length": {
"argumentTypes": null,
"hexValue": "32",
"id": 1760,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "112:1:8",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": null,
"typeString": null
},
"value": "2"
},
"nodeType": "ArrayTypeName",
"src": "107:7:8",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$2_storage_ptr",
"typeString": "uint256[2]"
}
},
"id": 1762,
"length": null,
"nodeType": "ArrayTypeName",
"src": "107:9:8",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_array$_t_uint256_$2_storage_$dyn_storage_ptr",
"typeString": "uint256[2][]"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1765,
"name": "_entropy",
"nodeType": "VariableDeclaration",
"scope": 1771,
"src": "125:14:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1764,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "125:5:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "106:34:8"
},
"payable": false,
"returnParameters": {
"id": 1770,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1769,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1771,
"src": "161:6:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr",
"typeString": "uint256[]"
},
"typeName": {
"baseType": {
"id": 1767,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "161:4:8",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1768,
"length": null,
"nodeType": "ArrayTypeName",
"src": "161:6:8",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
"typeString": "uint256[]"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "160:8:8"
},
"scope": 1785,
"src": "86:83:8",
"stateMutability": "pure",
"superFunction": null,
"visibility": "public"
},
{
"body": null,
"documentation": null,
"id": 1784,
"implemented": false,
"isConstructor": false,
"isDeclaredConst": true,
"modifiers": [],
"name": "verify",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1780,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1773,
"name": "rawmsg",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "190:14:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 1772,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "190:7:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1775,
"name": "N",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "206:7:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1774,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "206:5:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1777,
"name": "E",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "215:7:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1776,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "215:5:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1779,
"name": "S",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "224:7:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1778,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "224:5:8",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "189:43:8"
},
"payable": false,
"returnParameters": {
"id": 1783,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1782,
"name": "",
"nodeType": "VariableDeclaration",
"scope": 1784,
"src": "254:4:8",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 1781,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "254:4:8",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "253:6:8"
},
"scope": 1785,
"src": "174:86:8",
"stateMutability": "view",
"superFunction": null,
"visibility": "public"
}
],
"scope": 1786,
"src": "60:202:8"
}
],
"src": "0:262:8"
},
"compiler": {
"name": "solc",
"version": "0.4.25+commit.59dbf8f1.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.0.0-beta.0",
"updatedAt": "2018-12-04T11:48:18.073Z"
}