UNPKG

@andrekorol/kollateral-contracts

Version:

Kollateral protocol, the flash loan building block

444 lines 14.6 kB
{ "contractName": "IWETH", "abi": [ { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "deposit", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "wad", "type": "uint256" } ], "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.7.3+commit.9bfce1f6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"wad\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/IWETH.sol\":\"IWETH\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/IWETH.sol\":{\"keccak256\":\"0x714f003eb93b5f91739e36fdc22ba3eaca8c82a83d11013b1dc776d63aa242cb\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://47d70bd07837927806c759fe38c1fc8933bc8de2e4f56f6c234ca5e338ded961\",\"dweb:/ipfs/QmeDYFtSUQVG1fQEXgVMh2AE2fs3rGYnG8L8C7uK4fDWg9\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "immutableReferences": {}, "generatedSources": [], "deployedGeneratedSources": [], "sourceMap": "", "deployedSourceMap": "", "source": "/*\n\n Copyright 2020 Kollateral LLC.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\n// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.7.0;\n\nabstract contract IWETH {\n mapping(address => uint256) public balanceOf;\n\n function deposit() public payable virtual;\n\n function withdraw(uint256 wad) public virtual;\n}\n", "sourcePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/IWETH.sol", "ast": { "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/IWETH.sol", "exportedSymbols": { "IWETH": [ 1578 ] }, "id": 1579, "license": "Apache-2.0", "nodeType": "SourceUnit", "nodes": [ { "id": 1565, "literals": [ "solidity", "^", "0.7", ".0" ], "nodeType": "PragmaDirective", "src": "640:23:10" }, { "abstract": true, "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "fullyImplemented": false, "id": 1578, "linearizedBaseContracts": [ 1578 ], "name": "IWETH", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "functionSelector": "70a08231", "id": 1569, "mutability": "mutable", "name": "balanceOf", "nodeType": "VariableDeclaration", "scope": 1578, "src": "695:44:10", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 1568, "keyType": { "id": 1566, "name": "address", "nodeType": "ElementaryTypeName", "src": "703:7:10", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "695:27:10", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 1567, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "714:7:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "visibility": "public" }, { "functionSelector": "d0e30db0", "id": 1572, "implemented": false, "kind": "function", "modifiers": [], "name": "deposit", "nodeType": "FunctionDefinition", "parameters": { "id": 1570, "nodeType": "ParameterList", "parameters": [], "src": "762:2:10" }, "returnParameters": { "id": 1571, "nodeType": "ParameterList", "parameters": [], "src": "787:0:10" }, "scope": 1578, "src": "746:42:10", "stateMutability": "payable", "virtual": true, "visibility": "public" }, { "functionSelector": "2e1a7d4d", "id": 1577, "implemented": false, "kind": "function", "modifiers": [], "name": "withdraw", "nodeType": "FunctionDefinition", "parameters": { "id": 1575, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1574, "mutability": "mutable", "name": "wad", "nodeType": "VariableDeclaration", "scope": 1577, "src": "812:11:10", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1573, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "812:7:10", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "visibility": "internal" } ], "src": "811:13:10" }, "returnParameters": { "id": 1576, "nodeType": "ParameterList", "parameters": [], "src": "839:0:10" }, "scope": 1578, "src": "794:46:10", "stateMutability": "nonpayable", "virtual": true, "visibility": "public" } ], "scope": 1579, "src": "665:177:10" } ], "src": "640:203:10" }, "legacyAST": { "attributes": { "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/IWETH.sol", "exportedSymbols": { "IWETH": [ 1578 ] }, "license": "Apache-2.0" }, "children": [ { "attributes": { "literals": [ "solidity", "^", "0.7", ".0" ] }, "id": 1565, "name": "PragmaDirective", "src": "640:23:10" }, { "attributes": { "abstract": true, "baseContracts": [ null ], "contractDependencies": [ null ], "contractKind": "contract", "fullyImplemented": false, "linearizedBaseContracts": [ 1578 ], "name": "IWETH", "scope": 1579 }, "children": [ { "attributes": { "constant": false, "functionSelector": "70a08231", "mutability": "mutable", "name": "balanceOf", "scope": 1578, "stateVariable": true, "storageLocation": "default", "type": "mapping(address => uint256)", "visibility": "public" }, "children": [ { "attributes": { "type": "mapping(address => uint256)" }, "children": [ { "attributes": { "name": "address", "type": "address" }, "id": 1566, "name": "ElementaryTypeName", "src": "703:7:10" }, { "attributes": { "name": "uint256", "type": "uint256" }, "id": 1567, "name": "ElementaryTypeName", "src": "714:7:10" } ], "id": 1568, "name": "Mapping", "src": "695:27:10" } ], "id": 1569, "name": "VariableDeclaration", "src": "695:44:10" }, { "attributes": { "functionSelector": "d0e30db0", "implemented": false, "isConstructor": false, "kind": "function", "modifiers": [ null ], "name": "deposit", "scope": 1578, "stateMutability": "payable", "virtual": true, "visibility": "public" }, "children": [ { "attributes": { "parameters": [ null ] }, "children": [], "id": 1570, "name": "ParameterList", "src": "762:2:10" }, { "attributes": { "parameters": [ null ] }, "children": [], "id": 1571, "name": "ParameterList", "src": "787:0:10" } ], "id": 1572, "name": "FunctionDefinition", "src": "746:42:10" }, { "attributes": { "functionSelector": "2e1a7d4d", "implemented": false, "isConstructor": false, "kind": "function", "modifiers": [ null ], "name": "withdraw", "scope": 1578, "stateMutability": "nonpayable", "virtual": true, "visibility": "public" }, "children": [ { "children": [ { "attributes": { "constant": false, "mutability": "mutable", "name": "wad", "scope": 1577, "stateVariable": false, "storageLocation": "default", "type": "uint256", "visibility": "internal" }, "children": [ { "attributes": { "name": "uint256", "type": "uint256" }, "id": 1573, "name": "ElementaryTypeName", "src": "812:7:10" } ], "id": 1574, "name": "VariableDeclaration", "src": "812:11:10" } ], "id": 1575, "name": "ParameterList", "src": "811:13:10" }, { "attributes": { "parameters": [ null ] }, "children": [], "id": 1576, "name": "ParameterList", "src": "839:0:10" } ], "id": 1577, "name": "FunctionDefinition", "src": "794:46:10" } ], "id": 1578, "name": "ContractDefinition", "src": "665:177:10" } ], "id": 1579, "name": "SourceUnit", "src": "640:203:10" }, "compiler": { "name": "solc", "version": "0.7.3+commit.9bfce1f6.Emscripten.clang" }, "networks": {}, "schemaVersion": "3.3.3", "updatedAt": "2021-02-01T23:13:33.203Z", "devdoc": { "kind": "dev", "methods": {}, "version": 1 }, "userdoc": { "kind": "user", "methods": {}, "version": 1 } }