UNPKG

test-contracts-sovryn

Version:

Smart contracts for the Sovryn protocol and external integrations.

613 lines (612 loc) 28.1 kB
{ "id": "fce439d97bc909d60380e0bde72359c5", "_format": "hh-sol-build-info-1", "solcVersion": "0.5.17", "solcLongVersion": "0.5.17+commit.d19bba13", "input": { "language": "Solidity", "sources": { "contracts/mockup/PriceFeedRSKOracleMockup.sol": { "content": "pragma solidity 0.5.17;\n\ncontract PriceFeedRSKOracleMockup {\n\tuint256 public value;\n\tbool public has;\n\n\tfunction getPricing() public view returns (uint256, uint256) {\n\t\treturn (value, block.timestamp);\n\t}\n\n\tfunction setValue(uint256 _value) public {\n\t\tvalue = _value;\n\t}\n\n\tfunction setHas(bool _has) public {\n\t\thas = _has;\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/PriceFeedRSKOracleMockup.sol": { "PriceFeedRSKOracleMockup": { "abi": [ { "constant": true, "inputs": [], "name": "getPricing", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "has", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "bool", "name": "_has", "type": "bool" } ], "name": "setHas", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "_value", "type": "uint256" } ], "name": "setValue", "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": { "methods": {} }, "evm": { "bytecode": { "linkReferences": {}, "object": "608060405234801561001057600080fd5b50610155806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806338b4e3381461005c5780633fa4f2451461007d578063552410771461009757806361da0693146100b6578063b689d5ac146100d5575b600080fd5b6100646100f1565b6040805192835260208301919091528051918290030190f35b6100856100f9565b60408051918252519081900360200190f35b6100b4600480360360208110156100ad57600080fd5b50356100ff565b005b6100b4600480360360208110156100cc57600080fd5b50351515610104565b6100dd610117565b604080519115158252519081900360200190f35b600054429091565b60005481565b600055565b6001805460ff1916911515919091179055565b60015460ff168156fea265627a7a72315820337ae32f27c3b0fbd139340606e1a958072de19353c65db7ecde6bc981822d7664736f6c63430005110032", "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH2 0x155 DUP1 PUSH2 0x20 PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x57 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x38B4E338 EQ PUSH2 0x5C JUMPI DUP1 PUSH4 0x3FA4F245 EQ PUSH2 0x7D JUMPI DUP1 PUSH4 0x55241077 EQ PUSH2 0x97 JUMPI DUP1 PUSH4 0x61DA0693 EQ PUSH2 0xB6 JUMPI DUP1 PUSH4 0xB689D5AC EQ PUSH2 0xD5 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x64 PUSH2 0xF1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP3 DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 MLOAD SWAP2 DUP3 SWAP1 SUB ADD SWAP1 RETURN JUMPDEST PUSH2 0x85 PUSH2 0xF9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0xB4 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xAD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0xFF JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB4 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xCC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD ISZERO ISZERO PUSH2 0x104 JUMP JUMPDEST PUSH2 0xDD PUSH2 0x117 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD TIMESTAMP SWAP1 SWAP2 JUMP JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP2 ISZERO ISZERO SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0xFF AND DUP2 JUMP INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 CALLER PUSH27 0xE32F27C3B0FBD139340606E1A958072DE19353C65DB7ECDE6BC981 DUP3 0x2D PUSH23 0x64736F6C63430005110032000000000000000000000000 ", "sourceMap": "25:302:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:302:0;;;;;;;" }, "deployedBytecode": { "linkReferences": {}, "object": "608060405234801561001057600080fd5b50600436106100575760003560e01c806338b4e3381461005c5780633fa4f2451461007d578063552410771461009757806361da0693146100b6578063b689d5ac146100d5575b600080fd5b6100646100f1565b6040805192835260208301919091528051918290030190f35b6100856100f9565b60408051918252519081900360200190f35b6100b4600480360360208110156100ad57600080fd5b50356100ff565b005b6100b4600480360360208110156100cc57600080fd5b50351515610104565b6100dd610117565b604080519115158252519081900360200190f35b600054429091565b60005481565b600055565b6001805460ff1916911515919091179055565b60015460ff168156fea265627a7a72315820337ae32f27c3b0fbd139340606e1a958072de19353c65db7ecde6bc981822d7664736f6c63430005110032", "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0x57 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x38B4E338 EQ PUSH2 0x5C JUMPI DUP1 PUSH4 0x3FA4F245 EQ PUSH2 0x7D JUMPI DUP1 PUSH4 0x55241077 EQ PUSH2 0x97 JUMPI DUP1 PUSH4 0x61DA0693 EQ PUSH2 0xB6 JUMPI DUP1 PUSH4 0xB689D5AC EQ PUSH2 0xD5 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x64 PUSH2 0xF1 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP3 DUP4 MSTORE PUSH1 0x20 DUP4 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP1 MLOAD SWAP2 DUP3 SWAP1 SUB ADD SWAP1 RETURN JUMPDEST PUSH2 0x85 PUSH2 0xF9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH2 0xB4 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xAD JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD PUSH2 0xFF JUMP JUMPDEST STOP JUMPDEST PUSH2 0xB4 PUSH1 0x4 DUP1 CALLDATASIZE SUB PUSH1 0x20 DUP2 LT ISZERO PUSH2 0xCC JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP CALLDATALOAD ISZERO ISZERO PUSH2 0x104 JUMP JUMPDEST PUSH2 0xDD PUSH2 0x117 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x0 SLOAD TIMESTAMP SWAP1 SWAP2 JUMP JUMPDEST PUSH1 0x0 SLOAD DUP2 JUMP JUMPDEST PUSH1 0x0 SSTORE JUMP JUMPDEST PUSH1 0x1 DUP1 SLOAD PUSH1 0xFF NOT AND SWAP2 ISZERO ISZERO SWAP2 SWAP1 SWAP2 OR SWAP1 SSTORE JUMP JUMPDEST PUSH1 0x1 SLOAD PUSH1 0xFF AND DUP2 JUMP INVALID LOG2 PUSH6 0x627A7A723158 KECCAK256 CALLER PUSH27 0xE32F27C3B0FBD139340606E1A958072DE19353C65DB7ECDE6BC981 DUP3 0x2D PUSH23 0x64736F6C63430005110032000000000000000000000000 ", "sourceMap": "25:302:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;25:302:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;104:100;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;62:20;;;:::i;:::-;;;;;;;;;;;;;;;;207:63;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;207:63:0;;:::i;:::-;;273:52;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;273:52:0;;;;:::i;85:15::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;104:100;147:7;177:5;184:15;104:100;;:::o;62:20::-;;;;:::o;207:63::-;252:5;:14;207:63::o;273:52::-;311:3;:10;;-1:-1:-1;;311:10:0;;;;;;;;;;273:52::o;85:15::-;;;;;;:::o" }, "methodIdentifiers": { "getPricing()": "38b4e338", "has()": "b689d5ac", "setHas(bool)": "61da0693", "setValue(uint256)": "55241077", "value()": "3fa4f245" } }, "userdoc": { "methods": {} } } } }, "sources": { "contracts/mockup/PriceFeedRSKOracleMockup.sol": { "ast": { "absolutePath": "contracts/mockup/PriceFeedRSKOracleMockup.sol", "exportedSymbols": { "PriceFeedRSKOracleMockup": [ 39 ] }, "id": 40, "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "0.5", ".17" ], "nodeType": "PragmaDirective", "src": "0:23:0" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": true, "id": 39, "linearizedBaseContracts": [ 39 ], "name": "PriceFeedRSKOracleMockup", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 3, "name": "value", "nodeType": "VariableDeclaration", "scope": 39, "src": "62:20:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "62:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "public" }, { "constant": false, "id": 5, "name": "has", "nodeType": "VariableDeclaration", "scope": 39, "src": "85:15:0", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 4, "name": "bool", "nodeType": "ElementaryTypeName", "src": "85:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "public" }, { "body": { "id": 17, "nodeType": "Block", "src": "165:39:0", "statements": [ { "expression": { "argumentTypes": null, "components": [ { "argumentTypes": null, "id": 12, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3, "src": "177:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 13, "name": "block", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 44, "src": "184:5:0", "typeDescriptions": { "typeIdentifier": "t_magic_block", "typeString": "block" } }, "id": 14, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "timestamp", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "184:15:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "id": 15, "isConstant": false, "isInlineArray": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", "src": "176:24:0", "typeDescriptions": { "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", "typeString": "tuple(uint256,uint256)" } }, "functionReturnParameters": 11, "id": 16, "nodeType": "Return", "src": "169:31:0" } ] }, "documentation": null, "id": 18, "implemented": true, "kind": "function", "modifiers": [], "name": "getPricing", "nodeType": "FunctionDefinition", "parameters": { "id": 6, "nodeType": "ParameterList", "parameters": [], "src": "123:2:0" }, "returnParameters": { "id": 11, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 8, "name": "", "nodeType": "VariableDeclaration", "scope": 18, "src": "147:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 7, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "147:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 10, "name": "", "nodeType": "VariableDeclaration", "scope": 18, "src": "156:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 9, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "156:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "146:18:0" }, "scope": 39, "src": "104:100:0", "stateMutability": "view", "superFunction": null, "visibility": "public" }, { "body": { "id": 27, "nodeType": "Block", "src": "248:22:0", "statements": [ { "expression": { "argumentTypes": null, "id": 25, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 23, "name": "value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3, "src": "252:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 24, "name": "_value", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 20, "src": "260:6:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "252:14:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 26, "nodeType": "ExpressionStatement", "src": "252:14:0" } ] }, "documentation": null, "id": 28, "implemented": true, "kind": "function", "modifiers": [], "name": "setValue", "nodeType": "FunctionDefinition", "parameters": { "id": 21, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 20, "name": "_value", "nodeType": "VariableDeclaration", "scope": 28, "src": "225:14:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 19, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "225:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "224:16:0" }, "returnParameters": { "id": 22, "nodeType": "ParameterList", "parameters": [], "src": "248:0:0" }, "scope": 39, "src": "207:63:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 37, "nodeType": "Block", "src": "307:18:0", "statements": [ { "expression": { "argumentTypes": null, "id": 35, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 33, "name": "has", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5, "src": "311:3:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 34, "name": "_has", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 30, "src": "317:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "311:10:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 36, "nodeType": "ExpressionStatement", "src": "311:10:0" } ] }, "documentation": null, "id": 38, "implemented": true, "kind": "function", "modifiers": [], "name": "setHas", "nodeType": "FunctionDefinition", "parameters": { "id": 31, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 30, "name": "_has", "nodeType": "VariableDeclaration", "scope": 38, "src": "289:9:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 29, "name": "bool", "nodeType": "ElementaryTypeName", "src": "289:4:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "288:11:0" }, "returnParameters": { "id": 32, "nodeType": "ParameterList", "parameters": [], "src": "307:0:0" }, "scope": 39, "src": "273:52:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" } ], "scope": 40, "src": "25:302:0" } ], "src": "0:328:0" }, "id": 0 } } } }