@maplelabs/core-artifacts
Version:
Consist artifacts of the maple protocol
4,319 lines • 169 kB
JSON
{
"id": "77d9256a93a181578df72bddf30bab67",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.6.11",
"solcLongVersion": "0.6.11+commit.5ef660b1",
"input": {
"language": "Solidity",
"sources": {
"contracts/core/pool/v1/interfaces/IPoolFDT.sol": {
"content": "// SPDX-License-Identifier: AGPL-3.0-or-later // hevm: flattened sources of contracts/core/pool/v1/interfaces/IPoolFDT.sol\npragma solidity =0.6.11 >=0.6.0 <0.8.0;\n\n////// lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\n/* pragma solidity >=0.6.0 <0.8.0; */\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n////// contracts/core/funds-distribution-token/v1/interfaces/IBasicFDT.sol\n/* pragma solidity 0.6.11; */\n\n/* import { IERC20 } from \"../../../../../lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\"; */\n\n/// @title BasicFDT implements the basic level FDT functionality for accounting for revenues.\ninterface IBasicFDT is IERC20 {\n\n /**\n @dev This event emits when new funds are distributed.\n @param by The address of the sender that distributed funds.\n @param fundsDistributed The amount of funds received for distribution.\n */\n event FundsDistributed(address indexed by, uint256 fundsDistributed);\n\n /**\n @dev This event emits when distributed funds are withdrawn by a token holder.\n @param by The address of the receiver of funds.\n @param fundsWithdrawn The amount of funds that were withdrawn.\n @param totalWithdrawn The total amount of funds that were withdrawn.\n */\n event FundsWithdrawn(address indexed by, uint256 fundsWithdrawn, uint256 totalWithdrawn);\n\n /**\n @dev This event emits when the internal `pointsPerShare` is updated.\n @dev First, and only, parameter is the new value of the internal `pointsPerShare`.\n */\n event PointsPerShareUpdated(uint256);\n\n /**\n @dev This event emits when an account's `pointsCorrection` is updated.\n @dev First parameter is the address of some account.\n @dev Second parameter is the new value of the account's `pointsCorrection`.\n */\n event PointsCorrectionUpdated(address indexed, int256);\n\n /**\n @dev Returns the amount of funds that an account can withdraw.\n @param _owner The address of some FDT holder.\n @return The amount funds that `_owner` can withdraw.\n */\n function withdrawableFundsOf(address _owner) external view returns (uint256);\n\n /**\n @dev Withdraws all available funds for the calling FDT holder.\n */\n function withdrawFunds() external;\n\n /**\n @dev Returns the amount of funds that an account has withdrawn.\n @param _owner The address of a token holder.\n @return The amount of funds that `_owner` has withdrawn.\n */\n function withdrawnFundsOf(address _owner) external view returns (uint256);\n\n /**\n @dev Returns the amount of funds that an account has earned in total. \n @dev accumulativeFundsOf(_owner) = withdrawableFundsOf(_owner) + withdrawnFundsOf(_owner) \n = (pointsPerShare * balanceOf(_owner) + pointsCorrection[_owner]) / pointsMultiplier \n @param _owner The address of a token holder.\n @return The amount of funds that `_owner` has earned in total.\n */\n function accumulativeFundsOf(address _owner) external view returns (uint256);\n\n /**\n @dev Registers a payment of funds in tokens. \n @dev May be called directly after a deposit is made. \n @dev Calls _updateFundsTokenBalance(), whereby the contract computes the delta of the new and previous \n `fundsToken` balance and increments the total received funds (cumulative), by delta, by calling _distributeFunds().\n */\n function updateFundsReceived() external;\n\n}\n\n////// contracts/core/funds-distribution-token/v1/interfaces/IExtendedFDT.sol\n/* pragma solidity 0.6.11; */\n\n/* import { IBasicFDT } from \"./IBasicFDT.sol\"; */\n\n/// @title ExtendedFDT implements the FDT functionality for accounting for losses.\ninterface IExtendedFDT is IBasicFDT {\n\n /**\n @dev This event emits when the internal `lossesPerShare` is updated.\n @dev First, and only, parameter is the new value of the internal `lossesPerShare`.\n */\n event LossesPerShareUpdated(uint256);\n\n /**\n @dev This event emits when an account's `lossesCorrection` is updated.\n @dev First parameter is the address of some account.\n @dev Second parameter is the new value of the account's `lossesCorrection`.\n */\n event LossesCorrectionUpdated(address indexed, int256);\n\n /**\n @dev This event emits when new losses are distributed.\n @dev First parameter is the address of the account that has distributed losses.\n @dev Second parameter is the amount of losses received for distribution.\n */\n event LossesDistributed(address indexed, uint256);\n\n /**\n @dev This event emits when distributed losses are recognized by a token holder.\n @dev First parameter is the address of the receiver of losses.\n @dev Second parameter is the amount of losses that were recognized.\n @dev Third parameter is the total amount of losses that are recognized.\n */\n event LossesRecognized(address indexed, uint256, uint256);\n\n /**\n @dev Returns the amount of losses that an account can withdraw.\n @param _owner The address of a token holder.\n @return The amount of losses that `_owner` can withdraw.\n */\n function recognizableLossesOf(address _owner) external view returns (uint256);\n\n /**\n @dev Returns the amount of losses that an account has recognized.\n @param _owner The address of a token holder.\n @return The amount of losses that `_owner` has recognized.\n */\n function recognizedLossesOf(address _owner) external view returns (uint256);\n\n /**\n @dev Returns the amount of losses that an account has earned in total. \n @dev accumulativeLossesOf(_owner) = recognizableLossesOf(_owner) + recognizedLossesOf(_owner) \n = (lossesPerShare * balanceOf(_owner) + lossesCorrection[_owner]) / pointsMultiplier \n @param _owner The address of a token holder.\n @return The amount of losses that `_owner` has earned in total.\n */\n function accumulativeLossesOf(address _owner) external view returns (uint256);\n\n /**\n @dev Registers a loss. \n @dev May be called directly after a shortfall after BPT burning occurs. \n @dev Calls _updateLossesTokenBalance(), whereby the contract computes the delta of the new and previous \n losses balance and increments the total losses (cumulative), by delta, by calling _distributeLosses(). \n */\n function updateLossesReceived() external;\n\n}\n\n////// contracts/core/pool/v1/interfaces/IPoolFDT.sol\n/* pragma solidity 0.6.11; */\n\n/* import { IExtendedFDT } from \"../../../funds-distribution-token/v1/interfaces/IExtendedFDT.sol\"; */\n\n/// @title PoolFDT inherits ExtendedFDT and accounts for gains/losses for Liquidity Providers.\ninterface IPoolFDT is IExtendedFDT {\n\n /**\n @dev The sum of all withdrawable interest.\n */\n function interestSum() external view returns (uint256);\n\n /**\n @dev The sum of all unrecognized losses.\n */\n function poolLosses() external view returns (uint256);\n\n /**\n @dev The amount of earned interest present and accounted for in this contract.\n */\n function interestBalance() external view returns (uint256);\n\n /**\n @dev The amount of losses present and accounted for in this contract.\n */\n function lossesBalance() external view returns (uint256);\n\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"abi",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers"
],
"": [
"ast"
]
}
}
}
},
"output": {
"contracts": {
"contracts/core/pool/v1/interfaces/IPoolFDT.sol": {
"IBasicFDT": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "by",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fundsDistributed",
"type": "uint256"
}
],
"name": "FundsDistributed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "by",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fundsWithdrawn",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "totalWithdrawn",
"type": "uint256"
}
],
"name": "FundsWithdrawn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "",
"type": "address"
},
{
"indexed": false,
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"name": "PointsCorrectionUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "PointsPerShareUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "accumulativeFundsOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "updateFundsReceived",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "withdrawFunds",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "withdrawableFundsOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "withdrawnFundsOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"accumulativeFundsOf(address)": "4e97415f",
"allowance(address,address)": "dd62ed3e",
"approve(address,uint256)": "095ea7b3",
"balanceOf(address)": "70a08231",
"totalSupply()": "18160ddd",
"transfer(address,uint256)": "a9059cbb",
"transferFrom(address,address,uint256)": "23b872dd",
"updateFundsReceived()": "46c162de",
"withdrawFunds()": "24600fc3",
"withdrawableFundsOf(address)": "443bb293",
"withdrawnFundsOf(address)": "0041c52c"
}
}
},
"IERC20": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"allowance(address,address)": "dd62ed3e",
"approve(address,uint256)": "095ea7b3",
"balanceOf(address)": "70a08231",
"totalSupply()": "18160ddd",
"transfer(address,uint256)": "a9059cbb",
"transferFrom(address,address,uint256)": "23b872dd"
}
}
},
"IExtendedFDT": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "by",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fundsDistributed",
"type": "uint256"
}
],
"name": "FundsDistributed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "by",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fundsWithdrawn",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "totalWithdrawn",
"type": "uint256"
}
],
"name": "FundsWithdrawn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "",
"type": "address"
},
{
"indexed": false,
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"name": "LossesCorrectionUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "LossesDistributed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "LossesPerShareUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "LossesRecognized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "",
"type": "address"
},
{
"indexed": false,
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"name": "PointsCorrectionUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "PointsPerShareUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "accumulativeFundsOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "accumulativeLossesOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "recognizableLossesOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "recognizedLossesOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "updateFundsReceived",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "updateLossesReceived",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "withdrawFunds",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "withdrawableFundsOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "withdrawnFundsOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"accumulativeFundsOf(address)": "4e97415f",
"accumulativeLossesOf(address)": "40bde098",
"allowance(address,address)": "dd62ed3e",
"approve(address,uint256)": "095ea7b3",
"balanceOf(address)": "70a08231",
"recognizableLossesOf(address)": "66967791",
"recognizedLossesOf(address)": "aed4966a",
"totalSupply()": "18160ddd",
"transfer(address,uint256)": "a9059cbb",
"transferFrom(address,address,uint256)": "23b872dd",
"updateFundsReceived()": "46c162de",
"updateLossesReceived()": "cc0fef02",
"withdrawFunds()": "24600fc3",
"withdrawableFundsOf(address)": "443bb293",
"withdrawnFundsOf(address)": "0041c52c"
}
}
},
"IPoolFDT": {
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "by",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fundsDistributed",
"type": "uint256"
}
],
"name": "FundsDistributed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "by",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "fundsWithdrawn",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "totalWithdrawn",
"type": "uint256"
}
],
"name": "FundsWithdrawn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "",
"type": "address"
},
{
"indexed": false,
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"name": "LossesCorrectionUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "LossesDistributed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "LossesPerShareUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "LossesRecognized",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "",
"type": "address"
},
{
"indexed": false,
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"name": "PointsCorrectionUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "PointsPerShareUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "accumulativeFundsOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "accumulativeLossesOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "interestBalance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "interestSum",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "lossesBalance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "poolLosses",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "recognizableLossesOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "recognizedLossesOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "address",
"name": "recipient",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "updateFundsReceived",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "updateLossesReceived",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "withdrawFunds",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "withdrawableFundsOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"name": "withdrawnFundsOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
],
"evm": {
"bytecode": {
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"deployedBytecode": {
"immutableReferences": {},
"linkReferences": {},
"object": "",
"opcodes": "",
"sourceMap": ""
},
"methodIdentifiers": {
"accumulativeFundsOf(address)": "4e97415f",
"accumulativeLossesOf(address)": "40bde098",
"allowance(address,address)": "dd62ed3e",
"approve(address,uint256)": "095ea7b3",
"balanceOf(address)": "70a08231",
"interestBalance()": "9f3c7325",
"interestSum()": "71073bac",
"lossesBalance()": "fec984e3",
"poolLosses()": "a33142f7",
"recognizableLossesOf(address)": "66967791",
"recognizedLossesOf(address)": "aed4966a",
"totalSupply()": "18160ddd",
"transfer(address,uint256)": "a9059cbb",
"transferFrom(address,address,uint256)": "23b872dd",
"updateFundsReceived()": "46c162de",
"updateLossesReceived()": "cc0fef02",
"withdrawFunds()": "24600fc3",
"withdrawableFundsOf(address)": "443bb293",
"withdrawnFundsOf(address)": "0041c52c"
}
}
}
}
},
"sources": {
"contracts/core/pool/v1/interfaces/IPoolFDT.sol": {
"ast": {
"absolutePath": "contracts/core/pool/v1/interfaces/IPoolFDT.sol",
"exportedSymbols": {
"IBasicFDT": [
141
],
"IERC20": [
77
],
"IExtendedFDT": [
201
],
"IPoolFDT": [
229
]
},
"id": 230,
"license": "AGPL-3.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"=",
"0.6",
".11",
">=",
"0.6",
".0",
"<",
"0.8",
".0"
],
"nodeType": "PragmaDirective",
"src": "123:39:0"
},
{
"abstract": false,
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "270:70:0",
"text": " @dev Interface of the ERC20 standard as defined in the EIP."
},
"fullyImplemented": false,
"id": 77,
"linearizedBaseContracts": [
77
],
"name": "IERC20",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": {
"id": 3,
"nodeType": "StructuredDocumentation",
"src": "364:66:0",
"text": " @dev Returns the amount of tokens in existence."
},
"functionSelector": "18160ddd",
"id": 8,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "totalSupply",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 4,
"nodeType": "ParameterList",
"parameters": [],
"src": "455:2:0"
},
"returnParameters": {
"id": 7,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 6,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 8,
"src": "481:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 5,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "481:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "480:9:0"
},
"scope": 77,
"src": "435:55:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 9,
"nodeType": "StructuredDocumentation",
"src": "496:72:0",
"text": " @dev Returns the amount of tokens owned by `account`."
},
"functionSelector": "70a08231",
"id": 16,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "balanceOf",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 12,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 11,
"mutability": "mutable",
"name": "account",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 16,
"src": "592:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 10,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "592:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "591:17:0"
},
"returnParameters": {
"id": 15,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 14,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 16,
"src": "632:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 13,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "632:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "631:9:0"
},
"scope": 77,
"src": "573:68:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 17,
"nodeType": "StructuredDocumentation",
"src": "647:209:0",
"text": " @dev Moves `amount` tokens from the caller's account to `recipient`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."
},
"functionSelector": "a9059cbb",
"id": 26,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "transfer",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 22,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 19,
"mutability": "mutable",
"name": "recipient",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 26,
"src": "879:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 18,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "879:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 21,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 26,
"src": "898:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 20,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "898:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "878:35:0"
},
"returnParameters": {
"id": 25,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 26,
"src": "932:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 23,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "932:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "931:6:0"
},
"scope": 77,
"src": "861:77:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 27,
"nodeType": "StructuredDocumentation",
"src": "944:264:0",
"text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called."
},
"functionSelector": "dd62ed3e",
"id": 36,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "allowance",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 32,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 29,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 36,
"src": "1232:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 28,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1232:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 31,
"mutability": "mutable",
"name": "spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 36,
"src": "1247:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 30,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1247:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1231:32:0"
},
"returnParameters": {
"id": 35,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 34,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 36,
"src": "1287:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 33,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1287:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1286:9:0"
},
"scope": 77,
"src": "1213:83:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 37,
"nodeType": "StructuredDocumentation",
"src": "1302:642:0",
"text": " @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event."
},
"functionSelector": "095ea7b3",
"id": 46,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "approve",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 42,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 39,
"mutability": "mutable",
"name": "spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 46,
"src": "1966:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 38,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1966:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 41,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 46,
"src": "1983:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 40,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1983:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1965:33:0"
},
"returnParameters": {
"id": 45,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 44,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 46,
"src": "2017:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 43,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2017:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2016:6:0"
},
"scope": 77,
"src": "1949:74:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 47,
"nodeType": "StructuredDocumentation",
"src": "2029:296:0",
"text": " @dev Moves `amount` tokens from `sender` to `recipient` using the\n allowance mechanism. `amount` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."
},
"functionSelector": "23b872dd",
"id": 58,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "transferFrom",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 54,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 49,
"mutability": "mutable",
"name": "sender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 58,
"src": "2352:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 48,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2352:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 51,
"mutability": "mutable",
"name": "recipient",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 58,
"src": "2368:17:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 50,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2368:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 53,
"mutability": "mutable",
"name": "amount",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 58,
"src": "2387:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 52,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2387:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2351:51:0"
},
"returnParameters": {
"id": 57,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 56,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 58,
"src": "2421:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 55,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2421:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2420:6:0"
},
"scope": 77,
"src": "2330:97:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"anonymous": false,
"documentation": {
"id": 59,
"nodeType": "StructuredDocumentation",
"src": "2433:158:0",
"text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero."
},
"id": 67,
"name": "Transfer",
"nodeType": "EventDefinition",
"parameters": {
"id": 66,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 61,
"indexed": true,
"mutability": "mutable",
"name": "from",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 67,
"src": "2611:20:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 60,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2611:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 63,
"indexed": true,
"mutability": "mutable",
"name": "to",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 67,
"src": "2633:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 62,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2633:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 65,
"indexed": false,
"mutability": "mutable",
"name": "value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 67,
"src": "2653:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 64,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2653:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2610:57:0"
},
"src": "2596:72:0"
},
{
"anonymous": false,
"documentation": {
"id": 68,
"nodeType": "StructuredDocumentation",
"src": "2674:148:0",
"text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance."
},
"id": 76,
"name": "Approval",
"nodeType": "EventDefinition",
"parameters": {
"id": 75,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 70,
"indexed": true,
"mutability": "mutable",
"name": "owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 76,
"src": "2842:21:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 69,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2842:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 72,
"indexed": true,
"mutability": "mutable",
"name": "spender",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 76,
"src": "2865:23:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 71,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2865:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 74,
"indexed": false,
"mutability": "mutable",
"name": "value",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 76,
"src": "2890:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 73,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2890:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "2841:63:0"
},
"src": "2827:78:0"
}
],
"scope": 230,
"src": "341:2566:0"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 79,
"name": "IERC20",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 77,
"src": "3240:6:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IERC20_$77",
"typeString": "contract IERC20"
}
},
"id": 80,
"nodeType": "InheritanceSpecifier",
"src": "3240:6:0"
}
],
"contractDependencies": [
77
],
"contractKind": "interface",
"documentation": {
"id": 78,
"nodeType": "StructuredDocumentation",
"src": "3123:94:0",
"text": "@title BasicFDT implements the basic level FDT functionality for accounting for revenues."
},
"fullyImplemented": false,
"id": 141,
"linearizedBaseContracts": [
141,
77
],
"name": "IBasicFDT",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": {
"id": 81,
"nodeType": "StructuredDocumentation",
"src": "3254:236:0",
"text": "@dev This event emits when new funds are distributed.\n@param by The address of the sender that distributed funds.\n@param fundsDistributed The amount of funds received for distribution."
},
"id": 87,
"name": "FundsDistributed",
"nodeType": "EventDefinition",
"parameters": {
"id": 86,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 83,
"indexed": true,
"mutability": "mutable",
"name": "by",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 87,
"src": "3518:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 82,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3518:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 85,
"indexed": false,
"mutability": "mutable",
"name": "fundsDistributed",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 87,
"src": "3538:24:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 84,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3538:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3517:46:0"
},
"src": "3495:69:0"
},
{
"anonymous": false,
"documentation": {
"id": 88,
"nodeType": "StructuredDocumentation",
"src": "3570:315:0",
"text": "@dev This event emits when distributed funds are withdrawn by a token holder.\n@param by The address of the receiver of funds.\n@param fundsWithdrawn The amount of funds that were withdrawn.\n@param totalWithdrawn The total amount of funds that were withdrawn."
},
"id": 96,
"name": "FundsWithdrawn",
"nodeType": "EventDefinition",
"parameters": {
"id": 95,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 90,
"indexed": true,
"mutability": "mutable",
"name": "by",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 96,
"src": "3911:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 89,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "3911:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 92,
"indexed": false,
"mutability": "mutable",
"name": "fundsWithdrawn",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 96,
"src": "3931:22:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 91,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3931:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 94,
"indexed": false,
"mutability": "mutable",
"name": "totalWithdrawn",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 96,
"src": "3955:22:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 93,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "3955:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "3910:68:0"
},
"src": "3890:89:0"
},
{
"anonymous": false,
"documentation": {
"id": 97,
"nodeType": "StructuredDocumentation",
"src": "3985:179:0",
"text": "@dev This event emits when the internal `pointsPerShare` is updated.\n@dev First, and only, parameter is the new value of the internal `pointsPerShare`."
},
"id": 101,
"name": "PointsPerShareUpdated",
"nodeType": "EventDefinition",
"parameters": {
"id": 100,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 99,
"indexed": false,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 101,
"src": "4197:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 98,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4197:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4196:9:0"
},
"src": "4169:37:0"
},
{
"anonymous": false,
"documentation": {
"id": 102,
"nodeType": "StructuredDocumentation",
"src": "4212:235:0",
"text": "@dev This event emits when an account's `pointsCorrection` is updated.\n@dev First parameter is the address of some account.\n@dev Second parameter is the new value of the account's `pointsCorrection`."
},
"id": 108,
"name": "PointsCorrectionUpdated",
"nodeType": "EventDefinition",
"parameters": {
"id": 107,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 104,
"indexed": true,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 108,
"src": "4482:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 103,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4482:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 106,
"indexed": false,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 108,
"src": "4499:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 105,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "4499:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4481:25:0"
},
"src": "4452:55:0"
},
{
"body": null,
"documentation": {
"id": 109,
"nodeType": "StructuredDocumentation",
"src": "4513:201:0",
"text": "@dev Returns the amount of funds that an account can withdraw.\n@param _owner The address of some FDT holder.\n@return The amount funds that `_owner` can withdraw."
},
"functionSelector": "443bb293",
"id": 116,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "withdrawableFundsOf",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 112,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 111,
"mutability": "mutable",
"name": "_owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 116,
"src": "4748:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 110,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "4748:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4747:16:0"
},
"returnParameters": {
"id": 115,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 114,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 116,
"src": "4787:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 113,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "4787:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "4786:9:0"
},
"scope": 141,
"src": "4719:77:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 117,
"nodeType": "StructuredDocumentation",
"src": "4802:82:0",
"text": "@dev Withdraws all available funds for the calling FDT holder."
},
"functionSelector": "24600fc3",
"id": 120,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "withdrawFunds",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 118,
"nodeType": "ParameterList",
"parameters": [],
"src": "4911:2:0"
},
"returnParameters": {
"id": 119,
"nodeType": "ParameterList",
"parameters": [],
"src": "4922:0:0"
},
"scope": 141,
"src": "4889:34:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 121,
"nodeType": "StructuredDocumentation",
"src": "4929:205:0",
"text": "@dev Returns the amount of funds that an account has withdrawn.\n@param _owner The address of a token holder.\n@return The amount of funds that `_owner` has withdrawn."
},
"functionSelector": "0041c52c",
"id": 128,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "withdrawnFundsOf",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 124,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 123,
"mutability": "mutable",
"name": "_owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 128,
"src": "5165:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 122,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5165:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5164:16:0"
},
"returnParameters": {
"id": 127,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 126,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 128,
"src": "5204:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 125,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5204:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5203:9:0"
},
"scope": 141,
"src": "5139:74:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 129,
"nodeType": "StructuredDocumentation",
"src": "5219:422:0",
"text": "@dev Returns the amount of funds that an account has earned in total. \n@dev accumulativeFundsOf(_owner) = withdrawableFundsOf(_owner) + withdrawnFundsOf(_owner) \n= (pointsPerShare * balanceOf(_owner) + pointsCorrection[_owner]) / pointsMultiplier \n@param _owner The address of a token holder.\n@return The amount of funds that `_owner` has earned in total."
},
"functionSelector": "4e97415f",
"id": 136,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "accumulativeFundsOf",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 132,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 131,
"mutability": "mutable",
"name": "_owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 136,
"src": "5675:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 130,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "5675:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5674:16:0"
},
"returnParameters": {
"id": 135,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 134,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 136,
"src": "5714:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 133,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "5714:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "5713:9:0"
},
"scope": 141,
"src": "5646:77:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 137,
"nodeType": "StructuredDocumentation",
"src": "5729:368:0",
"text": "@dev Registers a payment of funds in tokens. \n@dev May be called directly after a deposit is made. \n@dev Calls _updateFundsTokenBalance(), whereby the contract computes the delta of the new and previous \n`fundsToken` balance and increments the total received funds (cumulative), by delta, by calling _distributeFunds()."
},
"functionSelector": "46c162de",
"id": 140,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "updateFundsReceived",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 138,
"nodeType": "ParameterList",
"parameters": [],
"src": "6130:2:0"
},
"returnParameters": {
"id": 139,
"nodeType": "ParameterList",
"parameters": [],
"src": "6141:0:0"
},
"scope": 141,
"src": "6102:40:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 230,
"src": "3217:2928:0"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 143,
"name": "IBasicFDT",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 141,
"src": "6417:9:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IBasicFDT_$141",
"typeString": "contract IBasicFDT"
}
},
"id": 144,
"nodeType": "InheritanceSpecifier",
"src": "6417:9:0"
}
],
"contractDependencies": [
77,
141
],
"contractKind": "interface",
"documentation": {
"id": 142,
"nodeType": "StructuredDocumentation",
"src": "6308:83:0",
"text": "@title ExtendedFDT implements the FDT functionality for accounting for losses."
},
"fullyImplemented": false,
"id": 201,
"linearizedBaseContracts": [
201,
141,
77
],
"name": "IExtendedFDT",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": {
"id": 145,
"nodeType": "StructuredDocumentation",
"src": "6434:179:0",
"text": "@dev This event emits when the internal `lossesPerShare` is updated.\n@dev First, and only, parameter is the new value of the internal `lossesPerShare`."
},
"id": 149,
"name": "LossesPerShareUpdated",
"nodeType": "EventDefinition",
"parameters": {
"id": 148,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 147,
"indexed": false,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 149,
"src": "6646:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 146,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "6646:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6645:9:0"
},
"src": "6618:37:0"
},
{
"anonymous": false,
"documentation": {
"id": 150,
"nodeType": "StructuredDocumentation",
"src": "6661:235:0",
"text": "@dev This event emits when an account's `lossesCorrection` is updated.\n@dev First parameter is the address of some account.\n@dev Second parameter is the new value of the account's `lossesCorrection`."
},
"id": 156,
"name": "LossesCorrectionUpdated",
"nodeType": "EventDefinition",
"parameters": {
"id": 155,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 152,
"indexed": true,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 156,
"src": "6931:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 151,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "6931:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 154,
"indexed": false,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 156,
"src": "6948:6:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
},
"typeName": {
"id": 153,
"name": "int256",
"nodeType": "ElementaryTypeName",
"src": "6948:6:0",
"typeDescriptions": {
"typeIdentifier": "t_int256",
"typeString": "int256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "6930:25:0"
},
"src": "6901:55:0"
},
{
"anonymous": false,
"documentation": {
"id": 157,
"nodeType": "StructuredDocumentation",
"src": "6962:243:0",
"text": "@dev This event emits when new losses are distributed.\n@dev First parameter is the address of the account that has distributed losses.\n@dev Second parameter is the amount of losses received for distribution."
},
"id": 163,
"name": "LossesDistributed",
"nodeType": "EventDefinition",
"parameters": {
"id": 162,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 159,
"indexed": true,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 163,
"src": "7234:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 158,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7234:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 161,
"indexed": false,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 163,
"src": "7251:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 160,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7251:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7233:26:0"
},
"src": "7210:50:0"
},
{
"anonymous": false,
"documentation": {
"id": 164,
"nodeType": "StructuredDocumentation",
"src": "7266:328:0",
"text": "@dev This event emits when distributed losses are recognized by a token holder.\n@dev First parameter is the address of the receiver of losses.\n@dev Second parameter is the amount of losses that were recognized.\n@dev Third parameter is the total amount of losses that are recognized."
},
"id": 172,
"name": "LossesRecognized",
"nodeType": "EventDefinition",
"parameters": {
"id": 171,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 166,
"indexed": true,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 172,
"src": "7622:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 165,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7622:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 168,
"indexed": false,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 172,
"src": "7639:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 167,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7639:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 170,
"indexed": false,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 172,
"src": "7648:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 169,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7648:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7621:35:0"
},
"src": "7599:58:0"
},
{
"body": null,
"documentation": {
"id": 173,
"nodeType": "StructuredDocumentation",
"src": "7663:205:0",
"text": "@dev Returns the amount of losses that an account can withdraw.\n@param _owner The address of a token holder.\n@return The amount of losses that `_owner` can withdraw."
},
"functionSelector": "66967791",
"id": 180,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "recognizableLossesOf",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 176,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 175,
"mutability": "mutable",
"name": "_owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 180,
"src": "7903:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 174,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "7903:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7902:16:0"
},
"returnParameters": {
"id": 179,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 178,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 180,
"src": "7942:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 177,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "7942:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "7941:9:0"
},
"scope": 201,
"src": "7873:78:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 181,
"nodeType": "StructuredDocumentation",
"src": "7957:209:0",
"text": "@dev Returns the amount of losses that an account has recognized.\n@param _owner The address of a token holder.\n@return The amount of losses that `_owner` has recognized."
},
"functionSelector": "aed4966a",
"id": 188,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "recognizedLossesOf",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 184,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 183,
"mutability": "mutable",
"name": "_owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 188,
"src": "8199:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 182,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "8199:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "8198:16:0"
},
"returnParameters": {
"id": 187,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 186,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 188,
"src": "8238:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 185,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8238:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "8237:9:0"
},
"scope": 201,
"src": "8171:76:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 189,
"nodeType": "StructuredDocumentation",
"src": "8253:428:0",
"text": "@dev Returns the amount of losses that an account has earned in total. \n@dev accumulativeLossesOf(_owner) = recognizableLossesOf(_owner) + recognizedLossesOf(_owner) \n= (lossesPerShare * balanceOf(_owner) + lossesCorrection[_owner]) / pointsMultiplier \n@param _owner The address of a token holder.\n@return The amount of losses that `_owner` has earned in total."
},
"functionSelector": "40bde098",
"id": 196,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "accumulativeLossesOf",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 192,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 191,
"mutability": "mutable",
"name": "_owner",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 196,
"src": "8716:14:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 190,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "8716:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "8715:16:0"
},
"returnParameters": {
"id": 195,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 194,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 196,
"src": "8755:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 193,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "8755:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "8754:9:0"
},
"scope": 201,
"src": "8686:78:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 197,
"nodeType": "StructuredDocumentation",
"src": "8770:354:0",
"text": "@dev Registers a loss. \n@dev May be called directly after a shortfall after BPT burning occurs. \n@dev Calls _updateLossesTokenBalance(), whereby the contract computes the delta of the new and previous \nlosses balance and increments the total losses (cumulative), by delta, by calling _distributeLosses(). "
},
"functionSelector": "cc0fef02",
"id": 200,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "updateLossesReceived",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 198,
"nodeType": "ParameterList",
"parameters": [],
"src": "9158:2:0"
},
"returnParameters": {
"id": 199,
"nodeType": "ParameterList",
"parameters": [],
"src": "9169:0:0"
},
"scope": 201,
"src": "9129:41:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 230,
"src": "6391:2782:0"
},
{
"abstract": false,
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 203,
"name": "IExtendedFDT",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 201,
"src": "9481:12:0",
"typeDescriptions": {
"typeIdentifier": "t_contract$_IExtendedFDT_$201",
"typeString": "contract IExtendedFDT"
}
},
"id": 204,
"nodeType": "InheritanceSpecifier",
"src": "9481:12:0"
}
],
"contractDependencies": [
77,
141,
201
],
"contractKind": "interface",
"documentation": {
"id": 202,
"nodeType": "StructuredDocumentation",
"src": "9364:95:0",
"text": "@title PoolFDT inherits ExtendedFDT and accounts for gains/losses for Liquidity Providers."
},
"fullyImplemented": false,
"id": 229,
"linearizedBaseContracts": [
229,
201,
141,
77
],
"name": "IPoolFDT",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": {
"id": 205,
"nodeType": "StructuredDocumentation",
"src": "9501:62:0",
"text": "@dev The sum of all withdrawable interest."
},
"functionSelector": "71073bac",
"id": 210,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "interestSum",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 206,
"nodeType": "ParameterList",
"parameters": [],
"src": "9588:2:0"
},
"returnParameters": {
"id": 209,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 208,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 210,
"src": "9614:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 207,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9614:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "9613:9:0"
},
"scope": 229,
"src": "9568:55:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 211,
"nodeType": "StructuredDocumentation",
"src": "9629:60:0",
"text": "@dev The sum of all unrecognized losses."
},
"functionSelector": "a33142f7",
"id": 216,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "poolLosses",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 212,
"nodeType": "ParameterList",
"parameters": [],
"src": "9713:2:0"
},
"returnParameters": {
"id": 215,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 214,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 216,
"src": "9739:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 213,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9739:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "9738:9:0"
},
"scope": 229,
"src": "9694:54:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 217,
"nodeType": "StructuredDocumentation",
"src": "9754:98:0",
"text": "@dev The amount of earned interest present and accounted for in this contract."
},
"functionSelector": "9f3c7325",
"id": 222,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "interestBalance",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 218,
"nodeType": "ParameterList",
"parameters": [],
"src": "9881:2:0"
},
"returnParameters": {
"id": 221,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 220,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 222,
"src": "9907:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 219,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "9907:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "9906:9:0"
},
"scope": 229,
"src": "9857:59:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"body": null,
"documentation": {
"id": 223,
"nodeType": "StructuredDocumentation",
"src": "9922:89:0",
"text": "@dev The amount of losses present and accounted for in this contract."
},
"functionSelector": "fec984e3",
"id": 228,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "lossesBalance",
"nodeType": "FunctionDefinition",
"overrides": null,
"parameters": {
"id": 224,
"nodeType": "ParameterList",
"parameters": [],
"src": "10038:2:0"
},
"returnParameters": {
"id": 227,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 226,
"mutability": "mutable",
"name": "",
"nodeType": "VariableDeclaration",
"overrides": null,
"scope": 228,
"src": "10064:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 225,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "10064:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "10063:9:0"
},
"scope": 229,
"src": "10016:57:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
}
],
"scope": 230,
"src": "9459:617:0"
}
],
"src": "123:9954:0"
},
"id": 0
}
}
}
}