UNPKG

test-contracts-sovryn

Version:

Smart contracts for the Sovryn protocol and external integrations.

460 lines (459 loc) 19.8 kB
{ "id": "41de5cd8751cdbc2e89787d71b7ebb63", "_format": "hh-sol-build-info-1", "solcVersion": "0.5.17", "solcLongVersion": "0.5.17+commit.d19bba13", "input": { "language": "Solidity", "sources": { "contracts/mockup/setGet.sol": { "content": "pragma solidity 0.5.17;\n\n/**\n * @title A simple smart contract for setting and getting values.\n * @author Franklin Richards\n * @dev This is going to be used for testing purposes.\n */\ncontract setGet {\n\tuint256 public value;\n\n\tevent valueSet(uint256 indexed _value);\n\n\t/**\n\t * @notice To get the `value`.\n\t * @return _value The value.\n\t */\n\tfunction get() public returns (uint256 _value) {\n\t\treturn value;\n\t}\n\n\t/**\n\t * @notice To set the `value`.\n\t * @param _value The value.\n\t */\n\tfunction set(uint256 _value) public {\n\t\tvalue = _value;\n\t}\n}\n" } }, "settings": { "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "abi", "evm.bytecode", "evm.deployedBytecode", "evm.methodIdentifiers", "devdoc", "userdoc" ], "": [ "ast" ] } } } }, "output": { "contracts": { "contracts/mockup/setGet.sol": { "setGet": { "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "valueSet", "type": "event" }, { "constant": false, "inputs": [], "name": "get", "outputs": [ { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "set", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "value", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "devdoc": { "author": "Franklin Richards", "details": "This is going to be used for testing purposes.", "methods": { "get()": { "return": "_value The value." }, "set(uint256)": { "params": { "_value": "The value." } } }, "title": "A simple smart contract for setting and getting values." }, "evm": { "bytecode": { "linkReferences": {}, "object": "608060405234801561001057600080fd5b5060c18061001f6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fa4f24514604157806360fe47b11460595780636d4ce63c146075575b600080fd5b6047607b565b60408051918252519081900360200190f35b607360048036036020811015606d57600080fd5b50356081565b005b60476086565b60005481565b600055565b6000549056fea265627a7a72315820b9a2d2ab5433aba06e5d8c1b213773f6c593782bad81866bbd35d6071a797e2964736f6c63430005110032", "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0xC1 DUP1 PUSH2 0x1F PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x3C JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x3FA4F245 EQ PUSH1 0x41 JUMPI DUP1 PUSH4 0x60FE47B1 EQ PUSH1 0x59 JUMPI DUP1 PUSH4 0x6D4CE63C EQ PUSH1 0x75 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x47 PUSH1 0x7B JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x73 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x6D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x81 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x47 PUSH1 0x86 JUMP JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x0 SLOAD SWAP1 JUMP INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 0xB9 LOG2 0xD2 0xAB SLOAD CALLER 0xAB LOG0 PUSH15 0x5D8C1B213773F6C593782BAD81866B 0xBD CALLDATALOAD 0xD6 SMOD BYTE PUSH26 0x7E2964736F6C6343000511003200000000000000000000000000 ", "sourceMap": "183:358:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;183:358:0;;;;;;;" }, "deployedBytecode": { "linkReferences": {}, "object": "6080604052348015600f57600080fd5b5060043610603c5760003560e01c80633fa4f24514604157806360fe47b11460595780636d4ce63c146075575b600080fd5b6047607b565b60408051918252519081900360200190f35b607360048036036020811015606d57600080fd5b50356081565b005b60476086565b60005481565b600055565b6000549056fea265627a7a72315820b9a2d2ab5433aba06e5d8c1b213773f6c593782bad81866bbd35d6071a797e2964736f6c63430005110032", "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x3C JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x3FA4F245 EQ PUSH1 0x41 JUMPI DUP1 PUSH4 0x60FE47B1 EQ PUSH1 0x59 JUMPI DUP1 PUSH4 0x6D4CE63C EQ PUSH1 0x75 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x47 PUSH1 0x7B JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x73 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH1 0x6D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH1 0x81 JUMP JUMPDEST STOP JUMPDEST PUSH1 0x47 PUSH1 0x86 JUMP JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x0 SLOAD SWAP1 JUMP INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 0xB9 LOG2 0xD2 0xAB SLOAD CALLER 0xAB LOG0 PUSH15 0x5D8C1B213773F6C593782BAD81866B 0xBD CALLDATALOAD 0xD6 SMOD BYTE PUSH26 0x7E2964736F6C6343000511003200000000000000000000000000 ", "sourceMap": "183:358:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;183:358:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;202:20;;;:::i;:::-;;;;;;;;;;;;;;;;481:58;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;481:58:0;;:::i;:::-;;340:67;;;:::i;202:20::-;;;;:::o;481:58::-;521:5;:14;481:58::o;340:67::-;371:14;398:5;340:67;:::o" }, "methodIdentifiers": { "get()": "6d4ce63c", "set(uint256)": "60fe47b1", "value()": "3fa4f245" } }, "userdoc": { "methods": { "get()": { "notice": "To get the `value`." }, "set(uint256)": { "notice": "To set the `value`." } } } } } }, "errors": [ { "component": "general", "formattedMessage": "contracts/mockup/setGet.sol:17:2: Warning: Function state mutability can be restricted to view\n\tfunction get() public returns (uint256 _value) {\n ^ (Relevant source part starts here and spans across multiple lines).\n", "message": "Function state mutability can be restricted to view", "severity": "warning", "sourceLocation": { "end": 407, "file": "contracts/mockup/setGet.sol", "start": 340 }, "type": "Warning" } ], "sources": { "contracts/mockup/setGet.sol": { "ast": { "absolutePath": "contracts/mockup/setGet.sol", "exportedSymbols": { "setGet": [ 26 ] }, "id": 27, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "0.5", ".17" ], "nodeType": "PragmaDirective", "src": "0:23:0" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "@title A simple smart contract for setting and getting values.\n@author Franklin Richards\n@dev This is going to be used for testing purposes.", "fullyImplemented": true, "id": 26, "linearizedBaseContracts": [ 26 ], "name": "setGet", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 3, "name": "value", "nodeType": "VariableDeclaration", "scope": 26, "src": "202:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "202:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "anonymous": false, "documentation": null, "id": 7, "name": "valueSet", "nodeType": "EventDefinition", "parameters": { "id": 6, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 5, "indexed": true, "name": "_value", "nodeType": "VariableDeclaration", "scope": 7, "src": "241:22:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 4, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "241:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "240:24:0" }, "src": "226:39:0" }, { "body": { "id": 14, "nodeType": "Block", "src": "387:20:0", "statements": [ { "expression": { "argumentTypes": null, "id": 12, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3, "src": "398:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "functionReturnParameters": 11, "id": 13, "nodeType": "Return", "src": "391:12:0" } ] }, "documentation": "@notice To get the `value`.\n@return _value The value.", "id": 15, "implemented": true, "kind": "function", "modifiers": [], "name": "get", "nodeType": "FunctionDefinition", "parameters": { "id": 8, "nodeType": "ParameterList", "parameters": [], "src": "352:2:0" }, "returnParameters": { "id": 11, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 10, "name": "_value", "nodeType": "VariableDeclaration", "scope": 15, "src": "371:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "371:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "370:16:0" }, "scope": 26, "src": "340:67:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 24, "nodeType": "Block", "src": "517:22:0", "statements": [ { "expression": { "argumentTypes": null, "id": 22, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 20, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3, "src": "521:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 21, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 17, "src": "529:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "521:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 23, "nodeType": "ExpressionStatement", "src": "521:14:0" } ] }, "documentation": "@notice To set the `value`.\n@param _value The value.", "id": 25, "implemented": true, "kind": "function", "modifiers": [], "name": "set", "nodeType": "FunctionDefinition", "parameters": { "id": 18, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 17, "name": "_value", "nodeType": "VariableDeclaration", "scope": 25, "src": "494:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 16, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "494:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "493:16:0" }, "returnParameters": { "id": 19, "nodeType": "ParameterList", "parameters": [], "src": "517:0:0" }, "scope": 26, "src": "481:58:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 27, "src": "183:358:0" } ], "src": "0:542:0" }, "id": 0 } } } }