@etherisc/gif-contracts
Version:
This repository holds the GIF core contracts and tools to develop, test and deploy GIF instances.
1,804 lines (1,803 loc) • 2.45 MB
JSON
{
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint8",
"name": "version",
"type": "uint8"
}
],
"name": "Initialized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bool",
"name": "callSuccess",
"type": "bool"
},
{
"indexed": false,
"internalType": "uint256",
"name": "returnDataLength",
"type": "uint256"
},
{
"indexed": false,
"internalType": "bytes",
"name": "returnData",
"type": "bytes"
}
],
"name": "LogTransferHelperCallFailed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bool",
"name": "tokenIsContract",
"type": "bool"
},
{
"indexed": false,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
}
],
"name": "LogTransferHelperInputValidation1Failed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "allowance",
"type": "uint256"
}
],
"name": "LogTransferHelperInputValidation2Failed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fixedFee",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fractionalFee",
"type": "uint256"
}
],
"name": "LogTreasuryCapitalFeesSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogTreasuryCapitalProcessed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "riskpoolWalletAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogTreasuryCapitalTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "instanceWalletAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogTreasuryFeesTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "walletAddress",
"type": "address"
}
],
"name": "LogTreasuryInstanceWalletSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogTreasuryPayoutProcessed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "riskpoolWalletAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogTreasuryPayoutTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "productId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fixedFee",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fractionalFee",
"type": "uint256"
}
],
"name": "LogTreasuryPremiumFeesSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogTreasuryPremiumProcessed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "riskpoolWalletAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogTreasuryPremiumTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "productId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "erc20Address",
"type": "address"
}
],
"name": "LogTreasuryProductTokenSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "LogTreasuryResumed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "walletAddress",
"type": "address"
}
],
"name": "LogTreasuryRiskpoolWalletSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "LogTreasurySuspended",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogTreasuryWithdrawalProcessed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "riskpoolWalletAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LogTreasuryWithdrawalTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Paused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Unpaused",
"type": "event"
},
{
"inputs": [],
"name": "FRACTIONAL_FEE_MAX",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "FRACTION_FULL_UNIT",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "calculateFee",
"outputs": [
{
"internalType": "uint256",
"name": "feeAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "netAmount",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fixedFee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fractionalFee",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "feeCalculationData",
"type": "bytes"
}
],
"name": "createFeeSpecification",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fixedFee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fractionalFee",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "feeCalculationData",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"internalType": "struct ITreasury.FeeSpecification",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
}
],
"name": "getComponentToken",
"outputs": [
{
"internalType": "contract IERC20",
"name": "token",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
}
],
"name": "getFeeSpecification",
"outputs": [
{
"components": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fixedFee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fractionalFee",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "feeCalculationData",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"internalType": "struct ITreasury.FeeSpecification",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getFractionFullUnit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "getInstanceWallet",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
}
],
"name": "getRiskpoolWallet",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "registry",
"type": "address"
}
],
"name": "initialize",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "paused",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "capitalAmount",
"type": "uint256"
}
],
"name": "processCapital",
"outputs": [
{
"internalType": "uint256",
"name": "feeAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "netCapitalAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "payoutId",
"type": "uint256"
}
],
"name": "processPayout",
"outputs": [
{
"internalType": "uint256",
"name": "feeAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "netPayoutAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "processPremium",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
},
{
"internalType": "uint256",
"name": "feeAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "netAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "processId",
"type": "bytes32"
}
],
"name": "processPremium",
"outputs": [
{
"internalType": "bool",
"name": "success",
"type": "bool"
},
{
"internalType": "uint256",
"name": "feeAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "netPremiumAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "bundleId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "processWithdrawal",
"outputs": [
{
"internalType": "uint256",
"name": "feeAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "netAmount",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "resume",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fixedFee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fractionalFee",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "feeCalculationData",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"internalType": "struct ITreasury.FeeSpecification",
"name": "feeSpec",
"type": "tuple"
}
],
"name": "setCapitalFees",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "instanceWalletAddress",
"type": "address"
}
],
"name": "setInstanceWallet",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint256",
"name": "componentId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fixedFee",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "fractionalFee",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "feeCalculationData",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "createdAt",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "updatedAt",
"type": "uint256"
}
],
"internalType": "struct ITreasury.FeeSpecification",
"name": "feeSpec",
"type": "tuple"
}
],
"name": "setPremiumFees",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "productId",
"type": "uint256"
},
{
"internalType": "address",
"name": "erc20Address",
"type": "address"
}
],
"name": "setProductToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "riskpoolId",
"type": "uint256"
},
{
"internalType": "address",
"name": "riskpoolWalletAddress",
"type": "address"
}
],
"name": "setRiskpoolWallet",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "suspend",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"allSourcePaths": {
"10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/utils/Initializable.sol",
"101": "contracts/tokens/BundleToken.sol",
"11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/security/Pausable.sol",
"13": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
"17": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/ERC721.sol",
"18": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"19": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721Receiver.sol",
"20": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/extensions/IERC721Metadata.sol",
"21": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol",
"22": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"24": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"25": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/ERC165.sol",
"26": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
"27": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/structs/EnumerableSet.sol",
"30": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"32": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"33": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol",
"37": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"38": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IBundle.sol",
"39": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol",
"4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
"41": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol",
"42": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPool.sol",
"44": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol",
"45": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/ITreasury.sol",
"53": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol",
"74": "contracts/modules/BundleController.sol",
"75": "contracts/modules/ComponentController.sol",
"77": "contracts/modules/PolicyController.sol",
"78": "contracts/modules/PoolController.sol",
"81": "contracts/modules/TreasuryModule.sol",
"88": "contracts/shared/CoreController.sol",
"90": "contracts/shared/TransferHelper.sol"
},
"ast": {
"absolutePath": "contracts/modules/TreasuryModule.sol",
"exportedSymbols": {
"Address": [
26374
],
"BundleController": [
5504
],
"BundleToken": [
17246
],
"ComponentController": [
6504
],
"Context": [
24074
],
"CoreController": [
14924
],
"ERC165": [
26079
],
"ERC721": [
24987
],
"EnumerableSet": [
19390
],
"IAccess": [
21938
],
"IBundle": [
20491
],
"IBundleToken": [
24052
],
"IComponent": [
22099
],
"IComponentEvents": [
22419
],
"IERC165": [
27203
],
"IERC20": [
18510
],
"IERC721": [
23745
],
"IERC721Metadata": [
27618
],
"IERC721Receiver": [
27591
],
"IOracle": [
22133
],
"IPolicy": [
20837
],
"IPool": [
21652
],
"IProduct": [
21995
],
"IRegistry": [
21750
],
"IRiskpool": [
22366
],
"ITreasury": [
23443
],
"Initializable": [
18432
],
"Ownable": [
20950
],
"Pausable": [
23183
],
"PolicyController": [
8529
],
"PoolController": [
9719
],
"Strings": [
23075
],
"TransferHelper": [
15170
],
"TreasuryModule": [
12127
]
},
"id": 12128,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 10667,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:81"
},
{
"absolutePath": "contracts/modules/ComponentController.sol",
"file": "./ComponentController.sol",
"id": 10668,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 6505,
"src": "63:35:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/modules/PolicyController.sol",
"file": "./PolicyController.sol",
"id": 10669,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 8530,
"src": "99:32:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/modules/BundleController.sol",
"file": "./BundleController.sol",
"id": 10670,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 5505,
"src": "132:32:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/modules/PoolController.sol",
"file": "./PoolController.sol",
"id": 10671,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 9720,
"src": "165:30:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/CoreController.sol",
"file": "../shared/CoreController.sol",
"id": 10672,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 14925,
"src": "196:38:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "contracts/shared/TransferHelper.sol",
"file": "../shared/TransferHelper.sol",
"id": 10673,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 15171,
"src": "235:38:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"file": "@etherisc/gif-interface/contracts/components/IComponent.sol",
"id": 10674,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 22100,
"src": "275:69:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"file": "@etherisc/gif-interface/contracts/components/IProduct.sol",
"id": 10675,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 21996,
"src": "345:67:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol",
"file": "@etherisc/gif-interface/contracts/modules/IPolicy.sol",
"id": 10676,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 20838,
"src": "413:63:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/ITreasury.sol",
"file": "@etherisc/gif-interface/contracts/modules/ITreasury.sol",
"id": 10677,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 23444,
"src": "477:65:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/security/Pausable.sol",
"file": "@openzeppelin/contracts/security/Pausable.sol",
"id": 10678,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 23184,
"src": "544:55:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"id": 10679,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 18511,
"src": "600:56:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"file": "@openzeppelin/contracts/utils/Strings.sol",
"id": 10680,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 12128,
"sourceUnit": 23076,
"src": "657:51:81",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 10681,
"name": "ITreasury",
"nodeType": "IdentifierPath",
"referencedDeclaration": 23443,
"src": "742:9:81"
},
"id": 10682,
"nodeType": "InheritanceSpecifier",
"src": "742:9:81"
},
{
"baseName": {
"id": 10683,
"name": "CoreController",
"nodeType": "IdentifierPath",
"referencedDeclaration": 14924,
"src": "757:14:81"
},
"id": 10684,
"nodeType": "InheritanceSpecifier",
"src": "757:14:81"
},
{
"baseName": {
"id": 10685,
"name": "Pausable",
"nodeType": "IdentifierPath",
"referencedDeclaration": 23183,
"src": "777:8:81"
},
"id": 10686,
"nodeType": "InheritanceSpecifier",
"src": "777:8:81"
}
],
"contractDependencies": [
14924,
18432,
23183,
23443,
24074
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 12127,
"linearizedBaseContracts": [
12127,
23183,
14924,
18432,
24074,
23443
],
"name": "TreasuryModule",
"nameLocation": "719:14:81",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"functionSelector": "b79f5eab",
"id": 10691,
"mutability": "constant",
"name": "FRACTION_FULL_UNIT",
"nameLocation": "816:18:81",
"nodeType": "VariableDeclaration",
"scope": 12127,
"src": "792:51:81",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10687,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "792:7:81",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"commonType": {
"typeIdentifier": "t_rational_1000000000000000000_by_1",
"typeString": "int_const 1000000000000000000"
},
"id": 10690,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 10688,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "837:2:81",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "3138",
"id": 10689,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "841:2:81",
"typeDescriptions": {
"typeIdentifier": "t_rational_18_by_1",
"typeString": "int_const 18"
},
"value": "18"
},
"src": "837:6:81",
"typeDescriptions": {
"typeIdentifier": "t_rational_1000000000000000000_by_1",
"typeString": "int_const 1000000000000000000"
}
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "f964690d",
"id": 10696,
"mutability": "constant",
"name": "FRACTIONAL_FEE_MAX",
"nameLocation": "873:18:81",
"nodeType": "VariableDeclaration",
"scope": 12127,
"src": "849:67:81",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10692,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "849:7:81",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 10695,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"id": 10693,
"name": "FRACTION_FULL_UNIT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10691,
"src": "894:18:81",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"hexValue": "34",
"id": 10694,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "915:1:81",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "894:22:81",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "public"
},
{
"anonymous": false,
"id": 10704,
"name": "LogTransferHelperInputValidation1Failed",
"nameLocation": "957:39:81",
"nodeType": "EventDefinition",
"parameters": {
"id": 10703,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10698,
"indexed": false,
"mutability": "mutable",
"name": "tokenIsContract",
"nameLocation": "1002:15:81",
"nodeType": "VariableDeclaration",
"scope": 10704,
"src": "997:20:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 10697,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "997:4:81",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10700,
"indexed": false,
"mutability": "mutable",
"name": "from",
"nameLocation": "1027:4:81",
"nodeType": "VariableDeclaration",
"scope": 10704,
"src": "1019:12:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 10699,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1019:7:81",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10702,
"indexed": false,
"mutability": "mutable",
"name": "to",
"nameLocation": "1041:2:81",
"nodeType": "VariableDeclaration",
"scope": 10704,
"src": "1033:10:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 10701,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1033:7:81",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "996:48:81"
},
"src": "951:94:81"
},
{
"anonymous": false,
"id": 10710,
"name": "LogTransferHelperInputValidation2Failed",
"nameLocation": "1056:39:81",
"nodeType": "EventDefinition",
"parameters": {
"id": 10709,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10706,
"indexed": false,
"mutability": "mutable",
"name": "balance",
"nameLocation": "1104:7:81",
"nodeType": "VariableDeclaration",
"scope": 10710,
"src": "1096:15:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10705,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1096:7:81",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10708,
"indexed": false,
"mutability": "mutable",
"name": "allowance",
"nameLocation": "1121:9:81",
"nodeType": "VariableDeclaration",
"scope": 10710,
"src": "1113:17:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10707,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1113:7:81",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1095:36:81"
},
"src": "1050:82:81"
},
{
"anonymous": false,
"id": 10718,
"name": "LogTransferHelperCallFailed",
"nameLocation": "1143:27:81",
"nodeType": "EventDefinition",
"parameters": {
"id": 10717,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10712,
"indexed": false,
"mutability": "mutable",
"name": "callSuccess",
"nameLocation": "1176:11:81",
"nodeType": "VariableDeclaration",
"scope": 10718,
"src": "1171:16:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 10711,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1171:4:81",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10714,
"indexed": false,
"mutability": "mutable",
"name": "returnDataLength",
"nameLocation": "1197:16:81",
"nodeType": "VariableDeclaration",
"scope": 10718,
"src": "1189:24:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10713,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1189:7:81",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10716,
"indexed": false,
"mutability": "mutable",
"name": "returnData",
"nameLocation": "1221:10:81",
"nodeType": "VariableDeclaration",
"scope": 10718,
"src": "1215:16:81",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 10715,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1215:5:81",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},