@andrekorol/kollateral-contracts
Version:
Kollateral protocol, the flash loan building block
695 lines • 25.9 kB
JSON
{
"contractName": "InvokableCatcher",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "data",
"type": "bytes32"
}
],
"name": "InvokeCatch",
"type": "event"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "data",
"type": "bytes32"
}
],
"name": "invokeCatch",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.7.3+commit.9bfce1f6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"data\",\"type\":\"bytes32\"}],\"name\":\"InvokeCatch\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"data\",\"type\":\"bytes32\"}],\"name\":\"invokeCatch\",\"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/testing/InvokableCatcher.sol\":\"InvokableCatcher\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/andrekorol/src/kollateral/protocol/contracts/testing/InvokableCatcher.sol\":{\"keccak256\":\"0x28aee2b4bd6baeee1c0cec7b0d53f1096f5144e74c92ed8c668488661f47e23c\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://8a84affc8f4afa7377b2f0e6674b9a0901c02c31fe81ecc69db494807df6e4a5\",\"dweb:/ipfs/QmbmQKjpnnhaLshTe4YZFcdGJQYDLqjJVBaDijT2kdLek1\"]}},\"version\":1}",
"bytecode": "0x6080604052348015600f57600080fd5b5060e68061001e6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80637e76349a14602d575b600080fd5b605660048036036020811015604157600080fd5b81019080803590602001909291905050506058565b005b7fca6b7a9ec5bebc98fee64e3a7b770bca04e3e49808cd0d9473357e69fa1238bb3382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15056fea26469706673582212209c055cdd6fb29b164c96eb6a4595963979c61f5f283ea2506d1184e1b773ff9f64736f6c63430007030033",
"deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060285760003560e01c80637e76349a14602d575b600080fd5b605660048036036020811015604157600080fd5b81019080803590602001909291905050506058565b005b7fca6b7a9ec5bebc98fee64e3a7b770bca04e3e49808cd0d9473357e69fa1238bb3382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15056fea26469706673582212209c055cdd6fb29b164c96eb6a4595963979c61f5f283ea2506d1184e1b773ff9f64736f6c63430007030033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
"sourceMap": "665:205:26:-:0;;;697:16;;;;;;;;;;665:205;;;;;;",
"deployedSourceMap": "665:205:26:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;773:95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;832:29;844:10;856:4;832:29;;;;;;;;;;;;;;;;;;;;;;;;;;773:95;:::o",
"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\ncontract InvokableCatcher {\n constructor() {}\n\n event InvokeCatch(address sender, bytes32 data);\n\n function invokeCatch(bytes32 data) external {\n emit InvokeCatch(msg.sender, data);\n }\n}\n",
"sourcePath": "/Users/andrekorol/src/kollateral/protocol/contracts/testing/InvokableCatcher.sol",
"ast": {
"absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/testing/InvokableCatcher.sol",
"exportedSymbols": {
"InvokableCatcher": [
3541
]
},
"id": 3542,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 3518,
"literals": [
"solidity",
"^",
"0.7",
".0"
],
"nodeType": "PragmaDirective",
"src": "640:23:26"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"fullyImplemented": true,
"id": 3541,
"linearizedBaseContracts": [
3541
],
"name": "InvokableCatcher",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 3521,
"nodeType": "Block",
"src": "711:2:26",
"statements": []
},
"id": 3522,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3519,
"nodeType": "ParameterList",
"parameters": [],
"src": "708:2:26"
},
"returnParameters": {
"id": 3520,
"nodeType": "ParameterList",
"parameters": [],
"src": "711:0:26"
},
"scope": 3541,
"src": "697:16:26",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
{
"anonymous": false,
"id": 3528,
"name": "InvokeCatch",
"nodeType": "EventDefinition",
"parameters": {
"id": 3527,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3524,
"indexed": false,
"mutability": "mutable",
"name": "sender",
"nodeType": "VariableDeclaration",
"scope": 3528,
"src": "737:14:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 3523,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "737:7:26",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 3526,
"indexed": false,
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 3528,
"src": "753:12:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3525,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "753:7:26",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "736:30:26"
},
"src": "719:48:26"
},
{
"body": {
"id": 3539,
"nodeType": "Block",
"src": "817:51:26",
"statements": [
{
"eventCall": {
"arguments": [
{
"expression": {
"id": 3534,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": -15,
"src": "844:3:26",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 3535,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"src": "844:10:26",
"typeDescriptions": {
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
}
},
{
"id": 3536,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3530,
"src": "856:4:26",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"id": 3533,
"name": "InvokeCatch",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 3528,
"src": "832:11:26",
"typeDescriptions": {
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bytes32_$returns$__$",
"typeString": "function (address,bytes32)"
}
},
"id": 3537,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "832:29:26",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 3538,
"nodeType": "EmitStatement",
"src": "827:34:26"
}
]
},
"functionSelector": "7e76349a",
"id": 3540,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "invokeCatch",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 3531,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 3530,
"mutability": "mutable",
"name": "data",
"nodeType": "VariableDeclaration",
"scope": 3540,
"src": "794:12:26",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 3529,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "794:7:26",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"visibility": "internal"
}
],
"src": "793:14:26"
},
"returnParameters": {
"id": 3532,
"nodeType": "ParameterList",
"parameters": [],
"src": "817:0:26"
},
"scope": 3541,
"src": "773:95:26",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 3542,
"src": "665:205:26"
}
],
"src": "640:231:26"
},
"legacyAST": {
"attributes": {
"absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/testing/InvokableCatcher.sol",
"exportedSymbols": {
"InvokableCatcher": [
3541
]
},
"license": "Apache-2.0"
},
"children": [
{
"attributes": {
"literals": [
"solidity",
"^",
"0.7",
".0"
]
},
"id": 3518,
"name": "PragmaDirective",
"src": "640:23:26"
},
{
"attributes": {
"abstract": false,
"baseContracts": [
null
],
"contractDependencies": [
null
],
"contractKind": "contract",
"fullyImplemented": true,
"linearizedBaseContracts": [
3541
],
"name": "InvokableCatcher",
"scope": 3542
},
"children": [
{
"attributes": {
"implemented": true,
"isConstructor": true,
"kind": "constructor",
"modifiers": [
null
],
"name": "",
"scope": 3541,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "public"
},
"children": [
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 3519,
"name": "ParameterList",
"src": "708:2:26"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 3520,
"name": "ParameterList",
"src": "711:0:26"
},
{
"attributes": {
"statements": [
null
]
},
"children": [],
"id": 3521,
"name": "Block",
"src": "711:2:26"
}
],
"id": 3522,
"name": "FunctionDefinition",
"src": "697:16:26"
},
{
"attributes": {
"anonymous": false,
"name": "InvokeCatch"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"indexed": false,
"mutability": "mutable",
"name": "sender",
"scope": 3528,
"stateVariable": false,
"storageLocation": "default",
"type": "address",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "address",
"stateMutability": "nonpayable",
"type": "address"
},
"id": 3523,
"name": "ElementaryTypeName",
"src": "737:7:26"
}
],
"id": 3524,
"name": "VariableDeclaration",
"src": "737:14:26"
},
{
"attributes": {
"constant": false,
"indexed": false,
"mutability": "mutable",
"name": "data",
"scope": 3528,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 3525,
"name": "ElementaryTypeName",
"src": "753:7:26"
}
],
"id": 3526,
"name": "VariableDeclaration",
"src": "753:12:26"
}
],
"id": 3527,
"name": "ParameterList",
"src": "736:30:26"
}
],
"id": 3528,
"name": "EventDefinition",
"src": "719:48:26"
},
{
"attributes": {
"functionSelector": "7e76349a",
"implemented": true,
"isConstructor": false,
"kind": "function",
"modifiers": [
null
],
"name": "invokeCatch",
"scope": 3541,
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
"children": [
{
"children": [
{
"attributes": {
"constant": false,
"mutability": "mutable",
"name": "data",
"scope": 3540,
"stateVariable": false,
"storageLocation": "default",
"type": "bytes32",
"visibility": "internal"
},
"children": [
{
"attributes": {
"name": "bytes32",
"type": "bytes32"
},
"id": 3529,
"name": "ElementaryTypeName",
"src": "794:7:26"
}
],
"id": 3530,
"name": "VariableDeclaration",
"src": "794:12:26"
}
],
"id": 3531,
"name": "ParameterList",
"src": "793:14:26"
},
{
"attributes": {
"parameters": [
null
]
},
"children": [],
"id": 3532,
"name": "ParameterList",
"src": "817:0:26"
},
{
"children": [
{
"children": [
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"isStructConstructorCall": false,
"lValueRequested": false,
"names": [
null
],
"tryCall": false,
"type": "tuple()",
"type_conversion": false
},
"children": [
{
"attributes": {
"argumentTypes": [
{
"typeIdentifier": "t_address_payable",
"typeString": "address payable"
},
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
],
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3528,
"type": "function (address,bytes32)",
"value": "InvokeCatch"
},
"id": 3533,
"name": "Identifier",
"src": "832:11:26"
},
{
"attributes": {
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"member_name": "sender",
"type": "address payable"
},
"children": [
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": -15,
"type": "msg",
"value": "msg"
},
"id": 3534,
"name": "Identifier",
"src": "844:3:26"
}
],
"id": 3535,
"name": "MemberAccess",
"src": "844:10:26"
},
{
"attributes": {
"overloadedDeclarations": [
null
],
"referencedDeclaration": 3530,
"type": "bytes32",
"value": "data"
},
"id": 3536,
"name": "Identifier",
"src": "856:4:26"
}
],
"id": 3537,
"name": "FunctionCall",
"src": "832:29:26"
}
],
"id": 3538,
"name": "EmitStatement",
"src": "827:34:26"
}
],
"id": 3539,
"name": "Block",
"src": "817:51:26"
}
],
"id": 3540,
"name": "FunctionDefinition",
"src": "773:95:26"
}
],
"id": 3541,
"name": "ContractDefinition",
"src": "665:205:26"
}
],
"id": 3542,
"name": "SourceUnit",
"src": "640:231:26"
},
"compiler": {
"name": "solc",
"version": "0.7.3+commit.9bfce1f6.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.3.3",
"updatedAt": "2021-02-01T23:13:33.234Z",
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}