UNPKG

@etherisc/terraguard-poc-contracts

Version:

Etherisc's smart contracts for the terraguard poc

677 lines 13.5 kB
{ "abi": [ { "inputs": [], "name": "treasury", "outputs": [ { "internalType": "contract ITreasury", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" } ], "allSourcePaths": { "2": "/home/runner/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.8.2/contracts/token/ERC20/IERC20.sol", "22": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/ITreasury.sol", "30": "contracts/BrownieWorkaraound.sol" }, "ast": { "absolutePath": "contracts/BrownieWorkaraound.sol", "exportedSymbols": { "BrownieWorkaround": [ 6 ], "IERC20": [ 4694 ], "ITreasury": [ 2409 ] }, "id": 7, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 1, "literals": [ "solidity", "^", "0.8", ".2" ], "nodeType": "PragmaDirective", "src": "39:23:30" }, { "absolutePath": "/home/runner/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/ITreasury.sol", "file": "@etherisc/gif-interface/contracts/modules/ITreasury.sol", "id": 2, "nameLocation": "-1:-1:-1", "nodeType": "ImportDirective", "scope": 7, "sourceUnit": 2410, "src": "152:65:30", "symbolAliases": [], "unitAlias": "" }, { "abstract": false, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "fullyImplemented": true, "id": 6, "linearizedBaseContracts": [ 6 ], "name": "BrownieWorkaround", "nameLocation": "228:17:30", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "61d027b3", "id": 5, "mutability": "mutable", "name": "treasury", "nameLocation": "270:8:30", "nodeType": "VariableDeclaration", "scope": 6, "src": "253:25:30", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_ITreasury_$2409", "typeString": "contract ITreasury" }, "typeName": { "id": 4, "nodeType": "UserDefinedTypeName", "pathNode": { "id": 3, "name": "ITreasury", "nodeType": "IdentifierPath", "referencedDeclaration": 2409, "src": "253:9:30" }, "referencedDeclaration": 2409, "src": "253:9:30", "typeDescriptions": { "typeIdentifier": "t_contract$_ITreasury_$2409", "typeString": "contract ITreasury" } }, "visibility": "public" } ], "scope": 7, "src": "219:67:30" } ], "src": "39:247:30" }, "bytecode": "6080604052348015600f57600080fd5b5060918061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806361d027b314602d575b600080fd5b600054603f906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f3fea2646970667358221220edd9922e46ce439eb4e32e4befd669c05dfd89ec46e4a26846028f506ffafc4864736f6c63430008020033", "bytecodeSha1": "c18d5017111e0ad92999e01bba3471fa6e80da16", "compiler": { "evm_version": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "version": "0.8.2+commit.661d1103" }, "contractName": "BrownieWorkaround", "coverageMap": { "branches": { "2": {}, "22": {}, "30": {} }, "statements": { "2": {}, "22": {}, "30": {} } }, "dependencies": [ "OpenZeppelin/openzeppelin-contracts@4.8.2/IERC20", "etherisc/gif-interface@3b0002a/ITreasury" ], "deployedBytecode": "6080604052348015600f57600080fd5b506004361060285760003560e01c806361d027b314602d575b600080fd5b600054603f906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f3fea2646970667358221220edd9922e46ce439eb4e32e4befd669c05dfd89ec46e4a26846028f506ffafc4864736f6c63430008020033", "deployedSourceMap": "219:67:30:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;253:25;;;;;-1:-1:-1;;;;;253:25:30;;;;;;-1:-1:-1;;;;;196:32:37;;;178:51;;166:2;151:18;253:25:30;;;;;;", "language": "Solidity", "natspec": { "kind": "dev", "methods": {}, "version": 1 }, "offset": [ 219, 286 ], "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH1 0xF JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH1 0x28 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x61D027B3 EQ PUSH1 0x2D JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 SLOAD PUSH1 0x3F SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xED 0xD9 SWAP3 0x2E CHAINID 0xCE NUMBER SWAP15 0xB4 0xE3 0x2E 0x4B 0xEF 0xD6 PUSH10 0xC05DFD89EC46E4A26846 MUL DUP16 POP PUSH16 0xFAFC4864736F6C634300080200330000 ", "pcMap": { "0": { "offset": [ 219, 286 ], "op": "PUSH1", "path": "30", "value": "0x80" }, "2": { "fn": null, "offset": [ 219, 286 ], "op": "PUSH1", "path": "30", "value": "0x40" }, "4": { "fn": null, "offset": [ 219, 286 ], "op": "MSTORE", "path": "30" }, "5": { "fn": null, "offset": [ 219, 286 ], "op": "CALLVALUE", "path": "30" }, "6": { "fn": null, "offset": [ 219, 286 ], "op": "DUP1", "path": "30" }, "7": { "fn": null, "offset": [ 219, 286 ], "op": "ISZERO", "path": "30" }, "8": { "fn": null, "offset": [ 219, 286 ], "op": "PUSH1", "path": "30", "value": "0xF" }, "10": { "fn": null, "offset": [ 219, 286 ], "op": "JUMPI", "path": "30" }, "11": { "fn": null, "offset": [ 219, 286 ], "op": "PUSH1", "path": "30", "value": "0x0" }, "13": { "fn": null, "offset": [ 219, 286 ], "op": "DUP1", "path": "30" }, "14": { "dev": "Cannot send ether to nonpayable function", "fn": null, "offset": [ 219, 286 ], "op": "REVERT", "path": "30" }, "15": { "fn": null, "offset": [ 219, 286 ], "op": "JUMPDEST", "path": "30" }, "16": { "fn": null, "offset": [ 219, 286 ], "op": "POP", "path": "30" }, "17": { "fn": null, "offset": [ 219, 286 ], "op": "PUSH1", "path": "30", "value": "0x4" }, "19": { "fn": null, "offset": [ 219, 286 ], "op": "CALLDATASIZE", "path": "30" }, "20": { "fn": null, "offset": [ 219, 286 ], "op": "LT", "path": "30" }, "21": { "fn": null, "offset": [ 219, 286 ], "op": "PUSH1", "path": "30", "value": "0x28" }, "23": { "fn": null, "offset": [ 219, 286 ], "op": "JUMPI", "path": "30" }, "24": { "fn": null, "offset": [ 219, 286 ], "op": "PUSH1", "path": "30", "value": "0x0" }, "26": { "fn": null, "offset": [ 219, 286 ], "op": "CALLDATALOAD", "path": "30" }, "27": { "fn": null, "offset": [ 219, 286 ], "op": "PUSH1", "path": "30", "value": "0xE0" }, "29": { "fn": null, "offset": [ 219, 286 ], "op": "SHR", "path": "30" }, "30": { "fn": null, "offset": [ 219, 286 ], "op": "DUP1", "path": "30" }, "31": { "fn": null, "offset": [ 219, 286 ], "op": "PUSH4", "path": "30", "value": "0x61D027B3" }, "36": { "fn": null, "offset": [ 219, 286 ], "op": "EQ", "path": "30" }, "37": { "fn": null, "offset": [ 219, 286 ], "op": "PUSH1", "path": "30", "value": "0x2D" }, "39": { "fn": null, "offset": [ 219, 286 ], "op": "JUMPI", "path": "30" }, "40": { "fn": null, "offset": [ 219, 286 ], "op": "JUMPDEST", "path": "30" }, "41": { "fn": null, "offset": [ 219, 286 ], "op": "PUSH1", "path": "30", "value": "0x0" }, "43": { "fn": null, "offset": [ 219, 286 ], "op": "DUP1", "path": "30" }, "44": { "first_revert": true, "fn": null, "offset": [ 219, 286 ], "op": "REVERT", "path": "30" }, "45": { "offset": [ 253, 278 ], "op": "JUMPDEST", "path": "30" }, "46": { "fn": null, "offset": [ 253, 278 ], "op": "PUSH1", "path": "30", "value": "0x0" }, "48": { "fn": null, "offset": [ 253, 278 ], "op": "SLOAD", "path": "30" }, "49": { "fn": null, "offset": [ 253, 278 ], "op": "PUSH1", "path": "30", "value": "0x3F" }, "51": { "fn": null, "offset": [ 253, 278 ], "op": "SWAP1", "path": "30" }, "52": { "op": "PUSH1", "value": "0x1" }, "54": { "op": "PUSH1", "value": "0x1" }, "56": { "op": "PUSH1", "value": "0xA0" }, "58": { "op": "SHL" }, "59": { "op": "SUB" }, "60": { "offset": [ 253, 278 ], "op": "AND", "path": "30" }, "61": { "fn": null, "offset": [ 253, 278 ], "op": "DUP2", "path": "30" }, "62": { "fn": null, "offset": [ 253, 278 ], "op": "JUMP", "path": "30" }, "63": { "fn": null, "offset": [ 253, 278 ], "op": "JUMPDEST", "path": "30" }, "64": { "fn": null, "offset": [ 253, 278 ], "op": "PUSH1", "path": "30", "value": "0x40" }, "66": { "fn": null, "offset": [ 253, 278 ], "op": "MLOAD", "path": "30" }, "67": { "op": "PUSH1", "value": "0x1" }, "69": { "op": "PUSH1", "value": "0x1" }, "71": { "op": "PUSH1", "value": "0xA0" }, "73": { "op": "SHL" }, "74": { "op": "SUB" }, "75": { "op": "SWAP1" }, "76": { "op": "SWAP2" }, "77": { "op": "AND" }, "78": { "op": "DUP2" }, "79": { "op": "MSTORE" }, "80": { "op": "PUSH1", "value": "0x20" }, "82": { "op": "ADD" }, "83": { "offset": [ 253, 278 ], "op": "PUSH1", "path": "30", "value": "0x40" }, "85": { "fn": null, "offset": [ 253, 278 ], "op": "MLOAD", "path": "30" }, "86": { "fn": null, "offset": [ 253, 278 ], "op": "DUP1", "path": "30" }, "87": { "fn": null, "offset": [ 253, 278 ], "op": "SWAP2", "path": "30" }, "88": { "fn": null, "offset": [ 253, 278 ], "op": "SUB", "path": "30" }, "89": { "fn": null, "offset": [ 253, 278 ], "op": "SWAP1", "path": "30" }, "90": { "fn": null, "offset": [ 253, 278 ], "op": "RETURN", "path": "30" } }, "sha1": "f4347aa4d6ed25648cb1787000abd648db5bfb00", "source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.2;\n\n// not really needed here. workaround to make brownie to include ITreasury in its scope\nimport \"@etherisc/gif-interface/contracts/modules/ITreasury.sol\";\n\ncontract BrownieWorkaround {\n\n ITreasury public treasury;\n \n}", "sourceMap": "219:67:30:-:0;;;;;;;;;;;;;;;;;;;", "sourcePath": "contracts/BrownieWorkaraound.sol", "type": "contract" }