12958 lines
455 KiB
JSON
12958 lines
455 KiB
JSON
{
|
|
"id": "7f7661c05ef73b6c22e67300c3992c39",
|
|
"_format": "hh-sol-build-info-1",
|
|
"solcVersion": "0.8.26",
|
|
"solcLongVersion": "0.8.26+commit.8a97fa7a",
|
|
"input": {
|
|
"language": "Solidity",
|
|
"sources": {
|
|
"contracts/treasury/AdminControlledEcosystemReserve.sol": {
|
|
"content": "// SPDX-License-Identifier: GPL-3.0\r\npragma solidity ^0.8.10;\r\n\r\nimport {IERC20} from '@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';\r\nimport {IAdminControlledEcosystemReserve} from './interfaces/IAdminControlledEcosystemReserve.sol';\r\nimport {VersionedInitializable} from './libs/VersionedInitializable.sol';\r\nimport {SafeERC20} from './libs/SafeERC20.sol';\r\nimport {ReentrancyGuard} from './libs/ReentrancyGuard.sol';\r\nimport {Address} from './libs/Address.sol';\r\n\r\n/**\r\n * @title AdminControlledEcosystemReserve\r\n * @notice Stores ERC20 tokens, and allows to dispose of them via approval or transfer dynamics\r\n * Adapted to be an implementation of a transparent proxy\r\n * @dev Done abstract to add an `initialize()` function on the child, with `initializer` modifier\r\n * @author BGD Labs\r\n **/\r\nabstract contract AdminControlledEcosystemReserve is\r\n VersionedInitializable,\r\n IAdminControlledEcosystemReserve\r\n{\r\n using SafeERC20 for IERC20;\r\n using Address for address payable;\r\n\r\n address internal _fundsAdmin;\r\n\r\n uint256 public constant REVISION = 1;\r\n\r\n /// @inheritdoc IAdminControlledEcosystemReserve\r\n address public constant ETH_MOCK_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;\r\n\r\n modifier onlyFundsAdmin() {\r\n require(msg.sender == _fundsAdmin, 'ONLY_BY_FUNDS_ADMIN');\r\n _;\r\n }\r\n\r\n function getRevision() internal pure override returns (uint256) {\r\n return REVISION;\r\n }\r\n\r\n /// @inheritdoc IAdminControlledEcosystemReserve\r\n function getFundsAdmin() external view returns (address) {\r\n return _fundsAdmin;\r\n }\r\n\r\n /// @inheritdoc IAdminControlledEcosystemReserve\r\n function approve(IERC20 token, address recipient, uint256 amount) external onlyFundsAdmin {\r\n token.safeApprove(recipient, amount);\r\n }\r\n\r\n /// @inheritdoc IAdminControlledEcosystemReserve\r\n function transfer(IERC20 token, address recipient, uint256 amount) external onlyFundsAdmin {\r\n require(recipient != address(0), 'INVALID_0X_RECIPIENT');\r\n\r\n if (address(token) == ETH_MOCK_ADDRESS) {\r\n payable(recipient).sendValue(amount);\r\n } else {\r\n token.safeTransfer(recipient, amount);\r\n }\r\n }\r\n\r\n /// @dev needed in order to receive ETH from the Aave v1 ecosystem reserve\r\n receive() external payable {}\r\n\r\n function _setFundsAdmin(address admin) internal {\r\n _fundsAdmin = admin;\r\n emit NewFundsAdmin(admin);\r\n }\r\n}\r\n"
|
|
},
|
|
"contracts/treasury/libs/Address.sol": {
|
|
"content": "// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\r\n\r\npragma solidity ^0.8.1;\r\n\r\n/**\r\n * @dev Collection of functions related to the address type\r\n */\r\nlibrary Address {\r\n /**\r\n * @dev Returns true if `account` is a contract.\r\n *\r\n * [IMPORTANT]\r\n * ====\r\n * It is unsafe to assume that an address for which this function returns\r\n * false is an externally-owned account (EOA) and not a contract.\r\n *\r\n * Among others, `isContract` will return false for the following\r\n * types of addresses:\r\n *\r\n * - an externally-owned account\r\n * - a contract in construction\r\n * - an address where a contract will be created\r\n * - an address where a contract lived, but was destroyed\r\n * ====\r\n *\r\n * [IMPORTANT]\r\n * ====\r\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\r\n *\r\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\r\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\r\n * constructor.\r\n * ====\r\n */\r\n function isContract(address account) internal view returns (bool) {\r\n // This method relies on extcodesize/address.code.length, which returns 0\r\n // for contracts in construction, since the code is only stored at the end\r\n // of the constructor execution.\r\n\r\n return account.code.length > 0;\r\n }\r\n\r\n /**\r\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\r\n * `recipient`, forwarding all available gas and reverting on errors.\r\n *\r\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\r\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\r\n * imposed by `transfer`, making them unable to receive funds via\r\n * `transfer`. {sendValue} removes this limitation.\r\n *\r\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\r\n *\r\n * IMPORTANT: because control is transferred to `recipient`, care must be\r\n * taken to not create reentrancy vulnerabilities. Consider using\r\n * {ReentrancyGuard} or the\r\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\r\n */\r\n function sendValue(address payable recipient, uint256 amount) internal {\r\n require(address(this).balance >= amount, 'Address: insufficient balance');\r\n\r\n (bool success, ) = recipient.call{value: amount}('');\r\n require(success, 'Address: unable to send value, recipient may have reverted');\r\n }\r\n\r\n /**\r\n * @dev Performs a Solidity function call using a low level `call`. A\r\n * plain `call` is an unsafe replacement for a function call: use this\r\n * function instead.\r\n *\r\n * If `target` reverts with a revert reason, it is bubbled up by this\r\n * function (like regular Solidity function calls).\r\n *\r\n * Returns the raw returned data. To convert to the expected return value,\r\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\r\n *\r\n * Requirements:\r\n *\r\n * - `target` must be a contract.\r\n * - calling `target` with `data` must not revert.\r\n *\r\n * _Available since v3.1._\r\n */\r\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\r\n return functionCall(target, data, 'Address: low-level call failed');\r\n }\r\n\r\n /**\r\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\r\n * `errorMessage` as a fallback revert reason when `target` reverts.\r\n *\r\n * _Available since v3.1._\r\n */\r\n function functionCall(\r\n address target,\r\n bytes memory data,\r\n string memory errorMessage\r\n ) internal returns (bytes memory) {\r\n return functionCallWithValue(target, data, 0, errorMessage);\r\n }\r\n\r\n /**\r\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r\n * but also transferring `value` wei to `target`.\r\n *\r\n * Requirements:\r\n *\r\n * - the calling contract must have an ETH balance of at least `value`.\r\n * - the called Solidity function must be `payable`.\r\n *\r\n * _Available since v3.1._\r\n */\r\n function functionCallWithValue(\r\n address target,\r\n bytes memory data,\r\n uint256 value\r\n ) internal returns (bytes memory) {\r\n return functionCallWithValue(target, data, value, 'Address: low-level call with value failed');\r\n }\r\n\r\n /**\r\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\r\n * with `errorMessage` as a fallback revert reason when `target` reverts.\r\n *\r\n * _Available since v3.1._\r\n */\r\n function functionCallWithValue(\r\n address target,\r\n bytes memory data,\r\n uint256 value,\r\n string memory errorMessage\r\n ) internal returns (bytes memory) {\r\n require(address(this).balance >= value, 'Address: insufficient balance for call');\r\n require(isContract(target), 'Address: call to non-contract');\r\n\r\n (bool success, bytes memory returndata) = target.call{value: value}(data);\r\n return verifyCallResult(success, returndata, errorMessage);\r\n }\r\n\r\n /**\r\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r\n * but performing a static call.\r\n *\r\n * _Available since v3.3._\r\n */\r\n function functionStaticCall(\r\n address target,\r\n bytes memory data\r\n ) internal view returns (bytes memory) {\r\n return functionStaticCall(target, data, 'Address: low-level static call failed');\r\n }\r\n\r\n /**\r\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\r\n * but performing a static call.\r\n *\r\n * _Available since v3.3._\r\n */\r\n function functionStaticCall(\r\n address target,\r\n bytes memory data,\r\n string memory errorMessage\r\n ) internal view returns (bytes memory) {\r\n require(isContract(target), 'Address: static call to non-contract');\r\n\r\n (bool success, bytes memory returndata) = target.staticcall(data);\r\n return verifyCallResult(success, returndata, errorMessage);\r\n }\r\n\r\n /**\r\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\r\n * but performing a delegate call.\r\n *\r\n * _Available since v3.4._\r\n */\r\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\r\n return functionDelegateCall(target, data, 'Address: low-level delegate call failed');\r\n }\r\n\r\n /**\r\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\r\n * but performing a delegate call.\r\n *\r\n * _Available since v3.4._\r\n */\r\n function functionDelegateCall(\r\n address target,\r\n bytes memory data,\r\n string memory errorMessage\r\n ) internal returns (bytes memory) {\r\n require(isContract(target), 'Address: delegate call to non-contract');\r\n\r\n (bool success, bytes memory returndata) = target.delegatecall(data);\r\n return verifyCallResult(success, returndata, errorMessage);\r\n }\r\n\r\n /**\r\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\r\n * revert reason using the provided one.\r\n *\r\n * _Available since v4.3._\r\n */\r\n function verifyCallResult(\r\n bool success,\r\n bytes memory returndata,\r\n string memory errorMessage\r\n ) internal pure returns (bytes memory) {\r\n if (success) {\r\n return returndata;\r\n } else {\r\n // Look for revert reason and bubble it up if present\r\n if (returndata.length > 0) {\r\n // The easiest way to bubble the revert reason is using memory via assembly\r\n\r\n assembly {\r\n let returndata_size := mload(returndata)\r\n revert(add(32, returndata), returndata_size)\r\n }\r\n } else {\r\n revert(errorMessage);\r\n }\r\n }\r\n }\r\n}\r\n"
|
|
},
|
|
"contracts/treasury/libs/ReentrancyGuard.sol": {
|
|
"content": "// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\r\n\r\npragma solidity ^0.8.0;\r\n\r\n/**\r\n * @dev Contract module that helps prevent reentrant calls to a function.\r\n *\r\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\r\n * available, which can be applied to functions to make sure there are no nested\r\n * (reentrant) calls to them.\r\n *\r\n * Note that because there is a single `nonReentrant` guard, functions marked as\r\n * `nonReentrant` may not call one another. This can be worked around by making\r\n * those functions `private`, and then adding `external` `nonReentrant` entry\r\n * points to them.\r\n *\r\n * TIP: If you would like to learn more about reentrancy and alternative ways\r\n * to protect against it, check out our blog post\r\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\r\n */\r\nabstract contract ReentrancyGuard {\r\n // Booleans are more expensive than uint256 or any type that takes up a full\r\n // word because each write operation emits an extra SLOAD to first read the\r\n // slot's contents, replace the bits taken up by the boolean, and then write\r\n // back. This is the compiler's defense against contract upgrades and\r\n // pointer aliasing, and it cannot be disabled.\r\n\r\n // The values being non-zero value makes deployment a bit more expensive,\r\n // but in exchange the refund on every call to nonReentrant will be lower in\r\n // amount. Since refunds are capped to a percentage of the total\r\n // transaction's gas, it is best to keep them low in cases like this one, to\r\n // increase the likelihood of the full refund coming into effect.\r\n uint256 private constant _NOT_ENTERED = 1;\r\n uint256 private constant _ENTERED = 2;\r\n\r\n uint256 private _status;\r\n\r\n constructor() {\r\n _status = _NOT_ENTERED;\r\n }\r\n\r\n /**\r\n * @dev Prevents a contract from calling itself, directly or indirectly.\r\n * Calling a `nonReentrant` function from another `nonReentrant`\r\n * function is not supported. It is possible to prevent this from happening\r\n * by making the `nonReentrant` function external, and making it call a\r\n * `private` function that does the actual work.\r\n */\r\n modifier nonReentrant() {\r\n // On the first call to nonReentrant, _notEntered will be true\r\n require(_status != _ENTERED, 'ReentrancyGuard: reentrant call');\r\n\r\n // Any calls to nonReentrant after this point will fail\r\n _status = _ENTERED;\r\n\r\n _;\r\n\r\n // By storing the original value once again, a refund is triggered (see\r\n // https://eips.ethereum.org/EIPS/eip-2200)\r\n _status = _NOT_ENTERED;\r\n }\r\n}\r\n"
|
|
},
|
|
"contracts/treasury/libs/SafeERC20.sol": {
|
|
"content": "// SPDX-License-Identifier: MIT\r\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\r\n\r\npragma solidity ^0.8.0;\r\n\r\nimport {IERC20} from '@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';\r\nimport {Address} from './Address.sol';\r\n\r\n/**\r\n * @title SafeERC20\r\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\r\n * contract returns false). Tokens that return no value (and instead revert or\r\n * throw on failure) are also supported, non-reverting calls are assumed to be\r\n * successful.\r\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\r\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\r\n */\r\nlibrary SafeERC20 {\r\n using Address for address;\r\n\r\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\r\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\r\n }\r\n\r\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\r\n _callOptionalReturn(\r\n token,\r\n abi.encodeWithSelector(token.transferFrom.selector, from, to, value)\r\n );\r\n }\r\n\r\n /**\r\n * @dev Deprecated. This function has issues similar to the ones found in\r\n * {IERC20-approve}, and its usage is discouraged.\r\n *\r\n * Whenever possible, use {safeIncreaseAllowance} and\r\n * {safeDecreaseAllowance} instead.\r\n */\r\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\r\n // safeApprove should only be called when setting an initial allowance,\r\n // or when resetting it to zero. To increase and decrease it, use\r\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\r\n require(\r\n (value == 0) || (token.allowance(address(this), spender) == 0),\r\n 'SafeERC20: approve from non-zero to non-zero allowance'\r\n );\r\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\r\n }\r\n\r\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\r\n uint256 newAllowance = token.allowance(address(this), spender) + value;\r\n _callOptionalReturn(\r\n token,\r\n abi.encodeWithSelector(token.approve.selector, spender, newAllowance)\r\n );\r\n }\r\n\r\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\r\n unchecked {\r\n uint256 oldAllowance = token.allowance(address(this), spender);\r\n require(oldAllowance >= value, 'SafeERC20: decreased allowance below zero');\r\n uint256 newAllowance = oldAllowance - value;\r\n _callOptionalReturn(\r\n token,\r\n abi.encodeWithSelector(token.approve.selector, spender, newAllowance)\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\r\n * on the return value: the return value is optional (but if data is returned, it must not be false).\r\n * @param token The token targeted by the call.\r\n * @param data The call data (encoded using abi.encode or one of its variants).\r\n */\r\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\r\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\r\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\r\n // the target address contains contract code and also asserts for success in the low-level call.\r\n\r\n bytes memory returndata = address(token).functionCall(data, 'SafeERC20: low-level call failed');\r\n if (returndata.length > 0) {\r\n // Return data is optional\r\n require(abi.decode(returndata, (bool)), 'SafeERC20: ERC20 operation did not succeed');\r\n }\r\n }\r\n}\r\n"
|
|
},
|
|
"contracts/treasury/libs/VersionedInitializable.sol": {
|
|
"content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.10;\r\n\r\n/**\r\n * @title VersionedInitializable\r\n *\r\n * @dev Helper contract to support initializer functions. To use it, replace\r\n * the constructor with a function that has the `initializer` modifier.\r\n * WARNING: Unlike constructors, initializer functions must be manually\r\n * invoked. This applies both to deploying an Initializable contract, as well\r\n * as extending an Initializable contract via inheritance.\r\n * WARNING: When used with inheritance, manual care must be taken to not invoke\r\n * a parent initializer twice, or ensure that all initializers are idempotent,\r\n * because this is not dealt with automatically as with constructors.\r\n *\r\n * @author Aave, inspired by the OpenZeppelin Initializable contract\r\n */\r\nabstract contract VersionedInitializable {\r\n /**\r\n * @dev Indicates that the contract has been initialized.\r\n */\r\n uint256 internal lastInitializedRevision = 0;\r\n\r\n /**\r\n * @dev Modifier to use in the initializer function of a contract.\r\n */\r\n modifier initializer() {\r\n uint256 revision = getRevision();\r\n require(revision > lastInitializedRevision, 'Contract instance has already been initialized');\r\n\r\n lastInitializedRevision = revision;\r\n\r\n _;\r\n }\r\n\r\n /// @dev returns the revision number of the contract.\r\n /// Needs to be defined in the inherited class as a constant.\r\n function getRevision() internal pure virtual returns (uint256);\r\n\r\n // Reserved storage space to allow for layout changes in the future.\r\n uint256[50] private ______gap;\r\n}\r\n"
|
|
},
|
|
"contracts/treasury/interfaces/IAdminControlledEcosystemReserve.sol": {
|
|
"content": "// SPDX-License-Identifier: GPL-3.0\r\npragma solidity ^0.8.10;\r\n\r\nimport {IERC20} from '@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';\r\n\r\ninterface IAdminControlledEcosystemReserve {\r\n /** @notice Emitted when the funds admin changes\r\n * @param fundsAdmin The new funds admin\r\n **/\r\n event NewFundsAdmin(address indexed fundsAdmin);\r\n\r\n /** @notice Returns the mock ETH reference address\r\n * @return address The address\r\n **/\r\n function ETH_MOCK_ADDRESS() external pure returns (address);\r\n\r\n /**\r\n * @notice Return the funds admin, only entity to be able to interact with this contract (controller of reserve)\r\n * @return address The address of the funds admin\r\n **/\r\n function getFundsAdmin() external view returns (address);\r\n\r\n /**\r\n * @dev Function for the funds admin to give ERC20 allowance to other parties\r\n * @param token The address of the token to give allowance from\r\n * @param recipient Allowance's recipient\r\n * @param amount Allowance to approve\r\n **/\r\n function approve(IERC20 token, address recipient, uint256 amount) external;\r\n\r\n /**\r\n * @notice Function for the funds admin to transfer ERC20 tokens to other parties\r\n * @param token The address of the token to transfer\r\n * @param recipient Transfer's recipient\r\n * @param amount Amount to transfer\r\n **/\r\n function transfer(IERC20 token, address recipient, uint256 amount) external;\r\n}\r\n"
|
|
},
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol": {
|
|
"content": "// SPDX-License-Identifier: AGPL-3.0\npragma solidity ^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"
|
|
}
|
|
},
|
|
"settings": {
|
|
"optimizer": {
|
|
"enabled": false,
|
|
"runs": 200
|
|
},
|
|
"outputSelection": {
|
|
"*": {
|
|
"": [
|
|
"ast"
|
|
],
|
|
"*": [
|
|
"abi",
|
|
"metadata",
|
|
"devdoc",
|
|
"userdoc",
|
|
"storageLayout",
|
|
"evm.legacyAssembly",
|
|
"evm.bytecode",
|
|
"evm.deployedBytecode",
|
|
"evm.methodIdentifiers",
|
|
"evm.gasEstimates",
|
|
"evm.assembly"
|
|
]
|
|
}
|
|
},
|
|
"remappings": []
|
|
}
|
|
},
|
|
"output": {
|
|
"contracts": {
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol": {
|
|
"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"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"details": "Interface of the ERC20 standard as defined in the EIP.",
|
|
"events": {
|
|
"Approval(address,address,uint256)": {
|
|
"details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance."
|
|
},
|
|
"Transfer(address,address,uint256)": {
|
|
"details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero."
|
|
}
|
|
},
|
|
"kind": "dev",
|
|
"methods": {
|
|
"allowance(address,address)": {
|
|
"details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called."
|
|
},
|
|
"approve(address,uint256)": {
|
|
"details": "Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event."
|
|
},
|
|
"balanceOf(address)": {
|
|
"details": "Returns the amount of tokens owned by `account`."
|
|
},
|
|
"totalSupply()": {
|
|
"details": "Returns the amount of tokens in existence."
|
|
},
|
|
"transfer(address,uint256)": {
|
|
"details": "Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
|
|
},
|
|
"transferFrom(address,address,uint256)": {
|
|
"details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {
|
|
"allowance(address,address)": "dd62ed3e",
|
|
"approve(address,uint256)": "095ea7b3",
|
|
"balanceOf(address)": "70a08231",
|
|
"totalSupply()": "18160ddd",
|
|
"transfer(address,uint256)": "a9059cbb",
|
|
"transferFrom(address,address,uint256)": "23b872dd"
|
|
}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"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\"}],\"devdoc\":{\"details\":\"Interface of the ERC20 standard as defined in the EIP.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default. This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens. Returns a boolean value indicating whether the operation succeeded. IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol\":{\"keccak256\":\"0xf57d62241e553696a1324d225663ba2e1a51db0a51ca236d0c1b009d89b6284c\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d327db93b636790909aa137124f30a856ac1631cb79c476aa188f9627fda8d03\",\"dweb:/ipfs/QmaxpmEoBFioeNYmpxJemyZ7aYF2nX1NKW1XDqREm7i6es\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"contracts/treasury/AdminControlledEcosystemReserve.sol": {
|
|
"AdminControlledEcosystemReserve": {
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "fundsAdmin",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "NewFundsAdmin",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "ETH_MOCK_ADDRESS",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "REVISION",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "contract IERC20",
|
|
"name": "token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "recipient",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "approve",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getFundsAdmin",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "contract IERC20",
|
|
"name": "token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "recipient",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "transfer",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"stateMutability": "payable",
|
|
"type": "receive"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"author": "BGD Labs*",
|
|
"details": "Done abstract to add an `initialize()` function on the child, with `initializer` modifier",
|
|
"events": {
|
|
"NewFundsAdmin(address)": {
|
|
"params": {
|
|
"fundsAdmin": "The new funds admin*"
|
|
}
|
|
}
|
|
},
|
|
"kind": "dev",
|
|
"methods": {
|
|
"approve(address,address,uint256)": {
|
|
"details": "Function for the funds admin to give ERC20 allowance to other parties",
|
|
"params": {
|
|
"amount": "Allowance to approve*",
|
|
"recipient": "Allowance's recipient",
|
|
"token": "The address of the token to give allowance from"
|
|
}
|
|
},
|
|
"getFundsAdmin()": {
|
|
"returns": {
|
|
"_0": "address The address of the funds admin*"
|
|
}
|
|
},
|
|
"transfer(address,address,uint256)": {
|
|
"params": {
|
|
"amount": "Amount to transfer*",
|
|
"recipient": "Transfer's recipient",
|
|
"token": "The address of the token to transfer"
|
|
}
|
|
}
|
|
},
|
|
"stateVariables": {
|
|
"ETH_MOCK_ADDRESS": {
|
|
"return": "address The address*",
|
|
"returns": {
|
|
"_0": "address The address*"
|
|
}
|
|
}
|
|
},
|
|
"title": "AdminControlledEcosystemReserve",
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {
|
|
"ETH_MOCK_ADDRESS()": "51ee886b",
|
|
"REVISION()": "dde43cba",
|
|
"approve(address,address,uint256)": "e1f21c67",
|
|
"getFundsAdmin()": "06bc2ee0",
|
|
"transfer(address,address,uint256)": "beabacc8"
|
|
}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fundsAdmin\",\"type\":\"address\"}],\"name\":\"NewFundsAdmin\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ETH_MOCK_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REVISION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFundsAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"BGD Labs*\",\"details\":\"Done abstract to add an `initialize()` function on the child, with `initializer` modifier\",\"events\":{\"NewFundsAdmin(address)\":{\"params\":{\"fundsAdmin\":\"The new funds admin*\"}}},\"kind\":\"dev\",\"methods\":{\"approve(address,address,uint256)\":{\"details\":\"Function for the funds admin to give ERC20 allowance to other parties\",\"params\":{\"amount\":\"Allowance to approve*\",\"recipient\":\"Allowance's recipient\",\"token\":\"The address of the token to give allowance from\"}},\"getFundsAdmin()\":{\"returns\":{\"_0\":\"address The address of the funds admin*\"}},\"transfer(address,address,uint256)\":{\"params\":{\"amount\":\"Amount to transfer*\",\"recipient\":\"Transfer's recipient\",\"token\":\"The address of the token to transfer\"}}},\"stateVariables\":{\"ETH_MOCK_ADDRESS\":{\"return\":\"address The address*\",\"returns\":{\"_0\":\"address The address*\"}}},\"title\":\"AdminControlledEcosystemReserve\",\"version\":1},\"userdoc\":{\"events\":{\"NewFundsAdmin(address)\":{\"notice\":\"Emitted when the funds admin changes\"}},\"kind\":\"user\",\"methods\":{\"ETH_MOCK_ADDRESS()\":{\"notice\":\"Returns the mock ETH reference address\"},\"getFundsAdmin()\":{\"notice\":\"Return the funds admin, only entity to be able to interact with this contract (controller of reserve)\"},\"transfer(address,address,uint256)\":{\"notice\":\"Function for the funds admin to transfer ERC20 tokens to other parties\"}},\"notice\":\"Stores ERC20 tokens, and allows to dispose of them via approval or transfer dynamics Adapted to be an implementation of a transparent proxy\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/treasury/AdminControlledEcosystemReserve.sol\":\"AdminControlledEcosystemReserve\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol\":{\"keccak256\":\"0xf57d62241e553696a1324d225663ba2e1a51db0a51ca236d0c1b009d89b6284c\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d327db93b636790909aa137124f30a856ac1631cb79c476aa188f9627fda8d03\",\"dweb:/ipfs/QmaxpmEoBFioeNYmpxJemyZ7aYF2nX1NKW1XDqREm7i6es\"]},\"contracts/treasury/AdminControlledEcosystemReserve.sol\":{\"keccak256\":\"0x762e73291586d0dc792962ba6254fc61e6b645561da7b9a384860c7c9a4de12a\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://568707fe0efabcfc64c421f13cc64bb98b70c6238d0e6a622691d9a7a2764391\",\"dweb:/ipfs/QmPrkZnubi4YAzzXHJ5Bw7njDtCJnojAiiihQshKqWeat1\"]},\"contracts/treasury/interfaces/IAdminControlledEcosystemReserve.sol\":{\"keccak256\":\"0x98018afde54c4d8ffe2213f9b67dc91cec8d8a9a6962303c222e7fbcbf099583\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://d914c234ae88695b09b855e56219d599400f53031d387812d5ce6c1a97620e4a\",\"dweb:/ipfs/QmewaB3vTNLgDq1h4qQjqdi7f2NwD8CadS1aBjVNnoYQZD\"]},\"contracts/treasury/libs/Address.sol\":{\"keccak256\":\"0xb2d70ed96d128c50245fe45acad4a21a8c7616d3ab0d7d81da6f6fddcba9336f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://028ec219854fc4c3c47d4099c7f71f21f2f2c1664b8c1f23afffb8121bc5a7c7\",\"dweb:/ipfs/QmXwZjJhLWAFDVLv6PnMhFiWazRFfyeeix58d4NpgjZK2U\"]},\"contracts/treasury/libs/ReentrancyGuard.sol\":{\"keccak256\":\"0xb3fe85f81b73c576b4bcde7ad54f53d7f9c1b552d2c227581b343f1dad17f522\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://875557006dd1f7926cc8d7c925ff048fe3f1499b6a8bfb69850f000fb350fad8\",\"dweb:/ipfs/QmUhkkVs3ATNnP4RpfSas9PizztHQUchCTyrB6QXLCLcjn\"]},\"contracts/treasury/libs/SafeERC20.sol\":{\"keccak256\":\"0x0ba690dc0a1acab430c16306271ca087920108d2a59197673157143881e24188\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6c45c3a123d36b71e74f9ed6d0e61b3b6d447c964c465717f4ee24718f5e6b18\",\"dweb:/ipfs/QmabJP3vdSYJuoEQYMziJKWyawUFsszFnvq3Y2R9JD3gsX\"]},\"contracts/treasury/libs/VersionedInitializable.sol\":{\"keccak256\":\"0x2a309d06d4ecbca926f68445dd5aeea59d43cb4c46ee194efcf2f63cf3e4ea58\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://437357f51a0a5bf7ea60c3e9f3d9faa26785551b490394eb1a735115afae509f\",\"dweb:/ipfs/QmcWtbYZKDELmoZiHMGrQ1K8en8BGstLioBR921JYGje5y\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [
|
|
{
|
|
"astId": 843,
|
|
"contract": "contracts/treasury/AdminControlledEcosystemReserve.sol:AdminControlledEcosystemReserve",
|
|
"label": "lastInitializedRevision",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_uint256"
|
|
},
|
|
{
|
|
"astId": 874,
|
|
"contract": "contracts/treasury/AdminControlledEcosystemReserve.sol:AdminControlledEcosystemReserve",
|
|
"label": "______gap",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_array(t_uint256)50_storage"
|
|
},
|
|
{
|
|
"astId": 105,
|
|
"contract": "contracts/treasury/AdminControlledEcosystemReserve.sol:AdminControlledEcosystemReserve",
|
|
"label": "_fundsAdmin",
|
|
"offset": 0,
|
|
"slot": "51",
|
|
"type": "t_address"
|
|
}
|
|
],
|
|
"types": {
|
|
"t_address": {
|
|
"encoding": "inplace",
|
|
"label": "address",
|
|
"numberOfBytes": "20"
|
|
},
|
|
"t_array(t_uint256)50_storage": {
|
|
"base": "t_uint256",
|
|
"encoding": "inplace",
|
|
"label": "uint256[50]",
|
|
"numberOfBytes": "1600"
|
|
},
|
|
"t_uint256": {
|
|
"encoding": "inplace",
|
|
"label": "uint256",
|
|
"numberOfBytes": "32"
|
|
}
|
|
}
|
|
},
|
|
"userdoc": {
|
|
"events": {
|
|
"NewFundsAdmin(address)": {
|
|
"notice": "Emitted when the funds admin changes"
|
|
}
|
|
},
|
|
"kind": "user",
|
|
"methods": {
|
|
"ETH_MOCK_ADDRESS()": {
|
|
"notice": "Returns the mock ETH reference address"
|
|
},
|
|
"getFundsAdmin()": {
|
|
"notice": "Return the funds admin, only entity to be able to interact with this contract (controller of reserve)"
|
|
},
|
|
"transfer(address,address,uint256)": {
|
|
"notice": "Function for the funds admin to transfer ERC20 tokens to other parties"
|
|
}
|
|
},
|
|
"notice": "Stores ERC20 tokens, and allows to dispose of them via approval or transfer dynamics Adapted to be an implementation of a transparent proxy",
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"contracts/treasury/interfaces/IAdminControlledEcosystemReserve.sol": {
|
|
"IAdminControlledEcosystemReserve": {
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "fundsAdmin",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"name": "NewFundsAdmin",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "ETH_MOCK_ADDRESS",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "pure",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "contract IERC20",
|
|
"name": "token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "recipient",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "approve",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getFundsAdmin",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "contract IERC20",
|
|
"name": "token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "recipient",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "transfer",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"events": {
|
|
"NewFundsAdmin(address)": {
|
|
"params": {
|
|
"fundsAdmin": "The new funds admin*"
|
|
}
|
|
}
|
|
},
|
|
"kind": "dev",
|
|
"methods": {
|
|
"ETH_MOCK_ADDRESS()": {
|
|
"returns": {
|
|
"_0": "address The address*"
|
|
}
|
|
},
|
|
"approve(address,address,uint256)": {
|
|
"details": "Function for the funds admin to give ERC20 allowance to other parties",
|
|
"params": {
|
|
"amount": "Allowance to approve*",
|
|
"recipient": "Allowance's recipient",
|
|
"token": "The address of the token to give allowance from"
|
|
}
|
|
},
|
|
"getFundsAdmin()": {
|
|
"returns": {
|
|
"_0": "address The address of the funds admin*"
|
|
}
|
|
},
|
|
"transfer(address,address,uint256)": {
|
|
"params": {
|
|
"amount": "Amount to transfer*",
|
|
"recipient": "Transfer's recipient",
|
|
"token": "The address of the token to transfer"
|
|
}
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {
|
|
"ETH_MOCK_ADDRESS()": "51ee886b",
|
|
"approve(address,address,uint256)": "e1f21c67",
|
|
"getFundsAdmin()": "06bc2ee0",
|
|
"transfer(address,address,uint256)": "beabacc8"
|
|
}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"fundsAdmin\",\"type\":\"address\"}],\"name\":\"NewFundsAdmin\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ETH_MOCK_ADDRESS\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFundsAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"NewFundsAdmin(address)\":{\"params\":{\"fundsAdmin\":\"The new funds admin*\"}}},\"kind\":\"dev\",\"methods\":{\"ETH_MOCK_ADDRESS()\":{\"returns\":{\"_0\":\"address The address*\"}},\"approve(address,address,uint256)\":{\"details\":\"Function for the funds admin to give ERC20 allowance to other parties\",\"params\":{\"amount\":\"Allowance to approve*\",\"recipient\":\"Allowance's recipient\",\"token\":\"The address of the token to give allowance from\"}},\"getFundsAdmin()\":{\"returns\":{\"_0\":\"address The address of the funds admin*\"}},\"transfer(address,address,uint256)\":{\"params\":{\"amount\":\"Amount to transfer*\",\"recipient\":\"Transfer's recipient\",\"token\":\"The address of the token to transfer\"}}},\"version\":1},\"userdoc\":{\"events\":{\"NewFundsAdmin(address)\":{\"notice\":\"Emitted when the funds admin changes\"}},\"kind\":\"user\",\"methods\":{\"ETH_MOCK_ADDRESS()\":{\"notice\":\"Returns the mock ETH reference address\"},\"getFundsAdmin()\":{\"notice\":\"Return the funds admin, only entity to be able to interact with this contract (controller of reserve)\"},\"transfer(address,address,uint256)\":{\"notice\":\"Function for the funds admin to transfer ERC20 tokens to other parties\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/treasury/interfaces/IAdminControlledEcosystemReserve.sol\":\"IAdminControlledEcosystemReserve\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol\":{\"keccak256\":\"0xf57d62241e553696a1324d225663ba2e1a51db0a51ca236d0c1b009d89b6284c\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d327db93b636790909aa137124f30a856ac1631cb79c476aa188f9627fda8d03\",\"dweb:/ipfs/QmaxpmEoBFioeNYmpxJemyZ7aYF2nX1NKW1XDqREm7i6es\"]},\"contracts/treasury/interfaces/IAdminControlledEcosystemReserve.sol\":{\"keccak256\":\"0x98018afde54c4d8ffe2213f9b67dc91cec8d8a9a6962303c222e7fbcbf099583\",\"license\":\"GPL-3.0\",\"urls\":[\"bzz-raw://d914c234ae88695b09b855e56219d599400f53031d387812d5ce6c1a97620e4a\",\"dweb:/ipfs/QmewaB3vTNLgDq1h4qQjqdi7f2NwD8CadS1aBjVNnoYQZD\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"events": {
|
|
"NewFundsAdmin(address)": {
|
|
"notice": "Emitted when the funds admin changes"
|
|
}
|
|
},
|
|
"kind": "user",
|
|
"methods": {
|
|
"ETH_MOCK_ADDRESS()": {
|
|
"notice": "Returns the mock ETH reference address"
|
|
},
|
|
"getFundsAdmin()": {
|
|
"notice": "Return the funds admin, only entity to be able to interact with this contract (controller of reserve)"
|
|
},
|
|
"transfer(address,address,uint256)": {
|
|
"notice": "Function for the funds admin to transfer ERC20 tokens to other parties"
|
|
}
|
|
},
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"contracts/treasury/libs/Address.sol": {
|
|
"Address": {
|
|
"abi": [],
|
|
"devdoc": {
|
|
"details": "Collection of functions related to the address type",
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": " /* \"contracts/treasury/libs/Address.sol\":202:7951 library Address {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/treasury/libs/Address.sol\":202:7951 library Address {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212200f5bbba861fa75ffb59c64ca2a99a43246a3ea34fed571a48dae2c11489c5b2c64736f6c634300081a0033\n}\n",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212200f5bbba861fa75ffb59c64ca2a99a43246a3ea34fed571a48dae2c11489c5b2c64736f6c634300081a0033",
|
|
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF JUMPDEST 0xBB 0xA8 PUSH2 0xFA75 SELFDESTRUCT 0xB5 SWAP13 PUSH5 0xCA2A99A432 CHAINID LOG3 0xEA CALLVALUE INVALID 0xD5 PUSH18 0xA48DAE2C11489C5B2C64736F6C634300081A STOP CALLER ",
|
|
"sourceMap": "202:7749:3:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212200f5bbba861fa75ffb59c64ca2a99a43246a3ea34fed571a48dae2c11489c5b2c64736f6c634300081a0033",
|
|
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0xF JUMPDEST 0xBB 0xA8 PUSH2 0xFA75 SELFDESTRUCT 0xB5 SWAP13 PUSH5 0xCA2A99A432 CHAINID LOG3 0xEA CALLVALUE INVALID 0xD5 PUSH18 0xA48DAE2C11489C5B2C64736F6C634300081A STOP CALLER ",
|
|
"sourceMap": "202:7749:3:-:0;;;;;;;;"
|
|
},
|
|
"gasEstimates": {
|
|
"creation": {
|
|
"codeDepositCost": "17000",
|
|
"executionCost": "92",
|
|
"totalCost": "17092"
|
|
},
|
|
"internal": {
|
|
"functionCall(address,bytes memory)": "infinite",
|
|
"functionCall(address,bytes memory,string memory)": "infinite",
|
|
"functionCallWithValue(address,bytes memory,uint256)": "infinite",
|
|
"functionCallWithValue(address,bytes memory,uint256,string memory)": "infinite",
|
|
"functionDelegateCall(address,bytes memory)": "infinite",
|
|
"functionDelegateCall(address,bytes memory,string memory)": "infinite",
|
|
"functionStaticCall(address,bytes memory)": "infinite",
|
|
"functionStaticCall(address,bytes memory,string memory)": "infinite",
|
|
"isContract(address)": "infinite",
|
|
"sendValue(address payable,uint256)": "infinite",
|
|
"verifyCallResult(bool,bytes memory,string memory)": "infinite"
|
|
}
|
|
},
|
|
"legacyAssembly": {
|
|
".code": [
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH #[$]",
|
|
"source": 3,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH [$]",
|
|
"source": 3,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "B"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "DUP3",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "DUP3",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "DUP3",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "CODECOPY",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "DUP1",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "MLOAD",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "BYTE",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "EQ",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH [tag]",
|
|
"source": 3,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "JUMPI",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "MSTORE",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "4"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "MSTORE",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "24"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "REVERT",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "tag",
|
|
"source": 3,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "JUMPDEST",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "ADDRESS",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "MSTORE",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "DUP2",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "MSTORE8",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "DUP3",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "DUP2",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "RETURN",
|
|
"source": 3
|
|
}
|
|
],
|
|
".data": {
|
|
"0": {
|
|
".auxdata": "a26469706673582212200f5bbba861fa75ffb59c64ca2a99a43246a3ea34fed571a48dae2c11489c5b2c64736f6c634300081a0033",
|
|
".code": [
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSHDEPLOYADDRESS",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "ADDRESS",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "EQ",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "80"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "40"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "MSTORE",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "PUSH",
|
|
"source": 3,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "DUP1",
|
|
"source": 3
|
|
},
|
|
{
|
|
"begin": 202,
|
|
"end": 7951,
|
|
"name": "REVERT",
|
|
"source": 3
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"sourceList": [
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"contracts/treasury/AdminControlledEcosystemReserve.sol",
|
|
"contracts/treasury/interfaces/IAdminControlledEcosystemReserve.sol",
|
|
"contracts/treasury/libs/Address.sol",
|
|
"contracts/treasury/libs/ReentrancyGuard.sol",
|
|
"contracts/treasury/libs/SafeERC20.sol",
|
|
"contracts/treasury/libs/VersionedInitializable.sol",
|
|
"#utility.yul"
|
|
]
|
|
},
|
|
"methodIdentifiers": {}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Collection of functions related to the address type\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/treasury/libs/Address.sol\":\"Address\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/treasury/libs/Address.sol\":{\"keccak256\":\"0xb2d70ed96d128c50245fe45acad4a21a8c7616d3ab0d7d81da6f6fddcba9336f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://028ec219854fc4c3c47d4099c7f71f21f2f2c1664b8c1f23afffb8121bc5a7c7\",\"dweb:/ipfs/QmXwZjJhLWAFDVLv6PnMhFiWazRFfyeeix58d4NpgjZK2U\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"contracts/treasury/libs/ReentrancyGuard.sol": {
|
|
"ReentrancyGuard": {
|
|
"abi": [],
|
|
"devdoc": {
|
|
"details": "Contract module that helps prevent reentrant calls to a function. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].",
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Contract module that helps prevent reentrant calls to a function. Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier available, which can be applied to functions to make sure there are no nested (reentrant) calls to them. Note that because there is a single `nonReentrant` guard, functions marked as `nonReentrant` may not call one another. This can be worked around by making those functions `private`, and then adding `external` `nonReentrant` entry points to them. TIP: If you would like to learn more about reentrancy and alternative ways to protect against it, check out our blog post https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/treasury/libs/ReentrancyGuard.sol\":\"ReentrancyGuard\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/treasury/libs/ReentrancyGuard.sol\":{\"keccak256\":\"0xb3fe85f81b73c576b4bcde7ad54f53d7f9c1b552d2c227581b343f1dad17f522\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://875557006dd1f7926cc8d7c925ff048fe3f1499b6a8bfb69850f000fb350fad8\",\"dweb:/ipfs/QmUhkkVs3ATNnP4RpfSas9PizztHQUchCTyrB6QXLCLcjn\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [
|
|
{
|
|
"astId": 581,
|
|
"contract": "contracts/treasury/libs/ReentrancyGuard.sol:ReentrancyGuard",
|
|
"label": "_status",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_uint256"
|
|
}
|
|
],
|
|
"types": {
|
|
"t_uint256": {
|
|
"encoding": "inplace",
|
|
"label": "uint256",
|
|
"numberOfBytes": "32"
|
|
}
|
|
}
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"contracts/treasury/libs/SafeERC20.sol": {
|
|
"SafeERC20": {
|
|
"abi": [],
|
|
"devdoc": {
|
|
"details": "Wrappers around ERC20 operations that throw on failure (when the token contract returns false). Tokens that return no value (and instead revert or throw on failure) are also supported, non-reverting calls are assumed to be successful. To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.",
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"title": "SafeERC20",
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": " /* \"contracts/treasury/libs/SafeERC20.sol\":735:3804 library SafeERC20 {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/treasury/libs/SafeERC20.sol\":735:3804 library SafeERC20 {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212204dac1e6aab9ad2a631f0ac456d0dcf8b88f4d1219a659832341667c6982683ac64736f6c634300081a0033\n}\n",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212204dac1e6aab9ad2a631f0ac456d0dcf8b88f4d1219a659832341667c6982683ac64736f6c634300081a0033",
|
|
"opcodes": "PUSH1 0x55 PUSH1 0x4B PUSH1 0xB DUP3 DUP3 DUP3 CODECOPY DUP1 MLOAD PUSH0 BYTE PUSH1 0x73 EQ PUSH1 0x3F JUMPI PUSH32 0x4E487B7100000000000000000000000000000000000000000000000000000000 PUSH0 MSTORE PUSH0 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH0 REVERT JUMPDEST ADDRESS PUSH0 MSTORE PUSH1 0x73 DUP2 MSTORE8 DUP3 DUP2 RETURN INVALID PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4D 0xAC 0x1E PUSH11 0xAB9AD2A631F0AC456D0DCF DUP12 DUP9 DELEGATECALL 0xD1 0x21 SWAP11 PUSH6 0x9832341667C6 SWAP9 0x26 DUP4 0xAC PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
|
|
"sourceMap": "735:3069:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212204dac1e6aab9ad2a631f0ac456d0dcf8b88f4d1219a659832341667c6982683ac64736f6c634300081a0033",
|
|
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x4D 0xAC 0x1E PUSH11 0xAB9AD2A631F0AC456D0DCF DUP12 DUP9 DELEGATECALL 0xD1 0x21 SWAP11 PUSH6 0x9832341667C6 SWAP9 0x26 DUP4 0xAC PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
|
|
"sourceMap": "735:3069:5:-:0;;;;;;;;"
|
|
},
|
|
"gasEstimates": {
|
|
"creation": {
|
|
"codeDepositCost": "17000",
|
|
"executionCost": "92",
|
|
"totalCost": "17092"
|
|
},
|
|
"internal": {
|
|
"_callOptionalReturn(contract IERC20,bytes memory)": "infinite",
|
|
"safeApprove(contract IERC20,address,uint256)": "infinite",
|
|
"safeDecreaseAllowance(contract IERC20,address,uint256)": "infinite",
|
|
"safeIncreaseAllowance(contract IERC20,address,uint256)": "infinite",
|
|
"safeTransfer(contract IERC20,address,uint256)": "infinite",
|
|
"safeTransferFrom(contract IERC20,address,address,uint256)": "infinite"
|
|
}
|
|
},
|
|
"legacyAssembly": {
|
|
".code": [
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH #[$]",
|
|
"source": 5,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH [$]",
|
|
"source": 5,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "B"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "DUP3",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "DUP3",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "DUP3",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "CODECOPY",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "DUP1",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "MLOAD",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "BYTE",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "EQ",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH [tag]",
|
|
"source": 5,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "JUMPI",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "MSTORE",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "4"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "MSTORE",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "24"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "REVERT",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "tag",
|
|
"source": 5,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "JUMPDEST",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "ADDRESS",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "MSTORE",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "DUP2",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "MSTORE8",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "DUP3",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "DUP2",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "RETURN",
|
|
"source": 5
|
|
}
|
|
],
|
|
".data": {
|
|
"0": {
|
|
".auxdata": "a26469706673582212204dac1e6aab9ad2a631f0ac456d0dcf8b88f4d1219a659832341667c6982683ac64736f6c634300081a0033",
|
|
".code": [
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSHDEPLOYADDRESS",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "ADDRESS",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "EQ",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "80"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "40"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "MSTORE",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "PUSH",
|
|
"source": 5,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "DUP1",
|
|
"source": 5
|
|
},
|
|
{
|
|
"begin": 735,
|
|
"end": 3804,
|
|
"name": "REVERT",
|
|
"source": 5
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"sourceList": [
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"contracts/treasury/AdminControlledEcosystemReserve.sol",
|
|
"contracts/treasury/interfaces/IAdminControlledEcosystemReserve.sol",
|
|
"contracts/treasury/libs/Address.sol",
|
|
"contracts/treasury/libs/ReentrancyGuard.sol",
|
|
"contracts/treasury/libs/SafeERC20.sol",
|
|
"contracts/treasury/libs/VersionedInitializable.sol",
|
|
"#utility.yul"
|
|
]
|
|
},
|
|
"methodIdentifiers": {}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers around ERC20 operations that throw on failure (when the token contract returns false). Tokens that return no value (and instead revert or throw on failure) are also supported, non-reverting calls are assumed to be successful. To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\",\"kind\":\"dev\",\"methods\":{},\"title\":\"SafeERC20\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/treasury/libs/SafeERC20.sol\":\"SafeERC20\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol\":{\"keccak256\":\"0xf57d62241e553696a1324d225663ba2e1a51db0a51ca236d0c1b009d89b6284c\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d327db93b636790909aa137124f30a856ac1631cb79c476aa188f9627fda8d03\",\"dweb:/ipfs/QmaxpmEoBFioeNYmpxJemyZ7aYF2nX1NKW1XDqREm7i6es\"]},\"contracts/treasury/libs/Address.sol\":{\"keccak256\":\"0xb2d70ed96d128c50245fe45acad4a21a8c7616d3ab0d7d81da6f6fddcba9336f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://028ec219854fc4c3c47d4099c7f71f21f2f2c1664b8c1f23afffb8121bc5a7c7\",\"dweb:/ipfs/QmXwZjJhLWAFDVLv6PnMhFiWazRFfyeeix58d4NpgjZK2U\"]},\"contracts/treasury/libs/SafeERC20.sol\":{\"keccak256\":\"0x0ba690dc0a1acab430c16306271ca087920108d2a59197673157143881e24188\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6c45c3a123d36b71e74f9ed6d0e61b3b6d447c964c465717f4ee24718f5e6b18\",\"dweb:/ipfs/QmabJP3vdSYJuoEQYMziJKWyawUFsszFnvq3Y2R9JD3gsX\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"contracts/treasury/libs/VersionedInitializable.sol": {
|
|
"VersionedInitializable": {
|
|
"abi": [],
|
|
"devdoc": {
|
|
"author": "Aave, inspired by the OpenZeppelin Initializable contract",
|
|
"details": "Helper contract to support initializer functions. To use it, replace the constructor with a function that has the `initializer` modifier. WARNING: Unlike constructors, initializer functions must be manually invoked. This applies both to deploying an Initializable contract, as well as extending an Initializable contract via inheritance. WARNING: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or ensure that all initializers are idempotent, because this is not dealt with automatically as with constructors.",
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"stateVariables": {
|
|
"lastInitializedRevision": {
|
|
"details": "Indicates that the contract has been initialized."
|
|
}
|
|
},
|
|
"title": "VersionedInitializable",
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Aave, inspired by the OpenZeppelin Initializable contract\",\"details\":\"Helper contract to support initializer functions. To use it, replace the constructor with a function that has the `initializer` modifier. WARNING: Unlike constructors, initializer functions must be manually invoked. This applies both to deploying an Initializable contract, as well as extending an Initializable contract via inheritance. WARNING: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or ensure that all initializers are idempotent, because this is not dealt with automatically as with constructors.\",\"kind\":\"dev\",\"methods\":{},\"stateVariables\":{\"lastInitializedRevision\":{\"details\":\"Indicates that the contract has been initialized.\"}},\"title\":\"VersionedInitializable\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/treasury/libs/VersionedInitializable.sol\":\"VersionedInitializable\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/treasury/libs/VersionedInitializable.sol\":{\"keccak256\":\"0x2a309d06d4ecbca926f68445dd5aeea59d43cb4c46ee194efcf2f63cf3e4ea58\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://437357f51a0a5bf7ea60c3e9f3d9faa26785551b490394eb1a735115afae509f\",\"dweb:/ipfs/QmcWtbYZKDELmoZiHMGrQ1K8en8BGstLioBR921JYGje5y\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [
|
|
{
|
|
"astId": 843,
|
|
"contract": "contracts/treasury/libs/VersionedInitializable.sol:VersionedInitializable",
|
|
"label": "lastInitializedRevision",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_uint256"
|
|
},
|
|
{
|
|
"astId": 874,
|
|
"contract": "contracts/treasury/libs/VersionedInitializable.sol:VersionedInitializable",
|
|
"label": "______gap",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_array(t_uint256)50_storage"
|
|
}
|
|
],
|
|
"types": {
|
|
"t_array(t_uint256)50_storage": {
|
|
"base": "t_uint256",
|
|
"encoding": "inplace",
|
|
"label": "uint256[50]",
|
|
"numberOfBytes": "1600"
|
|
},
|
|
"t_uint256": {
|
|
"encoding": "inplace",
|
|
"label": "uint256",
|
|
"numberOfBytes": "32"
|
|
}
|
|
}
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"sources": {
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol": {
|
|
"ast": {
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"exportedSymbols": {
|
|
"IERC20": [
|
|
77
|
|
]
|
|
},
|
|
"id": 78,
|
|
"license": "AGPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "37:23:0"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "IERC20",
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": {
|
|
"id": 2,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "62:70:0",
|
|
"text": " @dev Interface of the ERC20 standard as defined in the EIP."
|
|
},
|
|
"fullyImplemented": false,
|
|
"id": 77,
|
|
"linearizedBaseContracts": [
|
|
77
|
|
],
|
|
"name": "IERC20",
|
|
"nameLocation": "143:6:0",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"documentation": {
|
|
"id": 3,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "154:62:0",
|
|
"text": " @dev Returns the amount of tokens in existence."
|
|
},
|
|
"functionSelector": "18160ddd",
|
|
"id": 8,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "totalSupply",
|
|
"nameLocation": "228:11:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 4,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "239:2:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 7,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 6,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 8,
|
|
"src": "265:7:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 5,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "265:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "264:9:0"
|
|
},
|
|
"scope": 77,
|
|
"src": "219:55:0",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 9,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "278:68:0",
|
|
"text": " @dev Returns the amount of tokens owned by `account`."
|
|
},
|
|
"functionSelector": "70a08231",
|
|
"id": 16,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "balanceOf",
|
|
"nameLocation": "358:9:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 12,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 11,
|
|
"mutability": "mutable",
|
|
"name": "account",
|
|
"nameLocation": "376:7:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 16,
|
|
"src": "368:15:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 10,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "368:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "367:17:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 15,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 14,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 16,
|
|
"src": "408:7:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 13,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "408:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "407:9:0"
|
|
},
|
|
"scope": 77,
|
|
"src": "349:68:0",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 17,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "421:197: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",
|
|
"nameLocation": "630:8:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 22,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 19,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "647:9:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 26,
|
|
"src": "639:17:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 18,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "639:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 21,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "666:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 26,
|
|
"src": "658:14:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 20,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "658:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "638:35:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 25,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 24,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 26,
|
|
"src": "692:4:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 23,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "692:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "691:6:0"
|
|
},
|
|
"scope": 77,
|
|
"src": "621:77:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 27,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "702:252: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",
|
|
"nameLocation": "966:9:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 32,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 29,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "984:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 36,
|
|
"src": "976:13:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 28,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "976:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 31,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nameLocation": "999:7:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 36,
|
|
"src": "991:15:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 30,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "991:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "975:32:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 35,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 34,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 36,
|
|
"src": "1031:7:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 33,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1031:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1030:9:0"
|
|
},
|
|
"scope": 77,
|
|
"src": "957:83:0",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 37,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1044:616: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",
|
|
"nameLocation": "1672:7:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 42,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 39,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nameLocation": "1688:7:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 46,
|
|
"src": "1680:15:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 38,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1680:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 41,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "1705:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 46,
|
|
"src": "1697:14:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 40,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1697:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1679:33:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 45,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 44,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 46,
|
|
"src": "1731:4:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 43,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1731:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1730:6:0"
|
|
},
|
|
"scope": 77,
|
|
"src": "1663:74:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 47,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1741:280: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",
|
|
"nameLocation": "2033:12:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 54,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 49,
|
|
"mutability": "mutable",
|
|
"name": "sender",
|
|
"nameLocation": "2054:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 58,
|
|
"src": "2046:14:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 48,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2046:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 51,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "2070:9:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 58,
|
|
"src": "2062:17:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 50,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2062:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 53,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "2089:6:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 58,
|
|
"src": "2081:14:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 52,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2081:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2045:51:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 57,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 56,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 58,
|
|
"src": "2115:4:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 55,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2115:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2114:6:0"
|
|
},
|
|
"scope": 77,
|
|
"src": "2024:97:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 59,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2125:148:0",
|
|
"text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero."
|
|
},
|
|
"eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
|
|
"id": 67,
|
|
"name": "Transfer",
|
|
"nameLocation": "2282:8:0",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 66,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 61,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "from",
|
|
"nameLocation": "2307:4:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 67,
|
|
"src": "2291:20:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 60,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2291:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 63,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "2329:2:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 67,
|
|
"src": "2313:18:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 62,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2313:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 65,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "2341:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 67,
|
|
"src": "2333:13:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 64,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2333:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2290:57:0"
|
|
},
|
|
"src": "2276:72:0"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 68,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2352:142: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."
|
|
},
|
|
"eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
|
|
"id": 76,
|
|
"name": "Approval",
|
|
"nameLocation": "2503:8:0",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 75,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 70,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "2528:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 76,
|
|
"src": "2512:21:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 69,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2512:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 72,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nameLocation": "2551:7:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 76,
|
|
"src": "2535:23:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 71,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2535:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 74,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "2568:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 76,
|
|
"src": "2560:13:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 73,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2560:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2511:63:0"
|
|
},
|
|
"src": "2497:78:0"
|
|
}
|
|
],
|
|
"scope": 78,
|
|
"src": "133:2444:0",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
67,
|
|
76
|
|
]
|
|
}
|
|
],
|
|
"src": "37:2541:0"
|
|
},
|
|
"id": 0
|
|
},
|
|
"contracts/treasury/AdminControlledEcosystemReserve.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/treasury/AdminControlledEcosystemReserve.sol",
|
|
"exportedSymbols": {
|
|
"Address": [
|
|
570
|
|
],
|
|
"AdminControlledEcosystemReserve": [
|
|
231
|
|
],
|
|
"IAdminControlledEcosystemReserve": [
|
|
275
|
|
],
|
|
"IERC20": [
|
|
77
|
|
],
|
|
"ReentrancyGuard": [
|
|
610
|
|
],
|
|
"SafeERC20": [
|
|
836
|
|
],
|
|
"VersionedInitializable": [
|
|
875
|
|
]
|
|
},
|
|
"id": 232,
|
|
"license": "GPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 79,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".10"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "37:24:1"
|
|
},
|
|
{
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"file": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"id": 81,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 232,
|
|
"sourceUnit": 78,
|
|
"src": "65:94:1",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 80,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 77,
|
|
"src": "73:6:1",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "contracts/treasury/interfaces/IAdminControlledEcosystemReserve.sol",
|
|
"file": "./interfaces/IAdminControlledEcosystemReserve.sol",
|
|
"id": 83,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 232,
|
|
"sourceUnit": 276,
|
|
"src": "161:99:1",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 82,
|
|
"name": "IAdminControlledEcosystemReserve",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 275,
|
|
"src": "169:32:1",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "contracts/treasury/libs/VersionedInitializable.sol",
|
|
"file": "./libs/VersionedInitializable.sol",
|
|
"id": 85,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 232,
|
|
"sourceUnit": 876,
|
|
"src": "262:73:1",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 84,
|
|
"name": "VersionedInitializable",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 875,
|
|
"src": "270:22:1",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "contracts/treasury/libs/SafeERC20.sol",
|
|
"file": "./libs/SafeERC20.sol",
|
|
"id": 87,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 232,
|
|
"sourceUnit": 837,
|
|
"src": "337:47:1",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 86,
|
|
"name": "SafeERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 836,
|
|
"src": "345:9:1",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "contracts/treasury/libs/ReentrancyGuard.sol",
|
|
"file": "./libs/ReentrancyGuard.sol",
|
|
"id": 89,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 232,
|
|
"sourceUnit": 611,
|
|
"src": "386:59:1",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 88,
|
|
"name": "ReentrancyGuard",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 610,
|
|
"src": "394:15:1",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "contracts/treasury/libs/Address.sol",
|
|
"file": "./libs/Address.sol",
|
|
"id": 91,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 232,
|
|
"sourceUnit": 571,
|
|
"src": "447:43:1",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 90,
|
|
"name": "Address",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 570,
|
|
"src": "455:7:1",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": true,
|
|
"baseContracts": [
|
|
{
|
|
"baseName": {
|
|
"id": 93,
|
|
"name": "VersionedInitializable",
|
|
"nameLocations": [
|
|
"880:22:1"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 875,
|
|
"src": "880:22:1"
|
|
},
|
|
"id": 94,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "880:22:1"
|
|
},
|
|
{
|
|
"baseName": {
|
|
"id": 95,
|
|
"name": "IAdminControlledEcosystemReserve",
|
|
"nameLocations": [
|
|
"907:32:1"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 275,
|
|
"src": "907:32:1"
|
|
},
|
|
"id": 96,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "907:32:1"
|
|
}
|
|
],
|
|
"canonicalName": "AdminControlledEcosystemReserve",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 92,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "494:328:1",
|
|
"text": " @title AdminControlledEcosystemReserve\n @notice Stores ERC20 tokens, and allows to dispose of them via approval or transfer dynamics\n Adapted to be an implementation of a transparent proxy\n @dev Done abstract to add an `initialize()` function on the child, with `initializer` modifier\n @author BGD Labs*"
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 231,
|
|
"linearizedBaseContracts": [
|
|
231,
|
|
275,
|
|
875
|
|
],
|
|
"name": "AdminControlledEcosystemReserve",
|
|
"nameLocation": "842:31:1",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"global": false,
|
|
"id": 100,
|
|
"libraryName": {
|
|
"id": 97,
|
|
"name": "SafeERC20",
|
|
"nameLocations": [
|
|
"952:9:1"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 836,
|
|
"src": "952:9:1"
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "946:27:1",
|
|
"typeName": {
|
|
"id": 99,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 98,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"966:6:1"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 77,
|
|
"src": "966:6:1"
|
|
},
|
|
"referencedDeclaration": 77,
|
|
"src": "966:6:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"global": false,
|
|
"id": 103,
|
|
"libraryName": {
|
|
"id": 101,
|
|
"name": "Address",
|
|
"nameLocations": [
|
|
"983:7:1"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 570,
|
|
"src": "983:7:1"
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "977:34:1",
|
|
"typeName": {
|
|
"id": 102,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "995:15:1",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 105,
|
|
"mutability": "mutable",
|
|
"name": "_fundsAdmin",
|
|
"nameLocation": "1034:11:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 231,
|
|
"src": "1017:28:1",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 104,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1017:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"functionSelector": "dde43cba",
|
|
"id": 108,
|
|
"mutability": "constant",
|
|
"name": "REVISION",
|
|
"nameLocation": "1076:8:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 231,
|
|
"src": "1052:36:1",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 106,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1052:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"hexValue": "31",
|
|
"id": 107,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1087:1:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
246
|
|
],
|
|
"constant": true,
|
|
"documentation": {
|
|
"id": 109,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1095:48:1",
|
|
"text": "@inheritdoc IAdminControlledEcosystemReserve"
|
|
},
|
|
"functionSelector": "51ee886b",
|
|
"id": 112,
|
|
"mutability": "constant",
|
|
"name": "ETH_MOCK_ADDRESS",
|
|
"nameLocation": "1171:16:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 231,
|
|
"src": "1147:85:1",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 110,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1147:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"value": {
|
|
"hexValue": "307845656565654565656545654565654565456545656545454565656565456565656565656545456545",
|
|
"id": 111,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1190:42:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"value": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"
|
|
},
|
|
"visibility": "public"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 123,
|
|
"nodeType": "Block",
|
|
"src": "1265:78:1",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 118,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 115,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967281,
|
|
"src": "1280:3:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 116,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1284:6:1",
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1280:10:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"id": 117,
|
|
"name": "_fundsAdmin",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 105,
|
|
"src": "1294:11:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1280:25:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "4f4e4c595f42595f46554e44535f41444d494e",
|
|
"id": 119,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1307:21:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_3088d49d45e4841a4a1f6f3b3363c5e7594d9318a96bb26b85336195c6269f1c",
|
|
"typeString": "literal_string \"ONLY_BY_FUNDS_ADMIN\""
|
|
},
|
|
"value": "ONLY_BY_FUNDS_ADMIN"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_3088d49d45e4841a4a1f6f3b3363c5e7594d9318a96bb26b85336195c6269f1c",
|
|
"typeString": "literal_string \"ONLY_BY_FUNDS_ADMIN\""
|
|
}
|
|
],
|
|
"id": 114,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1272:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 120,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1272:57:1",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 121,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1272:57:1"
|
|
},
|
|
{
|
|
"id": 122,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1336:1:1"
|
|
}
|
|
]
|
|
},
|
|
"id": 124,
|
|
"name": "onlyFundsAdmin",
|
|
"nameLocation": "1248:14:1",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 113,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1262:2:1"
|
|
},
|
|
"src": "1239:104:1",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
870
|
|
],
|
|
"body": {
|
|
"id": 132,
|
|
"nodeType": "Block",
|
|
"src": "1413:28:1",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 130,
|
|
"name": "REVISION",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 108,
|
|
"src": "1427:8:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"functionReturnParameters": 129,
|
|
"id": 131,
|
|
"nodeType": "Return",
|
|
"src": "1420:15:1"
|
|
}
|
|
]
|
|
},
|
|
"id": 133,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getRevision",
|
|
"nameLocation": "1358:11:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 126,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "1386:8:1"
|
|
},
|
|
"parameters": {
|
|
"id": 125,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1369:2:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 129,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 128,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 133,
|
|
"src": "1404:7:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 127,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1404:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1403:9:1"
|
|
},
|
|
"scope": 231,
|
|
"src": "1349:92:1",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
252
|
|
],
|
|
"body": {
|
|
"id": 141,
|
|
"nodeType": "Block",
|
|
"src": "1556:31:1",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 139,
|
|
"name": "_fundsAdmin",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 105,
|
|
"src": "1570:11:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 138,
|
|
"id": 140,
|
|
"nodeType": "Return",
|
|
"src": "1563:18:1"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 134,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1447:48:1",
|
|
"text": "@inheritdoc IAdminControlledEcosystemReserve"
|
|
},
|
|
"functionSelector": "06bc2ee0",
|
|
"id": 142,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getFundsAdmin",
|
|
"nameLocation": "1508:13:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 135,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1521:2:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 138,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 137,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 142,
|
|
"src": "1547:7:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 136,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1547:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1546:9:1"
|
|
},
|
|
"scope": 231,
|
|
"src": "1499:88:1",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
263
|
|
],
|
|
"body": {
|
|
"id": 162,
|
|
"nodeType": "Block",
|
|
"src": "1735:49:1",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 158,
|
|
"name": "recipient",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 148,
|
|
"src": "1760:9:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 159,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 150,
|
|
"src": "1771:6:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 155,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 146,
|
|
"src": "1742:5:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 157,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1748:11:1",
|
|
"memberName": "safeApprove",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 713,
|
|
"src": "1742:17:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$77_$_t_address_$_t_uint256_$returns$__$attached_to$_t_contract$_IERC20_$77_$",
|
|
"typeString": "function (contract IERC20,address,uint256)"
|
|
}
|
|
},
|
|
"id": 160,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1742:36:1",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 161,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1742:36:1"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 143,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1593:48:1",
|
|
"text": "@inheritdoc IAdminControlledEcosystemReserve"
|
|
},
|
|
"functionSelector": "e1f21c67",
|
|
"id": 163,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 153,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 152,
|
|
"name": "onlyFundsAdmin",
|
|
"nameLocations": [
|
|
"1720:14:1"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 124,
|
|
"src": "1720:14:1"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1720:14:1"
|
|
}
|
|
],
|
|
"name": "approve",
|
|
"nameLocation": "1654:7:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 151,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 146,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "1669:5:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 163,
|
|
"src": "1662:12:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 145,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 144,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"1662:6:1"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 77,
|
|
"src": "1662:6:1"
|
|
},
|
|
"referencedDeclaration": 77,
|
|
"src": "1662:6:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 148,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "1684:9:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 163,
|
|
"src": "1676:17:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 147,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1676:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 150,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "1703:6:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 163,
|
|
"src": "1695:14:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 149,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1695:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1661:49:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 154,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1735:0:1"
|
|
},
|
|
"scope": 231,
|
|
"src": "1645:139:1",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
274
|
|
],
|
|
"body": {
|
|
"id": 210,
|
|
"nodeType": "Block",
|
|
"src": "1933:230:1",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 182,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 177,
|
|
"name": "recipient",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 169,
|
|
"src": "1948:9:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"arguments": [
|
|
{
|
|
"hexValue": "30",
|
|
"id": 180,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1969:1:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
}
|
|
],
|
|
"id": 179,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1961:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 178,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1961:7:1",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 181,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1961:10:1",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1948:23:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "494e56414c49445f30585f524543495049454e54",
|
|
"id": 183,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1973:22:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_ec010e99c751f7cfb062de644310ffc32aeb81087912935b9531c5118ccc5f3d",
|
|
"typeString": "literal_string \"INVALID_0X_RECIPIENT\""
|
|
},
|
|
"value": "INVALID_0X_RECIPIENT"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_ec010e99c751f7cfb062de644310ffc32aeb81087912935b9531c5118ccc5f3d",
|
|
"typeString": "literal_string \"INVALID_0X_RECIPIENT\""
|
|
}
|
|
],
|
|
"id": 176,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1940:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 184,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1940:56:1",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 185,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1940:56:1"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 191,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [
|
|
{
|
|
"id": 188,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 167,
|
|
"src": "2017:5:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
],
|
|
"id": 187,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2009:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 186,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2009:7:1",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 189,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2009:14:1",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"id": 190,
|
|
"name": "ETH_MOCK_ADDRESS",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 112,
|
|
"src": "2027:16:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "2009:34:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 208,
|
|
"nodeType": "Block",
|
|
"src": "2104:54:1",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 204,
|
|
"name": "recipient",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 169,
|
|
"src": "2132:9:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 205,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 171,
|
|
"src": "2143:6:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 201,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 167,
|
|
"src": "2113:5:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 203,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2119:12:1",
|
|
"memberName": "safeTransfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 643,
|
|
"src": "2113:18:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$77_$_t_address_$_t_uint256_$returns$__$attached_to$_t_contract$_IERC20_$77_$",
|
|
"typeString": "function (contract IERC20,address,uint256)"
|
|
}
|
|
},
|
|
"id": 206,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2113:37:1",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 207,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2113:37:1"
|
|
}
|
|
]
|
|
},
|
|
"id": 209,
|
|
"nodeType": "IfStatement",
|
|
"src": "2005:153:1",
|
|
"trueBody": {
|
|
"id": 200,
|
|
"nodeType": "Block",
|
|
"src": "2045:53:1",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 197,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 171,
|
|
"src": "2083:6:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 194,
|
|
"name": "recipient",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 169,
|
|
"src": "2062:9:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 193,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2054:8:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_payable_$",
|
|
"typeString": "type(address payable)"
|
|
},
|
|
"typeName": {
|
|
"id": 192,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2054:8:1",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 195,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2054:18:1",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 196,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2073:9:1",
|
|
"memberName": "sendValue",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 327,
|
|
"src": "2054:28:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_payable_$_t_uint256_$returns$__$attached_to$_t_address_payable_$",
|
|
"typeString": "function (address payable,uint256)"
|
|
}
|
|
},
|
|
"id": 198,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2054:36:1",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 199,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2054:36:1"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 164,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1790:48:1",
|
|
"text": "@inheritdoc IAdminControlledEcosystemReserve"
|
|
},
|
|
"functionSelector": "beabacc8",
|
|
"id": 211,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 174,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 173,
|
|
"name": "onlyFundsAdmin",
|
|
"nameLocations": [
|
|
"1918:14:1"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 124,
|
|
"src": "1918:14:1"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1918:14:1"
|
|
}
|
|
],
|
|
"name": "transfer",
|
|
"nameLocation": "1851:8:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 172,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 167,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "1867:5:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 211,
|
|
"src": "1860:12:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 166,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 165,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"1860:6:1"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 77,
|
|
"src": "1860:6:1"
|
|
},
|
|
"referencedDeclaration": 77,
|
|
"src": "1860:6:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 169,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "1882:9:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 211,
|
|
"src": "1874:17:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 168,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1874:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 171,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "1901:6:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 211,
|
|
"src": "1893:14:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 170,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1893:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1859:49:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 175,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1933:0:1"
|
|
},
|
|
"scope": 231,
|
|
"src": "1842:321:1",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 215,
|
|
"nodeType": "Block",
|
|
"src": "2274:2:1",
|
|
"statements": []
|
|
},
|
|
"documentation": {
|
|
"id": 212,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2169:74:1",
|
|
"text": "@dev needed in order to receive ETH from the Aave v1 ecosystem reserve"
|
|
},
|
|
"id": 216,
|
|
"implemented": true,
|
|
"kind": "receive",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 213,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2254:2:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 214,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2274:0:1"
|
|
},
|
|
"scope": 231,
|
|
"src": "2247:29:1",
|
|
"stateMutability": "payable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 229,
|
|
"nodeType": "Block",
|
|
"src": "2330:64:1",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 223,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 221,
|
|
"name": "_fundsAdmin",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 105,
|
|
"src": "2337:11:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 222,
|
|
"name": "admin",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 218,
|
|
"src": "2351:5:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "2337:19:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 224,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2337:19:1"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"id": 226,
|
|
"name": "admin",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 218,
|
|
"src": "2382:5:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 225,
|
|
"name": "NewFundsAdmin",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 240,
|
|
"src": "2368:13:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
|
|
"typeString": "function (address)"
|
|
}
|
|
},
|
|
"id": 227,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2368:20:1",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 228,
|
|
"nodeType": "EmitStatement",
|
|
"src": "2363:25:1"
|
|
}
|
|
]
|
|
},
|
|
"id": 230,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_setFundsAdmin",
|
|
"nameLocation": "2291:14:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 219,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 218,
|
|
"mutability": "mutable",
|
|
"name": "admin",
|
|
"nameLocation": "2314:5:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 230,
|
|
"src": "2306:13:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 217,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2306:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2305:15:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 220,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2330:0:1"
|
|
},
|
|
"scope": 231,
|
|
"src": "2282:112:1",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 232,
|
|
"src": "824:1573:1",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
240
|
|
]
|
|
}
|
|
],
|
|
"src": "37:2362:1"
|
|
},
|
|
"id": 1
|
|
},
|
|
"contracts/treasury/interfaces/IAdminControlledEcosystemReserve.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/treasury/interfaces/IAdminControlledEcosystemReserve.sol",
|
|
"exportedSymbols": {
|
|
"IAdminControlledEcosystemReserve": [
|
|
275
|
|
],
|
|
"IERC20": [
|
|
77
|
|
]
|
|
},
|
|
"id": 276,
|
|
"license": "GPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 233,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".10"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "37:24:2"
|
|
},
|
|
{
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"file": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"id": 235,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 276,
|
|
"sourceUnit": 78,
|
|
"src": "65:94:2",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 234,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 77,
|
|
"src": "73:6:2",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "IAdminControlledEcosystemReserve",
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"fullyImplemented": false,
|
|
"id": 275,
|
|
"linearizedBaseContracts": [
|
|
275
|
|
],
|
|
"name": "IAdminControlledEcosystemReserve",
|
|
"nameLocation": "173:32:2",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 236,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "211:100:2",
|
|
"text": "@notice Emitted when the funds admin changes\n @param fundsAdmin The new funds admin*"
|
|
},
|
|
"eventSelector": "1ab77a654795da4cfe37c33188e862203ade9a5c7f1a9d4957669b3ccbec9e11",
|
|
"id": 240,
|
|
"name": "NewFundsAdmin",
|
|
"nameLocation": "321:13:2",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 239,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 238,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "fundsAdmin",
|
|
"nameLocation": "351:10:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 240,
|
|
"src": "335:26:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 237,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "335:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "334:28:2"
|
|
},
|
|
"src": "315:48:2"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 241,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "369:92:2",
|
|
"text": "@notice Returns the mock ETH reference address\n @return address The address*"
|
|
},
|
|
"functionSelector": "51ee886b",
|
|
"id": 246,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "ETH_MOCK_ADDRESS",
|
|
"nameLocation": "474:16:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 242,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "490:2:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 245,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 244,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 246,
|
|
"src": "516:7:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 243,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "516:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "515:9:2"
|
|
},
|
|
"scope": 275,
|
|
"src": "465:60:2",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 247,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "531:180:2",
|
|
"text": " @notice Return the funds admin, only entity to be able to interact with this contract (controller of reserve)\n @return address The address of the funds admin*"
|
|
},
|
|
"functionSelector": "06bc2ee0",
|
|
"id": 252,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getFundsAdmin",
|
|
"nameLocation": "724:13:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 248,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "737:2:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 251,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 250,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 252,
|
|
"src": "763:7:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 249,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "763:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "762:9:2"
|
|
},
|
|
"scope": 275,
|
|
"src": "715:57:2",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 253,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "778:245:2",
|
|
"text": " @dev Function for the funds admin to give ERC20 allowance to other parties\n @param token The address of the token to give allowance from\n @param recipient Allowance's recipient\n @param amount Allowance to approve*"
|
|
},
|
|
"functionSelector": "e1f21c67",
|
|
"id": 263,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "approve",
|
|
"nameLocation": "1036:7:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 261,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 256,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "1051:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 263,
|
|
"src": "1044:12:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 255,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 254,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"1044:6:2"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 77,
|
|
"src": "1044:6:2"
|
|
},
|
|
"referencedDeclaration": 77,
|
|
"src": "1044:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 258,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "1066:9:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 263,
|
|
"src": "1058:17:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 257,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1058:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 260,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "1085:6:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 263,
|
|
"src": "1077:14:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 259,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1077:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1043:49:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 262,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1101:0:2"
|
|
},
|
|
"scope": 275,
|
|
"src": "1027:75:2",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 264,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1108:235:2",
|
|
"text": " @notice Function for the funds admin to transfer ERC20 tokens to other parties\n @param token The address of the token to transfer\n @param recipient Transfer's recipient\n @param amount Amount to transfer*"
|
|
},
|
|
"functionSelector": "beabacc8",
|
|
"id": 274,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "transfer",
|
|
"nameLocation": "1356:8:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 272,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 267,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "1372:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 274,
|
|
"src": "1365:12:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 266,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 265,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"1365:6:2"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 77,
|
|
"src": "1365:6:2"
|
|
},
|
|
"referencedDeclaration": 77,
|
|
"src": "1365:6:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 269,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "1387:9:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 274,
|
|
"src": "1379:17:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 268,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1379:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 271,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "1406:6:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 274,
|
|
"src": "1398:14:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 270,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1398:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1364:49:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 273,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1422:0:2"
|
|
},
|
|
"scope": 275,
|
|
"src": "1347:76:2",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 276,
|
|
"src": "163:1263:2",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
240
|
|
]
|
|
}
|
|
],
|
|
"src": "37:1391:2"
|
|
},
|
|
"id": 2
|
|
},
|
|
"contracts/treasury/libs/Address.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/treasury/libs/Address.sol",
|
|
"exportedSymbols": {
|
|
"Address": [
|
|
570
|
|
]
|
|
},
|
|
"id": 571,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 277,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".1"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "104:23:3"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "Address",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"documentation": {
|
|
"id": 278,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "131:69:3",
|
|
"text": " @dev Collection of functions related to the address type"
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 570,
|
|
"linearizedBaseContracts": [
|
|
570
|
|
],
|
|
"name": "Address",
|
|
"nameLocation": "210:7:3",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 292,
|
|
"nodeType": "Block",
|
|
"src": "1222:242:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 290,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"expression": {
|
|
"id": 286,
|
|
"name": "account",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 281,
|
|
"src": "1435:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 287,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1443:4:3",
|
|
"memberName": "code",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1435:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 288,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1448:6:3",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1435:19:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 289,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1457:1:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1435:23:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"functionReturnParameters": 285,
|
|
"id": 291,
|
|
"nodeType": "Return",
|
|
"src": "1428:30:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 279,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "223:929:3",
|
|
"text": " @dev Returns true if `account` is a contract.\n [IMPORTANT]\n ====\n It is unsafe to assume that an address for which this function returns\n false is an externally-owned account (EOA) and not a contract.\n Among others, `isContract` will return false for the following\n types of addresses:\n - an externally-owned account\n - a contract in construction\n - an address where a contract will be created\n - an address where a contract lived, but was destroyed\n ====\n [IMPORTANT]\n ====\n You shouldn't rely on `isContract` to protect against flash loan attacks!\n Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n constructor.\n ===="
|
|
},
|
|
"id": 293,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "isContract",
|
|
"nameLocation": "1165:10:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 282,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 281,
|
|
"mutability": "mutable",
|
|
"name": "account",
|
|
"nameLocation": "1184:7:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 293,
|
|
"src": "1176:15:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 280,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1176:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1175:17:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 285,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 284,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 293,
|
|
"src": "1216:4:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 283,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1216:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1215:6:3"
|
|
},
|
|
"scope": 570,
|
|
"src": "1156:308:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 326,
|
|
"nodeType": "Block",
|
|
"src": "2436:232:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 308,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 304,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967268,
|
|
"src": "2459:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Address_$570",
|
|
"typeString": "library Address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_Address_$570",
|
|
"typeString": "library Address"
|
|
}
|
|
],
|
|
"id": 303,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2451:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 302,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2451:7:3",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 305,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2451:13:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 306,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2465:7:3",
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2451:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"id": 307,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 298,
|
|
"src": "2476:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2451:31:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365",
|
|
"id": 309,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2484:31:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9",
|
|
"typeString": "literal_string \"Address: insufficient balance\""
|
|
},
|
|
"value": "Address: insufficient balance"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9",
|
|
"typeString": "literal_string \"Address: insufficient balance\""
|
|
}
|
|
],
|
|
"id": 301,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "2443:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 310,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2443:73:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 311,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2443:73:3"
|
|
},
|
|
{
|
|
"assignments": [
|
|
313,
|
|
null
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 313,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "2531:7:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 326,
|
|
"src": "2526:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 312,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2526:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
null
|
|
],
|
|
"id": 320,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"hexValue": "",
|
|
"id": 318,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2574:2:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
},
|
|
"value": ""
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
|
|
"typeString": "literal_string \"\""
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 314,
|
|
"name": "recipient",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 296,
|
|
"src": "2544:9:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"id": 315,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2554:4:3",
|
|
"memberName": "call",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2544:14:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 317,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"names": [
|
|
"value"
|
|
],
|
|
"nodeType": "FunctionCallOptions",
|
|
"options": [
|
|
{
|
|
"id": 316,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 298,
|
|
"src": "2566:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"src": "2544:29:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value",
|
|
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 319,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2544:33:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "tuple(bool,bytes memory)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2525:52:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 322,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 313,
|
|
"src": "2592:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564",
|
|
"id": 323,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2601:60:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae",
|
|
"typeString": "literal_string \"Address: unable to send value, recipient may have reverted\""
|
|
},
|
|
"value": "Address: unable to send value, recipient may have reverted"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae",
|
|
"typeString": "literal_string \"Address: unable to send value, recipient may have reverted\""
|
|
}
|
|
],
|
|
"id": 321,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "2584:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 324,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2584:78:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 325,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2584:78:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 294,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1470:891:3",
|
|
"text": " @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n `recipient`, forwarding all available gas and reverting on errors.\n https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n of certain opcodes, possibly making contracts go over the 2300 gas limit\n imposed by `transfer`, making them unable to receive funds via\n `transfer`. {sendValue} removes this limitation.\n https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n IMPORTANT: because control is transferred to `recipient`, care must be\n taken to not create reentrancy vulnerabilities. Consider using\n {ReentrancyGuard} or the\n https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]."
|
|
},
|
|
"id": 327,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "sendValue",
|
|
"nameLocation": "2374:9:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 299,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 296,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "2400:9:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 327,
|
|
"src": "2384:25:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
},
|
|
"typeName": {
|
|
"id": 295,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2384:15:3",
|
|
"stateMutability": "payable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address_payable",
|
|
"typeString": "address payable"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 298,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "2419:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 327,
|
|
"src": "2411:14:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 297,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2411:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2383:43:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 300,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2436:0:3"
|
|
},
|
|
"scope": 570,
|
|
"src": "2365:303:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 343,
|
|
"nodeType": "Block",
|
|
"src": "3481:80:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 338,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 330,
|
|
"src": "3508:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 339,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 332,
|
|
"src": "3516:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564",
|
|
"id": 340,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3522:32:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df",
|
|
"typeString": "literal_string \"Address: low-level call failed\""
|
|
},
|
|
"value": "Address: low-level call failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df",
|
|
"typeString": "literal_string \"Address: low-level call failed\""
|
|
}
|
|
],
|
|
"id": 337,
|
|
"name": "functionCall",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
344,
|
|
364
|
|
],
|
|
"referencedDeclaration": 364,
|
|
"src": "3495:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 341,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3495:60:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 336,
|
|
"id": 342,
|
|
"nodeType": "Return",
|
|
"src": "3488:67:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 328,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2674:714:3",
|
|
"text": " @dev Performs a Solidity function call using a low level `call`. A\n plain `call` is an unsafe replacement for a function call: use this\n function instead.\n If `target` reverts with a revert reason, it is bubbled up by this\n function (like regular Solidity function calls).\n Returns the raw returned data. To convert to the expected return value,\n use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n Requirements:\n - `target` must be a contract.\n - calling `target` with `data` must not revert.\n _Available since v3.1._"
|
|
},
|
|
"id": 344,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionCall",
|
|
"nameLocation": "3401:12:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 333,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 330,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "3422:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 344,
|
|
"src": "3414:14:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 329,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3414:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 332,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "3443:4:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 344,
|
|
"src": "3430:17:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 331,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3430:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3413:35:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 336,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 335,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 344,
|
|
"src": "3467:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 334,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3467:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3466:14:3"
|
|
},
|
|
"scope": 570,
|
|
"src": "3392:169:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 363,
|
|
"nodeType": "Block",
|
|
"src": "3914:72:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 357,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 347,
|
|
"src": "3950:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 358,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 349,
|
|
"src": "3958:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "30",
|
|
"id": 359,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3964:1:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
{
|
|
"id": 360,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 351,
|
|
"src": "3967:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 356,
|
|
"name": "functionCallWithValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
384,
|
|
434
|
|
],
|
|
"referencedDeclaration": 434,
|
|
"src": "3928:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 361,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3928:52:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 355,
|
|
"id": 362,
|
|
"nodeType": "Return",
|
|
"src": "3921:59:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 345,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3567:206:3",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._"
|
|
},
|
|
"id": 364,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionCall",
|
|
"nameLocation": "3786:12:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 352,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 347,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "3813:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 364,
|
|
"src": "3805:14:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 346,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3805:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 349,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "3839:4:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 364,
|
|
"src": "3826:17:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 348,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3826:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 351,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "3864:12:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 364,
|
|
"src": "3850:26:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 350,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3850:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3798:83:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 355,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 354,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 364,
|
|
"src": "3900:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 353,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3900:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3899:14:3"
|
|
},
|
|
"scope": 570,
|
|
"src": "3777:209:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 383,
|
|
"nodeType": "Block",
|
|
"src": "4470:107:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 377,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 367,
|
|
"src": "4506:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 378,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 369,
|
|
"src": "4514:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 379,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 371,
|
|
"src": "4520:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564",
|
|
"id": 380,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "4527:43:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc",
|
|
"typeString": "literal_string \"Address: low-level call with value failed\""
|
|
},
|
|
"value": "Address: low-level call with value failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc",
|
|
"typeString": "literal_string \"Address: low-level call with value failed\""
|
|
}
|
|
],
|
|
"id": 376,
|
|
"name": "functionCallWithValue",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
384,
|
|
434
|
|
],
|
|
"referencedDeclaration": 434,
|
|
"src": "4484:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 381,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4484:87:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 375,
|
|
"id": 382,
|
|
"nodeType": "Return",
|
|
"src": "4477:94:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 365,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "3992:341:3",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but also transferring `value` wei to `target`.\n Requirements:\n - the calling contract must have an ETH balance of at least `value`.\n - the called Solidity function must be `payable`.\n _Available since v3.1._"
|
|
},
|
|
"id": 384,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionCallWithValue",
|
|
"nameLocation": "4346:21:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 372,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 367,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "4382:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 384,
|
|
"src": "4374:14:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 366,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4374:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 369,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "4408:4:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 384,
|
|
"src": "4395:17:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 368,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4395:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 371,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "4427:5:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 384,
|
|
"src": "4419:13:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 370,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4419:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4367:70:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 375,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 374,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 384,
|
|
"src": "4456:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 373,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4456:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4455:14:3"
|
|
},
|
|
"scope": 570,
|
|
"src": "4337:240:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 433,
|
|
"nodeType": "Block",
|
|
"src": "4985:308:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 405,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 401,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967268,
|
|
"src": "5008:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_Address_$570",
|
|
"typeString": "library Address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_Address_$570",
|
|
"typeString": "library Address"
|
|
}
|
|
],
|
|
"id": 400,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "5000:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 399,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5000:7:3",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 402,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5000:13:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 403,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5014:7:3",
|
|
"memberName": "balance",
|
|
"nodeType": "MemberAccess",
|
|
"src": "5000:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"id": 404,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 391,
|
|
"src": "5025:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "5000:30:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c",
|
|
"id": 406,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5032:40:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c",
|
|
"typeString": "literal_string \"Address: insufficient balance for call\""
|
|
},
|
|
"value": "Address: insufficient balance for call"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c",
|
|
"typeString": "literal_string \"Address: insufficient balance for call\""
|
|
}
|
|
],
|
|
"id": 398,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "4992:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 407,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "4992:81:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 408,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "4992:81:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 411,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 387,
|
|
"src": "5099:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 410,
|
|
"name": "isContract",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 293,
|
|
"src": "5088:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
|
|
"typeString": "function (address) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 412,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5088:18:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374",
|
|
"id": 413,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5108:31:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad",
|
|
"typeString": "literal_string \"Address: call to non-contract\""
|
|
},
|
|
"value": "Address: call to non-contract"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad",
|
|
"typeString": "literal_string \"Address: call to non-contract\""
|
|
}
|
|
],
|
|
"id": 409,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "5080:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 414,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5080:60:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 415,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "5080:60:3"
|
|
},
|
|
{
|
|
"assignments": [
|
|
417,
|
|
419
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 417,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "5155:7:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 433,
|
|
"src": "5150:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 416,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5150:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 419,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "5177:10:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 433,
|
|
"src": "5164:23:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 418,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5164:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 426,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 424,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 389,
|
|
"src": "5217:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 420,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 387,
|
|
"src": "5191:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 421,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "5198:4:3",
|
|
"memberName": "call",
|
|
"nodeType": "MemberAccess",
|
|
"src": "5191:11:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 423,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"names": [
|
|
"value"
|
|
],
|
|
"nodeType": "FunctionCallOptions",
|
|
"options": [
|
|
{
|
|
"id": 422,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 391,
|
|
"src": "5210:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"src": "5191:25:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value",
|
|
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 425,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5191:31:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "tuple(bool,bytes memory)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "5149:73:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 428,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 417,
|
|
"src": "5253:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"id": 429,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 419,
|
|
"src": "5262:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 430,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 393,
|
|
"src": "5274:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 427,
|
|
"name": "verifyCallResult",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 569,
|
|
"src": "5236:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 431,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5236:51:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 397,
|
|
"id": 432,
|
|
"nodeType": "Return",
|
|
"src": "5229:58:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 385,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "4583:232:3",
|
|
"text": " @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n with `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._"
|
|
},
|
|
"id": 434,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionCallWithValue",
|
|
"nameLocation": "4828:21:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 394,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 387,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "4864:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 434,
|
|
"src": "4856:14:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 386,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4856:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 389,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "4890:4:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 434,
|
|
"src": "4877:17:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 388,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4877:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 391,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "4909:5:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 434,
|
|
"src": "4901:13:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 390,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4901:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 393,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "4935:12:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 434,
|
|
"src": "4921:26:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 392,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4921:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4849:103:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 397,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 396,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 434,
|
|
"src": "4971:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 395,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "4971:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "4970:14:3"
|
|
},
|
|
"scope": 570,
|
|
"src": "4819:474:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 450,
|
|
"nodeType": "Block",
|
|
"src": "5579:93:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 445,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 437,
|
|
"src": "5612:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 446,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 439,
|
|
"src": "5620:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564",
|
|
"id": 447,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "5626:39:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0",
|
|
"typeString": "literal_string \"Address: low-level static call failed\""
|
|
},
|
|
"value": "Address: low-level static call failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_90ec82aa826a536a4cbfae44ecfa384680faa9a4b77344bce96aa761ad904df0",
|
|
"typeString": "literal_string \"Address: low-level static call failed\""
|
|
}
|
|
],
|
|
"id": 444,
|
|
"name": "functionStaticCall",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
451,
|
|
486
|
|
],
|
|
"referencedDeclaration": 486,
|
|
"src": "5593:18:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,string memory) view returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 448,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "5593:73:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 443,
|
|
"id": 449,
|
|
"nodeType": "Return",
|
|
"src": "5586:80:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 435,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5299:161:3",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._"
|
|
},
|
|
"id": 451,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionStaticCall",
|
|
"nameLocation": "5473:18:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 440,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 437,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "5506:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 451,
|
|
"src": "5498:14:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 436,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5498:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 439,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "5532:4:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 451,
|
|
"src": "5519:17:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 438,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5519:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5491:50:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 443,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 442,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 451,
|
|
"src": "5565:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 441,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5565:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5564:14:3"
|
|
},
|
|
"scope": 570,
|
|
"src": "5464:208:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 485,
|
|
"nodeType": "Block",
|
|
"src": "5998:219:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 465,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 454,
|
|
"src": "6024:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 464,
|
|
"name": "isContract",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 293,
|
|
"src": "6013:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
|
|
"typeString": "function (address) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 466,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6013:18:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7472616374",
|
|
"id": 467,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6033:38:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9",
|
|
"typeString": "literal_string \"Address: static call to non-contract\""
|
|
},
|
|
"value": "Address: static call to non-contract"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_c79cc78e4f16ce3933a42b84c73868f93bb4a59c031a0acf576679de98c608a9",
|
|
"typeString": "literal_string \"Address: static call to non-contract\""
|
|
}
|
|
],
|
|
"id": 463,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "6005:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 468,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6005:67:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 469,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6005:67:3"
|
|
},
|
|
{
|
|
"assignments": [
|
|
471,
|
|
473
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 471,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "6087:7:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 485,
|
|
"src": "6082:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 470,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6082:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 473,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "6109:10:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 485,
|
|
"src": "6096:23:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 472,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6096:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 478,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 476,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 456,
|
|
"src": "6141:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 474,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 454,
|
|
"src": "6123:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 475,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "6130:10:3",
|
|
"memberName": "staticcall",
|
|
"nodeType": "MemberAccess",
|
|
"src": "6123:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes memory) view returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 477,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6123:23:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "tuple(bool,bytes memory)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6081:65:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 480,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 471,
|
|
"src": "6177:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"id": 481,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 473,
|
|
"src": "6186:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 482,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 458,
|
|
"src": "6198:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 479,
|
|
"name": "verifyCallResult",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 569,
|
|
"src": "6160:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 483,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6160:51:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 462,
|
|
"id": 484,
|
|
"nodeType": "Return",
|
|
"src": "6153:58:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 452,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "5678:168:3",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a static call.\n _Available since v3.3._"
|
|
},
|
|
"id": 486,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionStaticCall",
|
|
"nameLocation": "5859:18:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 459,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 454,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "5892:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 486,
|
|
"src": "5884:14:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 453,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5884:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 456,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "5918:4:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 486,
|
|
"src": "5905:17:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 455,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5905:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 458,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "5943:12:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 486,
|
|
"src": "5929:26:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 457,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5929:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5877:83:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 462,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 461,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 486,
|
|
"src": "5984:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 460,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "5984:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "5983:14:3"
|
|
},
|
|
"scope": 570,
|
|
"src": "5850:367:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 502,
|
|
"nodeType": "Block",
|
|
"src": "6487:97:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 497,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 489,
|
|
"src": "6522:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 498,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 491,
|
|
"src": "6530:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564",
|
|
"id": 499,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6536:41:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398",
|
|
"typeString": "literal_string \"Address: low-level delegate call failed\""
|
|
},
|
|
"value": "Address: low-level delegate call failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_9fdcd12e4b726339b32a442b0a448365d5d85c96b2d2cff917b4f66c63110398",
|
|
"typeString": "literal_string \"Address: low-level delegate call failed\""
|
|
}
|
|
],
|
|
"id": 496,
|
|
"name": "functionDelegateCall",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
503,
|
|
538
|
|
],
|
|
"referencedDeclaration": 538,
|
|
"src": "6501:20:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (address,bytes memory,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 500,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6501:77:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 495,
|
|
"id": 501,
|
|
"nodeType": "Return",
|
|
"src": "6494:84:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 487,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6223:163:3",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._"
|
|
},
|
|
"id": 503,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionDelegateCall",
|
|
"nameLocation": "6399:20:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 492,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 489,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "6428:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 503,
|
|
"src": "6420:14:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 488,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6420:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 491,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "6449:4:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 503,
|
|
"src": "6436:17:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 490,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6436:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6419:35:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 495,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 494,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 503,
|
|
"src": "6473:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 493,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6473:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6472:14:3"
|
|
},
|
|
"scope": 570,
|
|
"src": "6390:194:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 537,
|
|
"nodeType": "Block",
|
|
"src": "6909:223:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 517,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 506,
|
|
"src": "6935:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 516,
|
|
"name": "isContract",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 293,
|
|
"src": "6924:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
|
|
"typeString": "function (address) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 518,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6924:18:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6e7472616374",
|
|
"id": 519,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "6944:40:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520",
|
|
"typeString": "literal_string \"Address: delegate call to non-contract\""
|
|
},
|
|
"value": "Address: delegate call to non-contract"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_b94ded0918034cf8f896e19fa3cfdef1188cd569c577264a3622e49152f88520",
|
|
"typeString": "literal_string \"Address: delegate call to non-contract\""
|
|
}
|
|
],
|
|
"id": 515,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "6916:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 520,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "6916:69:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 521,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "6916:69:3"
|
|
},
|
|
{
|
|
"assignments": [
|
|
523,
|
|
525
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 523,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "7000:7:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 537,
|
|
"src": "6995:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 522,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6995:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 525,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "7022:10:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 537,
|
|
"src": "7009:23:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 524,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7009:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 530,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 528,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 508,
|
|
"src": "7056:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 526,
|
|
"name": "target",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 506,
|
|
"src": "7036:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 527,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7043:12:3",
|
|
"memberName": "delegatecall",
|
|
"nodeType": "MemberAccess",
|
|
"src": "7036:19:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes memory) returns (bool,bytes memory)"
|
|
}
|
|
},
|
|
"id": 529,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7036:25:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
|
|
"typeString": "tuple(bool,bytes memory)"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "6994:67:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 532,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 523,
|
|
"src": "7092:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"id": 533,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 525,
|
|
"src": "7101:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"id": 534,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 510,
|
|
"src": "7113:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 531,
|
|
"name": "verifyCallResult",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 569,
|
|
"src": "7075:16:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$_t_bool_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bool,bytes memory,string memory) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 535,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7075:51:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 514,
|
|
"id": 536,
|
|
"nodeType": "Return",
|
|
"src": "7068:58:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 504,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "6590:170:3",
|
|
"text": " @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n but performing a delegate call.\n _Available since v3.4._"
|
|
},
|
|
"id": 538,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "functionDelegateCall",
|
|
"nameLocation": "6773:20:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 511,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 506,
|
|
"mutability": "mutable",
|
|
"name": "target",
|
|
"nameLocation": "6808:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 538,
|
|
"src": "6800:14:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 505,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6800:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 508,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "6834:4:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 538,
|
|
"src": "6821:17:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 507,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6821:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 510,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "6859:12:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 538,
|
|
"src": "6845:26:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 509,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6845:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6793:83:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 514,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 513,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 538,
|
|
"src": "6895:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 512,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "6895:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "6894:14:3"
|
|
},
|
|
"scope": 570,
|
|
"src": "6764:368:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 568,
|
|
"nodeType": "Block",
|
|
"src": "7496:452:3",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"id": 550,
|
|
"name": "success",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 541,
|
|
"src": "7507:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 566,
|
|
"nodeType": "Block",
|
|
"src": "7556:387:3",
|
|
"statements": [
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 557,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 554,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 543,
|
|
"src": "7630:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 555,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "7641:6:3",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "7630:17:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 556,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "7650:1:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "7630:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"falseBody": {
|
|
"id": 564,
|
|
"nodeType": "Block",
|
|
"src": "7895:41:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 561,
|
|
"name": "errorMessage",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 545,
|
|
"src": "7913:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string memory"
|
|
}
|
|
],
|
|
"id": 560,
|
|
"name": "revert",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967277,
|
|
4294967277
|
|
],
|
|
"referencedDeclaration": 4294967277,
|
|
"src": "7906:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (string memory) pure"
|
|
}
|
|
},
|
|
"id": 562,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "7906:20:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 563,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "7906:20:3"
|
|
}
|
|
]
|
|
},
|
|
"id": 565,
|
|
"nodeType": "IfStatement",
|
|
"src": "7626:310:3",
|
|
"trueBody": {
|
|
"id": 559,
|
|
"nodeType": "Block",
|
|
"src": "7653:236:3",
|
|
"statements": [
|
|
{
|
|
"AST": {
|
|
"nativeSrc": "7760:120:3",
|
|
"nodeType": "YulBlock",
|
|
"src": "7760:120:3",
|
|
"statements": [
|
|
{
|
|
"nativeSrc": "7773:40:3",
|
|
"nodeType": "YulVariableDeclaration",
|
|
"src": "7773:40:3",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"name": "returndata",
|
|
"nativeSrc": "7802:10:3",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7802:10:3"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mload",
|
|
"nativeSrc": "7796:5:3",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7796:5:3"
|
|
},
|
|
"nativeSrc": "7796:17:3",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "7796:17:3"
|
|
},
|
|
"variables": [
|
|
{
|
|
"name": "returndata_size",
|
|
"nativeSrc": "7777:15:3",
|
|
"nodeType": "YulTypedName",
|
|
"src": "7777:15:3",
|
|
"type": ""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "7836:2:3",
|
|
"nodeType": "YulLiteral",
|
|
"src": "7836:2:3",
|
|
"type": "",
|
|
"value": "32"
|
|
},
|
|
{
|
|
"name": "returndata",
|
|
"nativeSrc": "7840:10:3",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7840:10:3"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nativeSrc": "7832:3:3",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7832:3:3"
|
|
},
|
|
"nativeSrc": "7832:19:3",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "7832:19:3"
|
|
},
|
|
{
|
|
"name": "returndata_size",
|
|
"nativeSrc": "7853:15:3",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7853:15:3"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "revert",
|
|
"nativeSrc": "7825:6:3",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "7825:6:3"
|
|
},
|
|
"nativeSrc": "7825:44:3",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "7825:44:3"
|
|
},
|
|
"nativeSrc": "7825:44:3",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "7825:44:3"
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "cancun",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 543,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "7802:10:3",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 543,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "7840:10:3",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 558,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "7751:129:3"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"id": 567,
|
|
"nodeType": "IfStatement",
|
|
"src": "7503:440:3",
|
|
"trueBody": {
|
|
"id": 553,
|
|
"nodeType": "Block",
|
|
"src": "7516:34:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 551,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 543,
|
|
"src": "7532:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"functionReturnParameters": 549,
|
|
"id": 552,
|
|
"nodeType": "Return",
|
|
"src": "7525:17:3"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 539,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "7138:204:3",
|
|
"text": " @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n revert reason using the provided one.\n _Available since v4.3._"
|
|
},
|
|
"id": 569,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "verifyCallResult",
|
|
"nameLocation": "7355:16:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 546,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 541,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "7383:7:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 569,
|
|
"src": "7378:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 540,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7378:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 543,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "7410:10:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 569,
|
|
"src": "7397:23:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 542,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7397:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 545,
|
|
"mutability": "mutable",
|
|
"name": "errorMessage",
|
|
"nameLocation": "7441:12:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 569,
|
|
"src": "7427:26:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_memory_ptr",
|
|
"typeString": "string"
|
|
},
|
|
"typeName": {
|
|
"id": 544,
|
|
"name": "string",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7427:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_string_storage_ptr",
|
|
"typeString": "string"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7371:87:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 549,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 548,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 569,
|
|
"src": "7482:12:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 547,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "7482:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "7481:14:3"
|
|
},
|
|
"scope": 570,
|
|
"src": "7346:602:3",
|
|
"stateMutability": "pure",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 571,
|
|
"src": "202:7749:3",
|
|
"usedErrors": [],
|
|
"usedEvents": []
|
|
}
|
|
],
|
|
"src": "104:7849:3"
|
|
},
|
|
"id": 3
|
|
},
|
|
"contracts/treasury/libs/ReentrancyGuard.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/treasury/libs/ReentrancyGuard.sol",
|
|
"exportedSymbols": {
|
|
"ReentrancyGuard": [
|
|
610
|
|
]
|
|
},
|
|
"id": 611,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 572,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "100:23:4"
|
|
},
|
|
{
|
|
"abstract": true,
|
|
"baseContracts": [],
|
|
"canonicalName": "ReentrancyGuard",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 573,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "127:765:4",
|
|
"text": " @dev Contract module that helps prevent reentrant calls to a function.\n Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n available, which can be applied to functions to make sure there are no nested\n (reentrant) calls to them.\n Note that because there is a single `nonReentrant` guard, functions marked as\n `nonReentrant` may not call one another. This can be worked around by making\n those functions `private`, and then adding `external` `nonReentrant` entry\n points to them.\n TIP: If you would like to learn more about reentrancy and alternative ways\n to protect against it, check out our blog post\n https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]."
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 610,
|
|
"linearizedBaseContracts": [
|
|
610
|
|
],
|
|
"name": "ReentrancyGuard",
|
|
"nameLocation": "912:15:4",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": true,
|
|
"id": 576,
|
|
"mutability": "constant",
|
|
"name": "_NOT_ENTERED",
|
|
"nameLocation": "1697:12:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 610,
|
|
"src": "1672:41:4",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 574,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1672:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"hexValue": "31",
|
|
"id": 575,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1712:1:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_1_by_1",
|
|
"typeString": "int_const 1"
|
|
},
|
|
"value": "1"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": true,
|
|
"id": 579,
|
|
"mutability": "constant",
|
|
"name": "_ENTERED",
|
|
"nameLocation": "1743:8:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 610,
|
|
"src": "1718:37:4",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 577,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1718:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"hexValue": "32",
|
|
"id": 578,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1754:1:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_2_by_1",
|
|
"typeString": "int_const 2"
|
|
},
|
|
"value": "2"
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 581,
|
|
"mutability": "mutable",
|
|
"name": "_status",
|
|
"nameLocation": "1778:7:4",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 610,
|
|
"src": "1762:23:4",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 580,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1762:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 588,
|
|
"nodeType": "Block",
|
|
"src": "1806:35:4",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 586,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 584,
|
|
"name": "_status",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 581,
|
|
"src": "1813:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 585,
|
|
"name": "_NOT_ENTERED",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 576,
|
|
"src": "1823:12:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1813:22:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 587,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1813:22:4"
|
|
}
|
|
]
|
|
},
|
|
"id": 589,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 582,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1803:2:4"
|
|
},
|
|
"returnParameters": {
|
|
"id": 583,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1806:0:4"
|
|
},
|
|
"scope": 610,
|
|
"src": "1792:49:4",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 608,
|
|
"nodeType": "Block",
|
|
"src": "2235:399:4",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 595,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 593,
|
|
"name": "_status",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 581,
|
|
"src": "2318:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "!=",
|
|
"rightExpression": {
|
|
"id": 594,
|
|
"name": "_ENTERED",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 579,
|
|
"src": "2329:8:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2318:19:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "5265656e7472616e637947756172643a207265656e7472616e742063616c6c",
|
|
"id": 596,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2339:33:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619",
|
|
"typeString": "literal_string \"ReentrancyGuard: reentrant call\""
|
|
},
|
|
"value": "ReentrancyGuard: reentrant call"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619",
|
|
"typeString": "literal_string \"ReentrancyGuard: reentrant call\""
|
|
}
|
|
],
|
|
"id": 592,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "2310:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 597,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2310:63:4",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 598,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2310:63:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 601,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 599,
|
|
"name": "_status",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 581,
|
|
"src": "2443:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 600,
|
|
"name": "_ENTERED",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 579,
|
|
"src": "2453:8:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2443:18:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 602,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2443:18:4"
|
|
},
|
|
{
|
|
"id": 603,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "2470:1:4"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 606,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 604,
|
|
"name": "_status",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 581,
|
|
"src": "2606:7:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 605,
|
|
"name": "_NOT_ENTERED",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 576,
|
|
"src": "2616:12:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2606:22:4",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 607,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2606:22:4"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 590,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1847:360:4",
|
|
"text": " @dev Prevents a contract from calling itself, directly or indirectly.\n Calling a `nonReentrant` function from another `nonReentrant`\n function is not supported. It is possible to prevent this from happening\n by making the `nonReentrant` function external, and making it call a\n `private` function that does the actual work."
|
|
},
|
|
"id": 609,
|
|
"name": "nonReentrant",
|
|
"nameLocation": "2220:12:4",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 591,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2232:2:4"
|
|
},
|
|
"src": "2211:423:4",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"scope": 611,
|
|
"src": "894:1743:4",
|
|
"usedErrors": [],
|
|
"usedEvents": []
|
|
}
|
|
],
|
|
"src": "100:2539:4"
|
|
},
|
|
"id": 4
|
|
},
|
|
"contracts/treasury/libs/SafeERC20.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/treasury/libs/SafeERC20.sol",
|
|
"exportedSymbols": {
|
|
"Address": [
|
|
570
|
|
],
|
|
"IERC20": [
|
|
77
|
|
],
|
|
"SafeERC20": [
|
|
836
|
|
]
|
|
},
|
|
"id": 837,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 612,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "103:23:5"
|
|
},
|
|
{
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"file": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"id": 614,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 837,
|
|
"sourceUnit": 78,
|
|
"src": "130:94:5",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 613,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 77,
|
|
"src": "138:6:5",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "contracts/treasury/libs/Address.sol",
|
|
"file": "./Address.sol",
|
|
"id": 616,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 837,
|
|
"sourceUnit": 571,
|
|
"src": "226:38:5",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 615,
|
|
"name": "Address",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 570,
|
|
"src": "234:7:5",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "SafeERC20",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"documentation": {
|
|
"id": 617,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "268:465:5",
|
|
"text": " @title SafeERC20\n @dev Wrappers around ERC20 operations that throw on failure (when the token\n contract returns false). Tokens that return no value (and instead revert or\n throw on failure) are also supported, non-reverting calls are assumed to be\n successful.\n To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n which allows you to call the safe operations as `token.safeTransfer(...)`, etc."
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 836,
|
|
"linearizedBaseContracts": [
|
|
836
|
|
],
|
|
"name": "SafeERC20",
|
|
"nameLocation": "743:9:5",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"global": false,
|
|
"id": 620,
|
|
"libraryName": {
|
|
"id": 618,
|
|
"name": "Address",
|
|
"nameLocations": [
|
|
"764:7:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 570,
|
|
"src": "764:7:5"
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "758:26:5",
|
|
"typeName": {
|
|
"id": 619,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "776:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 642,
|
|
"nodeType": "Block",
|
|
"src": "862:99:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 631,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 623,
|
|
"src": "889:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"id": 634,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 623,
|
|
"src": "919:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 635,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "925:8:5",
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 26,
|
|
"src": "919:14:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 636,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "934:8:5",
|
|
"memberName": "selector",
|
|
"nodeType": "MemberAccess",
|
|
"src": "919:23:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
{
|
|
"id": 637,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 625,
|
|
"src": "944:2:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 638,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 627,
|
|
"src": "948:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 632,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967295,
|
|
"src": "896:3:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 633,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "900:18:5",
|
|
"memberName": "encodeWithSelector",
|
|
"nodeType": "MemberAccess",
|
|
"src": "896:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes4) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 639,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "896:58:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 630,
|
|
"name": "_callOptionalReturn",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 835,
|
|
"src": "869:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$77_$_t_bytes_memory_ptr_$returns$__$",
|
|
"typeString": "function (contract IERC20,bytes memory)"
|
|
}
|
|
},
|
|
"id": 640,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "869:86:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 641,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "869:86:5"
|
|
}
|
|
]
|
|
},
|
|
"id": 643,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "safeTransfer",
|
|
"nameLocation": "799:12:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 628,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 623,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "819:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 643,
|
|
"src": "812:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 622,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 621,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"812:6:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 77,
|
|
"src": "812:6:5"
|
|
},
|
|
"referencedDeclaration": 77,
|
|
"src": "812:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 625,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "834:2:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 643,
|
|
"src": "826:10:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 624,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "826:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 627,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "846:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 643,
|
|
"src": "838:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 626,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "838:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "811:41:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 629,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "862:0:5"
|
|
},
|
|
"scope": 836,
|
|
"src": "790:171:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 668,
|
|
"nodeType": "Block",
|
|
"src": "1057:130:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 656,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 646,
|
|
"src": "1092:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"id": 659,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 646,
|
|
"src": "1129:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 660,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1135:12:5",
|
|
"memberName": "transferFrom",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 58,
|
|
"src": "1129:18:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (address,address,uint256) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 661,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1148:8:5",
|
|
"memberName": "selector",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1129:27:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
{
|
|
"id": 662,
|
|
"name": "from",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 648,
|
|
"src": "1158:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 663,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 650,
|
|
"src": "1164:2:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 664,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 652,
|
|
"src": "1168:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 657,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967295,
|
|
"src": "1106:3:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 658,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1110:18:5",
|
|
"memberName": "encodeWithSelector",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1106:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes4) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 665,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1106:68:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 655,
|
|
"name": "_callOptionalReturn",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 835,
|
|
"src": "1064:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$77_$_t_bytes_memory_ptr_$returns$__$",
|
|
"typeString": "function (contract IERC20,bytes memory)"
|
|
}
|
|
},
|
|
"id": 666,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1064:117:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 667,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1064:117:5"
|
|
}
|
|
]
|
|
},
|
|
"id": 669,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "safeTransferFrom",
|
|
"nameLocation": "976:16:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 653,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 646,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "1000:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 669,
|
|
"src": "993:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 645,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 644,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"993:6:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 77,
|
|
"src": "993:6:5"
|
|
},
|
|
"referencedDeclaration": 77,
|
|
"src": "993:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 648,
|
|
"mutability": "mutable",
|
|
"name": "from",
|
|
"nameLocation": "1015:4:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 669,
|
|
"src": "1007:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 647,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1007:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 650,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "1029:2:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 669,
|
|
"src": "1021:10:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 649,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1021:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 652,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "1041:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 669,
|
|
"src": "1033:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 651,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1033:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "992:55:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 654,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1057:0:5"
|
|
},
|
|
"scope": 836,
|
|
"src": "967:220:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 712,
|
|
"nodeType": "Block",
|
|
"src": "1516:468:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"id": 696,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 683,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 681,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 677,
|
|
"src": "1748:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 682,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1757:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1748:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"id": 684,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "1747:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "||",
|
|
"rightExpression": {
|
|
"components": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 694,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 689,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967268,
|
|
"src": "1788:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeERC20_$836",
|
|
"typeString": "library SafeERC20"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_SafeERC20_$836",
|
|
"typeString": "library SafeERC20"
|
|
}
|
|
],
|
|
"id": 688,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "1780:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 687,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1780:7:5",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 690,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1780:13:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 691,
|
|
"name": "spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 675,
|
|
"src": "1795:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 685,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 673,
|
|
"src": "1764:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 686,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1770:9:5",
|
|
"memberName": "allowance",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 36,
|
|
"src": "1764:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$",
|
|
"typeString": "function (address,address) view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 692,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1764:39:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 693,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1807:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "1764:44:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
}
|
|
],
|
|
"id": 695,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "1763:46:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"src": "1747:62:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365",
|
|
"id": 697,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1818:56:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25",
|
|
"typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\""
|
|
},
|
|
"value": "SafeERC20: approve from non-zero to non-zero allowance"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25",
|
|
"typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\""
|
|
}
|
|
],
|
|
"id": 680,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1731:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 698,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1731:150:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 699,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1731:150:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 701,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 673,
|
|
"src": "1908:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"id": 704,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 673,
|
|
"src": "1938:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 705,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1944:7:5",
|
|
"memberName": "approve",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 46,
|
|
"src": "1938:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 706,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1952:8:5",
|
|
"memberName": "selector",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1938:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
{
|
|
"id": 707,
|
|
"name": "spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 675,
|
|
"src": "1962:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 708,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 677,
|
|
"src": "1971:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 702,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967295,
|
|
"src": "1915:3:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 703,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1919:18:5",
|
|
"memberName": "encodeWithSelector",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1915:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes4) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 709,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1915:62:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 700,
|
|
"name": "_callOptionalReturn",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 835,
|
|
"src": "1888:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$77_$_t_bytes_memory_ptr_$returns$__$",
|
|
"typeString": "function (contract IERC20,bytes memory)"
|
|
}
|
|
},
|
|
"id": 710,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1888:90:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 711,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1888:90:5"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 670,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1193:243:5",
|
|
"text": " @dev Deprecated. This function has issues similar to the ones found in\n {IERC20-approve}, and its usage is discouraged.\n Whenever possible, use {safeIncreaseAllowance} and\n {safeDecreaseAllowance} instead."
|
|
},
|
|
"id": 713,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "safeApprove",
|
|
"nameLocation": "1449:11:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 678,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 673,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "1468:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 713,
|
|
"src": "1461:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 672,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 671,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"1461:6:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 77,
|
|
"src": "1461:6:5"
|
|
},
|
|
"referencedDeclaration": 77,
|
|
"src": "1461:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 675,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nameLocation": "1483:7:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 713,
|
|
"src": "1475:15:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 674,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1475:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 677,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "1500:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 713,
|
|
"src": "1492:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 676,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1492:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1460:46:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 679,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1516:0:5"
|
|
},
|
|
"scope": 836,
|
|
"src": "1440:544:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 748,
|
|
"nodeType": "Block",
|
|
"src": "2076:208:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
724
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 724,
|
|
"mutability": "mutable",
|
|
"name": "newAllowance",
|
|
"nameLocation": "2091:12:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 748,
|
|
"src": "2083:20:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 723,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2083:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 735,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 734,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 729,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967268,
|
|
"src": "2130:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeERC20_$836",
|
|
"typeString": "library SafeERC20"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_SafeERC20_$836",
|
|
"typeString": "library SafeERC20"
|
|
}
|
|
],
|
|
"id": 728,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2122:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 727,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2122:7:5",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 730,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2122:13:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 731,
|
|
"name": "spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 718,
|
|
"src": "2137:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 725,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 716,
|
|
"src": "2106:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 726,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2112:9:5",
|
|
"memberName": "allowance",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 36,
|
|
"src": "2106:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$",
|
|
"typeString": "function (address,address) view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 732,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2106:39:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "+",
|
|
"rightExpression": {
|
|
"id": 733,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 720,
|
|
"src": "2148:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2106:47:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2083:70:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 737,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 716,
|
|
"src": "2188:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"id": 740,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 716,
|
|
"src": "2225:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 741,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2231:7:5",
|
|
"memberName": "approve",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 46,
|
|
"src": "2225:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 742,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2239:8:5",
|
|
"memberName": "selector",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2225:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
{
|
|
"id": 743,
|
|
"name": "spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 718,
|
|
"src": "2249:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 744,
|
|
"name": "newAllowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 724,
|
|
"src": "2258:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 738,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967295,
|
|
"src": "2202:3:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 739,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2206:18:5",
|
|
"memberName": "encodeWithSelector",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2202:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes4) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 745,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2202:69:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 736,
|
|
"name": "_callOptionalReturn",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 835,
|
|
"src": "2160:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$77_$_t_bytes_memory_ptr_$returns$__$",
|
|
"typeString": "function (contract IERC20,bytes memory)"
|
|
}
|
|
},
|
|
"id": 746,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2160:118:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 747,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2160:118:5"
|
|
}
|
|
]
|
|
},
|
|
"id": 749,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "safeIncreaseAllowance",
|
|
"nameLocation": "1999:21:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 721,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 716,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "2028:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 749,
|
|
"src": "2021:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 715,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 714,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"2021:6:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 77,
|
|
"src": "2021:6:5"
|
|
},
|
|
"referencedDeclaration": 77,
|
|
"src": "2021:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 718,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nameLocation": "2043:7:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 749,
|
|
"src": "2035:15:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 717,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2035:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 720,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "2060:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 749,
|
|
"src": "2052:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 719,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2052:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2020:46:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 722,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2076:0:5"
|
|
},
|
|
"scope": 836,
|
|
"src": "1990:294:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 796,
|
|
"nodeType": "Block",
|
|
"src": "2376:370:5",
|
|
"statements": [
|
|
{
|
|
"id": 795,
|
|
"nodeType": "UncheckedBlock",
|
|
"src": "2383:358:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
760
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 760,
|
|
"mutability": "mutable",
|
|
"name": "oldAllowance",
|
|
"nameLocation": "2410:12:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 795,
|
|
"src": "2402:20:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 759,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2402:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 769,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 765,
|
|
"name": "this",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967268,
|
|
"src": "2449:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_SafeERC20_$836",
|
|
"typeString": "library SafeERC20"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_SafeERC20_$836",
|
|
"typeString": "library SafeERC20"
|
|
}
|
|
],
|
|
"id": 764,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "2441:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 763,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2441:7:5",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 766,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2441:13:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 767,
|
|
"name": "spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 754,
|
|
"src": "2456:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 761,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 752,
|
|
"src": "2425:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 762,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2431:9:5",
|
|
"memberName": "allowance",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 36,
|
|
"src": "2425:15:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$",
|
|
"typeString": "function (address,address) view external returns (uint256)"
|
|
}
|
|
},
|
|
"id": 768,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2425:39:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2402:62:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 773,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 771,
|
|
"name": "oldAllowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 760,
|
|
"src": "2481:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">=",
|
|
"rightExpression": {
|
|
"id": 772,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 756,
|
|
"src": "2497:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2481:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f",
|
|
"id": 774,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "2504:43:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a",
|
|
"typeString": "literal_string \"SafeERC20: decreased allowance below zero\""
|
|
},
|
|
"value": "SafeERC20: decreased allowance below zero"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a",
|
|
"typeString": "literal_string \"SafeERC20: decreased allowance below zero\""
|
|
}
|
|
],
|
|
"id": 770,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "2473:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 775,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2473:75:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 776,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2473:75:5"
|
|
},
|
|
{
|
|
"assignments": [
|
|
778
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 778,
|
|
"mutability": "mutable",
|
|
"name": "newAllowance",
|
|
"nameLocation": "2565:12:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 795,
|
|
"src": "2557:20:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 777,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2557:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 782,
|
|
"initialValue": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 781,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 779,
|
|
"name": "oldAllowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 760,
|
|
"src": "2580:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "-",
|
|
"rightExpression": {
|
|
"id": 780,
|
|
"name": "value",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 756,
|
|
"src": "2595:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "2580:20:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "2557:43:5"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 784,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 752,
|
|
"src": "2639:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"expression": {
|
|
"id": 787,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 752,
|
|
"src": "2678:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 788,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2684:7:5",
|
|
"memberName": "approve",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 46,
|
|
"src": "2678:13:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 789,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2692:8:5",
|
|
"memberName": "selector",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2678:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
{
|
|
"id": 790,
|
|
"name": "spender",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 754,
|
|
"src": "2702:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 791,
|
|
"name": "newAllowance",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 778,
|
|
"src": "2711:12:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 785,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967295,
|
|
"src": "2655:3:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 786,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "2659:18:5",
|
|
"memberName": "encodeWithSelector",
|
|
"nodeType": "MemberAccess",
|
|
"src": "2655:22:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
|
|
"typeString": "function (bytes4) pure returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 792,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2655:69:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
],
|
|
"id": 783,
|
|
"name": "_callOptionalReturn",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 835,
|
|
"src": "2609:19:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$77_$_t_bytes_memory_ptr_$returns$__$",
|
|
"typeString": "function (contract IERC20,bytes memory)"
|
|
}
|
|
},
|
|
"id": 793,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "2609:124:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 794,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "2609:124:5"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"id": 797,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "safeDecreaseAllowance",
|
|
"nameLocation": "2299:21:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 757,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 752,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "2328:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 797,
|
|
"src": "2321:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 751,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 750,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"2321:6:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 77,
|
|
"src": "2321:6:5"
|
|
},
|
|
"referencedDeclaration": 77,
|
|
"src": "2321:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 754,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nameLocation": "2343:7:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 797,
|
|
"src": "2335:15:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 753,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2335:7:5",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 756,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "2360:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 797,
|
|
"src": "2352:13:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 755,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2352:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2320:46:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 758,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "2376:0:5"
|
|
},
|
|
"scope": 836,
|
|
"src": "2290:456:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 834,
|
|
"nodeType": "Block",
|
|
"src": "3193:608:5",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
807
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 807,
|
|
"mutability": "mutable",
|
|
"name": "returndata",
|
|
"nameLocation": "3544:10:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 834,
|
|
"src": "3531:23:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 806,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3531:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 816,
|
|
"initialValue": {
|
|
"arguments": [
|
|
{
|
|
"id": 813,
|
|
"name": "data",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 803,
|
|
"src": "3585:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564",
|
|
"id": 814,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3591:34:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b",
|
|
"typeString": "literal_string \"SafeERC20: low-level call failed\""
|
|
},
|
|
"value": "SafeERC20: low-level call failed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b",
|
|
"typeString": "literal_string \"SafeERC20: low-level call failed\""
|
|
}
|
|
],
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 810,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 801,
|
|
"src": "3565:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
],
|
|
"id": 809,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "3557:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_address_$",
|
|
"typeString": "type(address)"
|
|
},
|
|
"typeName": {
|
|
"id": 808,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3557:7:5",
|
|
"typeDescriptions": {}
|
|
}
|
|
},
|
|
"id": 811,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3557:14:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 812,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3572:12:5",
|
|
"memberName": "functionCall",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 364,
|
|
"src": "3557:27:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$attached_to$_t_address_$",
|
|
"typeString": "function (address,bytes memory,string memory) returns (bytes memory)"
|
|
}
|
|
},
|
|
"id": 815,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3557:69:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "3531:95:5"
|
|
},
|
|
{
|
|
"condition": {
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 820,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 817,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 807,
|
|
"src": "3637:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
"id": 818,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3648:6:5",
|
|
"memberName": "length",
|
|
"nodeType": "MemberAccess",
|
|
"src": "3637:17:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"hexValue": "30",
|
|
"id": 819,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3657:1:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"src": "3637:21:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"id": 833,
|
|
"nodeType": "IfStatement",
|
|
"src": "3633:163:5",
|
|
"trueBody": {
|
|
"id": 832,
|
|
"nodeType": "Block",
|
|
"src": "3660:136:5",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 824,
|
|
"name": "returndata",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 807,
|
|
"src": "3722:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
}
|
|
},
|
|
{
|
|
"components": [
|
|
{
|
|
"id": 826,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "ElementaryTypeNameExpression",
|
|
"src": "3735:4:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_bool_$",
|
|
"typeString": "type(bool)"
|
|
},
|
|
"typeName": {
|
|
"id": 825,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3735:4:5",
|
|
"typeDescriptions": {}
|
|
}
|
|
}
|
|
],
|
|
"id": 827,
|
|
"isConstant": false,
|
|
"isInlineArray": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"nodeType": "TupleExpression",
|
|
"src": "3734:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_bool_$",
|
|
"typeString": "type(bool)"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes memory"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_type$_t_bool_$",
|
|
"typeString": "type(bool)"
|
|
}
|
|
],
|
|
"expression": {
|
|
"id": 822,
|
|
"name": "abi",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967295,
|
|
"src": "3711:3:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_abi",
|
|
"typeString": "abi"
|
|
}
|
|
},
|
|
"id": 823,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"lValueRequested": false,
|
|
"memberLocation": "3715:6:5",
|
|
"memberName": "decode",
|
|
"nodeType": "MemberAccess",
|
|
"src": "3711:10:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
|
|
"typeString": "function () pure"
|
|
}
|
|
},
|
|
"id": 828,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3711:30:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564",
|
|
"id": 829,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "3743:44:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd",
|
|
"typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\""
|
|
},
|
|
"value": "SafeERC20: ERC20 operation did not succeed"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd",
|
|
"typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\""
|
|
}
|
|
],
|
|
"id": 821,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "3703:7:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 830,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "3703:85:5",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 831,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "3703:85:5"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 798,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2752:367:5",
|
|
"text": " @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n on the return value: the return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param data The call data (encoded using abi.encode or one of its variants)."
|
|
},
|
|
"id": 835,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "_callOptionalReturn",
|
|
"nameLocation": "3132:19:5",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 804,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 801,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "3159:5:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 835,
|
|
"src": "3152:12:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 800,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 799,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"3152:6:5"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 77,
|
|
"src": "3152:6:5"
|
|
},
|
|
"referencedDeclaration": 77,
|
|
"src": "3152:6:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$77",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 803,
|
|
"mutability": "mutable",
|
|
"name": "data",
|
|
"nameLocation": "3179:4:5",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 835,
|
|
"src": "3166:17:5",
|
|
"stateVariable": false,
|
|
"storageLocation": "memory",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_memory_ptr",
|
|
"typeString": "bytes"
|
|
},
|
|
"typeName": {
|
|
"id": 802,
|
|
"name": "bytes",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "3166:5:5",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes_storage_ptr",
|
|
"typeString": "bytes"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "3151:33:5"
|
|
},
|
|
"returnParameters": {
|
|
"id": 805,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "3193:0:5"
|
|
},
|
|
"scope": 836,
|
|
"src": "3123:678:5",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "private"
|
|
}
|
|
],
|
|
"scope": 837,
|
|
"src": "735:3069:5",
|
|
"usedErrors": [],
|
|
"usedEvents": []
|
|
}
|
|
],
|
|
"src": "103:3703:5"
|
|
},
|
|
"id": 5
|
|
},
|
|
"contracts/treasury/libs/VersionedInitializable.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/treasury/libs/VersionedInitializable.sol",
|
|
"exportedSymbols": {
|
|
"VersionedInitializable": [
|
|
875
|
|
]
|
|
},
|
|
"id": 876,
|
|
"license": "MIT",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 838,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".10"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "33:24:6"
|
|
},
|
|
{
|
|
"abstract": true,
|
|
"baseContracts": [],
|
|
"canonicalName": "VersionedInitializable",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 839,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "61:715:6",
|
|
"text": " @title VersionedInitializable\n @dev Helper contract to support initializer functions. To use it, replace\n the constructor with a function that has the `initializer` modifier.\n WARNING: Unlike constructors, initializer functions must be manually\n invoked. This applies both to deploying an Initializable contract, as well\n as extending an Initializable contract via inheritance.\n WARNING: When used with inheritance, manual care must be taken to not invoke\n a parent initializer twice, or ensure that all initializers are idempotent,\n because this is not dealt with automatically as with constructors.\n @author Aave, inspired by the OpenZeppelin Initializable contract"
|
|
},
|
|
"fullyImplemented": false,
|
|
"id": 875,
|
|
"linearizedBaseContracts": [
|
|
875
|
|
],
|
|
"name": "VersionedInitializable",
|
|
"nameLocation": "796:22:6",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"constant": false,
|
|
"documentation": {
|
|
"id": 840,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "824:71:6",
|
|
"text": " @dev Indicates that the contract has been initialized."
|
|
},
|
|
"id": 843,
|
|
"mutability": "mutable",
|
|
"name": "lastInitializedRevision",
|
|
"nameLocation": "916:23:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 875,
|
|
"src": "899:44:6",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 841,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "899:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"value": {
|
|
"hexValue": "30",
|
|
"id": 842,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "942:1:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_0_by_1",
|
|
"typeString": "int_const 0"
|
|
},
|
|
"value": "0"
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 863,
|
|
"nodeType": "Block",
|
|
"src": "1057:198:6",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
847
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 847,
|
|
"mutability": "mutable",
|
|
"name": "revision",
|
|
"nameLocation": "1072:8:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 863,
|
|
"src": "1064:16:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 846,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1064:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 850,
|
|
"initialValue": {
|
|
"arguments": [],
|
|
"expression": {
|
|
"argumentTypes": [],
|
|
"id": 848,
|
|
"name": "getRevision",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 870,
|
|
"src": "1083:11:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_pure$__$returns$_t_uint256_$",
|
|
"typeString": "function () pure returns (uint256)"
|
|
}
|
|
},
|
|
"id": 849,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1083:13:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1064:32:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"id": 854,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 852,
|
|
"name": "revision",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 847,
|
|
"src": "1111:8:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": ">",
|
|
"rightExpression": {
|
|
"id": 853,
|
|
"name": "lastInitializedRevision",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 843,
|
|
"src": "1122:23:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1111:34:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564",
|
|
"id": 855,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1147:48:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_9fbba6c4dcac9134893b633b9564f36435b3f927c1d5fa152c5c14b20cecb1a4",
|
|
"typeString": "literal_string \"Contract instance has already been initialized\""
|
|
},
|
|
"value": "Contract instance has already been initialized"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_9fbba6c4dcac9134893b633b9564f36435b3f927c1d5fa152c5c14b20cecb1a4",
|
|
"typeString": "literal_string \"Contract instance has already been initialized\""
|
|
}
|
|
],
|
|
"id": 851,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1103:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 856,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1103:93:6",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 857,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1103:93:6"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 860,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 858,
|
|
"name": "lastInitializedRevision",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 843,
|
|
"src": "1205:23:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 859,
|
|
"name": "revision",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 847,
|
|
"src": "1231:8:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"src": "1205:34:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 861,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1205:34:6"
|
|
},
|
|
{
|
|
"id": 862,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1248:1:6"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 844,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "950:80:6",
|
|
"text": " @dev Modifier to use in the initializer function of a contract."
|
|
},
|
|
"id": 864,
|
|
"name": "initializer",
|
|
"nameLocation": "1043:11:6",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 845,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1054:2:6"
|
|
},
|
|
"src": "1034:221:6",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 865,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1261:118:6",
|
|
"text": "@dev returns the revision number of the contract.\n Needs to be defined in the inherited class as a constant."
|
|
},
|
|
"id": 870,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getRevision",
|
|
"nameLocation": "1392:11:6",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 866,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1403:2:6"
|
|
},
|
|
"returnParameters": {
|
|
"id": 869,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 868,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 870,
|
|
"src": "1437:7:6",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 867,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1437:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1436:9:6"
|
|
},
|
|
"scope": 875,
|
|
"src": "1383:63:6",
|
|
"stateMutability": "pure",
|
|
"virtual": true,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 874,
|
|
"mutability": "mutable",
|
|
"name": "______gap",
|
|
"nameLocation": "1544:9:6",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 875,
|
|
"src": "1524:29:6",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$50_storage",
|
|
"typeString": "uint256[50]"
|
|
},
|
|
"typeName": {
|
|
"baseType": {
|
|
"id": 871,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1524:7:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"id": 873,
|
|
"length": {
|
|
"hexValue": "3530",
|
|
"id": 872,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "number",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1532:2:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_rational_50_by_1",
|
|
"typeString": "int_const 50"
|
|
},
|
|
"value": "50"
|
|
},
|
|
"nodeType": "ArrayTypeName",
|
|
"src": "1524:11:6",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_array$_t_uint256_$50_storage_ptr",
|
|
"typeString": "uint256[50]"
|
|
}
|
|
},
|
|
"visibility": "private"
|
|
}
|
|
],
|
|
"scope": 876,
|
|
"src": "778:779:6",
|
|
"usedErrors": [],
|
|
"usedEvents": []
|
|
}
|
|
],
|
|
"src": "33:1526:6"
|
|
},
|
|
"id": 6
|
|
}
|
|
}
|
|
}
|
|
} |