@etherisc/depeg-contracts
Version:
Etherisc's smart contracts for a depeg insurance for stable coins.
1,781 lines (1,780 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": {
"0": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/access/Ownable.sol",
"1": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/proxy/utils/Initializable.sol",
"10": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Address.sol",
"11": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Context.sol",
"12": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"14": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/ERC165.sol",
"15": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/introspection/IERC165.sol",
"16": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/structs/EnumerableSet.sol",
"17": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/BundleController.sol",
"18": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/ComponentController.sol",
"19": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/PolicyController.sol",
"2": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/security/Pausable.sol",
"20": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/PoolController.sol",
"21": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/TreasuryModule.sol",
"22": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/shared/CoreController.sol",
"23": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/shared/TransferHelper.sol",
"24": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/tokens/BundleToken.sol",
"27": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"29": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"30": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IRiskpool.sol",
"33": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IAccess.sol",
"34": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IBundle.sol",
"35": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IComponentEvents.sol",
"36": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol",
"37": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPool.sol",
"38": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IRegistry.sol",
"39": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/ITreasury.sol",
"4": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC20/IERC20.sol",
"46": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/tokens/IBundleToken.sol",
"6": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/ERC721.sol",
"7": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721.sol",
"8": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/IERC721Receiver.sol",
"9": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/token/ERC721/extensions/IERC721Metadata.sol"
},
"ast": {
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/TreasuryModule.sol",
"exportedSymbols": {
"Address": [
24852
],
"BundleController": [
17412
],
"BundleToken": [
23505
],
"ComponentController": [
18412
],
"Context": [
15648
],
"CoreController": [
21649
],
"ERC165": [
24921
],
"ERC721": [
24557
],
"EnumerableSet": [
10109
],
"IAccess": [
22927
],
"IBundle": [
13382
],
"IBundleToken": [
13428
],
"IComponent": [
11675
],
"IComponentEvents": [
22980
],
"IERC165": [
22864
],
"IERC20": [
15820
],
"IERC721": [
13932
],
"IERC721Metadata": [
24897
],
"IERC721Receiver": [
24870
],
"IOracle": [
23539
],
"IPolicy": [
12649
],
"IPool": [
23131
],
"IProduct": [
21878
],
"IRegistry": [
21976
],
"IRiskpool": [
14585
],
"ITreasury": [
12909
],
"Initializable": [
23690
],
"Ownable": [
9476
],
"Pausable": [
15928
],
"PolicyController": [
20323
],
"PoolController": [
21513
],
"Strings": [
16154
],
"TransferHelper": [
21821
],
"TreasuryModule": [
11571
]
},
"id": 11572,
"license": "Apache-2.0",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 10111,
"literals": [
"solidity",
"0.8",
".2"
],
"nodeType": "PragmaDirective",
"src": "39:22:21"
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/ComponentController.sol",
"file": "./ComponentController.sol",
"id": 10112,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 18413,
"src": "63:35:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/PolicyController.sol",
"file": "./PolicyController.sol",
"id": 10113,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 20324,
"src": "99:32:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/BundleController.sol",
"file": "./BundleController.sol",
"id": 10114,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 17413,
"src": "132:32:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/modules/PoolController.sol",
"file": "./PoolController.sol",
"id": 10115,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 21514,
"src": "165:30:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/shared/CoreController.sol",
"file": "../shared/CoreController.sol",
"id": 10116,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 21650,
"src": "196:38:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-contracts@b58fd27/contracts/shared/TransferHelper.sol",
"file": "../shared/TransferHelper.sol",
"id": 10117,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 21822,
"src": "235:38:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IComponent.sol",
"file": "@etherisc/gif-interface/contracts/components/IComponent.sol",
"id": 10118,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 11676,
"src": "275:69:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/components/IProduct.sol",
"file": "@etherisc/gif-interface/contracts/components/IProduct.sol",
"id": 10119,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 21879,
"src": "345:67:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/IPolicy.sol",
"file": "@etherisc/gif-interface/contracts/modules/IPolicy.sol",
"id": 10120,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 12650,
"src": "413:63:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/etherisc/gif-interface@3b0002a/contracts/modules/ITreasury.sol",
"file": "@etherisc/gif-interface/contracts/modules/ITreasury.sol",
"id": 10121,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 12910,
"src": "477:65:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/security/Pausable.sol",
"file": "@openzeppelin/contracts/security/Pausable.sol",
"id": 10122,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 15929,
"src": "544:55:21",
"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": 10123,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 15821,
"src": "600:56:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"absolutePath": "/home/vscode/.brownie/packages/OpenZeppelin/openzeppelin-contracts@4.7.3/contracts/utils/Strings.sol",
"file": "@openzeppelin/contracts/utils/Strings.sol",
"id": 10124,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 11572,
"sourceUnit": 16155,
"src": "657:51:21",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [
{
"baseName": {
"id": 10125,
"name": "ITreasury",
"nodeType": "IdentifierPath",
"referencedDeclaration": 12909,
"src": "742:9:21"
},
"id": 10126,
"nodeType": "InheritanceSpecifier",
"src": "742:9:21"
},
{
"baseName": {
"id": 10127,
"name": "CoreController",
"nodeType": "IdentifierPath",
"referencedDeclaration": 21649,
"src": "757:14:21"
},
"id": 10128,
"nodeType": "InheritanceSpecifier",
"src": "757:14:21"
},
{
"baseName": {
"id": 10129,
"name": "Pausable",
"nodeType": "IdentifierPath",
"referencedDeclaration": 15928,
"src": "777:8:21"
},
"id": 10130,
"nodeType": "InheritanceSpecifier",
"src": "777:8:21"
}
],
"contractDependencies": [
12909,
15648,
15928,
21649,
23690
],
"contractKind": "contract",
"fullyImplemented": true,
"id": 11571,
"linearizedBaseContracts": [
11571,
15928,
21649,
23690,
15648,
12909
],
"name": "TreasuryModule",
"nameLocation": "719:14:21",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": true,
"functionSelector": "b79f5eab",
"id": 10135,
"mutability": "constant",
"name": "FRACTION_FULL_UNIT",
"nameLocation": "816:18:21",
"nodeType": "VariableDeclaration",
"scope": 11571,
"src": "792:51:21",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10131,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "792:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"commonType": {
"typeIdentifier": "t_rational_1000000000000000000_by_1",
"typeString": "int_const 1000000000000000000"
},
"id": 10134,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"hexValue": "3130",
"id": 10132,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "837:2:21",
"typeDescriptions": {
"typeIdentifier": "t_rational_10_by_1",
"typeString": "int_const 10"
},
"value": "10"
},
"nodeType": "BinaryOperation",
"operator": "**",
"rightExpression": {
"hexValue": "3138",
"id": 10133,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "841:2:21",
"typeDescriptions": {
"typeIdentifier": "t_rational_18_by_1",
"typeString": "int_const 18"
},
"value": "18"
},
"src": "837:6:21",
"typeDescriptions": {
"typeIdentifier": "t_rational_1000000000000000000_by_1",
"typeString": "int_const 1000000000000000000"
}
},
"visibility": "public"
},
{
"constant": true,
"functionSelector": "f964690d",
"id": 10140,
"mutability": "constant",
"name": "FRACTIONAL_FEE_MAX",
"nameLocation": "873:18:21",
"nodeType": "VariableDeclaration",
"scope": 11571,
"src": "849:67:21",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10136,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "849:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 10139,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"leftExpression": {
"id": 10137,
"name": "FRACTION_FULL_UNIT",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 10135,
"src": "894:18:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "/",
"rightExpression": {
"hexValue": "34",
"id": 10138,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "915:1:21",
"typeDescriptions": {
"typeIdentifier": "t_rational_4_by_1",
"typeString": "int_const 4"
},
"value": "4"
},
"src": "894:22:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "public"
},
{
"anonymous": false,
"id": 10148,
"name": "LogTransferHelperInputValidation1Failed",
"nameLocation": "957:39:21",
"nodeType": "EventDefinition",
"parameters": {
"id": 10147,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10142,
"indexed": false,
"mutability": "mutable",
"name": "tokenIsContract",
"nameLocation": "1002:15:21",
"nodeType": "VariableDeclaration",
"scope": 10148,
"src": "997:20:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 10141,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "997:4:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10144,
"indexed": false,
"mutability": "mutable",
"name": "from",
"nameLocation": "1027:4:21",
"nodeType": "VariableDeclaration",
"scope": 10148,
"src": "1019:12:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 10143,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1019:7:21",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10146,
"indexed": false,
"mutability": "mutable",
"name": "to",
"nameLocation": "1041:2:21",
"nodeType": "VariableDeclaration",
"scope": 10148,
"src": "1033:10:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 10145,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1033:7:21",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "996:48:21"
},
"src": "951:94:21"
},
{
"anonymous": false,
"id": 10154,
"name": "LogTransferHelperInputValidation2Failed",
"nameLocation": "1056:39:21",
"nodeType": "EventDefinition",
"parameters": {
"id": 10153,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10150,
"indexed": false,
"mutability": "mutable",
"name": "balance",
"nameLocation": "1104:7:21",
"nodeType": "VariableDeclaration",
"scope": 10154,
"src": "1096:15:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10149,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1096:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10152,
"indexed": false,
"mutability": "mutable",
"name": "allowance",
"nameLocation": "1121:9:21",
"nodeType": "VariableDeclaration",
"scope": 10154,
"src": "1113:17:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10151,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1113:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1095:36:21"
},
"src": "1050:82:21"
},
{
"anonymous": false,
"id": 10162,
"name": "LogTransferHelperCallFailed",
"nameLocation": "1143:27:21",
"nodeType": "EventDefinition",
"parameters": {
"id": 10161,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 10156,
"indexed": false,
"mutability": "mutable",
"name": "callSuccess",
"nameLocation": "1176:11:21",
"nodeType": "VariableDeclaration",
"scope": 10162,
"src": "1171:16:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 10155,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1171:4:21",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10158,
"indexed": false,
"mutability": "mutable",
"name": "returnDataLength",
"nameLocation": "1197:16:21",
"nodeType": "VariableDeclaration",
"scope": 10162,
"src": "1189:24:21",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 10157,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1189:7:21",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 10160,