open-dex/contracts/libraries/artifacts/build-info/5f200d33a1ad6b787531720273db694c.json
2024-08-24 12:08:46 +03:00

4044 lines
141 KiB
JSON

{
"id": "5f200d33a1ad6b787531720273db694c",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.26",
"solcLongVersion": "0.8.26+commit.8a97fa7a",
"input": {
"language": "Solidity",
"sources": {
"contracts/libraries/TransferHelper.sol": {
"content": "// SPDX-License-Identifier: GPL-2.0-or-later\r\npragma solidity >=0.6.0;\r\n\r\nimport '@openzeppelin/contracts/token/ERC20/IERC20.sol';\r\n\r\nlibrary TransferHelper {\r\n /// @notice Transfers tokens from the targeted address to the given destination\r\n /// @notice Errors with 'STF' if transfer fails\r\n /// @param token The contract address of the token to be transferred\r\n /// @param from The originating address from which the tokens will be transferred\r\n /// @param to The destination address of the transfer\r\n /// @param value The amount to be transferred\r\n function safeTransferFrom(\r\n address token,\r\n address from,\r\n address to,\r\n uint256 value\r\n ) internal {\r\n (bool success, bytes memory data) =\r\n token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value));\r\n require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF');\r\n }\r\n\r\n /// @notice Transfers tokens from msg.sender to a recipient\r\n /// @dev Errors with ST if transfer fails\r\n /// @param token The contract address of the token which will be transferred\r\n /// @param to The recipient of the transfer\r\n /// @param value The value of the transfer\r\n function safeTransfer(\r\n address token,\r\n address to,\r\n uint256 value\r\n ) internal {\r\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));\r\n require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST');\r\n }\r\n\r\n /// @notice Approves the stipulated contract to spend the given allowance in the given token\r\n /// @dev Errors with 'SA' if transfer fails\r\n /// @param token The contract address of the token to be approved\r\n /// @param to The target of the approval\r\n /// @param value The amount of the given token the target will be allowed to spend\r\n function safeApprove(\r\n address token,\r\n address to,\r\n uint256 value\r\n ) internal {\r\n (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));\r\n require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA');\r\n }\r\n\r\n /// @notice Transfers ETH to the recipient address\r\n /// @dev Fails with `STE`\r\n /// @param to The destination of the transfer\r\n /// @param value The value to be transferred\r\n function safeTransferETH(address to, uint256 value) internal {\r\n (bool success, ) = to.call{value: value}(new bytes(0));\r\n require(success, 'STE');\r\n }\r\n}\r\n"
},
"@openzeppelin/contracts/token/ERC20/IERC20.sol": {
"content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the value of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the value of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 value) 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 a `value` amount of tokens as the allowance of `spender` over the\n * 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 value) external returns (bool);\n\n /**\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\n * allowance mechanism. `value` 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 from, address to, uint256 value) external returns (bool);\n}\n"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"": [
"ast"
],
"*": [
"abi",
"metadata",
"devdoc",
"userdoc",
"storageLayout",
"evm.legacyAssembly",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers",
"evm.gasEstimates",
"evm.assembly"
]
}
},
"remappings": []
}
},
"output": {
"contracts": {
"@openzeppelin/contracts/token/ERC20/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": "value",
"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": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"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 a `value` amount of tokens 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 value of tokens owned by `account`."
},
"totalSupply()": {
"details": "Returns the value of tokens in existence."
},
"transfer(address,uint256)": {
"details": "Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event."
},
"transferFrom(address,address,uint256)": {
"details": "Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` 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\":\"value\",\"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\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"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 a `value` amount of tokens 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 value of tokens owned by `account`.\"},\"totalSupply()\":{\"details\":\"Returns the value of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from the caller's account to `to`. Returns a boolean value indicating whether the operation succeeded. Emits a {Transfer} event.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism. `value` 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\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":\"IERC20\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
},
"contracts/libraries/TransferHelper.sol": {
"TransferHelper": {
"abi": [],
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"evm": {
"assembly": " /* \"contracts/libraries/TransferHelper.sol\":134:2596 library TransferHelper {... */\n dataSize(sub_0)\n dataOffset(sub_0)\n 0x0b\n dup3\n dup3\n dup3\n codecopy\n dup1\n mload\n 0x00\n byte\n 0x73\n eq\n tag_1\n jumpi\n mstore(0x00, 0x4e487b7100000000000000000000000000000000000000000000000000000000)\n mstore(0x04, 0x00)\n revert(0x00, 0x24)\ntag_1:\n mstore(0x00, address)\n 0x73\n dup2\n mstore8\n dup3\n dup2\n return\nstop\n\nsub_0: assembly {\n /* \"contracts/libraries/TransferHelper.sol\":134:2596 library TransferHelper {... */\n eq(address, deployTimeAddress())\n mstore(0x40, 0x80)\n 0x00\n dup1\n revert\n\n auxdata: 0xa26469706673582212201e0b8944569ba380a42b3da0ef50102ce9dd495a05a3c6edfcf5eb4f43e0b07664736f6c634300081a0033\n}\n",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212201e0b8944569ba380a42b3da0ef50102ce9dd495a05a3c6edfcf5eb4f43e0b07664736f6c634300081a0033",
"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 0x1E SIGNEXTEND DUP10 PREVRANDAO JUMP SWAP12 LOG3 DUP1 LOG4 0x2B RETURNDATASIZE LOG0 0xEF POP LT 0x2C 0xE9 0xDD BLOBHASH GAS SDIV LOG3 0xC6 0xED 0xFC CREATE2 0xEB 0x4F NUMBER 0xE0 0xB0 PUSH23 0x64736F6C634300081A0033000000000000000000000000 ",
"sourceMap": "134:2462:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212201e0b8944569ba380a42b3da0ef50102ce9dd495a05a3c6edfcf5eb4f43e0b07664736f6c634300081a0033",
"opcodes": "PUSH20 0x0 ADDRESS EQ PUSH1 0x80 PUSH1 0x40 MSTORE PUSH0 DUP1 REVERT INVALID LOG2 PUSH5 0x6970667358 0x22 SLT KECCAK256 0x1E SIGNEXTEND DUP10 PREVRANDAO JUMP SWAP12 LOG3 DUP1 LOG4 0x2B RETURNDATASIZE LOG0 0xEF POP LT 0x2C 0xE9 0xDD BLOBHASH GAS SDIV LOG3 0xC6 0xED 0xFC CREATE2 0xEB 0x4F NUMBER 0xE0 0xB0 PUSH23 0x64736F6C634300081A0033000000000000000000000000 ",
"sourceMap": "134:2462:1:-:0;;;;;;;;"
},
"gasEstimates": {
"creation": {
"codeDepositCost": "17000",
"executionCost": "92",
"totalCost": "17092"
},
"internal": {
"safeApprove(address,address,uint256)": "infinite",
"safeTransfer(address,address,uint256)": "infinite",
"safeTransferETH(address,uint256)": "infinite",
"safeTransferFrom(address,address,address,uint256)": "infinite"
}
},
"legacyAssembly": {
".code": [
{
"begin": 134,
"end": 2596,
"name": "PUSH #[$]",
"source": 1,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 134,
"end": 2596,
"name": "PUSH [$]",
"source": 1,
"value": "0000000000000000000000000000000000000000000000000000000000000000"
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "B"
},
{
"begin": 134,
"end": 2596,
"name": "DUP3",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "DUP3",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "DUP3",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "CODECOPY",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "DUP1",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "MLOAD",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 134,
"end": 2596,
"name": "BYTE",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "73"
},
{
"begin": 134,
"end": 2596,
"name": "EQ",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "PUSH [tag]",
"source": 1,
"value": "1"
},
{
"begin": 134,
"end": 2596,
"name": "JUMPI",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "4E487B7100000000000000000000000000000000000000000000000000000000"
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 134,
"end": 2596,
"name": "MSTORE",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "4"
},
{
"begin": 134,
"end": 2596,
"name": "MSTORE",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "24"
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 134,
"end": 2596,
"name": "REVERT",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "tag",
"source": 1,
"value": "1"
},
{
"begin": 134,
"end": 2596,
"name": "JUMPDEST",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "ADDRESS",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 134,
"end": 2596,
"name": "MSTORE",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "73"
},
{
"begin": 134,
"end": 2596,
"name": "DUP2",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "MSTORE8",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "DUP3",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "DUP2",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "RETURN",
"source": 1
}
],
".data": {
"0": {
".auxdata": "a26469706673582212201e0b8944569ba380a42b3da0ef50102ce9dd495a05a3c6edfcf5eb4f43e0b07664736f6c634300081a0033",
".code": [
{
"begin": 134,
"end": 2596,
"name": "PUSHDEPLOYADDRESS",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "ADDRESS",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "EQ",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "80"
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "40"
},
{
"begin": 134,
"end": 2596,
"name": "MSTORE",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "PUSH",
"source": 1,
"value": "0"
},
{
"begin": 134,
"end": 2596,
"name": "DUP1",
"source": 1
},
{
"begin": 134,
"end": 2596,
"name": "REVERT",
"source": 1
}
]
}
},
"sourceList": [
"@openzeppelin/contracts/token/ERC20/IERC20.sol",
"contracts/libraries/TransferHelper.sol",
"#utility.yul"
]
},
"methodIdentifiers": {}
},
"metadata": "{\"compiler\":{\"version\":\"0.8.26+commit.8a97fa7a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/libraries/TransferHelper.sol\":\"TransferHelper\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://0ea104e577e63faea3b69c415637e99e755dcbf64c5833d7140c35a714d6d90c\",\"dweb:/ipfs/Qmau6x4Ns9XdyynRCNNp3RhLqijJjFm7z5fyZazfYFGYdq\"]},\"contracts/libraries/TransferHelper.sol\":{\"keccak256\":\"0xdd6bdb15d86cea91b32e431a3665fb02d89cd2e3ac364defdd4996c984f3b2ef\",\"license\":\"GPL-2.0-or-later\",\"urls\":[\"bzz-raw://ea225076bf821ab6be89f44aeb024ada5ad96dd5b0a59721b57b3634a24da67a\",\"dweb:/ipfs/QmThwpyvdpBuDGfaWQPvnNuTS2bbhr6zCaJB5pGHkxkuj7\"]}},\"version\":1}",
"storageLayout": {
"storage": [],
"types": null
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
}
}
}
},
"sources": {
"@openzeppelin/contracts/token/ERC20/IERC20.sol": {
"ast": {
"absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"exportedSymbols": {
"IERC20": [
77
]
},
"id": 78,
"license": "MIT",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 1,
"literals": [
"solidity",
"^",
"0.8",
".20"
],
"nodeType": "PragmaDirective",
"src": "106:24:0"
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "IERC20",
"contractDependencies": [],
"contractKind": "interface",
"documentation": {
"id": 2,
"nodeType": "StructuredDocumentation",
"src": "132:70:0",
"text": " @dev Interface of the ERC20 standard as defined in the EIP."
},
"fullyImplemented": false,
"id": 77,
"linearizedBaseContracts": [
77
],
"name": "IERC20",
"nameLocation": "213:6:0",
"nodeType": "ContractDefinition",
"nodes": [
{
"anonymous": false,
"documentation": {
"id": 3,
"nodeType": "StructuredDocumentation",
"src": "226:158:0",
"text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero."
},
"eventSelector": "ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"id": 11,
"name": "Transfer",
"nameLocation": "395:8:0",
"nodeType": "EventDefinition",
"parameters": {
"id": 10,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 5,
"indexed": true,
"mutability": "mutable",
"name": "from",
"nameLocation": "420:4:0",
"nodeType": "VariableDeclaration",
"scope": 11,
"src": "404:20:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 4,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "404:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 7,
"indexed": true,
"mutability": "mutable",
"name": "to",
"nameLocation": "442:2:0",
"nodeType": "VariableDeclaration",
"scope": 11,
"src": "426:18:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 6,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "426:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 9,
"indexed": false,
"mutability": "mutable",
"name": "value",
"nameLocation": "454:5:0",
"nodeType": "VariableDeclaration",
"scope": 11,
"src": "446:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 8,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "446:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "403:57:0"
},
"src": "389:72:0"
},
{
"anonymous": false,
"documentation": {
"id": 12,
"nodeType": "StructuredDocumentation",
"src": "467:148:0",
"text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance."
},
"eventSelector": "8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925",
"id": 20,
"name": "Approval",
"nameLocation": "626:8:0",
"nodeType": "EventDefinition",
"parameters": {
"id": 19,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 14,
"indexed": true,
"mutability": "mutable",
"name": "owner",
"nameLocation": "651:5:0",
"nodeType": "VariableDeclaration",
"scope": 20,
"src": "635:21:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 13,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "635:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 16,
"indexed": true,
"mutability": "mutable",
"name": "spender",
"nameLocation": "674:7:0",
"nodeType": "VariableDeclaration",
"scope": 20,
"src": "658:23:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 15,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "658:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 18,
"indexed": false,
"mutability": "mutable",
"name": "value",
"nameLocation": "691:5:0",
"nodeType": "VariableDeclaration",
"scope": 20,
"src": "683:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 17,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "683:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "634:63:0"
},
"src": "620:78:0"
},
{
"documentation": {
"id": 21,
"nodeType": "StructuredDocumentation",
"src": "704:65:0",
"text": " @dev Returns the value of tokens in existence."
},
"functionSelector": "18160ddd",
"id": 26,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "totalSupply",
"nameLocation": "783:11:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 22,
"nodeType": "ParameterList",
"parameters": [],
"src": "794:2:0"
},
"returnParameters": {
"id": 25,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 24,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 26,
"src": "820:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 23,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "820:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "819:9:0"
},
"scope": 77,
"src": "774:55:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 27,
"nodeType": "StructuredDocumentation",
"src": "835:71:0",
"text": " @dev Returns the value of tokens owned by `account`."
},
"functionSelector": "70a08231",
"id": 34,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "balanceOf",
"nameLocation": "920:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 30,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 29,
"mutability": "mutable",
"name": "account",
"nameLocation": "938:7:0",
"nodeType": "VariableDeclaration",
"scope": 34,
"src": "930:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 28,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "930:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "929:17:0"
},
"returnParameters": {
"id": 33,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 32,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 34,
"src": "970:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 31,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "970:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "969:9:0"
},
"scope": 77,
"src": "911:68:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 35,
"nodeType": "StructuredDocumentation",
"src": "985:213:0",
"text": " @dev Moves a `value` amount of tokens from the caller's account to `to`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event."
},
"functionSelector": "a9059cbb",
"id": 44,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "transfer",
"nameLocation": "1212:8:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 40,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 37,
"mutability": "mutable",
"name": "to",
"nameLocation": "1229:2:0",
"nodeType": "VariableDeclaration",
"scope": 44,
"src": "1221:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 36,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1221:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 39,
"mutability": "mutable",
"name": "value",
"nameLocation": "1241:5:0",
"nodeType": "VariableDeclaration",
"scope": 44,
"src": "1233:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 38,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1233:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1220:27:0"
},
"returnParameters": {
"id": 43,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 42,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 44,
"src": "1266:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 41,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1266:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "1265:6:0"
},
"scope": 77,
"src": "1203:69:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 45,
"nodeType": "StructuredDocumentation",
"src": "1278:264:0",
"text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called."
},
"functionSelector": "dd62ed3e",
"id": 54,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "allowance",
"nameLocation": "1556:9:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 50,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 47,
"mutability": "mutable",
"name": "owner",
"nameLocation": "1574:5:0",
"nodeType": "VariableDeclaration",
"scope": 54,
"src": "1566:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 46,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1566:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 49,
"mutability": "mutable",
"name": "spender",
"nameLocation": "1589:7:0",
"nodeType": "VariableDeclaration",
"scope": 54,
"src": "1581:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 48,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1581:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
}
],
"src": "1565:32:0"
},
"returnParameters": {
"id": 53,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 52,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 54,
"src": "1621:7:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 51,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1621:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1620:9:0"
},
"scope": 77,
"src": "1547:83:0",
"stateMutability": "view",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 55,
"nodeType": "StructuredDocumentation",
"src": "1636:667:0",
"text": " @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n 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": 64,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "approve",
"nameLocation": "2317:7:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 60,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 57,
"mutability": "mutable",
"name": "spender",
"nameLocation": "2333:7:0",
"nodeType": "VariableDeclaration",
"scope": 64,
"src": "2325:15:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 56,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2325:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 59,
"mutability": "mutable",
"name": "value",
"nameLocation": "2350:5:0",
"nodeType": "VariableDeclaration",
"scope": 64,
"src": "2342:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 58,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2342:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2324:32:0"
},
"returnParameters": {
"id": 63,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 62,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 64,
"src": "2375:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 61,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2375:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "2374:6:0"
},
"scope": 77,
"src": "2308:73:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
},
{
"documentation": {
"id": 65,
"nodeType": "StructuredDocumentation",
"src": "2387:297:0",
"text": " @dev Moves a `value` amount of tokens from `from` to `to` using the\n allowance mechanism. `value` 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": 76,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "transferFrom",
"nameLocation": "2698:12:0",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 72,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 67,
"mutability": "mutable",
"name": "from",
"nameLocation": "2719:4:0",
"nodeType": "VariableDeclaration",
"scope": 76,
"src": "2711:12:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 66,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2711:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 69,
"mutability": "mutable",
"name": "to",
"nameLocation": "2733:2:0",
"nodeType": "VariableDeclaration",
"scope": 76,
"src": "2725:10:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 68,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2725:7:0",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 71,
"mutability": "mutable",
"name": "value",
"nameLocation": "2745:5:0",
"nodeType": "VariableDeclaration",
"scope": 76,
"src": "2737:13:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 70,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2737:7:0",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2710:41:0"
},
"returnParameters": {
"id": 75,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 74,
"mutability": "mutable",
"name": "",
"nameLocation": "-1:-1:-1",
"nodeType": "VariableDeclaration",
"scope": 76,
"src": "2770:4:0",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 73,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2770:4:0",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
}
],
"src": "2769:6:0"
},
"scope": 77,
"src": "2689:87:0",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "external"
}
],
"scope": 78,
"src": "203:2575:0",
"usedErrors": [],
"usedEvents": [
11,
20
]
}
],
"src": "106:2673:0"
},
"id": 0
},
"contracts/libraries/TransferHelper.sol": {
"ast": {
"absolutePath": "contracts/libraries/TransferHelper.sol",
"exportedSymbols": {
"IERC20": [
77
],
"TransferHelper": [
248
]
},
"id": 249,
"license": "GPL-2.0-or-later",
"nodeType": "SourceUnit",
"nodes": [
{
"id": 79,
"literals": [
"solidity",
">=",
"0.6",
".0"
],
"nodeType": "PragmaDirective",
"src": "46:24:1"
},
{
"absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
"id": 80,
"nameLocation": "-1:-1:-1",
"nodeType": "ImportDirective",
"scope": 249,
"sourceUnit": 78,
"src": "74:56:1",
"symbolAliases": [],
"unitAlias": ""
},
{
"abstract": false,
"baseContracts": [],
"canonicalName": "TransferHelper",
"contractDependencies": [],
"contractKind": "library",
"fullyImplemented": true,
"id": 248,
"linearizedBaseContracts": [
248
],
"name": "TransferHelper",
"nameLocation": "142:14:1",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": {
"id": 128,
"nodeType": "Block",
"src": "707:233:1",
"statements": [
{
"assignments": [
93,
95
],
"declarations": [
{
"constant": false,
"id": 93,
"mutability": "mutable",
"name": "success",
"nameLocation": "724:7:1",
"nodeType": "VariableDeclaration",
"scope": 128,
"src": "719:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 92,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "719:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 95,
"mutability": "mutable",
"name": "data",
"nameLocation": "746:4:1",
"nodeType": "VariableDeclaration",
"scope": 128,
"src": "733:17:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 94,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "733:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 108,
"initialValue": {
"arguments": [
{
"arguments": [
{
"expression": {
"expression": {
"id": 100,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "801:6:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$77_$",
"typeString": "type(contract IERC20)"
}
},
"id": 101,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "808:12:1",
"memberName": "transferFrom",
"nodeType": "MemberAccess",
"referencedDeclaration": 76,
"src": "801:19:1",
"typeDescriptions": {
"typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function IERC20.transferFrom(address,address,uint256) returns (bool)"
}
},
"id": 102,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "821:8:1",
"memberName": "selector",
"nodeType": "MemberAccess",
"src": "801:28:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
{
"id": 103,
"name": "from",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 85,
"src": "831:4:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 104,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 87,
"src": "837:2:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 105,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 89,
"src": "841:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 98,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967295,
"src": "778:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 99,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "782:18:1",
"memberName": "encodeWithSelector",
"nodeType": "MemberAccess",
"src": "778:22:1",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (bytes4) pure returns (bytes memory)"
}
},
"id": 106,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "778:69:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"id": 96,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 83,
"src": "767:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 97,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "773:4:1",
"memberName": "call",
"nodeType": "MemberAccess",
"src": "767:10:1",
"typeDescriptions": {
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
}
},
"id": 107,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "767:81:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "718:130:1"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 124,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 110,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 93,
"src": "867:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 122,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 114,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 111,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 95,
"src": "879:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 112,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "884:6:1",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "879:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 113,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "894:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "879:16:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"arguments": [
{
"id": 117,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 95,
"src": "910:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"components": [
{
"id": 119,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "917:4:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
},
"typeName": {
"id": 118,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "917:4:1",
"typeDescriptions": {}
}
}
],
"id": 120,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "916:6:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
}
],
"expression": {
"id": 115,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967295,
"src": "899:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 116,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "903:6:1",
"memberName": "decode",
"nodeType": "MemberAccess",
"src": "899:10:1",
"typeDescriptions": {
"typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 121,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "899:24:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "879:44:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 123,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "878:46:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "867:57:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "535446",
"id": 125,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "926:5:1",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_a1c4b1d67db284650e7cfb49cb11ce76848206ad466478425bd3418f8bbb9a86",
"typeString": "literal_string \"STF\""
},
"value": "STF"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_a1c4b1d67db284650e7cfb49cb11ce76848206ad466478425bd3418f8bbb9a86",
"typeString": "literal_string \"STF\""
}
],
"id": 109,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "859:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 126,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "859:73:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 127,
"nodeType": "ExpressionStatement",
"src": "859:73:1"
}
]
},
"documentation": {
"id": 81,
"nodeType": "StructuredDocumentation",
"src": "164:403:1",
"text": "@notice Transfers tokens from the targeted address to the given destination\n @notice Errors with 'STF' if transfer fails\n @param token The contract address of the token to be transferred\n @param from The originating address from which the tokens will be transferred\n @param to The destination address of the transfer\n @param value The amount to be transferred"
},
"id": 129,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "safeTransferFrom",
"nameLocation": "582:16:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 90,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 83,
"mutability": "mutable",
"name": "token",
"nameLocation": "617:5:1",
"nodeType": "VariableDeclaration",
"scope": 129,
"src": "609:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 82,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "609:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 85,
"mutability": "mutable",
"name": "from",
"nameLocation": "641:4:1",
"nodeType": "VariableDeclaration",
"scope": 129,
"src": "633:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 84,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "633:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 87,
"mutability": "mutable",
"name": "to",
"nameLocation": "664:2:1",
"nodeType": "VariableDeclaration",
"scope": 129,
"src": "656:10:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 86,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "656:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 89,
"mutability": "mutable",
"name": "value",
"nameLocation": "685:5:1",
"nodeType": "VariableDeclaration",
"scope": 129,
"src": "677:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 88,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "677:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "598:99:1"
},
"returnParameters": {
"id": 91,
"nodeType": "ParameterList",
"parameters": [],
"src": "707:0:1"
},
"scope": 248,
"src": "573:367:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 174,
"nodeType": "Block",
"src": "1346:209:1",
"statements": [
{
"assignments": [
140,
142
],
"declarations": [
{
"constant": false,
"id": 140,
"mutability": "mutable",
"name": "success",
"nameLocation": "1363:7:1",
"nodeType": "VariableDeclaration",
"scope": 174,
"src": "1358:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 139,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1358:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 142,
"mutability": "mutable",
"name": "data",
"nameLocation": "1385:4:1",
"nodeType": "VariableDeclaration",
"scope": 174,
"src": "1372:17:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 141,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "1372:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 154,
"initialValue": {
"arguments": [
{
"arguments": [
{
"expression": {
"expression": {
"id": 147,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "1427:6:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$77_$",
"typeString": "type(contract IERC20)"
}
},
"id": 148,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "1434:8:1",
"memberName": "transfer",
"nodeType": "MemberAccess",
"referencedDeclaration": 44,
"src": "1427:15:1",
"typeDescriptions": {
"typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function IERC20.transfer(address,uint256) returns (bool)"
}
},
"id": 149,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "1443:8:1",
"memberName": "selector",
"nodeType": "MemberAccess",
"src": "1427:24:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
{
"id": 150,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 134,
"src": "1453:2:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 151,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 136,
"src": "1457:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 145,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967295,
"src": "1404:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 146,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "1408:18:1",
"memberName": "encodeWithSelector",
"nodeType": "MemberAccess",
"src": "1404:22:1",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (bytes4) pure returns (bytes memory)"
}
},
"id": 152,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1404:59:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"id": 143,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 132,
"src": "1393:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 144,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1399:4:1",
"memberName": "call",
"nodeType": "MemberAccess",
"src": "1393:10:1",
"typeDescriptions": {
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
}
},
"id": 153,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1393:71:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "1357:107:1"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 170,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 156,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 140,
"src": "1483:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 168,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 160,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 157,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 142,
"src": "1495:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 158,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "1500:6:1",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "1495:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 159,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1510:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "1495:16:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"arguments": [
{
"id": 163,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 142,
"src": "1526:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"components": [
{
"id": 165,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "1533:4:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
},
"typeName": {
"id": 164,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "1533:4:1",
"typeDescriptions": {}
}
}
],
"id": 166,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1532:6:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
}
],
"expression": {
"id": 161,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967295,
"src": "1515:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 162,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "1519:6:1",
"memberName": "decode",
"nodeType": "MemberAccess",
"src": "1515:10:1",
"typeDescriptions": {
"typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 167,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1515:24:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1495:44:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 169,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "1494:46:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "1483:57:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "5354",
"id": 171,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1542:4:1",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_8e992d6a09e3feb7936717fa482f3a7086f18407e19b697f3153d17fd25870ca",
"typeString": "literal_string \"ST\""
},
"value": "ST"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_8e992d6a09e3feb7936717fa482f3a7086f18407e19b697f3153d17fd25870ca",
"typeString": "literal_string \"ST\""
}
],
"id": 155,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "1475:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 172,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "1475:72:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 173,
"nodeType": "ExpressionStatement",
"src": "1475:72:1"
}
]
},
"documentation": {
"id": 130,
"nodeType": "StructuredDocumentation",
"src": "948:285:1",
"text": "@notice Transfers tokens from msg.sender to a recipient\n @dev Errors with ST if transfer fails\n @param token The contract address of the token which will be transferred\n @param to The recipient of the transfer\n @param value The value of the transfer"
},
"id": 175,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "safeTransfer",
"nameLocation": "1248:12:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 137,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 132,
"mutability": "mutable",
"name": "token",
"nameLocation": "1279:5:1",
"nodeType": "VariableDeclaration",
"scope": 175,
"src": "1271:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 131,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1271:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 134,
"mutability": "mutable",
"name": "to",
"nameLocation": "1303:2:1",
"nodeType": "VariableDeclaration",
"scope": 175,
"src": "1295:10:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 133,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1295:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 136,
"mutability": "mutable",
"name": "value",
"nameLocation": "1324:5:1",
"nodeType": "VariableDeclaration",
"scope": 175,
"src": "1316:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 135,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1316:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1260:76:1"
},
"returnParameters": {
"id": 138,
"nodeType": "ParameterList",
"parameters": [],
"src": "1346:0:1"
},
"scope": 248,
"src": "1239:316:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 220,
"nodeType": "Block",
"src": "2021:208:1",
"statements": [
{
"assignments": [
186,
188
],
"declarations": [
{
"constant": false,
"id": 186,
"mutability": "mutable",
"name": "success",
"nameLocation": "2038:7:1",
"nodeType": "VariableDeclaration",
"scope": 220,
"src": "2033:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 185,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2033:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 188,
"mutability": "mutable",
"name": "data",
"nameLocation": "2060:4:1",
"nodeType": "VariableDeclaration",
"scope": 220,
"src": "2047:17:1",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 187,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2047:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"visibility": "internal"
}
],
"id": 200,
"initialValue": {
"arguments": [
{
"arguments": [
{
"expression": {
"expression": {
"id": 193,
"name": "IERC20",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 77,
"src": "2102:6:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_contract$_IERC20_$77_$",
"typeString": "type(contract IERC20)"
}
},
"id": 194,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "2109:7:1",
"memberName": "approve",
"nodeType": "MemberAccess",
"referencedDeclaration": 64,
"src": "2102:14:1",
"typeDescriptions": {
"typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$",
"typeString": "function IERC20.approve(address,uint256) returns (bool)"
}
},
"id": 195,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "2117:8:1",
"memberName": "selector",
"nodeType": "MemberAccess",
"src": "2102:23:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
}
},
{
"id": 196,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 180,
"src": "2127:2:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
{
"id": 197,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 182,
"src": "2131:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes4",
"typeString": "bytes4"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
},
{
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
],
"expression": {
"id": 191,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967295,
"src": "2079:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 192,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "2083:18:1",
"memberName": "encodeWithSelector",
"nodeType": "MemberAccess",
"src": "2079:22:1",
"typeDescriptions": {
"typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (bytes4) pure returns (bytes memory)"
}
},
"id": 198,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2079:58:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"id": 189,
"name": "token",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 178,
"src": "2068:5:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 190,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2074:4:1",
"memberName": "call",
"nodeType": "MemberAccess",
"src": "2068:10:1",
"typeDescriptions": {
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
}
},
"id": 199,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2068:70:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2032:106:1"
},
{
"expression": {
"arguments": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 216,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"id": 202,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 186,
"src": "2157:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "&&",
"rightExpression": {
"components": [
{
"commonType": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"id": 214,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"commonType": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"id": 206,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"expression": {
"id": 203,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 188,
"src": "2169:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"id": 204,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2174:6:1",
"memberName": "length",
"nodeType": "MemberAccess",
"src": "2169:11:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"hexValue": "30",
"id": 205,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2184:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
},
"src": "2169:16:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"nodeType": "BinaryOperation",
"operator": "||",
"rightExpression": {
"arguments": [
{
"id": 209,
"name": "data",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 188,
"src": "2200:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
{
"components": [
{
"id": 211,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "ElementaryTypeNameExpression",
"src": "2207:4:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
},
"typeName": {
"id": 210,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2207:4:1",
"typeDescriptions": {}
}
}
],
"id": 212,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2206:6:1",
"typeDescriptions": {
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
},
{
"typeIdentifier": "t_type$_t_bool_$",
"typeString": "type(bool)"
}
],
"expression": {
"id": 207,
"name": "abi",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 4294967295,
"src": "2189:3:1",
"typeDescriptions": {
"typeIdentifier": "t_magic_abi",
"typeString": "abi"
}
},
"id": 208,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"memberLocation": "2193:6:1",
"memberName": "decode",
"nodeType": "MemberAccess",
"src": "2189:10:1",
"typeDescriptions": {
"typeIdentifier": "t_function_abidecode_pure$__$returns$__$",
"typeString": "function () pure"
}
},
"id": 213,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2189:24:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "2169:44:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
}
],
"id": 215,
"isConstant": false,
"isInlineArray": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"nodeType": "TupleExpression",
"src": "2168:46:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"src": "2157:57:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "5341",
"id": 217,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2216:4:1",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_0c382912095e7706ed01a66755a50c713445aceaf5a9168954498b03dd381faa",
"typeString": "literal_string \"SA\""
},
"value": "SA"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_0c382912095e7706ed01a66755a50c713445aceaf5a9168954498b03dd381faa",
"typeString": "literal_string \"SA\""
}
],
"id": 201,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "2149:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 218,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2149:72:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 219,
"nodeType": "ExpressionStatement",
"src": "2149:72:1"
}
]
},
"documentation": {
"id": 176,
"nodeType": "StructuredDocumentation",
"src": "1563:346:1",
"text": "@notice Approves the stipulated contract to spend the given allowance in the given token\n @dev Errors with 'SA' if transfer fails\n @param token The contract address of the token to be approved\n @param to The target of the approval\n @param value The amount of the given token the target will be allowed to spend"
},
"id": 221,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "safeApprove",
"nameLocation": "1924:11:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 183,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 178,
"mutability": "mutable",
"name": "token",
"nameLocation": "1954:5:1",
"nodeType": "VariableDeclaration",
"scope": 221,
"src": "1946:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 177,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1946:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 180,
"mutability": "mutable",
"name": "to",
"nameLocation": "1978:2:1",
"nodeType": "VariableDeclaration",
"scope": 221,
"src": "1970:10:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 179,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1970:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 182,
"mutability": "mutable",
"name": "value",
"nameLocation": "1999:5:1",
"nodeType": "VariableDeclaration",
"scope": 221,
"src": "1991:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 181,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "1991:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "1935:76:1"
},
"returnParameters": {
"id": 184,
"nodeType": "ParameterList",
"parameters": [],
"src": "2021:0:1"
},
"scope": 248,
"src": "1915:314:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
},
{
"body": {
"id": 246,
"nodeType": "Block",
"src": "2486:107:1",
"statements": [
{
"assignments": [
230,
null
],
"declarations": [
{
"constant": false,
"id": 230,
"mutability": "mutable",
"name": "success",
"nameLocation": "2503:7:1",
"nodeType": "VariableDeclaration",
"scope": 246,
"src": "2498:12:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
},
"typeName": {
"id": 229,
"name": "bool",
"nodeType": "ElementaryTypeName",
"src": "2498:4:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
"visibility": "internal"
},
null
],
"id": 240,
"initialValue": {
"arguments": [
{
"arguments": [
{
"hexValue": "30",
"id": 237,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "number",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2548:1:1",
"typeDescriptions": {
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
},
"value": "0"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_rational_0_by_1",
"typeString": "int_const 0"
}
],
"id": 236,
"isConstant": false,
"isLValue": false,
"isPure": true,
"lValueRequested": false,
"nodeType": "NewExpression",
"src": "2538:9:1",
"typeDescriptions": {
"typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$",
"typeString": "function (uint256) pure returns (bytes memory)"
},
"typeName": {
"id": 235,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "2542:5:1",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
}
},
"id": 238,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2538:12:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
],
"expression": {
"id": 231,
"name": "to",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 224,
"src": "2516:2:1",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 232,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberLocation": "2519:4:1",
"memberName": "call",
"nodeType": "MemberAccess",
"src": "2516:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
}
},
"id": 234,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"names": [
"value"
],
"nodeType": "FunctionCallOptions",
"options": [
{
"id": 233,
"name": "value",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 226,
"src": "2531:5:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
}
],
"src": "2516:21:1",
"typeDescriptions": {
"typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value",
"typeString": "function (bytes memory) payable returns (bool,bytes memory)"
}
},
"id": 239,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2516:35:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
"typeString": "tuple(bool,bytes memory)"
}
},
"nodeType": "VariableDeclarationStatement",
"src": "2497:54:1"
},
{
"expression": {
"arguments": [
{
"id": 242,
"name": "success",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 230,
"src": "2570:7:1",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"hexValue": "535445",
"id": 243,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "2579:5:1",
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_48541fce89df928ec30caa1aed6c0cd94b8e2ef76b3c68b10b9a184ceadb93d4",
"typeString": "literal_string \"STE\""
},
"value": "STE"
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_48541fce89df928ec30caa1aed6c0cd94b8e2ef76b3c68b10b9a184ceadb93d4",
"typeString": "literal_string \"STE\""
}
],
"id": 241,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
4294967278,
4294967278,
4294967278
],
"referencedDeclaration": 4294967278,
"src": "2562:7:1",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 244,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"nameLocations": [],
"names": [],
"nodeType": "FunctionCall",
"src": "2562:23:1",
"tryCall": false,
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 245,
"nodeType": "ExpressionStatement",
"src": "2562:23:1"
}
]
},
"documentation": {
"id": 222,
"nodeType": "StructuredDocumentation",
"src": "2237:182:1",
"text": "@notice Transfers ETH to the recipient address\n @dev Fails with `STE`\n @param to The destination of the transfer\n @param value The value to be transferred"
},
"id": 247,
"implemented": true,
"kind": "function",
"modifiers": [],
"name": "safeTransferETH",
"nameLocation": "2434:15:1",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 227,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 224,
"mutability": "mutable",
"name": "to",
"nameLocation": "2458:2:1",
"nodeType": "VariableDeclaration",
"scope": 247,
"src": "2450:10:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 223,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "2450:7:1",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "internal"
},
{
"constant": false,
"id": 226,
"mutability": "mutable",
"name": "value",
"nameLocation": "2470:5:1",
"nodeType": "VariableDeclaration",
"scope": 247,
"src": "2462:13:1",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 225,
"name": "uint256",
"nodeType": "ElementaryTypeName",
"src": "2462:7:1",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"visibility": "internal"
}
],
"src": "2449:27:1"
},
"returnParameters": {
"id": 228,
"nodeType": "ParameterList",
"parameters": [],
"src": "2486:0:1"
},
"scope": 248,
"src": "2425:168:1",
"stateMutability": "nonpayable",
"virtual": false,
"visibility": "internal"
}
],
"scope": 249,
"src": "134:2462:1",
"usedErrors": [],
"usedEvents": []
}
],
"src": "46:2552:1"
},
"id": 1
}
}
}
}