@andrekorol/kollateral-contracts
Version:
Kollateral protocol, the flash loan building block
481 lines • 18.5 kB
JSON
{
"contractName": "ICallee",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"components": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "uint256",
"name": "number",
"type": "uint256"
}
],
"internalType": "struct Types.AccountInfo",
"name": "accountInfo",
"type": "tuple"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "callFunction",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.7.3+commit.9bfce1f6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"internalType\":\"struct Types.AccountInfo\",\"name\":\"accountInfo\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"callFunction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"dYdX Interface that Callees for Solo must implement in order to ingest data.\",\"kind\":\"dev\",\"methods\":{\"callFunction(address,(address,uint256),bytes)\":{\"params\":{\"accountInfo\":\"The account from which the data is being sent\",\"data\":\"Arbitrary data given by the sender\",\"sender\":\"The msg.sender to Solo\"}}},\"title\":\"ICallee\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"callFunction(address,(address,uint256),bytes)\":{\"notice\":\"Allows users to send this contract arbitrary data.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/andrekorol/src/kollateral/protocol/contracts/liquidity/dydx/ICallee.sol\":\"ICallee\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/andrekorol/src/kollateral/protocol/contracts/liquidity/dydx/ICallee.sol\":{\"keccak256\":\"0xa9b64126eb7872118430e6f217903d82fa6be3f7ac240eb744b9313feac2baa4\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://cf4a6bdd4de3254fef36a4ca761d4b84ae1295dc63351571a13a3e6081ff6598\",\"dweb:/ipfs/Qmf41m5ZHnzt342H6gkWZBXz2XxhqfLa5QrngTsWjH8ZPD\"]},\"/Users/andrekorol/src/kollateral/protocol/contracts/liquidity/dydx/Types.sol\":{\"keccak256\":\"0x6ed571153190f3dd335ef6979ee462c6edbf519b0f5b4ca0d469ac7ed39b9d72\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://b9ed752bdc9d722648483115bc6bbc40c6566ba6f3ea6c1a6dea56706dfcdba3\",\"dweb:/ipfs/QmYzqrrEnrL3ALyrQZATiobh696caMHMe1V8GsmtsoVYb2\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "",
"deployedSourceMap": "",
"source": "/*\n Copyright 2019 dYdX Trading Inc.\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;\npragma experimental ABIEncoderV2;\n\nimport \"./Types.sol\";\n\n/**\n * @title ICallee\n * @author dYdX\n *\n * Interface that Callees for Solo must implement in order to ingest data.\n */\ninterface ICallee {\n // ============ Public Functions ============\n\n /**\n * Allows users to send this contract arbitrary data.\n *\n * @param sender The msg.sender to Solo\n * @param accountInfo The account from which the data is being sent\n * @param data Arbitrary data given by the sender\n */\n function callFunction(\n address sender,\n Types.AccountInfo memory accountInfo,\n bytes memory data\n ) external;\n}\n",
"sourcePath": "/Users/andrekorol/src/kollateral/protocol/contracts/liquidity/dydx/ICallee.sol",
"ast": {
"absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/liquidity/dydx/ICallee.sol",
"exportedSymbols": {
"ICallee": [
2482
],
"Types": [
3226
]
},
"id": 2483,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 2468,
"literals": [
"solidity",
"^",
"0.7",
".0"
],
"nodeType": "PragmaDirective",
"src": "641:23:21"
},
{
"id": 2469,
"literals": [
"experimental",
"ABIEncoderV2"
],
"nodeType": "PragmaDirective",
"src": "665:33:21"
},
{
"absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/liquidity/dydx/Types.sol",
"file": "./Types.sol",
"id": 2470,
"nodeType": "ImportDirective",
"scope": 2483,
"sourceUnit": 3227,
"src": "700:21:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 2471,
"nodeType": "StructuredDocumentation",
"src": "723:119:21",
"text": " @title ICallee\n @author dYdX\n Interface that Callees for Solo must implement in order to ingest data."
},
"fullyImplemented": false,
"id": 2482,
"linearizedBaseContracts": [
2482
],
"name": "ICallee",
"nodeType": "ContractDefinition",
"nodes": [
{
"documentation": {
"id": 2472,
"nodeType": "StructuredDocumentation",
"src": "918:264:21",
"text": " Allows users to send this contract arbitrary data.\n @param sender The msg.sender to Solo\n @param accountInfo The account from which the data is being sent\n @param data Arbitrary data given by the sender"
},
"functionSelector": "8b418713",
"id": 2481,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "callFunction",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 2479,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 2474,
"mutability": "mutable",
"name": "sender",
"nodeType": "VariableDeclaration",
"scope": 2481,
"src": "1218:14:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 2473,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1218:7:21",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2476,
"mutability": "mutable",
"name": "accountInfo",
"nodeType": "VariableDeclaration",
"scope": 2481,
"src": "1242:36:21",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_struct$_AccountInfo_$3225_memory_ptr",
"typeString": "struct Types.AccountInfo"
},
"typeName": {
"id": 2475,
"name": "Types.AccountInfo",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 3225,
"src": "1242:17:21",
"typeDescriptions": {
"typeIdentifier": "t_struct$_AccountInfo_$3225_storage_ptr",
"typeString": "struct Types.AccountInfo"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 2478,
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 2481,
"src": "1288:17:21",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 2477,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1288:5:21",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"src": "1208:103:21"
},
"returnParameters": {
"id": 2480,
"nodeType": "ParameterList",
"parameters": [],
"src": "1320:0:21"
},
"scope": 2482,
"src": "1187:134:21",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 2483,
"src": "843:480:21"
}
],
"src": "641:683:21"
},
"legacyAST": {
"attributes": {
"absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/liquidity/dydx/ICallee.sol",
"exportedSymbols": {
"ICallee": [
2482
],
"Types": [
3226
]
},
"license": "Apache-2.0"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"^",
"0.7",
".0"
]
},
"id": 2468,
"name": "PragmaDirective",
"src": "641:23:21"
},
{
"attributes": {
"literals": [
"experimental",
"ABIEncoderV2"
]
},
"id": 2469,
"name": "PragmaDirective",
"src": "665:33:21"
},
{
"attributes": {
"SourceUnit": 3227,
"absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/liquidity/dydx/Types.sol",
"file": "./Types.sol",
"scope": 2483,
"symbolAliases": [
null
],
"unitAlias": ""
},
"id": 2470,
"name": "ImportDirective",
"src": "700:21:21"
},
{
"attributes": {
"abstract": false,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "interface",
"fullyImplemented": false,
"linearizedBaseContracts": [
2482
],
"name": "ICallee",
"scope": 2483
},
"children": [
{
"attributes": {
"text": " @title ICallee\n @author dYdX\n Interface that Callees for Solo must implement in order to ingest data."
},
"id": 2471,
"name": "StructuredDocumentation",
"src": "723:119:21"
},
{
"attributes": {
"functionSelector": "8b418713",
"implemented": false,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "callFunction",
"scope": 2482,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
"children": [
{
"attributes": {
"text": " Allows users to send this contract arbitrary data.\n @param sender The msg.sender to Solo\n @param accountInfo The account from which the data is being sent\n @param data Arbitrary data given by the sender"
},
"id": 2472,
"name": "StructuredDocumentation",
"src": "918:264:21"
},
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "sender",
"scope": 2481,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 2473,
"name": "ElementaryTypeName",
"src": "1218:7:21"
}
],
"id": 2474,
"name": "VariableDeclaration",
"src": "1218:14:21"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "accountInfo",
"scope": 2481,
"stateVariable": false,
"storageLocation": "memory",
"type": "struct Types.AccountInfo",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "Types.AccountInfo",
"referencedDeclaration": 3225,
"type": "struct Types.AccountInfo"
},
"id": 2475,
"name": "UserDefinedTypeName",
"src": "1242:17:21"
}
],
"id": 2476,
"name": "VariableDeclaration",
"src": "1242:36:21"
},
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "data",
"scope": 2481,
"stateVariable": false,
"storageLocation": "memory",
"type": "bytes",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes",
"type": "bytes"
},
"id": 2477,
"name": "ElementaryTypeName",
"src": "1288:5:21"
}
],
"id": 2478,
"name": "VariableDeclaration",
"src": "1288:17:21"
}
],
"id": 2479,
"name": "ParameterList",
"src": "1208:103:21"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 2480,
"name": "ParameterList",
"src": "1320:0:21"
}
],
"id": 2481,
"name": "FunctionDefinition",
"src": "1187:134:21"
}
],
"id": 2482,
"name": "ContractDefinition",
"src": "843:480:21"
}
],
"id": 2483,
"name": "SourceUnit",
"src": "641:683:21"
},
"compiler": {
"name": "solc",
"version": "0.7.3+commit.9bfce1f6.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.3.3",
"updatedAt": "2021-02-01T23:13:33.220Z",
"devdoc": {
"author": "dYdX Interface that Callees for Solo must implement in order to ingest data.",
"kind": "dev",
"methods": {
"callFunction(address,(address,uint256),bytes)": {
"params": {
"accountInfo": "The account from which the data is being sent",
"data": "Arbitrary data given by the sender",
"sender": "The msg.sender to Solo"
}
}
},
"title": "ICallee",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"callFunction(address,(address,uint256),bytes)": {
"notice": "Allows users to send this contract arbitrary data."
}
},
"version": 1
}
}