6315 lines
217 KiB
JSON
6315 lines
217 KiB
JSON
{
|
|
"id": "76ef34c0e3b9af3ab56c86196bc64c87",
|
|
"_format": "hh-sol-build-info-1",
|
|
"solcVersion": "0.8.26",
|
|
"solcLongVersion": "0.8.26+commit.8a97fa7a",
|
|
"input": {
|
|
"language": "Solidity",
|
|
"sources": {
|
|
"contracts/rewards/transfer-strategies/TransferStrategyBase.sol": {
|
|
"content": "// SPDX-License-Identifier: AGPL-3.0\r\npragma solidity ^0.8.10;\r\n\r\nimport {ITransferStrategyBase} from '../interfaces/ITransferStrategyBase.sol';\r\nimport {GPv2SafeERC20} from '@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol';\r\nimport {IERC20} from '@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol';\r\n\r\n/**\r\n * @title TransferStrategyStorage\r\n * @author Aave\r\n **/\r\nabstract contract TransferStrategyBase is ITransferStrategyBase {\r\n using GPv2SafeERC20 for IERC20;\r\n\r\n address internal immutable INCENTIVES_CONTROLLER;\r\n address internal immutable REWARDS_ADMIN;\r\n\r\n constructor(address incentivesController, address rewardsAdmin) {\r\n INCENTIVES_CONTROLLER = incentivesController;\r\n REWARDS_ADMIN = rewardsAdmin;\r\n }\r\n\r\n /**\r\n * @dev Modifier for incentives controller only functions\r\n */\r\n modifier onlyIncentivesController() {\r\n require(INCENTIVES_CONTROLLER == msg.sender, 'CALLER_NOT_INCENTIVES_CONTROLLER');\r\n _;\r\n }\r\n\r\n /**\r\n * @dev Modifier for reward admin only functions\r\n */\r\n modifier onlyRewardsAdmin() {\r\n require(msg.sender == REWARDS_ADMIN, 'ONLY_REWARDS_ADMIN');\r\n _;\r\n }\r\n\r\n /// @inheritdoc ITransferStrategyBase\r\n function getIncentivesController() external view override returns (address) {\r\n return INCENTIVES_CONTROLLER;\r\n }\r\n\r\n /// @inheritdoc ITransferStrategyBase\r\n function getRewardsAdmin() external view override returns (address) {\r\n return REWARDS_ADMIN;\r\n }\r\n\r\n /// @inheritdoc ITransferStrategyBase\r\n function performTransfer(\r\n address to,\r\n address reward,\r\n uint256 amount\r\n ) external virtual returns (bool);\r\n\r\n /// @inheritdoc ITransferStrategyBase\r\n function emergencyWithdrawal(\r\n address token,\r\n address to,\r\n uint256 amount\r\n ) external onlyRewardsAdmin {\r\n IERC20(token).safeTransfer(to, amount);\r\n\r\n emit EmergencyWithdrawal(msg.sender, token, to, amount);\r\n }\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"
|
|
},
|
|
"@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol": {
|
|
"content": "// SPDX-License-Identifier: LGPL-3.0-or-later\npragma solidity ^0.8.0;\n\nimport {IERC20} from '../../openzeppelin/contracts/IERC20.sol';\n\n/// @title Gnosis Protocol v2 Safe ERC20 Transfer Library\n/// @author Gnosis Developers\n/// @dev Gas-efficient version of Openzeppelin's SafeERC20 contract.\nlibrary GPv2SafeERC20 {\n /// @dev Wrapper around a call to the ERC20 function `transfer` that reverts\n /// also when the token returns `false`.\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n bytes4 selector_ = token.transfer.selector;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let freeMemoryPointer := mload(0x40)\n mstore(freeMemoryPointer, selector_)\n mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff))\n mstore(add(freeMemoryPointer, 36), value)\n\n if iszero(call(gas(), token, 0, freeMemoryPointer, 68, 0, 0)) {\n returndatacopy(0, 0, returndatasize())\n revert(0, returndatasize())\n }\n }\n\n require(getLastTransferResult(token), 'GPv2: failed transfer');\n }\n\n /// @dev Wrapper around a call to the ERC20 function `transferFrom` that\n /// reverts also when the token returns `false`.\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n bytes4 selector_ = token.transferFrom.selector;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let freeMemoryPointer := mload(0x40)\n mstore(freeMemoryPointer, selector_)\n mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff))\n mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff))\n mstore(add(freeMemoryPointer, 68), value)\n\n if iszero(call(gas(), token, 0, freeMemoryPointer, 100, 0, 0)) {\n returndatacopy(0, 0, returndatasize())\n revert(0, returndatasize())\n }\n }\n\n require(getLastTransferResult(token), 'GPv2: failed transferFrom');\n }\n\n /// @dev Verifies that the last return was a successful `transfer*` call.\n /// This is done by checking that the return data is either empty, or\n /// is a valid ABI encoded boolean.\n function getLastTransferResult(IERC20 token) private view returns (bool success) {\n // NOTE: Inspecting previous return data requires assembly. Note that\n // we write the return data to memory 0 in the case where the return\n // data size is 32, this is OK since the first 64 bytes of memory are\n // reserved by Solidy as a scratch space that can be used within\n // assembly blocks.\n // <https://docs.soliditylang.org/en/v0.7.6/internals/layout_in_memory.html>\n // solhint-disable-next-line no-inline-assembly\n assembly {\n /// @dev Revert with an ABI encoded Solidity error with a message\n /// that fits into 32-bytes.\n ///\n /// An ABI encoded Solidity error has the following memory layout:\n ///\n /// ------------+----------------------------------\n /// byte range | value\n /// ------------+----------------------------------\n /// 0x00..0x04 | selector(\"Error(string)\")\n /// 0x04..0x24 | string offset (always 0x20)\n /// 0x24..0x44 | string length\n /// 0x44..0x64 | string value, padded to 32-bytes\n function revertWithMessage(length, message) {\n mstore(0x00, '\\x08\\xc3\\x79\\xa0')\n mstore(0x04, 0x20)\n mstore(0x24, length)\n mstore(0x44, message)\n revert(0x00, 0x64)\n }\n\n switch returndatasize()\n // Non-standard ERC20 transfer without return.\n case 0 {\n // NOTE: When the return data size is 0, verify that there\n // is code at the address. This is done in order to maintain\n // compatibility with Solidity calling conventions.\n // <https://docs.soliditylang.org/en/v0.7.6/control-structures.html#external-function-calls>\n if iszero(extcodesize(token)) {\n revertWithMessage(20, 'GPv2: not a contract')\n }\n\n success := 1\n }\n // Standard ERC20 transfer returning boolean success value.\n case 32 {\n returndatacopy(0, 0, returndatasize())\n\n // NOTE: For ABI encoding v1, any non-zero value is accepted\n // as `true` for a boolean. In order to stay compatible with\n // OpenZeppelin's `SafeERC20` library which is known to work\n // with the existing ERC20 implementation we care about,\n // make sure we return success for any non-zero return value\n // from the `transfer*` call.\n success := iszero(iszero(mload(0)))\n }\n default {\n revertWithMessage(31, 'GPv2: malformed transfer result')\n }\n }\n }\n}\n"
|
|
},
|
|
"contracts/rewards/interfaces/ITransferStrategyBase.sol": {
|
|
"content": "// SPDX-License-Identifier: AGPL-3.0\r\npragma solidity ^0.8.10;\r\n\r\ninterface ITransferStrategyBase {\r\n event EmergencyWithdrawal(\r\n address indexed caller,\r\n address indexed token,\r\n address indexed to,\r\n uint256 amount\r\n );\r\n\r\n /**\r\n * @dev Perform custom transfer logic via delegate call from source contract to a TransferStrategy implementation\r\n * @param to Account to transfer rewards\r\n * @param reward Address of the reward token\r\n * @param amount Amount to transfer to the \"to\" address parameter\r\n * @return Returns true bool if transfer logic succeeds\r\n */\r\n function performTransfer(address to, address reward, uint256 amount) external returns (bool);\r\n\r\n /**\r\n * @return Returns the address of the Incentives Controller\r\n */\r\n function getIncentivesController() external view returns (address);\r\n\r\n /**\r\n * @return Returns the address of the Rewards admin\r\n */\r\n function getRewardsAdmin() external view returns (address);\r\n\r\n /**\r\n * @dev Perform an emergency token withdrawal only callable by the Rewards admin\r\n * @param token Address of the token to withdraw funds from this contract\r\n * @param to Address of the recipient of the withdrawal\r\n * @param amount Amount of the withdrawal\r\n */\r\n function emergencyWithdrawal(address token, address to, uint256 amount) external;\r\n}\r\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/gnosis/contracts/GPv2SafeERC20.sol": {
|
|
"GPv2SafeERC20": {
|
|
"abi": [],
|
|
"devdoc": {
|
|
"author": "Gnosis Developers",
|
|
"details": "Gas-efficient version of Openzeppelin's SafeERC20 contract.",
|
|
"kind": "dev",
|
|
"methods": {},
|
|
"title": "Gnosis Protocol v2 Safe ERC20 Transfer Library",
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": " /* \"@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol\":293:4724 library GPv2SafeERC20 {... */\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 /* \"@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol\":293:4724 library GPv2SafeERC20 {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212202f4c33345085f5bd705ee6fd9814dba12a20e35fab853a3ec43392e7a6e706a764736f6c634300081a0033\n}\n",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212202f4c33345085f5bd705ee6fd9814dba12a20e35fab853a3ec43392e7a6e706a764736f6c634300081a0033",
|
|
"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 0x2F 0x4C CALLER CALLVALUE POP DUP6 CREATE2 0xBD PUSH17 0x5EE6FD9814DBA12A20E35FAB853A3EC433 SWAP3 0xE7 0xA6 0xE7 MOD 0xA7 PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
|
|
"sourceMap": "293:4431:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212202f4c33345085f5bd705ee6fd9814dba12a20e35fab853a3ec43392e7a6e706a764736f6c634300081a0033",
|
|
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x2F 0x4C CALLER CALLVALUE POP DUP6 CREATE2 0xBD PUSH17 0x5EE6FD9814DBA12A20E35FAB853A3EC433 SWAP3 0xE7 0xA6 0xE7 MOD 0xA7 PUSH5 0x736F6C6343 STOP ADDMOD BYTE STOP CALLER ",
|
|
"sourceMap": "293:4431:0:-:0;;;;;;;;"
|
|
},
|
|
"gasEstimates": {
|
|
"creation": {
|
|
"codeDepositCost": "17000",
|
|
"executionCost": "92",
|
|
"totalCost": "17092"
|
|
},
|
|
"internal": {
|
|
"getLastTransferResult(contract IERC20)": "infinite",
|
|
"safeTransfer(contract IERC20,address,uint256)": "infinite",
|
|
"safeTransferFrom(contract IERC20,address,address,uint256)": "infinite"
|
|
}
|
|
},
|
|
"legacyAssembly": {
|
|
".code": [
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH #[$]",
|
|
"source": 0,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH [$]",
|
|
"source": 0,
|
|
"value": "0000000000000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "B"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "DUP3",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "DUP3",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "DUP3",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "CODECOPY",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "DUP1",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "MLOAD",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "BYTE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "EQ",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH [tag]",
|
|
"source": 0,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "JUMPI",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "MSTORE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "4"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "MSTORE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "24"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "REVERT",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "tag",
|
|
"source": 0,
|
|
"value": "1"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "JUMPDEST",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "ADDRESS",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "MSTORE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "73"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "DUP2",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "MSTORE8",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "DUP3",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "DUP2",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "RETURN",
|
|
"source": 0
|
|
}
|
|
],
|
|
".data": {
|
|
"0": {
|
|
".auxdata": "a26469706673582212202f4c33345085f5bd705ee6fd9814dba12a20e35fab853a3ec43392e7a6e706a764736f6c634300081a0033",
|
|
".code": [
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSHDEPLOYADDRESS",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "ADDRESS",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "EQ",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "80"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "40"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "MSTORE",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "PUSH",
|
|
"source": 0,
|
|
"value": "0"
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "DUP1",
|
|
"source": 0
|
|
},
|
|
{
|
|
"begin": 293,
|
|
"end": 4724,
|
|
"name": "REVERT",
|
|
"source": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"sourceList": [
|
|
"@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol",
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"contracts/rewards/interfaces/ITransferStrategyBase.sol",
|
|
"contracts/rewards/transfer-strategies/TransferStrategyBase.sol",
|
|
"#utility.yul"
|
|
]
|
|
},
|
|
"methodIdentifiers": {}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"Gnosis Developers\",\"details\":\"Gas-efficient version of Openzeppelin's SafeERC20 contract.\",\"kind\":\"dev\",\"methods\":{},\"title\":\"Gnosis Protocol v2 Safe ERC20 Transfer Library\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol\":\"GPv2SafeERC20\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol\":{\"keccak256\":\"0xb18337187a2a6c4e64c61f8e4e06f0e932a69bb8f33688943bf50d7f4198e44b\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://38c0769720d226d41fb5a0f504a0b9434ca266acb15d1de9bbc08f1a5c8a7bbc\",\"dweb:/ipfs/QmeskcXDL7cbMXbjEdAdbUamKmjqYKBwRfheFZmm9mpBKJ\"]},\"@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
|
|
}
|
|
}
|
|
},
|
|
"@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/rewards/interfaces/ITransferStrategyBase.sol": {
|
|
"ITransferStrategyBase": {
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "caller",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "EmergencyWithdrawal",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "emergencyWithdrawal",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getIncentivesController",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getRewardsAdmin",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "performTransfer",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"kind": "dev",
|
|
"methods": {
|
|
"emergencyWithdrawal(address,address,uint256)": {
|
|
"details": "Perform an emergency token withdrawal only callable by the Rewards admin",
|
|
"params": {
|
|
"amount": "Amount of the withdrawal",
|
|
"to": "Address of the recipient of the withdrawal",
|
|
"token": "Address of the token to withdraw funds from this contract"
|
|
}
|
|
},
|
|
"getIncentivesController()": {
|
|
"returns": {
|
|
"_0": "Returns the address of the Incentives Controller"
|
|
}
|
|
},
|
|
"getRewardsAdmin()": {
|
|
"returns": {
|
|
"_0": "Returns the address of the Rewards admin"
|
|
}
|
|
},
|
|
"performTransfer(address,address,uint256)": {
|
|
"details": "Perform custom transfer logic via delegate call from source contract to a TransferStrategy implementation",
|
|
"params": {
|
|
"amount": "Amount to transfer to the \"to\" address parameter",
|
|
"reward": "Address of the reward token",
|
|
"to": "Account to transfer rewards"
|
|
},
|
|
"returns": {
|
|
"_0": "Returns true bool if transfer logic succeeds"
|
|
}
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {
|
|
"emergencyWithdrawal(address,address,uint256)": "8d8e5da7",
|
|
"getIncentivesController()": "75d26413",
|
|
"getRewardsAdmin()": "c6255443",
|
|
"performTransfer(address,address,uint256)": "16beb982"
|
|
}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EmergencyWithdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"emergencyWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getIncentivesController\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRewardsAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"performTransfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"emergencyWithdrawal(address,address,uint256)\":{\"details\":\"Perform an emergency token withdrawal only callable by the Rewards admin\",\"params\":{\"amount\":\"Amount of the withdrawal\",\"to\":\"Address of the recipient of the withdrawal\",\"token\":\"Address of the token to withdraw funds from this contract\"}},\"getIncentivesController()\":{\"returns\":{\"_0\":\"Returns the address of the Incentives Controller\"}},\"getRewardsAdmin()\":{\"returns\":{\"_0\":\"Returns the address of the Rewards admin\"}},\"performTransfer(address,address,uint256)\":{\"details\":\"Perform custom transfer logic via delegate call from source contract to a TransferStrategy implementation\",\"params\":{\"amount\":\"Amount to transfer to the \\\"to\\\" address parameter\",\"reward\":\"Address of the reward token\",\"to\":\"Account to transfer rewards\"},\"returns\":{\"_0\":\"Returns true bool if transfer logic succeeds\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/rewards/interfaces/ITransferStrategyBase.sol\":\"ITransferStrategyBase\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/rewards/interfaces/ITransferStrategyBase.sol\":{\"keccak256\":\"0x06217cc5297b238a5a11f666de608edb4f113593ad8be24db6eefa97e6e6346d\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d80b6f9a5fdfe18e9e1b7b96fd795bb070cd4228e8590d9e7692b87972ab669b\",\"dweb:/ipfs/QmQM9MzVkfEjFznBa5p6vvbvmUpnntPSnTfwsa9fQwsTKc\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
},
|
|
"contracts/rewards/transfer-strategies/TransferStrategyBase.sol": {
|
|
"TransferStrategyBase": {
|
|
"abi": [
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "caller",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "EmergencyWithdrawal",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "token",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "emergencyWithdrawal",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getIncentivesController",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [],
|
|
"name": "getRewardsAdmin",
|
|
"outputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "to",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "address",
|
|
"name": "reward",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "amount",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "performTransfer",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bool",
|
|
"name": "",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"devdoc": {
|
|
"author": "Aave*",
|
|
"kind": "dev",
|
|
"methods": {
|
|
"emergencyWithdrawal(address,address,uint256)": {
|
|
"details": "Perform an emergency token withdrawal only callable by the Rewards admin",
|
|
"params": {
|
|
"amount": "Amount of the withdrawal",
|
|
"to": "Address of the recipient of the withdrawal",
|
|
"token": "Address of the token to withdraw funds from this contract"
|
|
}
|
|
},
|
|
"getIncentivesController()": {
|
|
"returns": {
|
|
"_0": "Returns the address of the Incentives Controller"
|
|
}
|
|
},
|
|
"getRewardsAdmin()": {
|
|
"returns": {
|
|
"_0": "Returns the address of the Rewards admin"
|
|
}
|
|
},
|
|
"performTransfer(address,address,uint256)": {
|
|
"details": "Perform custom transfer logic via delegate call from source contract to a TransferStrategy implementation",
|
|
"params": {
|
|
"amount": "Amount to transfer to the \"to\" address parameter",
|
|
"reward": "Address of the reward token",
|
|
"to": "Account to transfer rewards"
|
|
},
|
|
"returns": {
|
|
"_0": "Returns true bool if transfer logic succeeds"
|
|
}
|
|
}
|
|
},
|
|
"title": "TransferStrategyStorage",
|
|
"version": 1
|
|
},
|
|
"evm": {
|
|
"assembly": "",
|
|
"bytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"deployedBytecode": {
|
|
"functionDebugData": {},
|
|
"generatedSources": [],
|
|
"immutableReferences": {},
|
|
"linkReferences": {},
|
|
"object": "",
|
|
"opcodes": "",
|
|
"sourceMap": ""
|
|
},
|
|
"gasEstimates": null,
|
|
"legacyAssembly": null,
|
|
"methodIdentifiers": {
|
|
"emergencyWithdrawal(address,address,uint256)": "8d8e5da7",
|
|
"getIncentivesController()": "75d26413",
|
|
"getRewardsAdmin()": "c6255443",
|
|
"performTransfer(address,address,uint256)": "16beb982"
|
|
}
|
|
},
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EmergencyWithdrawal\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"emergencyWithdrawal\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getIncentivesController\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRewardsAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"reward\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"performTransfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Aave*\",\"kind\":\"dev\",\"methods\":{\"emergencyWithdrawal(address,address,uint256)\":{\"details\":\"Perform an emergency token withdrawal only callable by the Rewards admin\",\"params\":{\"amount\":\"Amount of the withdrawal\",\"to\":\"Address of the recipient of the withdrawal\",\"token\":\"Address of the token to withdraw funds from this contract\"}},\"getIncentivesController()\":{\"returns\":{\"_0\":\"Returns the address of the Incentives Controller\"}},\"getRewardsAdmin()\":{\"returns\":{\"_0\":\"Returns the address of the Rewards admin\"}},\"performTransfer(address,address,uint256)\":{\"details\":\"Perform custom transfer logic via delegate call from source contract to a TransferStrategy implementation\",\"params\":{\"amount\":\"Amount to transfer to the \\\"to\\\" address parameter\",\"reward\":\"Address of the reward token\",\"to\":\"Account to transfer rewards\"},\"returns\":{\"_0\":\"Returns true bool if transfer logic succeeds\"}}},\"title\":\"TransferStrategyStorage\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/rewards/transfer-strategies/TransferStrategyBase.sol\":\"TransferStrategyBase\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol\":{\"keccak256\":\"0xb18337187a2a6c4e64c61f8e4e06f0e932a69bb8f33688943bf50d7f4198e44b\",\"license\":\"LGPL-3.0-or-later\",\"urls\":[\"bzz-raw://38c0769720d226d41fb5a0f504a0b9434ca266acb15d1de9bbc08f1a5c8a7bbc\",\"dweb:/ipfs/QmeskcXDL7cbMXbjEdAdbUamKmjqYKBwRfheFZmm9mpBKJ\"]},\"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol\":{\"keccak256\":\"0xf57d62241e553696a1324d225663ba2e1a51db0a51ca236d0c1b009d89b6284c\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d327db93b636790909aa137124f30a856ac1631cb79c476aa188f9627fda8d03\",\"dweb:/ipfs/QmaxpmEoBFioeNYmpxJemyZ7aYF2nX1NKW1XDqREm7i6es\"]},\"contracts/rewards/interfaces/ITransferStrategyBase.sol\":{\"keccak256\":\"0x06217cc5297b238a5a11f666de608edb4f113593ad8be24db6eefa97e6e6346d\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://d80b6f9a5fdfe18e9e1b7b96fd795bb070cd4228e8590d9e7692b87972ab669b\",\"dweb:/ipfs/QmQM9MzVkfEjFznBa5p6vvbvmUpnntPSnTfwsa9fQwsTKc\"]},\"contracts/rewards/transfer-strategies/TransferStrategyBase.sol\":{\"keccak256\":\"0x15840e56da6e30e9e6b4e50e6dbf2873343627437c1b123fbe377e968892e1af\",\"license\":\"AGPL-3.0\",\"urls\":[\"bzz-raw://8749bfc8de35fee3977374f0fbd3238df5c1a0e31e57230219ae5b005b8a4587\",\"dweb:/ipfs/QmehKLX9iiZ84zy4pboaD551vqkoaUyYBEiZ4fxHa3h6Xx\"]}},\"version\":1}",
|
|
"storageLayout": {
|
|
"storage": [],
|
|
"types": null
|
|
},
|
|
"userdoc": {
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"sources": {
|
|
"@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol": {
|
|
"ast": {
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol",
|
|
"exportedSymbols": {
|
|
"GPv2SafeERC20": [
|
|
70
|
|
],
|
|
"IERC20": [
|
|
148
|
|
]
|
|
},
|
|
"id": 71,
|
|
"license": "LGPL-3.0-or-later",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 1,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "46:23:0"
|
|
},
|
|
{
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"file": "../../openzeppelin/contracts/IERC20.sol",
|
|
"id": 3,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 71,
|
|
"sourceUnit": 149,
|
|
"src": "71:63:0",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 2,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 148,
|
|
"src": "79:6:0",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "GPv2SafeERC20",
|
|
"contractDependencies": [],
|
|
"contractKind": "library",
|
|
"documentation": {
|
|
"id": 4,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "136:157:0",
|
|
"text": "@title Gnosis Protocol v2 Safe ERC20 Transfer Library\n @author Gnosis Developers\n @dev Gas-efficient version of Openzeppelin's SafeERC20 contract."
|
|
},
|
|
"fullyImplemented": true,
|
|
"id": 70,
|
|
"linearizedBaseContracts": [
|
|
70
|
|
],
|
|
"name": "GPv2SafeERC20",
|
|
"nameLocation": "301:13:0",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"body": {
|
|
"id": 29,
|
|
"nodeType": "Block",
|
|
"src": "513:585:0",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
16
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 16,
|
|
"mutability": "mutable",
|
|
"name": "selector_",
|
|
"nameLocation": "526:9:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 29,
|
|
"src": "519:16:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 15,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "519:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 20,
|
|
"initialValue": {
|
|
"expression": {
|
|
"expression": {
|
|
"id": 17,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8,
|
|
"src": "538:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 18,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "544:8:0",
|
|
"memberName": "transfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 97,
|
|
"src": "538:14:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (address,uint256) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 19,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "553:8:0",
|
|
"memberName": "selector",
|
|
"nodeType": "MemberAccess",
|
|
"src": "538:23:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "519:42:0"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nativeSrc": "629:396:0",
|
|
"nodeType": "YulBlock",
|
|
"src": "629:396:0",
|
|
"statements": [
|
|
{
|
|
"nativeSrc": "637:36:0",
|
|
"nodeType": "YulVariableDeclaration",
|
|
"src": "637:36:0",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "668:4:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "668:4:0",
|
|
"type": "",
|
|
"value": "0x40"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mload",
|
|
"nativeSrc": "662:5:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "662:5:0"
|
|
},
|
|
"nativeSrc": "662:11:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "662:11:0"
|
|
},
|
|
"variables": [
|
|
{
|
|
"name": "freeMemoryPointer",
|
|
"nativeSrc": "641:17:0",
|
|
"nodeType": "YulTypedName",
|
|
"src": "641:17:0",
|
|
"type": ""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"name": "freeMemoryPointer",
|
|
"nativeSrc": "687:17:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "687:17:0"
|
|
},
|
|
{
|
|
"name": "selector_",
|
|
"nativeSrc": "706:9:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "706:9:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nativeSrc": "680:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "680:6:0"
|
|
},
|
|
"nativeSrc": "680:36:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "680:36:0"
|
|
},
|
|
"nativeSrc": "680:36:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "680:36:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "freeMemoryPointer",
|
|
"nativeSrc": "734:17:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "734:17:0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "753:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "753:1:0",
|
|
"type": "",
|
|
"value": "4"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nativeSrc": "730:3:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "730:3:0"
|
|
},
|
|
"nativeSrc": "730:25:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "730:25:0"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "to",
|
|
"nativeSrc": "761:2:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "761:2:0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "765:42:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "765:42:0",
|
|
"type": "",
|
|
"value": "0xffffffffffffffffffffffffffffffffffffffff"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "and",
|
|
"nativeSrc": "757:3:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "757:3:0"
|
|
},
|
|
"nativeSrc": "757:51:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "757:51:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nativeSrc": "723:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "723:6:0"
|
|
},
|
|
"nativeSrc": "723:86:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "723:86:0"
|
|
},
|
|
"nativeSrc": "723:86:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "723:86:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "freeMemoryPointer",
|
|
"nativeSrc": "827:17:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "827:17:0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "846:2:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "846:2:0",
|
|
"type": "",
|
|
"value": "36"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nativeSrc": "823:3:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "823:3:0"
|
|
},
|
|
"nativeSrc": "823:26:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "823:26:0"
|
|
},
|
|
{
|
|
"name": "value",
|
|
"nativeSrc": "851:5:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "851:5:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nativeSrc": "816:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "816:6:0"
|
|
},
|
|
"nativeSrc": "816:41:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "816:41:0"
|
|
},
|
|
"nativeSrc": "816:41:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "816:41:0"
|
|
},
|
|
{
|
|
"body": {
|
|
"nativeSrc": "927:92:0",
|
|
"nodeType": "YulBlock",
|
|
"src": "927:92:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "952:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "952:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "955:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "955:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"arguments": [],
|
|
"functionName": {
|
|
"name": "returndatasize",
|
|
"nativeSrc": "958:14:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "958:14:0"
|
|
},
|
|
"nativeSrc": "958:16:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "958:16:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "returndatacopy",
|
|
"nativeSrc": "937:14:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "937:14:0"
|
|
},
|
|
"nativeSrc": "937:38:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "937:38:0"
|
|
},
|
|
"nativeSrc": "937:38:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "937:38:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "991:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "991:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"arguments": [],
|
|
"functionName": {
|
|
"name": "returndatasize",
|
|
"nativeSrc": "994:14:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "994:14:0"
|
|
},
|
|
"nativeSrc": "994:16:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "994:16:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "revert",
|
|
"nativeSrc": "984:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "984:6:0"
|
|
},
|
|
"nativeSrc": "984:27:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "984:27:0"
|
|
},
|
|
"nativeSrc": "984:27:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "984:27:0"
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"arguments": [],
|
|
"functionName": {
|
|
"name": "gas",
|
|
"nativeSrc": "880:3:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "880:3:0"
|
|
},
|
|
"nativeSrc": "880:5:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "880:5:0"
|
|
},
|
|
{
|
|
"name": "token",
|
|
"nativeSrc": "887:5:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "887:5:0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "894:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "894:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"name": "freeMemoryPointer",
|
|
"nativeSrc": "897:17:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "897:17:0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "916:2:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "916:2:0",
|
|
"type": "",
|
|
"value": "68"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "920:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "920:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "923:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "923:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "call",
|
|
"nativeSrc": "875:4:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "875:4:0"
|
|
},
|
|
"nativeSrc": "875:50:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "875:50:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "iszero",
|
|
"nativeSrc": "868:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "868:6:0"
|
|
},
|
|
"nativeSrc": "868:58:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "868:58:0"
|
|
},
|
|
"nativeSrc": "865:154:0",
|
|
"nodeType": "YulIf",
|
|
"src": "865:154:0"
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "cancun",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 16,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "706:9:0",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 10,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "761:2:0",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 8,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "887:5:0",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 12,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "851:5:0",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 21,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "620:405:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 24,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 8,
|
|
"src": "1061:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
],
|
|
"id": 23,
|
|
"name": "getLastTransferResult",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 69,
|
|
"src": "1039:21:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$148_$returns$_t_bool_$",
|
|
"typeString": "function (contract IERC20) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 25,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1039:28:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "475076323a206661696c6564207472616e73666572",
|
|
"id": 26,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1069:23:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_bcd627324e1455f8429089871957d6f7804c9418ddab92671c4a49f81f3fae96",
|
|
"typeString": "literal_string \"GPv2: failed transfer\""
|
|
},
|
|
"value": "GPv2: failed transfer"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_bcd627324e1455f8429089871957d6f7804c9418ddab92671c4a49f81f3fae96",
|
|
"typeString": "literal_string \"GPv2: failed transfer\""
|
|
}
|
|
],
|
|
"id": 22,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1031:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 27,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1031:62:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 28,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1031:62:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 5,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "319:119:0",
|
|
"text": "@dev Wrapper around a call to the ERC20 function `transfer` that reverts\n also when the token returns `false`."
|
|
},
|
|
"id": 30,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "safeTransfer",
|
|
"nameLocation": "450:12:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 13,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 8,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "470:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 30,
|
|
"src": "463:12:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 7,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 6,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"463:6:0"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 148,
|
|
"src": "463:6:0"
|
|
},
|
|
"referencedDeclaration": 148,
|
|
"src": "463:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 10,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "485:2:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 30,
|
|
"src": "477:10:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 9,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "477:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 12,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "497:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 30,
|
|
"src": "489:13:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 11,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "489:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "462:41:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 14,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "513:0:0"
|
|
},
|
|
"scope": 70,
|
|
"src": "441:657:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 57,
|
|
"nodeType": "Block",
|
|
"src": "1318:690:0",
|
|
"statements": [
|
|
{
|
|
"assignments": [
|
|
44
|
|
],
|
|
"declarations": [
|
|
{
|
|
"constant": false,
|
|
"id": 44,
|
|
"mutability": "mutable",
|
|
"name": "selector_",
|
|
"nameLocation": "1331:9:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 57,
|
|
"src": "1324:16:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
},
|
|
"typeName": {
|
|
"id": 43,
|
|
"name": "bytes4",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1324:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"id": 48,
|
|
"initialValue": {
|
|
"expression": {
|
|
"expression": {
|
|
"id": 45,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 34,
|
|
"src": "1343:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 46,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1349:12:0",
|
|
"memberName": "transferFrom",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 129,
|
|
"src": "1343:18:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
|
|
"typeString": "function (address,address,uint256) external returns (bool)"
|
|
}
|
|
},
|
|
"id": 47,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1362:8:0",
|
|
"memberName": "selector",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1343:27:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bytes4",
|
|
"typeString": "bytes4"
|
|
}
|
|
},
|
|
"nodeType": "VariableDeclarationStatement",
|
|
"src": "1324:46:0"
|
|
},
|
|
{
|
|
"AST": {
|
|
"nativeSrc": "1438:493:0",
|
|
"nodeType": "YulBlock",
|
|
"src": "1438:493:0",
|
|
"statements": [
|
|
{
|
|
"nativeSrc": "1446:36:0",
|
|
"nodeType": "YulVariableDeclaration",
|
|
"src": "1446:36:0",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1477:4:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1477:4:0",
|
|
"type": "",
|
|
"value": "0x40"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mload",
|
|
"nativeSrc": "1471:5:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1471:5:0"
|
|
},
|
|
"nativeSrc": "1471:11:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1471:11:0"
|
|
},
|
|
"variables": [
|
|
{
|
|
"name": "freeMemoryPointer",
|
|
"nativeSrc": "1450:17:0",
|
|
"nodeType": "YulTypedName",
|
|
"src": "1450:17:0",
|
|
"type": ""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"name": "freeMemoryPointer",
|
|
"nativeSrc": "1496:17:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1496:17:0"
|
|
},
|
|
{
|
|
"name": "selector_",
|
|
"nativeSrc": "1515:9:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1515:9:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nativeSrc": "1489:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1489:6:0"
|
|
},
|
|
"nativeSrc": "1489:36:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1489:36:0"
|
|
},
|
|
"nativeSrc": "1489:36:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "1489:36:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "freeMemoryPointer",
|
|
"nativeSrc": "1543:17:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1543:17:0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1562:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1562:1:0",
|
|
"type": "",
|
|
"value": "4"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nativeSrc": "1539:3:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1539:3:0"
|
|
},
|
|
"nativeSrc": "1539:25:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1539:25:0"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "from",
|
|
"nativeSrc": "1570:4:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1570:4:0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1576:42:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1576:42:0",
|
|
"type": "",
|
|
"value": "0xffffffffffffffffffffffffffffffffffffffff"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "and",
|
|
"nativeSrc": "1566:3:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1566:3:0"
|
|
},
|
|
"nativeSrc": "1566:53:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1566:53:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nativeSrc": "1532:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1532:6:0"
|
|
},
|
|
"nativeSrc": "1532:88:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1532:88:0"
|
|
},
|
|
"nativeSrc": "1532:88:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "1532:88:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "freeMemoryPointer",
|
|
"nativeSrc": "1638:17:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1638:17:0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1657:2:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1657:2:0",
|
|
"type": "",
|
|
"value": "36"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nativeSrc": "1634:3:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1634:3:0"
|
|
},
|
|
"nativeSrc": "1634:26:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1634:26:0"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "to",
|
|
"nativeSrc": "1666:2:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1666:2:0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1670:42:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1670:42:0",
|
|
"type": "",
|
|
"value": "0xffffffffffffffffffffffffffffffffffffffff"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "and",
|
|
"nativeSrc": "1662:3:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1662:3:0"
|
|
},
|
|
"nativeSrc": "1662:51:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1662:51:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nativeSrc": "1627:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1627:6:0"
|
|
},
|
|
"nativeSrc": "1627:87:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1627:87:0"
|
|
},
|
|
"nativeSrc": "1627:87:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "1627:87:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "freeMemoryPointer",
|
|
"nativeSrc": "1732:17:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1732:17:0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1751:2:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1751:2:0",
|
|
"type": "",
|
|
"value": "68"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "add",
|
|
"nativeSrc": "1728:3:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1728:3:0"
|
|
},
|
|
"nativeSrc": "1728:26:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1728:26:0"
|
|
},
|
|
{
|
|
"name": "value",
|
|
"nativeSrc": "1756:5:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1756:5:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nativeSrc": "1721:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1721:6:0"
|
|
},
|
|
"nativeSrc": "1721:41:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1721:41:0"
|
|
},
|
|
"nativeSrc": "1721:41:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "1721:41:0"
|
|
},
|
|
{
|
|
"body": {
|
|
"nativeSrc": "1833:92:0",
|
|
"nodeType": "YulBlock",
|
|
"src": "1833:92:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1858:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1858:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1861:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1861:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"arguments": [],
|
|
"functionName": {
|
|
"name": "returndatasize",
|
|
"nativeSrc": "1864:14:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1864:14:0"
|
|
},
|
|
"nativeSrc": "1864:16:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1864:16:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "returndatacopy",
|
|
"nativeSrc": "1843:14:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1843:14:0"
|
|
},
|
|
"nativeSrc": "1843:38:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1843:38:0"
|
|
},
|
|
"nativeSrc": "1843:38:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "1843:38:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1897:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1897:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"arguments": [],
|
|
"functionName": {
|
|
"name": "returndatasize",
|
|
"nativeSrc": "1900:14:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1900:14:0"
|
|
},
|
|
"nativeSrc": "1900:16:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1900:16:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "revert",
|
|
"nativeSrc": "1890:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1890:6:0"
|
|
},
|
|
"nativeSrc": "1890:27:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1890:27:0"
|
|
},
|
|
"nativeSrc": "1890:27:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "1890:27:0"
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"arguments": [],
|
|
"functionName": {
|
|
"name": "gas",
|
|
"nativeSrc": "1785:3:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1785:3:0"
|
|
},
|
|
"nativeSrc": "1785:5:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1785:5:0"
|
|
},
|
|
{
|
|
"name": "token",
|
|
"nativeSrc": "1792:5:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1792:5:0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1799:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1799:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"name": "freeMemoryPointer",
|
|
"nativeSrc": "1802:17:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1802:17:0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1821:3:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1821:3:0",
|
|
"type": "",
|
|
"value": "100"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1826:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1826:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "1829:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "1829:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "call",
|
|
"nativeSrc": "1780:4:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1780:4:0"
|
|
},
|
|
"nativeSrc": "1780:51:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1780:51:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "iszero",
|
|
"nativeSrc": "1773:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "1773:6:0"
|
|
},
|
|
"nativeSrc": "1773:59:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "1773:59:0"
|
|
},
|
|
"nativeSrc": "1770:155:0",
|
|
"nodeType": "YulIf",
|
|
"src": "1770:155:0"
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "cancun",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 36,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "1570:4:0",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 44,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "1515:9:0",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 38,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "1666:2:0",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 34,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "1792:5:0",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 40,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "1756:5:0",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 49,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "1429:502:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"id": 52,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 34,
|
|
"src": "1967:5:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
],
|
|
"id": 51,
|
|
"name": "getLastTransferResult",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 69,
|
|
"src": "1945:21:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$148_$returns$_t_bool_$",
|
|
"typeString": "function (contract IERC20) view returns (bool)"
|
|
}
|
|
},
|
|
"id": 53,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1945:28:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "475076323a206661696c6564207472616e7366657246726f6d",
|
|
"id": 54,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1975:27:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_910928af3c8209d55654c19deb64d9d16f87d0d58e9e40975f82488ba9b27d7e",
|
|
"typeString": "literal_string \"GPv2: failed transferFrom\""
|
|
},
|
|
"value": "GPv2: failed transferFrom"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_910928af3c8209d55654c19deb64d9d16f87d0d58e9e40975f82488ba9b27d7e",
|
|
"typeString": "literal_string \"GPv2: failed transferFrom\""
|
|
}
|
|
],
|
|
"id": 50,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1937:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 55,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1937:66:0",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 56,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1937:66:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 31,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1102:123:0",
|
|
"text": "@dev Wrapper around a call to the ERC20 function `transferFrom` that\n reverts also when the token returns `false`."
|
|
},
|
|
"id": 58,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "safeTransferFrom",
|
|
"nameLocation": "1237:16:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 41,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 34,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "1261:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 58,
|
|
"src": "1254:12:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 33,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 32,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"1254:6:0"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 148,
|
|
"src": "1254:6:0"
|
|
},
|
|
"referencedDeclaration": 148,
|
|
"src": "1254:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 36,
|
|
"mutability": "mutable",
|
|
"name": "from",
|
|
"nameLocation": "1276:4:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 58,
|
|
"src": "1268:12:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 35,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1268:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 38,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "1290:2:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 58,
|
|
"src": "1282:10:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 37,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1282:7:0",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 40,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "1302:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 58,
|
|
"src": "1294:13:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 39,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1294:7:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1253:55:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 42,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1318:0:0"
|
|
},
|
|
"scope": 70,
|
|
"src": "1228:780:0",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 68,
|
|
"nodeType": "Block",
|
|
"src": "2279:2443:0",
|
|
"statements": [
|
|
{
|
|
"AST": {
|
|
"nativeSrc": "2741:1977:0",
|
|
"nodeType": "YulBlock",
|
|
"src": "2741:1977:0",
|
|
"statements": [
|
|
{
|
|
"body": {
|
|
"nativeSrc": "3367:163:0",
|
|
"nodeType": "YulBlock",
|
|
"src": "3367:163:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "3384:4:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "3384:4:0",
|
|
"type": "",
|
|
"value": "0x00"
|
|
},
|
|
{
|
|
"hexValue": "08c379a0",
|
|
"kind": "string",
|
|
"nativeSrc": "3390:18:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "3390:18:0",
|
|
"type": ""
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nativeSrc": "3377:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3377:6:0"
|
|
},
|
|
"nativeSrc": "3377:32:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3377:32:0"
|
|
},
|
|
"nativeSrc": "3377:32:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "3377:32:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "3425:4:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "3425:4:0",
|
|
"type": "",
|
|
"value": "0x04"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "3431:4:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "3431:4:0",
|
|
"type": "",
|
|
"value": "0x20"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nativeSrc": "3418:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3418:6:0"
|
|
},
|
|
"nativeSrc": "3418:18:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3418:18:0"
|
|
},
|
|
"nativeSrc": "3418:18:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "3418:18:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "3452:4:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "3452:4:0",
|
|
"type": "",
|
|
"value": "0x24"
|
|
},
|
|
{
|
|
"name": "length",
|
|
"nativeSrc": "3458:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3458:6:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nativeSrc": "3445:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3445:6:0"
|
|
},
|
|
"nativeSrc": "3445:20:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3445:20:0"
|
|
},
|
|
"nativeSrc": "3445:20:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "3445:20:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "3481:4:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "3481:4:0",
|
|
"type": "",
|
|
"value": "0x44"
|
|
},
|
|
{
|
|
"name": "message",
|
|
"nativeSrc": "3487:7:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3487:7:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mstore",
|
|
"nativeSrc": "3474:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3474:6:0"
|
|
},
|
|
"nativeSrc": "3474:21:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3474:21:0"
|
|
},
|
|
"nativeSrc": "3474:21:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "3474:21:0"
|
|
},
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "3511:4:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "3511:4:0",
|
|
"type": "",
|
|
"value": "0x00"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "3517:4:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "3517:4:0",
|
|
"type": "",
|
|
"value": "0x64"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "revert",
|
|
"nativeSrc": "3504:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3504:6:0"
|
|
},
|
|
"nativeSrc": "3504:18:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3504:18:0"
|
|
},
|
|
"nativeSrc": "3504:18:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "3504:18:0"
|
|
}
|
|
]
|
|
},
|
|
"name": "revertWithMessage",
|
|
"nativeSrc": "3323:207:0",
|
|
"nodeType": "YulFunctionDefinition",
|
|
"parameters": [
|
|
{
|
|
"name": "length",
|
|
"nativeSrc": "3350:6:0",
|
|
"nodeType": "YulTypedName",
|
|
"src": "3350:6:0",
|
|
"type": ""
|
|
},
|
|
{
|
|
"name": "message",
|
|
"nativeSrc": "3358:7:0",
|
|
"nodeType": "YulTypedName",
|
|
"src": "3358:7:0",
|
|
"type": ""
|
|
}
|
|
],
|
|
"src": "3323:207:0"
|
|
},
|
|
{
|
|
"cases": [
|
|
{
|
|
"body": {
|
|
"nativeSrc": "3628:434:0",
|
|
"nodeType": "YulBlock",
|
|
"src": "3628:434:0",
|
|
"statements": [
|
|
{
|
|
"body": {
|
|
"nativeSrc": "3965:67:0",
|
|
"nodeType": "YulBlock",
|
|
"src": "3965:67:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "3995:2:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "3995:2:0",
|
|
"type": "",
|
|
"value": "20"
|
|
},
|
|
{
|
|
"hexValue": "475076323a206e6f74206120636f6e7472616374",
|
|
"kind": "string",
|
|
"nativeSrc": "3999:22:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "3999:22:0",
|
|
"type": "",
|
|
"value": "GPv2: not a contract"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "revertWithMessage",
|
|
"nativeSrc": "3977:17:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3977:17:0"
|
|
},
|
|
"nativeSrc": "3977:45:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3977:45:0"
|
|
},
|
|
"nativeSrc": "3977:45:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "3977:45:0"
|
|
}
|
|
]
|
|
},
|
|
"condition": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"name": "token",
|
|
"nativeSrc": "3957:5:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3957:5:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "extcodesize",
|
|
"nativeSrc": "3945:11:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3945:11:0"
|
|
},
|
|
"nativeSrc": "3945:18:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3945:18:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "iszero",
|
|
"nativeSrc": "3938:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3938:6:0"
|
|
},
|
|
"nativeSrc": "3938:26:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3938:26:0"
|
|
},
|
|
"nativeSrc": "3935:97:0",
|
|
"nodeType": "YulIf",
|
|
"src": "3935:97:0"
|
|
},
|
|
{
|
|
"nativeSrc": "4042:12:0",
|
|
"nodeType": "YulAssignment",
|
|
"src": "4042:12:0",
|
|
"value": {
|
|
"kind": "number",
|
|
"nativeSrc": "4053:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "4053:1:0",
|
|
"type": "",
|
|
"value": "1"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "success",
|
|
"nativeSrc": "4042:7:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "4042:7:0"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"nativeSrc": "3621:441:0",
|
|
"nodeType": "YulCase",
|
|
"src": "3621:441:0",
|
|
"value": {
|
|
"kind": "number",
|
|
"nativeSrc": "3626:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "3626:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
}
|
|
},
|
|
{
|
|
"body": {
|
|
"nativeSrc": "4143:480:0",
|
|
"nodeType": "YulBlock",
|
|
"src": "4143:480:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "4168:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "4168:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "4171:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "4171:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
},
|
|
{
|
|
"arguments": [],
|
|
"functionName": {
|
|
"name": "returndatasize",
|
|
"nativeSrc": "4174:14:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "4174:14:0"
|
|
},
|
|
"nativeSrc": "4174:16:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "4174:16:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "returndatacopy",
|
|
"nativeSrc": "4153:14:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "4153:14:0"
|
|
},
|
|
"nativeSrc": "4153:38:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "4153:38:0"
|
|
},
|
|
"nativeSrc": "4153:38:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "4153:38:0"
|
|
},
|
|
{
|
|
"nativeSrc": "4580:35:0",
|
|
"nodeType": "YulAssignment",
|
|
"src": "4580:35:0",
|
|
"value": {
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "4611:1:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "4611:1:0",
|
|
"type": "",
|
|
"value": "0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "mload",
|
|
"nativeSrc": "4605:5:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "4605:5:0"
|
|
},
|
|
"nativeSrc": "4605:8:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "4605:8:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "iszero",
|
|
"nativeSrc": "4598:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "4598:6:0"
|
|
},
|
|
"nativeSrc": "4598:16:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "4598:16:0"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "iszero",
|
|
"nativeSrc": "4591:6:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "4591:6:0"
|
|
},
|
|
"nativeSrc": "4591:24:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "4591:24:0"
|
|
},
|
|
"variableNames": [
|
|
{
|
|
"name": "success",
|
|
"nativeSrc": "4580:7:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "4580:7:0"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"nativeSrc": "4135:488:0",
|
|
"nodeType": "YulCase",
|
|
"src": "4135:488:0",
|
|
"value": {
|
|
"kind": "number",
|
|
"nativeSrc": "4140:2:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "4140:2:0",
|
|
"type": "",
|
|
"value": "32"
|
|
}
|
|
},
|
|
{
|
|
"body": {
|
|
"nativeSrc": "4638:74:0",
|
|
"nodeType": "YulBlock",
|
|
"src": "4638:74:0",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"kind": "number",
|
|
"nativeSrc": "4666:2:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "4666:2:0",
|
|
"type": "",
|
|
"value": "31"
|
|
},
|
|
{
|
|
"hexValue": "475076323a206d616c666f726d6564207472616e7366657220726573756c74",
|
|
"kind": "string",
|
|
"nativeSrc": "4670:33:0",
|
|
"nodeType": "YulLiteral",
|
|
"src": "4670:33:0",
|
|
"type": "",
|
|
"value": "GPv2: malformed transfer result"
|
|
}
|
|
],
|
|
"functionName": {
|
|
"name": "revertWithMessage",
|
|
"nativeSrc": "4648:17:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "4648:17:0"
|
|
},
|
|
"nativeSrc": "4648:56:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "4648:56:0"
|
|
},
|
|
"nativeSrc": "4648:56:0",
|
|
"nodeType": "YulExpressionStatement",
|
|
"src": "4648:56:0"
|
|
}
|
|
]
|
|
},
|
|
"nativeSrc": "4630:82:0",
|
|
"nodeType": "YulCase",
|
|
"src": "4630:82:0",
|
|
"value": "default"
|
|
}
|
|
],
|
|
"expression": {
|
|
"arguments": [],
|
|
"functionName": {
|
|
"name": "returndatasize",
|
|
"nativeSrc": "3545:14:0",
|
|
"nodeType": "YulIdentifier",
|
|
"src": "3545:14:0"
|
|
},
|
|
"nativeSrc": "3545:16:0",
|
|
"nodeType": "YulFunctionCall",
|
|
"src": "3545:16:0"
|
|
},
|
|
"nativeSrc": "3538:1174:0",
|
|
"nodeType": "YulSwitch",
|
|
"src": "3538:1174:0"
|
|
}
|
|
]
|
|
},
|
|
"evmVersion": "cancun",
|
|
"externalReferences": [
|
|
{
|
|
"declaration": 65,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "4042:7:0",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 65,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "4580:7:0",
|
|
"valueSize": 1
|
|
},
|
|
{
|
|
"declaration": 62,
|
|
"isOffset": false,
|
|
"isSlot": false,
|
|
"src": "3957:5:0",
|
|
"valueSize": 1
|
|
}
|
|
],
|
|
"id": 67,
|
|
"nodeType": "InlineAssembly",
|
|
"src": "2732:1986:0"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 59,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2012:183:0",
|
|
"text": "@dev Verifies that the last return was a successful `transfer*` call.\n This is done by checking that the return data is either empty, or\n is a valid ABI encoded boolean."
|
|
},
|
|
"id": 69,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getLastTransferResult",
|
|
"nameLocation": "2207:21:0",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 63,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 62,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "2236:5:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 69,
|
|
"src": "2229:12:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
},
|
|
"typeName": {
|
|
"id": 61,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 60,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"2229:6:0"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 148,
|
|
"src": "2229:6:0"
|
|
},
|
|
"referencedDeclaration": 148,
|
|
"src": "2229:6:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2228:14:0"
|
|
},
|
|
"returnParameters": {
|
|
"id": 66,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 65,
|
|
"mutability": "mutable",
|
|
"name": "success",
|
|
"nameLocation": "2270:7:0",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 69,
|
|
"src": "2265:12:0",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 64,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2265:4:0",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2264:14:0"
|
|
},
|
|
"scope": 70,
|
|
"src": "2198:2524:0",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "private"
|
|
}
|
|
],
|
|
"scope": 71,
|
|
"src": "293:4431:0",
|
|
"usedErrors": [],
|
|
"usedEvents": []
|
|
}
|
|
],
|
|
"src": "46:4679:0"
|
|
},
|
|
"id": 0
|
|
},
|
|
"@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol": {
|
|
"ast": {
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"exportedSymbols": {
|
|
"IERC20": [
|
|
148
|
|
]
|
|
},
|
|
"id": 149,
|
|
"license": "AGPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 72,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".0"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "37:23:1"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "IERC20",
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"documentation": {
|
|
"id": 73,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "62:70:1",
|
|
"text": " @dev Interface of the ERC20 standard as defined in the EIP."
|
|
},
|
|
"fullyImplemented": false,
|
|
"id": 148,
|
|
"linearizedBaseContracts": [
|
|
148
|
|
],
|
|
"name": "IERC20",
|
|
"nameLocation": "143:6:1",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"documentation": {
|
|
"id": 74,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "154:62:1",
|
|
"text": " @dev Returns the amount of tokens in existence."
|
|
},
|
|
"functionSelector": "18160ddd",
|
|
"id": 79,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "totalSupply",
|
|
"nameLocation": "228:11:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 75,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "239:2:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 78,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 77,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 79,
|
|
"src": "265:7:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 76,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "265:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "264:9:1"
|
|
},
|
|
"scope": 148,
|
|
"src": "219:55:1",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 80,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "278:68:1",
|
|
"text": " @dev Returns the amount of tokens owned by `account`."
|
|
},
|
|
"functionSelector": "70a08231",
|
|
"id": 87,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "balanceOf",
|
|
"nameLocation": "358:9:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 83,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 82,
|
|
"mutability": "mutable",
|
|
"name": "account",
|
|
"nameLocation": "376:7:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 87,
|
|
"src": "368:15:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 81,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "368:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "367:17:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 86,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 85,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 87,
|
|
"src": "408:7:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 84,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "408:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "407:9:1"
|
|
},
|
|
"scope": 148,
|
|
"src": "349:68:1",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 88,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "421:197:1",
|
|
"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": 97,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "transfer",
|
|
"nameLocation": "630:8:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 93,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 90,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "647:9:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 97,
|
|
"src": "639:17:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 89,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "639:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 92,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "666:6:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 97,
|
|
"src": "658:14:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 91,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "658:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "638:35:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 96,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 95,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 97,
|
|
"src": "692:4:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 94,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "692:4:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "691:6:1"
|
|
},
|
|
"scope": 148,
|
|
"src": "621:77:1",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 98,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "702:252:1",
|
|
"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": 107,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "allowance",
|
|
"nameLocation": "966:9:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 103,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 100,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "984:5:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 107,
|
|
"src": "976:13:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 99,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "976:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 102,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nameLocation": "999:7:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 107,
|
|
"src": "991:15:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 101,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "991:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "975:32:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 106,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 105,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 107,
|
|
"src": "1031:7:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 104,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1031:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1030:9:1"
|
|
},
|
|
"scope": 148,
|
|
"src": "957:83:1",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 108,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1044:616:1",
|
|
"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": 117,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "approve",
|
|
"nameLocation": "1672:7:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 113,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 110,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nameLocation": "1688:7:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 117,
|
|
"src": "1680:15:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 109,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1680:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 112,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "1705:6:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 117,
|
|
"src": "1697:14:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 111,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1697:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1679:33:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 116,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 115,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 117,
|
|
"src": "1731:4:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 114,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1731:4:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1730:6:1"
|
|
},
|
|
"scope": 148,
|
|
"src": "1663:74:1",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 118,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1741:280:1",
|
|
"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": 129,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "transferFrom",
|
|
"nameLocation": "2033:12:1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 125,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 120,
|
|
"mutability": "mutable",
|
|
"name": "sender",
|
|
"nameLocation": "2054:6:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 129,
|
|
"src": "2046:14:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 119,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2046:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 122,
|
|
"mutability": "mutable",
|
|
"name": "recipient",
|
|
"nameLocation": "2070:9:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 129,
|
|
"src": "2062:17:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 121,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2062:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 124,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "2089:6:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 129,
|
|
"src": "2081:14:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 123,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2081:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2045:51:1"
|
|
},
|
|
"returnParameters": {
|
|
"id": 128,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 127,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 129,
|
|
"src": "2115:4:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 126,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2115:4:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2114:6:1"
|
|
},
|
|
"scope": 148,
|
|
"src": "2024:97:1",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 130,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2125:148:1",
|
|
"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": 138,
|
|
"name": "Transfer",
|
|
"nameLocation": "2282:8:1",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 137,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 132,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "from",
|
|
"nameLocation": "2307:4:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 138,
|
|
"src": "2291:20:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 131,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2291:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 134,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "2329:2:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 138,
|
|
"src": "2313:18:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 133,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2313:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 136,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "2341:5:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 138,
|
|
"src": "2333:13:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 135,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2333:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2290:57:1"
|
|
},
|
|
"src": "2276:72:1"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"documentation": {
|
|
"id": 139,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "2352:142:1",
|
|
"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": 147,
|
|
"name": "Approval",
|
|
"nameLocation": "2503:8:1",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 146,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 141,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "owner",
|
|
"nameLocation": "2528:5:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 147,
|
|
"src": "2512:21:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 140,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2512:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 143,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "spender",
|
|
"nameLocation": "2551:7:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 147,
|
|
"src": "2535:23:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 142,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2535:7:1",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 145,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "value",
|
|
"nameLocation": "2568:5:1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 147,
|
|
"src": "2560:13:1",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 144,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "2560:7:1",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "2511:63:1"
|
|
},
|
|
"src": "2497:78:1"
|
|
}
|
|
],
|
|
"scope": 149,
|
|
"src": "133:2444:1",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
138,
|
|
147
|
|
]
|
|
}
|
|
],
|
|
"src": "37:2541:1"
|
|
},
|
|
"id": 1
|
|
},
|
|
"contracts/rewards/interfaces/ITransferStrategyBase.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/rewards/interfaces/ITransferStrategyBase.sol",
|
|
"exportedSymbols": {
|
|
"ITransferStrategyBase": [
|
|
195
|
|
]
|
|
},
|
|
"id": 196,
|
|
"license": "AGPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 150,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".10"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "38:24:2"
|
|
},
|
|
{
|
|
"abstract": false,
|
|
"baseContracts": [],
|
|
"canonicalName": "ITransferStrategyBase",
|
|
"contractDependencies": [],
|
|
"contractKind": "interface",
|
|
"fullyImplemented": false,
|
|
"id": 195,
|
|
"linearizedBaseContracts": [
|
|
195
|
|
],
|
|
"name": "ITransferStrategyBase",
|
|
"nameLocation": "76:21:2",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"anonymous": false,
|
|
"eventSelector": "7dc4ea712e6400e67a5abca1a983e5c420c386c19936dc120cd860b50b8e2579",
|
|
"id": 160,
|
|
"name": "EmergencyWithdrawal",
|
|
"nameLocation": "109:19:2",
|
|
"nodeType": "EventDefinition",
|
|
"parameters": {
|
|
"id": 159,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 152,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "caller",
|
|
"nameLocation": "151:6:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 160,
|
|
"src": "135:22:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 151,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "135:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 154,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "180:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 160,
|
|
"src": "164:21:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 153,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "164:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 156,
|
|
"indexed": true,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "208:2:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 160,
|
|
"src": "192:18:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 155,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "192:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 158,
|
|
"indexed": false,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "225:6:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 160,
|
|
"src": "217:14:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 157,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "217:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "128:108:2"
|
|
},
|
|
"src": "103:134:2"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 161,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "243:347:2",
|
|
"text": " @dev Perform custom transfer logic via delegate call from source contract to a TransferStrategy implementation\n @param to Account to transfer rewards\n @param reward Address of the reward token\n @param amount Amount to transfer to the \"to\" address parameter\n @return Returns true bool if transfer logic succeeds"
|
|
},
|
|
"functionSelector": "16beb982",
|
|
"id": 172,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "performTransfer",
|
|
"nameLocation": "603:15:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 168,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 163,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "627:2:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 172,
|
|
"src": "619:10:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 162,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "619:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 165,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "639:6:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 172,
|
|
"src": "631:14:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 164,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "631:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 167,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "655:6:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 172,
|
|
"src": "647:14:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 166,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "647:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "618:44:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 171,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 170,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 172,
|
|
"src": "681:4:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 169,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "681:4:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "680:6:2"
|
|
},
|
|
"scope": 195,
|
|
"src": "594:93:2",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 173,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "693:73:2",
|
|
"text": " @return Returns the address of the Incentives Controller"
|
|
},
|
|
"functionSelector": "75d26413",
|
|
"id": 178,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getIncentivesController",
|
|
"nameLocation": "779:23:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 174,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "802:2:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 177,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 176,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 178,
|
|
"src": "828:7:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 175,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "828:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "827:9:2"
|
|
},
|
|
"scope": 195,
|
|
"src": "770:67:2",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 179,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "843:65:2",
|
|
"text": " @return Returns the address of the Rewards admin"
|
|
},
|
|
"functionSelector": "c6255443",
|
|
"id": 184,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getRewardsAdmin",
|
|
"nameLocation": "921:15:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 180,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "936:2:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 183,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 182,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 184,
|
|
"src": "962:7:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 181,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "962:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "961:9:2"
|
|
},
|
|
"scope": 195,
|
|
"src": "912:59:2",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"documentation": {
|
|
"id": 185,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "977:275:2",
|
|
"text": " @dev Perform an emergency token withdrawal only callable by the Rewards admin\n @param token Address of the token to withdraw funds from this contract\n @param to Address of the recipient of the withdrawal\n @param amount Amount of the withdrawal"
|
|
},
|
|
"functionSelector": "8d8e5da7",
|
|
"id": 194,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "emergencyWithdrawal",
|
|
"nameLocation": "1265:19:2",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 192,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 187,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "1293:5:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 194,
|
|
"src": "1285:13:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 186,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1285:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 189,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "1308:2:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 194,
|
|
"src": "1300:10:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 188,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1300:7:2",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 191,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "1320:6:2",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 194,
|
|
"src": "1312:14:2",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 190,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1312:7:2",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1284:43:2"
|
|
},
|
|
"returnParameters": {
|
|
"id": 193,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1336:0:2"
|
|
},
|
|
"scope": 195,
|
|
"src": "1256:81:2",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 196,
|
|
"src": "66:1274:2",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
160
|
|
]
|
|
}
|
|
],
|
|
"src": "38:1304:2"
|
|
},
|
|
"id": 2
|
|
},
|
|
"contracts/rewards/transfer-strategies/TransferStrategyBase.sol": {
|
|
"ast": {
|
|
"absolutePath": "contracts/rewards/transfer-strategies/TransferStrategyBase.sol",
|
|
"exportedSymbols": {
|
|
"GPv2SafeERC20": [
|
|
70
|
|
],
|
|
"IERC20": [
|
|
148
|
|
],
|
|
"ITransferStrategyBase": [
|
|
195
|
|
],
|
|
"TransferStrategyBase": [
|
|
318
|
|
]
|
|
},
|
|
"id": 319,
|
|
"license": "AGPL-3.0",
|
|
"nodeType": "SourceUnit",
|
|
"nodes": [
|
|
{
|
|
"id": 197,
|
|
"literals": [
|
|
"solidity",
|
|
"^",
|
|
"0.8",
|
|
".10"
|
|
],
|
|
"nodeType": "PragmaDirective",
|
|
"src": "38:24:3"
|
|
},
|
|
{
|
|
"absolutePath": "contracts/rewards/interfaces/ITransferStrategyBase.sol",
|
|
"file": "../interfaces/ITransferStrategyBase.sol",
|
|
"id": 199,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 319,
|
|
"sourceUnit": 196,
|
|
"src": "66:78:3",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 198,
|
|
"name": "ITransferStrategyBase",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 195,
|
|
"src": "74:21:3",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol",
|
|
"file": "@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol",
|
|
"id": 201,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 319,
|
|
"sourceUnit": 71,
|
|
"src": "146:102:3",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 200,
|
|
"name": "GPv2SafeERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 70,
|
|
"src": "154:13:3",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"absolutePath": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"file": "@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol",
|
|
"id": 203,
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "ImportDirective",
|
|
"scope": 319,
|
|
"sourceUnit": 149,
|
|
"src": "250:94:3",
|
|
"symbolAliases": [
|
|
{
|
|
"foreign": {
|
|
"id": 202,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 148,
|
|
"src": "258:6:3",
|
|
"typeDescriptions": {}
|
|
},
|
|
"nameLocation": "-1:-1:-1"
|
|
}
|
|
],
|
|
"unitAlias": ""
|
|
},
|
|
{
|
|
"abstract": true,
|
|
"baseContracts": [
|
|
{
|
|
"baseName": {
|
|
"id": 205,
|
|
"name": "ITransferStrategyBase",
|
|
"nameLocations": [
|
|
"453:21:3"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 195,
|
|
"src": "453:21:3"
|
|
},
|
|
"id": 206,
|
|
"nodeType": "InheritanceSpecifier",
|
|
"src": "453:21:3"
|
|
}
|
|
],
|
|
"canonicalName": "TransferStrategyBase",
|
|
"contractDependencies": [],
|
|
"contractKind": "contract",
|
|
"documentation": {
|
|
"id": 204,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "348:61:3",
|
|
"text": " @title TransferStrategyStorage\n @author Aave*"
|
|
},
|
|
"fullyImplemented": false,
|
|
"id": 318,
|
|
"linearizedBaseContracts": [
|
|
318,
|
|
195
|
|
],
|
|
"name": "TransferStrategyBase",
|
|
"nameLocation": "429:20:3",
|
|
"nodeType": "ContractDefinition",
|
|
"nodes": [
|
|
{
|
|
"global": false,
|
|
"id": 210,
|
|
"libraryName": {
|
|
"id": 207,
|
|
"name": "GPv2SafeERC20",
|
|
"nameLocations": [
|
|
"486:13:3"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 70,
|
|
"src": "486:13:3"
|
|
},
|
|
"nodeType": "UsingForDirective",
|
|
"src": "480:31:3",
|
|
"typeName": {
|
|
"id": 209,
|
|
"nodeType": "UserDefinedTypeName",
|
|
"pathNode": {
|
|
"id": 208,
|
|
"name": "IERC20",
|
|
"nameLocations": [
|
|
"504:6:3"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 148,
|
|
"src": "504:6:3"
|
|
},
|
|
"referencedDeclaration": 148,
|
|
"src": "504:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 212,
|
|
"mutability": "immutable",
|
|
"name": "INCENTIVES_CONTROLLER",
|
|
"nameLocation": "544:21:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 318,
|
|
"src": "517:48:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 211,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "517:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 214,
|
|
"mutability": "immutable",
|
|
"name": "REWARDS_ADMIN",
|
|
"nameLocation": "597:13:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 318,
|
|
"src": "570:40:3",
|
|
"stateVariable": true,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 213,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "570:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 229,
|
|
"nodeType": "Block",
|
|
"src": "681:92:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 223,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 221,
|
|
"name": "INCENTIVES_CONTROLLER",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 212,
|
|
"src": "688:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 222,
|
|
"name": "incentivesController",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 216,
|
|
"src": "712:20:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "688:44:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 224,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "688:44:3"
|
|
},
|
|
{
|
|
"expression": {
|
|
"id": 227,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftHandSide": {
|
|
"id": 225,
|
|
"name": "REWARDS_ADMIN",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 214,
|
|
"src": "739:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "Assignment",
|
|
"operator": "=",
|
|
"rightHandSide": {
|
|
"id": 226,
|
|
"name": "rewardsAdmin",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 218,
|
|
"src": "755:12:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "739:28:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"id": 228,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "739:28:3"
|
|
}
|
|
]
|
|
},
|
|
"id": 230,
|
|
"implemented": true,
|
|
"kind": "constructor",
|
|
"modifiers": [],
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 219,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 216,
|
|
"mutability": "mutable",
|
|
"name": "incentivesController",
|
|
"nameLocation": "637:20:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 230,
|
|
"src": "629:28:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 215,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "629:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 218,
|
|
"mutability": "mutable",
|
|
"name": "rewardsAdmin",
|
|
"nameLocation": "667:12:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 230,
|
|
"src": "659:20:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 217,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "659:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "628:52:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 220,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "681:0:3"
|
|
},
|
|
"scope": 318,
|
|
"src": "617:156:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 242,
|
|
"nodeType": "Block",
|
|
"src": "890:101:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 237,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"id": 234,
|
|
"name": "INCENTIVES_CONTROLLER",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 212,
|
|
"src": "905:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"expression": {
|
|
"id": 235,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967281,
|
|
"src": "930:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 236,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "934:6:3",
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "930:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "905:35:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "43414c4c45525f4e4f545f494e43454e54495645535f434f4e54524f4c4c4552",
|
|
"id": 238,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "942:34:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_81338f1a577db8c7c83833eb7ec6bb164402c9f5cc1b20dac857316f1c65643a",
|
|
"typeString": "literal_string \"CALLER_NOT_INCENTIVES_CONTROLLER\""
|
|
},
|
|
"value": "CALLER_NOT_INCENTIVES_CONTROLLER"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_81338f1a577db8c7c83833eb7ec6bb164402c9f5cc1b20dac857316f1c65643a",
|
|
"typeString": "literal_string \"CALLER_NOT_INCENTIVES_CONTROLLER\""
|
|
}
|
|
],
|
|
"id": 233,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "897:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 239,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "897:80:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 240,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "897:80:3"
|
|
},
|
|
{
|
|
"id": 241,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "984:1:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 231,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "779:71:3",
|
|
"text": " @dev Modifier for incentives controller only functions"
|
|
},
|
|
"id": 243,
|
|
"name": "onlyIncentivesController",
|
|
"nameLocation": "863:24:3",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 232,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "887:2:3"
|
|
},
|
|
"src": "854:137:3",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"body": {
|
|
"id": 255,
|
|
"nodeType": "Block",
|
|
"src": "1091:79:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"commonType": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"id": 250,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"leftExpression": {
|
|
"expression": {
|
|
"id": 247,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967281,
|
|
"src": "1106:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 248,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1110:6:3",
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1106:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"nodeType": "BinaryOperation",
|
|
"operator": "==",
|
|
"rightExpression": {
|
|
"id": 249,
|
|
"name": "REWARDS_ADMIN",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 214,
|
|
"src": "1120:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"src": "1106:27:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
{
|
|
"hexValue": "4f4e4c595f524557415244535f41444d494e",
|
|
"id": 251,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": true,
|
|
"kind": "string",
|
|
"lValueRequested": false,
|
|
"nodeType": "Literal",
|
|
"src": "1135:20:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_stringliteral_3f731c6282513aad661017d660e9777df98697b25477c4a167f4ae2ad258b6ef",
|
|
"typeString": "literal_string \"ONLY_REWARDS_ADMIN\""
|
|
},
|
|
"value": "ONLY_REWARDS_ADMIN"
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_stringliteral_3f731c6282513aad661017d660e9777df98697b25477c4a167f4ae2ad258b6ef",
|
|
"typeString": "literal_string \"ONLY_REWARDS_ADMIN\""
|
|
}
|
|
],
|
|
"id": 246,
|
|
"name": "require",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [
|
|
4294967278,
|
|
4294967278,
|
|
4294967278
|
|
],
|
|
"referencedDeclaration": 4294967278,
|
|
"src": "1098:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
|
|
"typeString": "function (bool,string memory) pure"
|
|
}
|
|
},
|
|
"id": 252,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1098:58:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 253,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1098:58:3"
|
|
},
|
|
{
|
|
"id": 254,
|
|
"nodeType": "PlaceholderStatement",
|
|
"src": "1163:1:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 244,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "997:62:3",
|
|
"text": " @dev Modifier for reward admin only functions"
|
|
},
|
|
"id": 256,
|
|
"name": "onlyRewardsAdmin",
|
|
"nameLocation": "1072:16:3",
|
|
"nodeType": "ModifierDefinition",
|
|
"parameters": {
|
|
"id": 245,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1088:2:3"
|
|
},
|
|
"src": "1063:107:3",
|
|
"virtual": false,
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
178
|
|
],
|
|
"body": {
|
|
"id": 265,
|
|
"nodeType": "Block",
|
|
"src": "1293:41:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 263,
|
|
"name": "INCENTIVES_CONTROLLER",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 212,
|
|
"src": "1307:21:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 262,
|
|
"id": 264,
|
|
"nodeType": "Return",
|
|
"src": "1300:28:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 257,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1176:37:3",
|
|
"text": "@inheritdoc ITransferStrategyBase"
|
|
},
|
|
"functionSelector": "75d26413",
|
|
"id": 266,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getIncentivesController",
|
|
"nameLocation": "1226:23:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 259,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "1266:8:3"
|
|
},
|
|
"parameters": {
|
|
"id": 258,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1249:2:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 262,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 261,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 266,
|
|
"src": "1284:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 260,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1284:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1283:9:3"
|
|
},
|
|
"scope": 318,
|
|
"src": "1217:117:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
184
|
|
],
|
|
"body": {
|
|
"id": 275,
|
|
"nodeType": "Block",
|
|
"src": "1449:33:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"id": 273,
|
|
"name": "REWARDS_ADMIN",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 214,
|
|
"src": "1463:13:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"functionReturnParameters": 272,
|
|
"id": 274,
|
|
"nodeType": "Return",
|
|
"src": "1456:20:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 267,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1340:37:3",
|
|
"text": "@inheritdoc ITransferStrategyBase"
|
|
},
|
|
"functionSelector": "c6255443",
|
|
"id": 276,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "getRewardsAdmin",
|
|
"nameLocation": "1390:15:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"overrides": {
|
|
"id": 269,
|
|
"nodeType": "OverrideSpecifier",
|
|
"overrides": [],
|
|
"src": "1422:8:3"
|
|
},
|
|
"parameters": {
|
|
"id": 268,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1405:2:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 272,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 271,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 276,
|
|
"src": "1440:7:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 270,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1440:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1439:9:3"
|
|
},
|
|
"scope": 318,
|
|
"src": "1381:101:3",
|
|
"stateMutability": "view",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
172
|
|
],
|
|
"documentation": {
|
|
"id": 277,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1488:37:3",
|
|
"text": "@inheritdoc ITransferStrategyBase"
|
|
},
|
|
"functionSelector": "16beb982",
|
|
"id": 288,
|
|
"implemented": false,
|
|
"kind": "function",
|
|
"modifiers": [],
|
|
"name": "performTransfer",
|
|
"nameLocation": "1538:15:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 284,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 279,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "1568:2:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 288,
|
|
"src": "1560:10:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 278,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1560:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 281,
|
|
"mutability": "mutable",
|
|
"name": "reward",
|
|
"nameLocation": "1585:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 288,
|
|
"src": "1577:14:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 280,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1577:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 283,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "1606:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 288,
|
|
"src": "1598:14:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 282,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1598:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1553:64:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 287,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 286,
|
|
"mutability": "mutable",
|
|
"name": "",
|
|
"nameLocation": "-1:-1:-1",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 288,
|
|
"src": "1644:4:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
},
|
|
"typeName": {
|
|
"id": 285,
|
|
"name": "bool",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1644:4:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_bool",
|
|
"typeString": "bool"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1643:6:3"
|
|
},
|
|
"scope": 318,
|
|
"src": "1529:121:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": true,
|
|
"visibility": "external"
|
|
},
|
|
{
|
|
"baseFunctions": [
|
|
194
|
|
],
|
|
"body": {
|
|
"id": 316,
|
|
"nodeType": "Block",
|
|
"src": "1815:115:3",
|
|
"statements": [
|
|
{
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 304,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 293,
|
|
"src": "1849:2:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 305,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 295,
|
|
"src": "1853:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"expression": {
|
|
"arguments": [
|
|
{
|
|
"id": 301,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 291,
|
|
"src": "1829:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
],
|
|
"id": 300,
|
|
"name": "IERC20",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 148,
|
|
"src": "1822:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_type$_t_contract$_IERC20_$148_$",
|
|
"typeString": "type(contract IERC20)"
|
|
}
|
|
},
|
|
"id": 302,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "typeConversion",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1822:13:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_contract$_IERC20_$148",
|
|
"typeString": "contract IERC20"
|
|
}
|
|
},
|
|
"id": 303,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1836:12:3",
|
|
"memberName": "safeTransfer",
|
|
"nodeType": "MemberAccess",
|
|
"referencedDeclaration": 30,
|
|
"src": "1822:26:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$148_$_t_address_$_t_uint256_$returns$__$attached_to$_t_contract$_IERC20_$148_$",
|
|
"typeString": "function (contract IERC20,address,uint256)"
|
|
}
|
|
},
|
|
"id": 306,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1822:38:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 307,
|
|
"nodeType": "ExpressionStatement",
|
|
"src": "1822:38:3"
|
|
},
|
|
{
|
|
"eventCall": {
|
|
"arguments": [
|
|
{
|
|
"expression": {
|
|
"id": 309,
|
|
"name": "msg",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 4294967281,
|
|
"src": "1894:3:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_magic_message",
|
|
"typeString": "msg"
|
|
}
|
|
},
|
|
"id": 310,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"lValueRequested": false,
|
|
"memberLocation": "1898:6:3",
|
|
"memberName": "sender",
|
|
"nodeType": "MemberAccess",
|
|
"src": "1894:10:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 311,
|
|
"name": "token",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 291,
|
|
"src": "1906:5:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 312,
|
|
"name": "to",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 293,
|
|
"src": "1913:2:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
{
|
|
"id": 313,
|
|
"name": "amount",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 295,
|
|
"src": "1917:6:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
}
|
|
],
|
|
"expression": {
|
|
"argumentTypes": [
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
{
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
],
|
|
"id": 308,
|
|
"name": "EmergencyWithdrawal",
|
|
"nodeType": "Identifier",
|
|
"overloadedDeclarations": [],
|
|
"referencedDeclaration": 160,
|
|
"src": "1874:19:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_uint256_$returns$__$",
|
|
"typeString": "function (address,address,address,uint256)"
|
|
}
|
|
},
|
|
"id": 314,
|
|
"isConstant": false,
|
|
"isLValue": false,
|
|
"isPure": false,
|
|
"kind": "functionCall",
|
|
"lValueRequested": false,
|
|
"nameLocations": [],
|
|
"names": [],
|
|
"nodeType": "FunctionCall",
|
|
"src": "1874:50:3",
|
|
"tryCall": false,
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_tuple$__$",
|
|
"typeString": "tuple()"
|
|
}
|
|
},
|
|
"id": 315,
|
|
"nodeType": "EmitStatement",
|
|
"src": "1869:55:3"
|
|
}
|
|
]
|
|
},
|
|
"documentation": {
|
|
"id": 289,
|
|
"nodeType": "StructuredDocumentation",
|
|
"src": "1656:37:3",
|
|
"text": "@inheritdoc ITransferStrategyBase"
|
|
},
|
|
"functionSelector": "8d8e5da7",
|
|
"id": 317,
|
|
"implemented": true,
|
|
"kind": "function",
|
|
"modifiers": [
|
|
{
|
|
"id": 298,
|
|
"kind": "modifierInvocation",
|
|
"modifierName": {
|
|
"id": 297,
|
|
"name": "onlyRewardsAdmin",
|
|
"nameLocations": [
|
|
"1798:16:3"
|
|
],
|
|
"nodeType": "IdentifierPath",
|
|
"referencedDeclaration": 256,
|
|
"src": "1798:16:3"
|
|
},
|
|
"nodeType": "ModifierInvocation",
|
|
"src": "1798:16:3"
|
|
}
|
|
],
|
|
"name": "emergencyWithdrawal",
|
|
"nameLocation": "1706:19:3",
|
|
"nodeType": "FunctionDefinition",
|
|
"parameters": {
|
|
"id": 296,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [
|
|
{
|
|
"constant": false,
|
|
"id": 291,
|
|
"mutability": "mutable",
|
|
"name": "token",
|
|
"nameLocation": "1740:5:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 317,
|
|
"src": "1732:13:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 290,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1732:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 293,
|
|
"mutability": "mutable",
|
|
"name": "to",
|
|
"nameLocation": "1760:2:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 317,
|
|
"src": "1752:10:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
},
|
|
"typeName": {
|
|
"id": 292,
|
|
"name": "address",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1752:7:3",
|
|
"stateMutability": "nonpayable",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_address",
|
|
"typeString": "address"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
},
|
|
{
|
|
"constant": false,
|
|
"id": 295,
|
|
"mutability": "mutable",
|
|
"name": "amount",
|
|
"nameLocation": "1777:6:3",
|
|
"nodeType": "VariableDeclaration",
|
|
"scope": 317,
|
|
"src": "1769:14:3",
|
|
"stateVariable": false,
|
|
"storageLocation": "default",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
},
|
|
"typeName": {
|
|
"id": 294,
|
|
"name": "uint256",
|
|
"nodeType": "ElementaryTypeName",
|
|
"src": "1769:7:3",
|
|
"typeDescriptions": {
|
|
"typeIdentifier": "t_uint256",
|
|
"typeString": "uint256"
|
|
}
|
|
},
|
|
"visibility": "internal"
|
|
}
|
|
],
|
|
"src": "1725:63:3"
|
|
},
|
|
"returnParameters": {
|
|
"id": 299,
|
|
"nodeType": "ParameterList",
|
|
"parameters": [],
|
|
"src": "1815:0:3"
|
|
},
|
|
"scope": 318,
|
|
"src": "1697:233:3",
|
|
"stateMutability": "nonpayable",
|
|
"virtual": false,
|
|
"visibility": "external"
|
|
}
|
|
],
|
|
"scope": 319,
|
|
"src": "411:1522:3",
|
|
"usedErrors": [],
|
|
"usedEvents": [
|
|
160
|
|
]
|
|
}
|
|
],
|
|
"src": "38:1897:3"
|
|
},
|
|
"id": 3
|
|
}
|
|
}
|
|
}
|
|
} |