{
  "contractName": "Staking",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_storageManager",
          "type": "address"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "total",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "token",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "Staked",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "total",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "token",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "Unstaked",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "isWhitelistedToken",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "storageManager",
      "outputs": [
        {
          "internalType": "contract StorageManager",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_storageContract",
          "type": "address"
        }
      ],
      "name": "setStorageManager",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "token",
          "type": "address"
        },
        {
          "internalType": "bool",
          "name": "isWhiteListed",
          "type": "bool"
        }
      ],
      "name": "setWhitelistedTokens",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "token",
          "type": "address"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "stake",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "tokenAddress",
          "type": "address"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "stakeFor",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "tokenAddress",
          "type": "address"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "unstake",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "token",
          "type": "address"
        }
      ],
      "name": "isInWhiteList",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "token",
          "type": "address"
        }
      ],
      "name": "totalStaked",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "token",
          "type": "address"
        }
      ],
      "name": "totalStakedFor",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "supportsHistory",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "pure",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_storageManager\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"total\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"Unstaked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"isInWhiteList\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isWhitelistedToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_storageContract\",\"type\":\"address\"}],\"name\":\"setStorageManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isWhiteListed\",\"type\":\"bool\"}],\"name\":\"setWhitelistedTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"stake\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"stakeFor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"storageManager\",\"outputs\":[{\"internalType\":\"contract StorageManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"supportsHistory\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"totalStaked\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"totalStakedFor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"unstake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"see ERC900 proposalRinke Hendriksen <rinke@iovlabs.org>\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_storageManager\":\"the storageManager which uses this staking contract\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setStorageManager(address)\":{\"params\":{\"_storageContract\":\"the storageManager which uses this staking contract\"}},\"setWhitelistedTokens(address,bool)\":{\"params\":{\"isWhiteListed\":\"whether you want to whitelist the token or put it from the whitelist.\",\"token\":\"the token from whom you want to set the whitelisted\"}},\"stake(uint256,address,bytes)\":{\"details\":\"note that when you stake a non-native token, the caller must have given approval to the contract to transact tokens if the caller is a contract, it must implement the functionality to call unstake\",\"params\":{\"amount\":\"the amount you want to stake. Can be left blank when you are staking the native currency\",\"data\":\"should be disregarded for the current deployment\",\"token\":\"Token address\"}},\"stakeFor(uint256,address,address,bytes)\":{\"details\":\"note that when you stake a non-native token, the caller must have given approval to the contract to transact tokens if you are staking for a contract, the contract must be able to call unstake\",\"params\":{\"amount\":\"the amount you want to stake. Can be left blank when you are staking the native currency\",\"data\":\"should be disregarded for the current deployment\",\"tokenAddress\":\"Token address\",\"user\":\"the user for whom you are staking\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unstake(uint256,address,bytes)\":{\"details\":\"- if sender does not have nothing staked, the transaction will be reverted with \\\"substraction overflow\\\" error\",\"params\":{\"amount\":\"the total amount of tokens to unstake\",\"data\":\"should be disregarded for the current deployment\",\"tokenAddress\":\"Token address\"}}},\"title\":\"staking\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":\"constructor of the contract\",\"isInWhiteList(address)\":{\"notice\":\"return true if token whitelisted\"},\"setStorageManager(address)\":{\"notice\":\"set Storage Manager contract\"},\"setWhitelistedTokens(address,bool)\":{\"notice\":\"whitelist a token or remove the token from whitelist\"},\"stake(uint256,address,bytes)\":{\"notice\":\"stake the token via this function.\"},\"stakeFor(uint256,address,address,bytes)\":{\"notice\":\"stake tokens for somebody else via this function\"},\"supportsHistory()\":{\"notice\":\"contract does not support history functions (lastStakedFor, totalStakedForAt, totalStakedAt)\"},\"totalStaked(address)\":{\"notice\":\"returns the amount staked for the specific token\"},\"totalStakedFor(address,address)\":{\"notice\":\"returns the amount staked for the specific user and token\"},\"unstake(uint256,address,bytes)\":{\"notice\":\"unstake tokens which where previously staked via this function. Only possible when you don't have any active storage agreements\"}},\"notice\":\"implements the ERC900 interface, with some small modifications. The contract also handles native tokens.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/naz_dou/Documents/Projects/IovLabs/rif-marketplace-storage/contracts/Staking.sol\":\"Staking\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/naz_dou/Documents/Projects/IovLabs/rif-marketplace-storage/contracts/Staking.sol\":{\"keccak256\":\"0xc8c6489082e3779074d583ebcae6e3c8168d979af9fcf7cfb21b8466533442be\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://40f7890632429e13addda8c932b50b10c67551808e81002e41d731a4548b9f35\",\"dweb:/ipfs/QmQND6PUTvZpPiQfbdiWSHrRrLPtFmkoBi4RTMXosJkdpT\"]},\"/Users/naz_dou/Documents/Projects/IovLabs/rif-marketplace-storage/contracts/StorageManager.sol\":{\"keccak256\":\"0xb39dec9f5da8aa5bf10ca169d3e1ea12d08678d2f9d999dcbd22f52711dab8f0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://07fab32db88ce5f2f79e08db9c81095fc398d8ce7ac8dde69e6885197396ebd1\",\"dweb:/ipfs/QmXHa2SsauGepF6TbDkGsMeqKYgxHsFKsrVWbvC8Cw5q1m\"]},\"@openzeppelin/contracts-ethereum-package/contracts/GSN/Context.sol\":{\"keccak256\":\"0xe81686511d62f18b2d9c693c2c94c0a789c690de63aa90e15451ebf65c5bfd3e\",\"urls\":[\"bzz-raw://1332ee1d2b096456bf2e5795b5871d0fed47be6a31c9a2f2cef9206a299565ea\",\"dweb:/ipfs/Qmdu1847Y4UL3gTjbLUManMGfxYEoyGPSodM3Br89SKzwx\"]},\"@openzeppelin/contracts-ethereum-package/contracts/Initializable.sol\":{\"keccak256\":\"0x9bfec92e36234ecc99b5d37230acb6cd1f99560233753162204104a4897e8721\",\"urls\":[\"bzz-raw://5cf7c208583d4d046d75bd99f5507412ab01cce9dd9f802ce9768a416d93ea2f\",\"dweb:/ipfs/QmcQS1BBMPpVEkXP3qzwSjxHNrqDek8YeR7xbVWDC9ApC7\"]},\"@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol\":{\"keccak256\":\"0x04a69a78363214b4e3055db8e620bed222349f0c81e9d1cbe769eb849b69b73f\",\"urls\":[\"bzz-raw://b3115459376196d6c2c3817439c169d9b052b27b70e8ee2e28963cda760736da\",\"dweb:/ipfs/QmXaNF5rmcDSAzBiFMQjf979qb9xNXqD9eZtgo4uM9VEis\"]},\"@openzeppelin/contracts-ethereum-package/contracts/utils/Pausable.sol\":{\"keccak256\":\"0x2ad5473fe88d9ab30c6cd495ab8895daae8c4a48cf8231282a2d339387b35006\",\"urls\":[\"bzz-raw://a737c60474c063efc28e5922b6a1d073588c010eb67f883273d3ec29d8e52d6b\",\"dweb:/ipfs/QmWCeqeZhR45S1mcjPRYEMy1DCHMy9sXDfwYLPycFRh2Nk\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f\",\"dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96\"]},\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0xf7c39c7e6d06ed3bda90cfefbcbf2ddc32c599c3d6721746546ad64946efccaa\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://cb57a28e189cd8b05748db44bdd51d608e6f1364dd1b35ad921e1bc82c10631e\",\"dweb:/ipfs/QmaWWTBbVu2pRR9XUbE4iC159NoP59cRF9ZJwhf4ghFN9i\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x3b21f2c8d626de3b9925ae33e972d8bf5c8b1bffb3f4ee94daeed7d0679036e6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7f8d45329fecbf0836ad7543330c3ecd0f8d0ffa42d4016278c3eb2215fdcdfe\",\"dweb:/ipfs/QmXWLT7GcnHtA5NiD6MFi2CV3EWJY4wv5mLNnypqYDrxL3\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x5f02220344881ce43204ae4a6281145a67bc52c2bb1290a791857df3d19d78f5\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://24427744bd3e6cb73c17010119af12a318289c0253a4d9acb8576c9fb3797b08\",\"dweb:/ipfs/QmTLDqpKRBuxGxRAmjgXt9AkXyACW3MtKzi7PYjm5iMfGC\"]},\"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\":{\"keccak256\":\"0xf12dfbe97e6276980b83d2830bb0eb75e0cf4f3e626c2471137f82158ae6a0fc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b3a849c2d95e85463909e5b5c920b13e7a11216ca14127085e16d22b9379d52a\",\"dweb:/ipfs/QmUg3CZDbCCcQdroEpexBy5ZFd5vD1UWijWQq9qHZjtJNQ\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0xa6a15ddddcbf29d2922a1e0d4151b5d2d33da24b93cc9ebc12390e0d855532f8\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://7c119bcaecfa853d564ac88d312777f75fa1126a3bca88a3371adb0ad9f35cb0\",\"dweb:/ipfs/QmY9UPuXeSKq86Zh38fE43VGQPhKMN34mkuFSFqPcr6nvZ\"]}},\"version\":1}",
  "bytecode": "0x608060405234801561001057600080fd5b506040516114b73803806114b78339818101604052602081101561003357600080fd5b5051600061003f6100ae565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100b2565b3390565b6113f6806100c16000396000f3fe6080604052600436106100dd5760003560e01c806396bfc2291161007f578063ab37f48611610059578063ab37f486146103d7578063e1df964e1461040a578063f2fde38b146104d2578063ffc9969a14610505576100dd565b806396bfc2291461035c5780639bfd8d611461038f5780639cf001fe146103c2576100dd565b806339888705116100bb57806339888705146102b25780637033e4a6146102ed578063715018a6146103165780638da5cb5b1461032b576100dd565b806305357f93146100e2578063152c64e8146101aa5780632cc205d914610265575b600080fd5b6101a8600480360360808110156100f857600080fd5b8135916001600160a01b0360208201358116926040830135909116919081019060808101606082013564010000000081111561013357600080fd5b82018360208201111561014557600080fd5b8035906020019184600183028401116401000000008311171561016757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610538945050505050565b005b6101a8600480360360608110156101c057600080fd5b8135916001600160a01b03602082013516918101906060810160408201356401000000008111156101f057600080fd5b82018360208201111561020257600080fd5b8035906020019184600183028401116401000000008311171561022457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610783945050505050565b34801561027157600080fd5b506102a06004803603604081101561028857600080fd5b506001600160a01b0381358116916020013516610794565b60408051918252519081900360200190f35b3480156102be57600080fd5b506101a8600480360360408110156102d557600080fd5b506001600160a01b03813516906020013515156107bf565b3480156102f957600080fd5b50610302610842565b604080519115158252519081900360200190f35b34801561032257600080fd5b506101a8610847565b34801561033757600080fd5b506103406108e9565b604080516001600160a01b039092168252519081900360200190f35b34801561036857600080fd5b506103026004803603602081101561037f57600080fd5b50356001600160a01b03166108f8565b34801561039b57600080fd5b506102a0600480360360208110156103b257600080fd5b50356001600160a01b0316610916565b3480156103ce57600080fd5b50610340610931565b3480156103e357600080fd5b50610302600480360360208110156103fa57600080fd5b50356001600160a01b0316610940565b34801561041657600080fd5b506101a86004803603606081101561042d57600080fd5b8135916001600160a01b036020820135169181019060608101604082013564010000000081111561045d57600080fd5b82018360208201111561046f57600080fd5b8035906020019184600183028401116401000000008311171561049157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610955945050505050565b3480156104de57600080fd5b506101a8600480360360208110156104f557600080fd5b50356001600160a01b0316610ccb565b34801561051157600080fd5b506101a86004803603602081101561052857600080fd5b50356001600160a01b0316610dc3565b81306001600160a01b03166396bfc229826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561058657600080fd5b505afa15801561059a573d6000803e3d6000fd5b505050506040513d60208110156105b057600080fd5b50516105ed5760405162461bcd60e51b81526004018080602001828103825260318152602001806112c16031913960400191505060405180910390fd5b6105f683610e3d565b156105ff573494505b6001600160a01b0380851660009081526002602090815260408083209387168352929052205461062f9086610e4a565b6001600160a01b038086166000908152600260209081526040808320938816835292815282822093909355600390925290205461066c9086610e4a565b6001600160a01b038085166000818152600360209081526040808320959095559288168082526002845284822083835284528482205485518b815280860182905295860193909352608060608601818152885191870191909152875191957fe963c8e966503804f256e466220d4148a6f091b129de0c0e447f437af33ac530958c95948b948b949260a085019290860191908190849084905b8381101561071d578181015183820152602001610705565b50505050905090810190601f16801561074a5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a261076383610e3d565b61077c5761077c6001600160a01b038416333088610eab565b5050505050565b61078f83338484610538565b505050565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6107c7610f05565b6000546001600160a01b03908116911614610817576040805162461bcd60e51b81526020600482018190526024820152600080516020611377833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b600090565b61084f610f05565b6000546001600160a01b0390811691161461089f576040805162461bcd60e51b81526020600482018190526024820152600080516020611377833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6001600160a01b031660009081526004602052604090205460ff1690565b6001600160a01b031660009081526003602052604090205490565b6001546001600160a01b031681565b60046020526000908152604090205460ff1681565b81306001600160a01b03166396bfc229826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156109a357600080fd5b505afa1580156109b7573d6000803e3d6000fd5b505050506040513d60208110156109cd57600080fd5b5051610a0a5760405162461bcd60e51b81526004018080602001828103825260318152602001806112c16031913960400191505060405180910390fd5b6001546040805163ec5cdf9960e01b815233600482015290516001600160a01b039092169163ec5cdf9991602480820192602092909190829003018186803b158015610a5557600080fd5b505afa158015610a69573d6000803e3d6000fd5b505050506040513d6020811015610a7f57600080fd5b505115610abd5760405162461bcd60e51b815260040180806020018281038252603981526020018061133e6039913960400191505060405180910390fd5b3360009081526002602090815260408083206001600160a01b0387168452909152902054610aeb9085610f09565b3360009081526002602090815260408083206001600160a01b0388168452825280832093909355600390522054610b229085610f09565b6001600160a01b038416600081815260036020908152604080832094909455338083526002825284832084845282528483205485518a815280840182905295860194909452608060608601818152885191870191909152875191957f7c32fe78663816c0d4450249d427209fdc147e75d9ccb815e0de036eff370c84958b9590948b948b949260a0850192860191908190849084905b83811015610bd0578181015183820152602001610bb8565b50505050905090810190601f168015610bfd5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a2610c1683610e3d565b15610cb157604051600090339086908381818185875af1925050503d8060008114610c5d576040519150601f19603f3d011682016040523d82523d6000602084013e610c62565b606091505b5050905080610cab576040805162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b604482015290519081900360640190fd5b50610cc5565b610cc56001600160a01b0384163386610f4b565b50505050565b610cd3610f05565b6000546001600160a01b03908116911614610d23576040805162461bcd60e51b81526020600482018190526024820152600080516020611377833981519152604482015290519081900360640190fd5b6001600160a01b038116610d685760405162461bcd60e51b81526004018080602001828103825260268152602001806112f26026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610dcb610f05565b6000546001600160a01b03908116911614610e1b576040805162461bcd60e51b81526020600482018190526024820152600080516020611377833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03161590565b600082820183811015610ea4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610cc5908590610f99565b3390565b6000610ea483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061104a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261078f9084905b6060610fee826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110e19092919063ffffffff16565b80519091501561078f5780806020019051602081101561100d57600080fd5b505161078f5760405162461bcd60e51b815260040180806020018281038252602a815260200180611397602a913960400191505060405180910390fd5b600081848411156110d95760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561109e578181015183820152602001611086565b50505050905090810190601f1680156110cb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60606110f084846000856110f8565b949350505050565b6060824710156111395760405162461bcd60e51b81526004018080602001828103825260268152602001806113186026913960400191505060405180910390fd5b61114285611254565b611193576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106111d25780518252601f1990920191602091820191016111b3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611234576040519150601f19603f3d011682016040523d82523d6000602084013e611239565b606091505b509150915061124982828661125a565b979650505050505050565b3b151590565b60608315611269575081610ea4565b8251156112795782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561109e57818101518382015260200161108656fe5374616b696e673a206e6f7420706f737369626c6520746f20696e7465726163742077697468207468697320746f6b656e4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5374616b696e673a206d7573742068617665206e6f207574696c697a656420636170616369747920696e2053746f726167654d616e616765724f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209460bdf4b5b327db3a64888e7bec0520278bf45b34ac6bfa2ce0931f7e6026b064736f6c634300060c0033",
  "deployedBytecode": "0x6080604052600436106100dd5760003560e01c806396bfc2291161007f578063ab37f48611610059578063ab37f486146103d7578063e1df964e1461040a578063f2fde38b146104d2578063ffc9969a14610505576100dd565b806396bfc2291461035c5780639bfd8d611461038f5780639cf001fe146103c2576100dd565b806339888705116100bb57806339888705146102b25780637033e4a6146102ed578063715018a6146103165780638da5cb5b1461032b576100dd565b806305357f93146100e2578063152c64e8146101aa5780632cc205d914610265575b600080fd5b6101a8600480360360808110156100f857600080fd5b8135916001600160a01b0360208201358116926040830135909116919081019060808101606082013564010000000081111561013357600080fd5b82018360208201111561014557600080fd5b8035906020019184600183028401116401000000008311171561016757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610538945050505050565b005b6101a8600480360360608110156101c057600080fd5b8135916001600160a01b03602082013516918101906060810160408201356401000000008111156101f057600080fd5b82018360208201111561020257600080fd5b8035906020019184600183028401116401000000008311171561022457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610783945050505050565b34801561027157600080fd5b506102a06004803603604081101561028857600080fd5b506001600160a01b0381358116916020013516610794565b60408051918252519081900360200190f35b3480156102be57600080fd5b506101a8600480360360408110156102d557600080fd5b506001600160a01b03813516906020013515156107bf565b3480156102f957600080fd5b50610302610842565b604080519115158252519081900360200190f35b34801561032257600080fd5b506101a8610847565b34801561033757600080fd5b506103406108e9565b604080516001600160a01b039092168252519081900360200190f35b34801561036857600080fd5b506103026004803603602081101561037f57600080fd5b50356001600160a01b03166108f8565b34801561039b57600080fd5b506102a0600480360360208110156103b257600080fd5b50356001600160a01b0316610916565b3480156103ce57600080fd5b50610340610931565b3480156103e357600080fd5b50610302600480360360208110156103fa57600080fd5b50356001600160a01b0316610940565b34801561041657600080fd5b506101a86004803603606081101561042d57600080fd5b8135916001600160a01b036020820135169181019060608101604082013564010000000081111561045d57600080fd5b82018360208201111561046f57600080fd5b8035906020019184600183028401116401000000008311171561049157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610955945050505050565b3480156104de57600080fd5b506101a8600480360360208110156104f557600080fd5b50356001600160a01b0316610ccb565b34801561051157600080fd5b506101a86004803603602081101561052857600080fd5b50356001600160a01b0316610dc3565b81306001600160a01b03166396bfc229826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561058657600080fd5b505afa15801561059a573d6000803e3d6000fd5b505050506040513d60208110156105b057600080fd5b50516105ed5760405162461bcd60e51b81526004018080602001828103825260318152602001806112c16031913960400191505060405180910390fd5b6105f683610e3d565b156105ff573494505b6001600160a01b0380851660009081526002602090815260408083209387168352929052205461062f9086610e4a565b6001600160a01b038086166000908152600260209081526040808320938816835292815282822093909355600390925290205461066c9086610e4a565b6001600160a01b038085166000818152600360209081526040808320959095559288168082526002845284822083835284528482205485518b815280860182905295860193909352608060608601818152885191870191909152875191957fe963c8e966503804f256e466220d4148a6f091b129de0c0e447f437af33ac530958c95948b948b949260a085019290860191908190849084905b8381101561071d578181015183820152602001610705565b50505050905090810190601f16801561074a5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a261076383610e3d565b61077c5761077c6001600160a01b038416333088610eab565b5050505050565b61078f83338484610538565b505050565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b6107c7610f05565b6000546001600160a01b03908116911614610817576040805162461bcd60e51b81526020600482018190526024820152600080516020611377833981519152604482015290519081900360640190fd5b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b600090565b61084f610f05565b6000546001600160a01b0390811691161461089f576040805162461bcd60e51b81526020600482018190526024820152600080516020611377833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b6001600160a01b031660009081526004602052604090205460ff1690565b6001600160a01b031660009081526003602052604090205490565b6001546001600160a01b031681565b60046020526000908152604090205460ff1681565b81306001600160a01b03166396bfc229826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156109a357600080fd5b505afa1580156109b7573d6000803e3d6000fd5b505050506040513d60208110156109cd57600080fd5b5051610a0a5760405162461bcd60e51b81526004018080602001828103825260318152602001806112c16031913960400191505060405180910390fd5b6001546040805163ec5cdf9960e01b815233600482015290516001600160a01b039092169163ec5cdf9991602480820192602092909190829003018186803b158015610a5557600080fd5b505afa158015610a69573d6000803e3d6000fd5b505050506040513d6020811015610a7f57600080fd5b505115610abd5760405162461bcd60e51b815260040180806020018281038252603981526020018061133e6039913960400191505060405180910390fd5b3360009081526002602090815260408083206001600160a01b0387168452909152902054610aeb9085610f09565b3360009081526002602090815260408083206001600160a01b0388168452825280832093909355600390522054610b229085610f09565b6001600160a01b038416600081815260036020908152604080832094909455338083526002825284832084845282528483205485518a815280840182905295860194909452608060608601818152885191870191909152875191957f7c32fe78663816c0d4450249d427209fdc147e75d9ccb815e0de036eff370c84958b9590948b948b949260a0850192860191908190849084905b83811015610bd0578181015183820152602001610bb8565b50505050905090810190601f168015610bfd5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a2610c1683610e3d565b15610cb157604051600090339086908381818185875af1925050503d8060008114610c5d576040519150601f19603f3d011682016040523d82523d6000602084013e610c62565b606091505b5050905080610cab576040805162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b604482015290519081900360640190fd5b50610cc5565b610cc56001600160a01b0384163386610f4b565b50505050565b610cd3610f05565b6000546001600160a01b03908116911614610d23576040805162461bcd60e51b81526020600482018190526024820152600080516020611377833981519152604482015290519081900360640190fd5b6001600160a01b038116610d685760405162461bcd60e51b81526004018080602001828103825260268152602001806112f26026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b610dcb610f05565b6000546001600160a01b03908116911614610e1b576040805162461bcd60e51b81526020600482018190526024820152600080516020611377833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03161590565b600082820183811015610ea4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610cc5908590610f99565b3390565b6000610ea483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061104a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261078f9084905b6060610fee826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110e19092919063ffffffff16565b80519091501561078f5780806020019051602081101561100d57600080fd5b505161078f5760405162461bcd60e51b815260040180806020018281038252602a815260200180611397602a913960400191505060405180910390fd5b600081848411156110d95760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561109e578181015183820152602001611086565b50505050905090810190601f1680156110cb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60606110f084846000856110f8565b949350505050565b6060824710156111395760405162461bcd60e51b81526004018080602001828103825260268152602001806113186026913960400191505060405180910390fd5b61114285611254565b611193576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106111d25780518252601f1990920191602091820191016111b3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611234576040519150601f19603f3d011682016040523d82523d6000602084013e611239565b606091505b509150915061124982828661125a565b979650505050505050565b3b151590565b60608315611269575081610ea4565b8251156112795782518084602001fd5b60405162461bcd60e51b815260206004820181815284516024840152845185939192839260440191908501908083836000831561109e57818101518382015260200161108656fe5374616b696e673a206e6f7420706f737369626c6520746f20696e7465726163742077697468207468697320746f6b656e4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5374616b696e673a206d7573742068617665206e6f207574696c697a656420636170616369747920696e2053746f726167654d616e616765724f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212209460bdf4b5b327db3a64888e7bec0520278bf45b34ac6bfa2ce0931f7e6026b064736f6c634300060c0033",
  "immutableReferences": {},
  "sourceMap": "476:6330:1:-:0;;;1545:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1545:109:1;882:17:11;902:12;:10;:12::i;:::-;924:6;:18;;-1:-1:-1;;;;;;924:18:11;-1:-1:-1;;;;;924:18:11;;;;;;;957:43;;924:18;;-1:-1:-1;924:18:11;957:43;;924:6;;957:43;-1:-1:-1;1599:14:1;:48;;-1:-1:-1;;;;;;1599:48:1;-1:-1:-1;;;;;1599:48:1;;;;;;;;;;476:6330;;598:104:10;685:10;598:104;:::o;476:6330:1:-;;;;;;;",
  "deployedSourceMap": "476:6330:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3526:703;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3526:703:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3526:703:1;;-1:-1:-1;3526:703:1;;-1:-1:-1;;;;;3526:703:1:i;:::-;;2807:170;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2807:170:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2807:170:1;;-1:-1:-1;2807:170:1;;-1:-1:-1;;;;;2807:170:1:i;6291:135::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;6291:135:1;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;2184:142;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2184:142:1;;;;;;;;;;:::i;6553:85::-;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;1706:145:11;;;;;;;;;;;;;:::i;1083:77::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;1083:77:11;;;;;;;;;;;;;;5890:116:1;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5890:116:1;-1:-1:-1;;;;;5890:116:1;;:::i;6088:111::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6088:111:1;-1:-1:-1;;;;;6088:111:1;;:::i;575:36::-;;;;;;;;;;;;;:::i;1155:50::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1155:50:1;-1:-1:-1;;;;;1155:50:1;;:::i;4674:914::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4674:914:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4674:914:1;;-1:-1:-1;4674:914:1;;-1:-1:-1;;;;;4674:914:1:i;2000:240:11:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2000:240:11;-1:-1:-1;;;;;2000:240:11;;:::i;1796:138:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1796:138:1;-1:-1:-1;;;;;1796:138:1;;:::i;3526:703::-;3685:12;5719:4;-1:-1:-1;;;;;5719:18:1;;5738:12;5719:32;;;;;;;;;;;;;-1:-1:-1;;;;;5719:32:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5719:32:1;5711:94;;;;-1:-1:-1;;;5711:94:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3751:28:::1;3766:12;3751:14;:28::i;:::-;3747:77;;;3804:9;3795:18;;3747:77;-1:-1:-1::0;;;;;3869:19:1;;::::1;;::::0;;;:13:::1;:19;::::0;;;;;;;:33;;::::1;::::0;;;;;;;:45:::1;::::0;3907:6;3869:37:::1;:45::i;:::-;-1:-1:-1::0;;;;;3833:19:1;;::::1;;::::0;;;:13:::1;:19;::::0;;;;;;;:33;;::::1;::::0;;;;;;;;:81;;;;3953:12:::1;:26:::0;;;;;;:38:::1;::::0;3984:6;3953:30:::1;:38::i;:::-;-1:-1:-1::0;;;;;3924:26:1;;::::1;;::::0;;;:12:::1;:26;::::0;;;;;;;:67;;;;4006:75;;::::1;4027:19:::0;;;:13:::1;:19:::0;;;;;:33;;;;;;;;;4006:75;;;;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::1;::::0;4019:6;;4027:33;3937:12;;4076:4;;4006:75;;;;;;;::::1;::::0;;;;;;;;::::1;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4096:28;4111:12;4096:14;:28::i;:::-;4091:132;;4140:72;-1:-1:-1::0;;;;;4140:37:1;::::1;4178:10;4198:4;4205:6:::0;4140:37:::1;:72::i;:::-;3526:703:::0;;;;;:::o;2807:170::-;2929:41;2938:6;2946:10;2958:5;2965:4;2929:8;:41::i;:::-;2807:170;;;:::o;6291:135::-;-1:-1:-1;;;;;6393:19:1;;;6367:7;6393:19;;;:13;:19;;;;;;;;:26;;;;;;;;;;;;;6291:135::o;2184:142::-;1297:12:11;:10;:12::i;:::-;1287:6;;-1:-1:-1;;;;;1287:6:11;;;:22;;;1279:67;;;;;-1:-1:-1;;;1279:67:11;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1279:67:11;;;;;;;;;;;;;;;-1:-1:-1;;;;;2278:25:1;;;::::1;;::::0;;;:18:::1;:25;::::0;;;;:41;;-1:-1:-1;;2278:41:1::1;::::0;::::1;;::::0;;;::::1;::::0;;2184:142::o;6553:85::-;6603:4;6553:85;:::o;1706:145:11:-;1297:12;:10;:12::i;:::-;1287:6;;-1:-1:-1;;;;;1287:6:11;;;:22;;;1279:67;;;;;-1:-1:-1;;;1279:67:11;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1279:67:11;;;;;;;;;;;;;;;1812:1:::1;1796:6:::0;;1775:40:::1;::::0;-1:-1:-1;;;;;1796:6:11;;::::1;::::0;1775:40:::1;::::0;1812:1;;1775:40:::1;1842:1;1825:19:::0;;-1:-1:-1;;;;;;1825:19:11::1;::::0;;1706:145::o;1083:77::-;1121:7;1147:6;-1:-1:-1;;;;;1147:6:11;1083:77;:::o;5890:116:1:-;-1:-1:-1;;;;;5974:25:1;5951:4;5974:25;;;:18;:25;;;;;;;;;5890:116::o;6088:111::-;-1:-1:-1;;;;;6173:19:1;6147:7;6173:19;;;:12;:19;;;;;;;6088:111::o;575:36::-;;;-1:-1:-1;;;;;575:36:1;;:::o;1155:50::-;;;;;;;;;;;;;;;:::o;4674:914::-;4804:12;5719:4;-1:-1:-1;;;;;5719:18:1;;5738:12;5719:32;;;;;;;;;;;;;-1:-1:-1;;;;;5719:32:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5719:32:1;5711:94;;;;-1:-1:-1;;;5711:94:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4913:14:::1;::::0;:46:::1;::::0;;-1:-1:-1;;;4913:46:1;;4948:10:::1;4913:46;::::0;::::1;::::0;;;-1:-1:-1;;;;;4913:14:1;;::::1;::::0;:34:::1;::::0;:46;;;;;::::1;::::0;;;;;;;;;:14;:46;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;4913:46:1;4912:47:::1;4891:151;;;;-1:-1:-1::0;;;4891:151:1::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5108:10;5094:25;::::0;;;:13:::1;:25;::::0;;;;;;;-1:-1:-1;;;;;5094:39:1;::::1;::::0;;;;;;;;:51:::1;::::0;5138:6;5094:43:::1;:51::i;:::-;5066:10;5052:25;::::0;;;:13:::1;:25;::::0;;;;;;;-1:-1:-1;;;;;5052:39:1;::::1;::::0;;;;;;;:93;;;;5184:12:::1;:26:::0;;;;:38:::1;::::0;5215:6;5184:30:::1;:38::i;:::-;-1:-1:-1::0;;;;;5155:26:1;::::1;;::::0;;;:12:::1;:26;::::0;;;;;;;:67;;;;5246:10:::1;5266:25:::0;;;:13:::1;:25:::0;;;;;:39;;;;;;;;;5237:89;;;;;;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;;;5246:10;;5237:89:::1;::::0;5258:6;;5266:39;;5168:12;;5321:4;;5237:89;;;;;;::::1;::::0;;;;;;;;::::1;;;;;;;::::0;;::::1;::::0;;;::::1;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5340:28;5355:12;5340:14;:28::i;:::-;5336:246;;;5403:34;::::0;5385:12:::1;::::0;5403:10:::1;::::0;5426:6;;5385:12;5403:34;5385:12;5403:34;5426:6;5403:10;:34:::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5384:53;;;5459:7;5451:36;;;::::0;;-1:-1:-1;;;5451:36:1;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;5451:36:1;;;;;;;;;;;;;::::1;;5336:246;;;;5518:53;-1:-1:-1::0;;;;;5518:33:1;::::1;5552:10;5564:6:::0;5518:33:::1;:53::i;:::-;4674:914:::0;;;;:::o;2000:240:11:-;1297:12;:10;:12::i;:::-;1287:6;;-1:-1:-1;;;;;1287:6:11;;;:22;;;1279:67;;;;;-1:-1:-1;;;1279:67:11;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1279:67:11;;;;;;;;;;;;;;;-1:-1:-1;;;;;2088:22:11;::::1;2080:73;;;;-1:-1:-1::0;;;2080:73:11::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2189:6;::::0;;2168:38:::1;::::0;-1:-1:-1;;;;;2168:38:11;;::::1;::::0;2189:6;::::1;::::0;2168:38:::1;::::0;::::1;2216:6;:17:::0;;-1:-1:-1;;;;;;2216:17:11::1;-1:-1:-1::0;;;;;2216:17:11;;;::::1;::::0;;;::::1;::::0;;2000:240::o;1796:138:1:-;1297:12:11;:10;:12::i;:::-;1287:6;;-1:-1:-1;;;;;1287:6:11;;;:22;;;1279:67;;;;;-1:-1:-1;;;1279:67:11;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1279:67:11;;;;;;;;;;;;;;;1878:14:1::1;:49:::0;;-1:-1:-1;;;;;;1878:49:1::1;-1:-1:-1::0;;;;;1878:49:1;;;::::1;::::0;;;::::1;::::0;;1796:138::o;6694:110::-;-1:-1:-1;;;;;6778:19:1;;;6694:110::o;882:176:12:-;940:7;971:5;;;994:6;;;;986:46;;;;;-1:-1:-1;;;986:46:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;1050:1;882:176;-1:-1:-1;;;882:176:12:o;885:203:15:-;1012:68;;;-1:-1:-1;;;;;1012:68:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1012:68:15;-1:-1:-1;;;1012:68:15;;;985:96;;1005:5;;985:19;:96::i;598:104:10:-;685:10;598:104;:::o;1329:134:12:-;1387:7;1413:43;1417:1;1420;1413:43;;;;;;;;;;;;;;;;;:3;:43::i;704:175:15:-;813:58;;;-1:-1:-1;;;;;813:58:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;813:58:15;-1:-1:-1;;;813:58:15;;;786:86;;806:5;;2967:751;3386:23;3412:69;3440:4;3412:69;;;;;;;;;;;;;;;;;3420:5;-1:-1:-1;;;;;3412:27:15;;;:69;;;;;:::i;:::-;3495:17;;3386:95;;-1:-1:-1;3495:21:15;3491:221;;3635:10;3624:30;;;;;;;;;;;;;;;-1:-1:-1;3624:30:15;3616:85;;;;-1:-1:-1;;;3616:85:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1754:187:12;1840:7;1875:12;1867:6;;;;1859:29;;;;-1:-1:-1;;;1859:29:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;1910:5:12;;;1754:187::o;3581:193:16:-;3684:12;3715:52;3737:6;3745:4;3751:1;3754:12;3715:21;:52::i;:::-;3708:59;3581:193;-1:-1:-1;;;;3581:193:16:o;4608:523::-;4735:12;4792:5;4767:21;:30;;4759:81;;;;-1:-1:-1;;;4759:81:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4858:18;4869:6;4858:10;:18::i;:::-;4850:60;;;;;-1:-1:-1;;;4850:60:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;4981:12;4995:23;5022:6;-1:-1:-1;;;;;5022:11:16;5042:5;5050:4;5022:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5022:33:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4980:75;;;;5072:52;5090:7;5099:10;5111:12;5072:17;:52::i;:::-;5065:59;4608:523;-1:-1:-1;;;;;;;4608:523:16:o;726:413::-;1086:20;1124:8;;;726:413::o;6111:725::-;6226:12;6254:7;6250:580;;;-1:-1:-1;6284:10:16;6277:17;;6250:580;6395:17;;:21;6391:429;;6653:10;6647:17;6713:15;6700:10;6696:2;6692:19;6685:44;6602:145;6785:20;;-1:-1:-1;;;6785:20:16;;;;;;;;;;;;;;;;;6792:12;;6785:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
  "source": "// SPDX-License-Identifier: MIT\npragma solidity 0.6.12;\n\nimport \"./StorageManager.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/SafeERC20.sol\";\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\n/// @title staking\n/// @author see ERC900 proposal\n/// @author Rinke Hendriksen <rinke@iovlabs.org>\n/// @notice implements the ERC900 interface, with some small modifications. The contract also handles native tokens.\ncontract Staking is Ownable {\n    using SafeMath for uint256;\n    using SafeERC20 for IERC20;\n\n    StorageManager public storageManager;\n    // amount of tokens per token staked per address [account -> (tokenAddress -> amount)]\n    mapping(address => mapping(address => uint256)) internal _amountStaked;\n    // total amount staked per token\n    mapping(address => uint256) internal _totalStaked;\n    // the ERC20 token of the contract. By convention, address(0) is the native currency\n    // multicurrency is achieved by deploying multiple contract instances\n    // maps the tokenAddresses which can be used with this contract. By convention, address(0) is the native token.\n    mapping(address => bool) public isWhitelistedToken;\n\n    event Staked(address indexed user, uint256 amount, uint256 total, address token, bytes data);\n    event Unstaked(address indexed user, uint256 amount, uint256 total, address token, bytes data);\n\n    /**\n    @notice constructor of the contract\n    @param _storageManager the storageManager which uses this staking contract\n    */\n    constructor(address _storageManager) public {\n        storageManager = StorageManager(_storageManager);\n    }\n\n    /**\n    @notice set Storage Manager contract\n    @param _storageContract the storageManager which uses this staking contract\n    */\n    function setStorageManager(address _storageContract) external onlyOwner {\n        storageManager = StorageManager(_storageContract);\n    }\n\n    /**\n    @notice whitelist a token or remove the token from whitelist\n    @param token the token from whom you want to set the whitelisted\n    @param isWhiteListed whether you want to whitelist the token or put it from the whitelist.\n    */\n    function setWhitelistedTokens(address token, bool isWhiteListed) external onlyOwner {\n        isWhitelistedToken[token] = isWhiteListed;\n    }\n\n    /**\n    @notice stake the token via this function.\n    @dev note that when you stake a non-native token, the caller must have given approval to the contract to transact tokens\n    if the caller is a contract, it must implement the functionality to call unstake\n    @param amount the amount you want to stake. Can be left blank when you are staking the native currency\n    @param token Token address\n    @param data should be disregarded for the current deployment\n    */\n    function stake(\n        uint256 amount,\n        address token,\n        bytes memory data\n    ) external payable {\n        stakeFor(amount, msg.sender, token, data);\n    }\n\n    /**\n    @notice stake tokens for somebody else via this function\n    @dev note that when you stake a non-native token, the caller must have given approval to the contract to transact tokens\n    if you are staking for a contract, the contract must be able to call unstake\n    @param amount the amount you want to stake. Can be left blank when you are staking the native currency\n    @param user the user for whom you are staking\n    @param tokenAddress Token address\n    @param data should be disregarded for the current deployment\n     */\n    function stakeFor(\n        uint256 amount,\n        address user,\n        address tokenAddress,\n        bytes memory data\n    ) public payable whitelistedToken(tokenAddress) {\n        // disregard passed-in amount\n        if (_isNativeToken(tokenAddress)) {\n            amount = msg.value;\n        }\n        _amountStaked[user][tokenAddress] = _amountStaked[user][tokenAddress].add(amount);\n        _totalStaked[tokenAddress] = _totalStaked[tokenAddress].add(amount);\n        emit Staked(user, amount, _amountStaked[user][tokenAddress], tokenAddress, data);\n        if (!_isNativeToken(tokenAddress)) {\n            IERC20(tokenAddress).safeTransferFrom(msg.sender, address(this), amount);\n        }\n    }\n\n    /**\n    @notice unstake tokens which where previously staked via this function. Only possible when you don't have any active storage agreements\n    @dev\n     - if sender does not have nothing staked, the transaction will be reverted with \"substraction overflow\" error\n    @param amount the total amount of tokens to unstake\n    @param tokenAddress Token address\n    @param data should be disregarded for the current deployment\n     */\n    function unstake(\n        uint256 amount,\n        address tokenAddress,\n        bytes memory data\n    ) external whitelistedToken(tokenAddress) {\n        // only allow unstake if there is no utilized capacity\n        require(\n            !storageManager.hasUtilizedCapacity(msg.sender),\n            \"Staking: must have no utilized capacity in StorageManager\"\n        );\n        _amountStaked[msg.sender][tokenAddress] = _amountStaked[msg.sender][tokenAddress].sub(amount);\n        _totalStaked[tokenAddress] = _totalStaked[tokenAddress].sub(amount);\n        emit Unstaked(msg.sender, amount, _amountStaked[msg.sender][tokenAddress], tokenAddress, data);\n        if (_isNativeToken(tokenAddress)) {\n            (bool success, ) = msg.sender.call{value: amount}(\"\");\n            require(success, \"Transfer failed.\");\n        } else {\n            IERC20(tokenAddress).safeTransfer(msg.sender, amount);\n        }\n    }\n\n    /**\n    @notice modifier for whitelisted token\n     */\n    modifier whitelistedToken(address tokenAddress) {\n        require(this.isInWhiteList(tokenAddress), \"Staking: not possible to interact with this token\");\n        _;\n    }\n\n    /**\n    @notice return true if token whitelisted\n     */\n    function isInWhiteList(address token) external view returns (bool) {\n        return isWhitelistedToken[token];\n    }\n\n    /**\n    @notice returns the amount staked for the specific token\n    */\n    function totalStaked(address token) external view returns (uint256) {\n        return _totalStaked[token];\n    }\n\n    /**\n    @notice returns the amount staked for the specific user and token\n     */\n    function totalStakedFor(address user, address token) external view returns (uint256) {\n        return _amountStaked[user][token];\n    }\n\n    /**\n    @notice contract does not support history functions (lastStakedFor, totalStakedForAt, totalStakedAt)\n     */\n    function supportsHistory() external pure returns (bool) {\n        return false;\n    }\n\n    /**\n    @notice if use a native token\n     */\n    function _isNativeToken(address token) private pure returns (bool) {\n        return token == address(0);\n    }\n}\n",
  "sourcePath": "/Users/naz_dou/Documents/Projects/IovLabs/rif-marketplace-storage/contracts/Staking.sol",
  "ast": {
    "absolutePath": "/Users/naz_dou/Documents/Projects/IovLabs/rif-marketplace-storage/contracts/Staking.sol",
    "exportedSymbols": {
      "Staking": [
        438
      ]
    },
    "id": 439,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 58,
        "literals": [
          "solidity",
          "0.6",
          ".12"
        ],
        "nodeType": "PragmaDirective",
        "src": "32:23:1"
      },
      {
        "absolutePath": "/Users/naz_dou/Documents/Projects/IovLabs/rif-marketplace-storage/contracts/StorageManager.sol",
        "file": "./StorageManager.sol",
        "id": 59,
        "nodeType": "ImportDirective",
        "scope": 439,
        "sourceUnit": 1911,
        "src": "57:30:1",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "id": 60,
        "nodeType": "ImportDirective",
        "scope": 439,
        "sourceUnit": 3334,
        "src": "88:56:1",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
        "id": 61,
        "nodeType": "ImportDirective",
        "scope": 439,
        "sourceUnit": 3547,
        "src": "145:59:1",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/access/Ownable.sol",
        "file": "@openzeppelin/contracts/access/Ownable.sol",
        "id": 62,
        "nodeType": "ImportDirective",
        "scope": 439,
        "sourceUnit": 2557,
        "src": "205:52:1",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 64,
              "name": "Ownable",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2556,
              "src": "496:7:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Ownable_$2556",
                "typeString": "contract Ownable"
              }
            },
            "id": 65,
            "nodeType": "InheritanceSpecifier",
            "src": "496:7:1"
          }
        ],
        "contractDependencies": [
          2447,
          2556
        ],
        "contractKind": "contract",
        "documentation": {
          "id": 63,
          "nodeType": "StructuredDocumentation",
          "src": "259:217:1",
          "text": "@title staking\n @author see ERC900 proposal\n @author Rinke Hendriksen <rinke@iovlabs.org>\n @notice implements the ERC900 interface, with some small modifications. The contract also handles native tokens."
        },
        "fullyImplemented": true,
        "id": 438,
        "linearizedBaseContracts": [
          438,
          2556,
          2447
        ],
        "name": "Staking",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 68,
            "libraryName": {
              "contractScope": null,
              "id": 66,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2752,
              "src": "516:8:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$2752",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "510:27:1",
            "typeName": {
              "id": 67,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "529:7:1",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "id": 71,
            "libraryName": {
              "contractScope": null,
              "id": 69,
              "name": "SafeERC20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 3546,
              "src": "548:9:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeERC20_$3546",
                "typeString": "library SafeERC20"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "542:27:1",
            "typeName": {
              "contractScope": null,
              "id": 70,
              "name": "IERC20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 3333,
              "src": "562:6:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_IERC20_$3333",
                "typeString": "contract IERC20"
              }
            }
          },
          {
            "constant": false,
            "functionSelector": "9cf001fe",
            "id": 73,
            "mutability": "mutable",
            "name": "storageManager",
            "nodeType": "VariableDeclaration",
            "overrides": null,
            "scope": 438,
            "src": "575:36:1",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_StorageManager_$1910",
              "typeString": "contract StorageManager"
            },
            "typeName": {
              "contractScope": null,
              "id": 72,
              "name": "StorageManager",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1910,
              "src": "575:14:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_StorageManager_$1910",
                "typeString": "contract StorageManager"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 79,
            "mutability": "mutable",
            "name": "_amountStaked",
            "nodeType": "VariableDeclaration",
            "overrides": null,
            "scope": 438,
            "src": "708:70:1",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
              "typeString": "mapping(address => mapping(address => uint256))"
            },
            "typeName": {
              "id": 78,
              "keyType": {
                "id": 74,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "716:7:1",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "708:47:1",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                "typeString": "mapping(address => mapping(address => uint256))"
              },
              "valueType": {
                "id": 77,
                "keyType": {
                  "id": 75,
                  "name": "address",
                  "nodeType": "ElementaryTypeName",
                  "src": "735:7:1",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  }
                },
                "nodeType": "Mapping",
                "src": "727:27:1",
                "typeDescriptions": {
                  "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                  "typeString": "mapping(address => uint256)"
                },
                "valueType": {
                  "id": 76,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "746:7:1",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                }
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 83,
            "mutability": "mutable",
            "name": "_totalStaked",
            "nodeType": "VariableDeclaration",
            "overrides": null,
            "scope": 438,
            "src": "821:49:1",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
              "typeString": "mapping(address => uint256)"
            },
            "typeName": {
              "id": 82,
              "keyType": {
                "id": 80,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "829:7:1",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "821:27:1",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                "typeString": "mapping(address => uint256)"
              },
              "valueType": {
                "id": 81,
                "name": "uint256",
                "nodeType": "ElementaryTypeName",
                "src": "840:7:1",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                }
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "functionSelector": "ab37f486",
            "id": 87,
            "mutability": "mutable",
            "name": "isWhitelistedToken",
            "nodeType": "VariableDeclaration",
            "overrides": null,
            "scope": 438,
            "src": "1155:50:1",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
              "typeString": "mapping(address => bool)"
            },
            "typeName": {
              "id": 86,
              "keyType": {
                "id": 84,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "1163:7:1",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "1155:24:1",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                "typeString": "mapping(address => bool)"
              },
              "valueType": {
                "id": 85,
                "name": "bool",
                "nodeType": "ElementaryTypeName",
                "src": "1174:4:1",
                "typeDescriptions": {
                  "typeIdentifier": "t_bool",
                  "typeString": "bool"
                }
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 99,
            "name": "Staked",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 98,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 89,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "user",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 99,
                  "src": "1225:20:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 88,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1225:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 91,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 99,
                  "src": "1247:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 90,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1247:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 93,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "total",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 99,
                  "src": "1263:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 92,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1263:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 95,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 99,
                  "src": "1278:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 94,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1278:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 97,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 99,
                  "src": "1293:10:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 96,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1293:5:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1224:80:1"
            },
            "src": "1212:93:1"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 111,
            "name": "Unstaked",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 110,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 101,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "user",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 111,
                  "src": "1325:20:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 100,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1325:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 103,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 111,
                  "src": "1347:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 102,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1347:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 105,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "total",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 111,
                  "src": "1363:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 104,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1363:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 107,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 111,
                  "src": "1378:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 106,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1378:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 109,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 111,
                  "src": "1393:10:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 108,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1393:5:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1324:80:1"
            },
            "src": "1310:95:1"
          },
          {
            "body": {
              "id": 123,
              "nodeType": "Block",
              "src": "1589:65:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 121,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 117,
                      "name": "storageManager",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 73,
                      "src": "1599:14:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_StorageManager_$1910",
                        "typeString": "contract StorageManager"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 119,
                          "name": "_storageManager",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 114,
                          "src": "1631:15:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 118,
                        "name": "StorageManager",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1910,
                        "src": "1616:14:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_StorageManager_$1910_$",
                          "typeString": "type(contract StorageManager)"
                        }
                      },
                      "id": 120,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1616:31:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_StorageManager_$1910",
                        "typeString": "contract StorageManager"
                      }
                    },
                    "src": "1599:48:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_StorageManager_$1910",
                      "typeString": "contract StorageManager"
                    }
                  },
                  "id": 122,
                  "nodeType": "ExpressionStatement",
                  "src": "1599:48:1"
                }
              ]
            },
            "documentation": {
              "id": 112,
              "nodeType": "StructuredDocumentation",
              "src": "1411:129:1",
              "text": "@notice constructor of the contract\n@param _storageManager the storageManager which uses this staking contract"
            },
            "id": 124,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 115,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 114,
                  "mutability": "mutable",
                  "name": "_storageManager",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 124,
                  "src": "1557:23:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 113,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1557:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1556:25:1"
            },
            "returnParameters": {
              "id": 116,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1589:0:1"
            },
            "scope": 438,
            "src": "1545:109:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 138,
              "nodeType": "Block",
              "src": "1868:66:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 136,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 132,
                      "name": "storageManager",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 73,
                      "src": "1878:14:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_StorageManager_$1910",
                        "typeString": "contract StorageManager"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 134,
                          "name": "_storageContract",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 127,
                          "src": "1910:16:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 133,
                        "name": "StorageManager",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1910,
                        "src": "1895:14:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_StorageManager_$1910_$",
                          "typeString": "type(contract StorageManager)"
                        }
                      },
                      "id": 135,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1895:32:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_StorageManager_$1910",
                        "typeString": "contract StorageManager"
                      }
                    },
                    "src": "1878:49:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_StorageManager_$1910",
                      "typeString": "contract StorageManager"
                    }
                  },
                  "id": 137,
                  "nodeType": "ExpressionStatement",
                  "src": "1878:49:1"
                }
              ]
            },
            "documentation": {
              "id": 125,
              "nodeType": "StructuredDocumentation",
              "src": "1660:131:1",
              "text": "@notice set Storage Manager contract\n@param _storageContract the storageManager which uses this staking contract"
            },
            "functionSelector": "ffc9969a",
            "id": 139,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 130,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 129,
                  "name": "onlyOwner",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2505,
                  "src": "1858:9:1",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1858:9:1"
              }
            ],
            "name": "setStorageManager",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 128,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 127,
                  "mutability": "mutable",
                  "name": "_storageContract",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 139,
                  "src": "1823:24:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 126,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1823:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1822:26:1"
            },
            "returnParameters": {
              "id": 131,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1868:0:1"
            },
            "scope": 438,
            "src": "1796:138:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 155,
              "nodeType": "Block",
              "src": "2268:58:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 153,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 149,
                        "name": "isWhitelistedToken",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 87,
                        "src": "2278:18:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                          "typeString": "mapping(address => bool)"
                        }
                      },
                      "id": 151,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 150,
                        "name": "token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 142,
                        "src": "2297:5:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "2278:25:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 152,
                      "name": "isWhiteListed",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 144,
                      "src": "2306:13:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "2278:41:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 154,
                  "nodeType": "ExpressionStatement",
                  "src": "2278:41:1"
                }
              ]
            },
            "documentation": {
              "id": 140,
              "nodeType": "StructuredDocumentation",
              "src": "1940:239:1",
              "text": "@notice whitelist a token or remove the token from whitelist\n@param token the token from whom you want to set the whitelisted\n@param isWhiteListed whether you want to whitelist the token or put it from the whitelist."
            },
            "functionSelector": "39888705",
            "id": 156,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 147,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 146,
                  "name": "onlyOwner",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2505,
                  "src": "2258:9:1",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2258:9:1"
              }
            ],
            "name": "setWhitelistedTokens",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 145,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 142,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 156,
                  "src": "2214:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 141,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2214:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 144,
                  "mutability": "mutable",
                  "name": "isWhiteListed",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 156,
                  "src": "2229:18:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 143,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2229:4:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2213:35:1"
            },
            "returnParameters": {
              "id": 148,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2268:0:1"
            },
            "scope": 438,
            "src": "2184:142:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 174,
              "nodeType": "Block",
              "src": "2919:58:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 167,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 159,
                        "src": "2938:6:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 168,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -15,
                          "src": "2946:3:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 169,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "2946:10:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 170,
                        "name": "token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 161,
                        "src": "2958:5:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 171,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 163,
                        "src": "2965:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 166,
                      "name": "stakeFor",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 258,
                      "src": "2929:8:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_address_$_t_address_$_t_bytes_memory_ptr_$returns$__$",
                        "typeString": "function (uint256,address,address,bytes memory)"
                      }
                    },
                    "id": 172,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2929:41:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 173,
                  "nodeType": "ExpressionStatement",
                  "src": "2929:41:1"
                }
              ]
            },
            "documentation": {
              "id": 157,
              "nodeType": "StructuredDocumentation",
              "src": "2332:470:1",
              "text": "@notice stake the token via this function.\n@dev note that when you stake a non-native token, the caller must have given approval to the contract to transact tokens\nif the caller is a contract, it must implement the functionality to call unstake\n@param amount the amount you want to stake. Can be left blank when you are staking the native currency\n@param token Token address\n@param data should be disregarded for the current deployment"
            },
            "functionSelector": "152c64e8",
            "id": 175,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "stake",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 164,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 159,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 175,
                  "src": "2831:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 158,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2831:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 161,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 175,
                  "src": "2855:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 160,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2855:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 163,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 175,
                  "src": "2878:17:1",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 162,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2878:5:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2821:80:1"
            },
            "returnParameters": {
              "id": 165,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2919:0:1"
            },
            "scope": 438,
            "src": "2807:170:1",
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 257,
              "nodeType": "Block",
              "src": "3699:530:1",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 191,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 182,
                        "src": "3766:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "id": 190,
                      "name": "_isNativeToken",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 437,
                      "src": "3751:14:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_bool_$",
                        "typeString": "function (address) pure returns (bool)"
                      }
                    },
                    "id": 192,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3751:28:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 199,
                  "nodeType": "IfStatement",
                  "src": "3747:77:1",
                  "trueBody": {
                    "id": 198,
                    "nodeType": "Block",
                    "src": "3781:43:1",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 196,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 193,
                            "name": "amount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 178,
                            "src": "3795:6:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 194,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "3804:3:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 195,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "value",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "3804:9:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3795:18:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 197,
                        "nodeType": "ExpressionStatement",
                        "src": "3795:18:1"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 213,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "id": 200,
                          "name": "_amountStaked",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 79,
                          "src": "3833:13:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                            "typeString": "mapping(address => mapping(address => uint256))"
                          }
                        },
                        "id": 203,
                        "indexExpression": {
                          "argumentTypes": null,
                          "id": 201,
                          "name": "user",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 180,
                          "src": "3847:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "3833:19:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                          "typeString": "mapping(address => uint256)"
                        }
                      },
                      "id": 204,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 202,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 182,
                        "src": "3853:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "3833:33:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 211,
                          "name": "amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 178,
                          "src": "3907:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 205,
                              "name": "_amountStaked",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 79,
                              "src": "3869:13:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                "typeString": "mapping(address => mapping(address => uint256))"
                              }
                            },
                            "id": 207,
                            "indexExpression": {
                              "argumentTypes": null,
                              "id": 206,
                              "name": "user",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 180,
                              "src": "3883:4:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "3869:19:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 209,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 208,
                            "name": "tokenAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 182,
                            "src": "3889:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "3869:33:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 210,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 2585,
                        "src": "3869:37:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 212,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3869:45:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3833:81:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 214,
                  "nodeType": "ExpressionStatement",
                  "src": "3833:81:1"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 224,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 215,
                        "name": "_totalStaked",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 83,
                        "src": "3924:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                          "typeString": "mapping(address => uint256)"
                        }
                      },
                      "id": 217,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 216,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 182,
                        "src": "3937:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "3924:26:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 222,
                          "name": "amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 178,
                          "src": "3984:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 218,
                            "name": "_totalStaked",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 83,
                            "src": "3953:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 220,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 219,
                            "name": "tokenAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 182,
                            "src": "3966:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "3953:26:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 221,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 2585,
                        "src": "3953:30:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 223,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3953:38:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3924:67:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 225,
                  "nodeType": "ExpressionStatement",
                  "src": "3924:67:1"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 227,
                        "name": "user",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 180,
                        "src": "4013:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 228,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 178,
                        "src": "4019:6:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 229,
                            "name": "_amountStaked",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 79,
                            "src": "4027:13:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                              "typeString": "mapping(address => mapping(address => uint256))"
                            }
                          },
                          "id": 231,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 230,
                            "name": "user",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 180,
                            "src": "4041:4:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "4027:19:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                            "typeString": "mapping(address => uint256)"
                          }
                        },
                        "id": 233,
                        "indexExpression": {
                          "argumentTypes": null,
                          "id": 232,
                          "name": "tokenAddress",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 182,
                          "src": "4047:12:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "4027:33:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 234,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 182,
                        "src": "4062:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 235,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 184,
                        "src": "4076:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 226,
                      "name": "Staked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 99,
                      "src": "4006:6:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$",
                        "typeString": "function (address,uint256,uint256,address,bytes memory)"
                      }
                    },
                    "id": 236,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4006:75:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 237,
                  "nodeType": "EmitStatement",
                  "src": "4001:80:1"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "id": 241,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "4095:29:1",
                    "subExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 239,
                          "name": "tokenAddress",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 182,
                          "src": "4111:12:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 238,
                        "name": "_isNativeToken",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 437,
                        "src": "4096:14:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_bool_$",
                          "typeString": "function (address) pure returns (bool)"
                        }
                      },
                      "id": 240,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4096:28:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 256,
                  "nodeType": "IfStatement",
                  "src": "4091:132:1",
                  "trueBody": {
                    "id": 255,
                    "nodeType": "Block",
                    "src": "4126:97:1",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 246,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "4178:3:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 247,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "4178:10:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 250,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -28,
                                  "src": "4198:4:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Staking_$438",
                                    "typeString": "contract Staking"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Staking_$438",
                                    "typeString": "contract Staking"
                                  }
                                ],
                                "id": 249,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4190:7:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 248,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "4190:7:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": null,
                                    "typeString": null
                                  }
                                }
                              },
                              "id": 251,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4190:13:1",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 252,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 178,
                              "src": "4205:6:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 243,
                                  "name": "tokenAddress",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 182,
                                  "src": "4147:12:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 242,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3333,
                                "src": "4140:6:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$3333_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 244,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4140:20:1",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$3333",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 245,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "safeTransferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3392,
                            "src": "4140:37:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3333_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3333_$",
                              "typeString": "function (contract IERC20,address,address,uint256)"
                            }
                          },
                          "id": 253,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4140:72:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 254,
                        "nodeType": "ExpressionStatement",
                        "src": "4140:72:1"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 176,
              "nodeType": "StructuredDocumentation",
              "src": "2983:538:1",
              "text": "@notice stake tokens for somebody else via this function\n@dev note that when you stake a non-native token, the caller must have given approval to the contract to transact tokens\nif you are staking for a contract, the contract must be able to call unstake\n@param amount the amount you want to stake. Can be left blank when you are staking the native currency\n@param user the user for whom you are staking\n@param tokenAddress Token address\n@param data should be disregarded for the current deployment"
            },
            "functionSelector": "05357f93",
            "id": 258,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "id": 187,
                    "name": "tokenAddress",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 182,
                    "src": "3685:12:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 188,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 186,
                  "name": "whitelistedToken",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 369,
                  "src": "3668:16:1",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_address_$",
                    "typeString": "modifier (address)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "3668:30:1"
              }
            ],
            "name": "stakeFor",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 185,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 178,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 258,
                  "src": "3553:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 177,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3553:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 180,
                  "mutability": "mutable",
                  "name": "user",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 258,
                  "src": "3577:12:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 179,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3577:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 182,
                  "mutability": "mutable",
                  "name": "tokenAddress",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 258,
                  "src": "3599:20:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 181,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3599:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 184,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 258,
                  "src": "3629:17:1",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 183,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3629:5:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3543:109:1"
            },
            "returnParameters": {
              "id": 189,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3699:0:1"
            },
            "scope": 438,
            "src": "3526:703:1",
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 353,
              "nodeType": "Block",
              "src": "4818:770:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 277,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "UnaryOperation",
                        "operator": "!",
                        "prefix": true,
                        "src": "4912:47:1",
                        "subExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 274,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "4948:3:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 275,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "4948:10:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 272,
                              "name": "storageManager",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 73,
                              "src": "4913:14:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StorageManager_$1910",
                                "typeString": "contract StorageManager"
                              }
                            },
                            "id": 273,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "hasUtilizedCapacity",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1526,
                            "src": "4913:34:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
                              "typeString": "function (address) view external returns (bool)"
                            }
                          },
                          "id": 276,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4913:46:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "5374616b696e673a206d7573742068617665206e6f207574696c697a656420636170616369747920696e2053746f726167654d616e61676572",
                        "id": 278,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "4973:59:1",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_74a096c83306e0c75e37fc8e62b413f704d53d59f74d871aa15721facf20c8cd",
                          "typeString": "literal_string \"Staking: must have no utilized capacity in StorageManager\""
                        },
                        "value": "Staking: must have no utilized capacity in StorageManager"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_74a096c83306e0c75e37fc8e62b413f704d53d59f74d871aa15721facf20c8cd",
                          "typeString": "literal_string \"Staking: must have no utilized capacity in StorageManager\""
                        }
                      ],
                      "id": 271,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "4891:7:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 279,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4891:151:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 280,
                  "nodeType": "ExpressionStatement",
                  "src": "4891:151:1"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 296,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "id": 281,
                          "name": "_amountStaked",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 79,
                          "src": "5052:13:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                            "typeString": "mapping(address => mapping(address => uint256))"
                          }
                        },
                        "id": 285,
                        "indexExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 282,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -15,
                            "src": "5066:3:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 283,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "5066:10:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "5052:25:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                          "typeString": "mapping(address => uint256)"
                        }
                      },
                      "id": 286,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 284,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 263,
                        "src": "5078:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "5052:39:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 294,
                          "name": "amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 261,
                          "src": "5138:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 287,
                              "name": "_amountStaked",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 79,
                              "src": "5094:13:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                "typeString": "mapping(address => mapping(address => uint256))"
                              }
                            },
                            "id": 290,
                            "indexExpression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 288,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "5108:3:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 289,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "5108:10:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "5094:25:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 292,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 291,
                            "name": "tokenAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 263,
                            "src": "5120:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "5094:39:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 293,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 2602,
                        "src": "5094:43:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 295,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5094:51:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5052:93:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 297,
                  "nodeType": "ExpressionStatement",
                  "src": "5052:93:1"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 307,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 298,
                        "name": "_totalStaked",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 83,
                        "src": "5155:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                          "typeString": "mapping(address => uint256)"
                        }
                      },
                      "id": 300,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 299,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 263,
                        "src": "5168:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "5155:26:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 305,
                          "name": "amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 261,
                          "src": "5215:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 301,
                            "name": "_totalStaked",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 83,
                            "src": "5184:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 303,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 302,
                            "name": "tokenAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 263,
                            "src": "5197:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "5184:26:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 304,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 2602,
                        "src": "5184:30:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 306,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5184:38:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5155:67:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 308,
                  "nodeType": "ExpressionStatement",
                  "src": "5155:67:1"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 310,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -15,
                          "src": "5246:3:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 311,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5246:10:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 312,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 261,
                        "src": "5258:6:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 313,
                            "name": "_amountStaked",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 79,
                            "src": "5266:13:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                              "typeString": "mapping(address => mapping(address => uint256))"
                            }
                          },
                          "id": 316,
                          "indexExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 314,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "5280:3:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 315,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "5280:10:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "5266:25:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                            "typeString": "mapping(address => uint256)"
                          }
                        },
                        "id": 318,
                        "indexExpression": {
                          "argumentTypes": null,
                          "id": 317,
                          "name": "tokenAddress",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 263,
                          "src": "5292:12:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "5266:39:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 319,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 263,
                        "src": "5307:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 320,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 265,
                        "src": "5321:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 309,
                      "name": "Unstaked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 111,
                      "src": "5237:8:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$",
                        "typeString": "function (address,uint256,uint256,address,bytes memory)"
                      }
                    },
                    "id": 321,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5237:89:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 322,
                  "nodeType": "EmitStatement",
                  "src": "5232:94:1"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 324,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 263,
                        "src": "5355:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "id": 323,
                      "name": "_isNativeToken",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 437,
                      "src": "5340:14:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_bool_$",
                        "typeString": "function (address) pure returns (bool)"
                      }
                    },
                    "id": 325,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5340:28:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 351,
                    "nodeType": "Block",
                    "src": "5504:78:1",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 346,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "5552:3:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 347,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "5552:10:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 348,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 261,
                              "src": "5564:6:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 343,
                                  "name": "tokenAddress",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 263,
                                  "src": "5525:12:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 342,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3333,
                                "src": "5518:6:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$3333_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 344,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5518:20:1",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$3333",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 345,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "safeTransfer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3367,
                            "src": "5518:33:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3333_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3333_$",
                              "typeString": "function (contract IERC20,address,uint256)"
                            }
                          },
                          "id": 349,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5518:53:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 350,
                        "nodeType": "ExpressionStatement",
                        "src": "5518:53:1"
                      }
                    ]
                  },
                  "id": 352,
                  "nodeType": "IfStatement",
                  "src": "5336:246:1",
                  "trueBody": {
                    "id": 341,
                    "nodeType": "Block",
                    "src": "5370:128:1",
                    "statements": [
                      {
                        "assignments": [
                          327,
                          null
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 327,
                            "mutability": "mutable",
                            "name": "success",
                            "nodeType": "VariableDeclaration",
                            "overrides": null,
                            "scope": 341,
                            "src": "5385:12:1",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "typeName": {
                              "id": 326,
                              "name": "bool",
                              "nodeType": "ElementaryTypeName",
                              "src": "5385:4:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          },
                          null
                        ],
                        "id": 335,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "",
                              "id": 333,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "5434:2:1",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
                                "typeString": "literal_string \"\""
                              },
                              "value": ""
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
                                "typeString": "literal_string \"\""
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
                                  "typeString": "literal_string \"\""
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 328,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -15,
                                  "src": "5403:3:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 329,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "5403:10:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "id": 330,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "call",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "5403:15: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": 332,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "names": [
                              "value"
                            ],
                            "nodeType": "FunctionCallOptions",
                            "options": [
                              {
                                "argumentTypes": null,
                                "id": 331,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 261,
                                "src": "5426:6:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "src": "5403:30: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": 334,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5403:34:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                            "typeString": "tuple(bool,bytes memory)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5384:53:1"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 337,
                              "name": "success",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 327,
                              "src": "5459:7:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "5472616e73666572206661696c65642e",
                              "id": 338,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "5468:18:1",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_c81948f77ae7b56f1759fc612b6b373d090eebe7124f74c528fff8e0a139fe69",
                                "typeString": "literal_string \"Transfer failed.\""
                              },
                              "value": "Transfer failed."
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_c81948f77ae7b56f1759fc612b6b373d090eebe7124f74c528fff8e0a139fe69",
                                "typeString": "literal_string \"Transfer failed.\""
                              }
                            ],
                            "id": 336,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              -18,
                              -18
                            ],
                            "referencedDeclaration": -18,
                            "src": "5451:7:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 339,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5451:36:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 340,
                        "nodeType": "ExpressionStatement",
                        "src": "5451:36:1"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 259,
              "nodeType": "StructuredDocumentation",
              "src": "4235:434:1",
              "text": "@notice unstake tokens which where previously staked via this function. Only possible when you don't have any active storage agreements\n@dev\n- if sender does not have nothing staked, the transaction will be reverted with \"substraction overflow\" error\n@param amount the total amount of tokens to unstake\n@param tokenAddress Token address\n@param data should be disregarded for the current deployment"
            },
            "functionSelector": "e1df964e",
            "id": 354,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "id": 268,
                    "name": "tokenAddress",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 263,
                    "src": "4804:12:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 269,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 267,
                  "name": "whitelistedToken",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 369,
                  "src": "4787:16:1",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_address_$",
                    "typeString": "modifier (address)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "4787:30:1"
              }
            ],
            "name": "unstake",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 266,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 261,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 354,
                  "src": "4700:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 260,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4700:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 263,
                  "mutability": "mutable",
                  "name": "tokenAddress",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 354,
                  "src": "4724:20:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 262,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4724:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 265,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 354,
                  "src": "4754:17:1",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 264,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4754:5:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4690:87:1"
            },
            "returnParameters": {
              "id": 270,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4818:0:1"
            },
            "scope": 438,
            "src": "4674:914:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 368,
              "nodeType": "Block",
              "src": "5701:122:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 362,
                            "name": "tokenAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 357,
                            "src": "5738:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 360,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -28,
                            "src": "5719:4:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Staking_$438",
                              "typeString": "contract Staking"
                            }
                          },
                          "id": 361,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "isInWhiteList",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 382,
                          "src": "5719:18:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
                            "typeString": "function (address) view external returns (bool)"
                          }
                        },
                        "id": 363,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5719:32:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "5374616b696e673a206e6f7420706f737369626c6520746f20696e7465726163742077697468207468697320746f6b656e",
                        "id": 364,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "5753:51:1",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_13e9674a3a61d7988099791e547f8eef6b536e376639ce382aa927d1ef1e8f11",
                          "typeString": "literal_string \"Staking: not possible to interact with this token\""
                        },
                        "value": "Staking: not possible to interact with this token"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_13e9674a3a61d7988099791e547f8eef6b536e376639ce382aa927d1ef1e8f11",
                          "typeString": "literal_string \"Staking: not possible to interact with this token\""
                        }
                      ],
                      "id": 359,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "5711:7:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 365,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5711:94:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 366,
                  "nodeType": "ExpressionStatement",
                  "src": "5711:94:1"
                },
                {
                  "id": 367,
                  "nodeType": "PlaceholderStatement",
                  "src": "5815:1:1"
                }
              ]
            },
            "documentation": {
              "id": 355,
              "nodeType": "StructuredDocumentation",
              "src": "5594:54:1",
              "text": "@notice modifier for whitelisted token"
            },
            "id": 369,
            "name": "whitelistedToken",
            "nodeType": "ModifierDefinition",
            "overrides": null,
            "parameters": {
              "id": 358,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 357,
                  "mutability": "mutable",
                  "name": "tokenAddress",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 369,
                  "src": "5679:20:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 356,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5679:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5678:22:1"
            },
            "src": "5653:170:1",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 381,
              "nodeType": "Block",
              "src": "5957:49:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 377,
                      "name": "isWhitelistedToken",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 87,
                      "src": "5974:18:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                        "typeString": "mapping(address => bool)"
                      }
                    },
                    "id": 379,
                    "indexExpression": {
                      "argumentTypes": null,
                      "id": 378,
                      "name": "token",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 372,
                      "src": "5993:5:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "5974:25:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 376,
                  "id": 380,
                  "nodeType": "Return",
                  "src": "5967:32:1"
                }
              ]
            },
            "documentation": {
              "id": 370,
              "nodeType": "StructuredDocumentation",
              "src": "5829:56:1",
              "text": "@notice return true if token whitelisted"
            },
            "functionSelector": "96bfc229",
            "id": 382,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isInWhiteList",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 373,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 372,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 382,
                  "src": "5913:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 371,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5913:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5912:15:1"
            },
            "returnParameters": {
              "id": 376,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 375,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 382,
                  "src": "5951:4:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 374,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "5951:4:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5950:6:1"
            },
            "scope": 438,
            "src": "5890:116:1",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 394,
              "nodeType": "Block",
              "src": "6156:43:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 390,
                      "name": "_totalStaked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 83,
                      "src": "6173:12:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                        "typeString": "mapping(address => uint256)"
                      }
                    },
                    "id": 392,
                    "indexExpression": {
                      "argumentTypes": null,
                      "id": 391,
                      "name": "token",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 385,
                      "src": "6186:5:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "6173:19:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 389,
                  "id": 393,
                  "nodeType": "Return",
                  "src": "6166:26:1"
                }
              ]
            },
            "documentation": {
              "id": 383,
              "nodeType": "StructuredDocumentation",
              "src": "6012:71:1",
              "text": "@notice returns the amount staked for the specific token"
            },
            "functionSelector": "9bfd8d61",
            "id": 395,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "totalStaked",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 386,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 385,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 395,
                  "src": "6109:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 384,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "6109:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6108:15:1"
            },
            "returnParameters": {
              "id": 389,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 388,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 395,
                  "src": "6147:7:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 387,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6147:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6146:9:1"
            },
            "scope": 438,
            "src": "6088:111:1",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 411,
              "nodeType": "Block",
              "src": "6376:50:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 405,
                        "name": "_amountStaked",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 79,
                        "src": "6393:13:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                          "typeString": "mapping(address => mapping(address => uint256))"
                        }
                      },
                      "id": 407,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 406,
                        "name": "user",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 398,
                        "src": "6407:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "IndexAccess",
                      "src": "6393:19:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                        "typeString": "mapping(address => uint256)"
                      }
                    },
                    "id": 409,
                    "indexExpression": {
                      "argumentTypes": null,
                      "id": 408,
                      "name": "token",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 400,
                      "src": "6413:5:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "6393:26:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 404,
                  "id": 410,
                  "nodeType": "Return",
                  "src": "6386:33:1"
                }
              ]
            },
            "documentation": {
              "id": 396,
              "nodeType": "StructuredDocumentation",
              "src": "6205:81:1",
              "text": "@notice returns the amount staked for the specific user and token"
            },
            "functionSelector": "2cc205d9",
            "id": 412,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "totalStakedFor",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 401,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 398,
                  "mutability": "mutable",
                  "name": "user",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 412,
                  "src": "6315:12:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 397,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "6315:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 400,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 412,
                  "src": "6329:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 399,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "6329:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6314:29:1"
            },
            "returnParameters": {
              "id": 404,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 403,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 412,
                  "src": "6367:7:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 402,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6367:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6366:9:1"
            },
            "scope": 438,
            "src": "6291:135:1",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 420,
              "nodeType": "Block",
              "src": "6609:29:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "66616c7365",
                    "id": 418,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6626:5:1",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "false"
                  },
                  "functionReturnParameters": 417,
                  "id": 419,
                  "nodeType": "Return",
                  "src": "6619:12:1"
                }
              ]
            },
            "documentation": {
              "id": 413,
              "nodeType": "StructuredDocumentation",
              "src": "6432:116:1",
              "text": "@notice contract does not support history functions (lastStakedFor, totalStakedForAt, totalStakedAt)"
            },
            "functionSelector": "7033e4a6",
            "id": 421,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "supportsHistory",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 414,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6577:2:1"
            },
            "returnParameters": {
              "id": 417,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 416,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 421,
                  "src": "6603:4:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 415,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "6603:4:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6602:6:1"
            },
            "scope": 438,
            "src": "6553:85:1",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 436,
              "nodeType": "Block",
              "src": "6761:43:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 434,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 429,
                      "name": "token",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 424,
                      "src": "6778:5:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 432,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "6795:1:1",
                          "subdenomination": null,
                          "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": 431,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "6787:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_address_$",
                          "typeString": "type(address)"
                        },
                        "typeName": {
                          "id": 430,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6787:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": null,
                            "typeString": null
                          }
                        }
                      },
                      "id": 433,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6787:10:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_address_payable",
                        "typeString": "address payable"
                      }
                    },
                    "src": "6778:19:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 428,
                  "id": 435,
                  "nodeType": "Return",
                  "src": "6771:26:1"
                }
              ]
            },
            "documentation": {
              "id": 422,
              "nodeType": "StructuredDocumentation",
              "src": "6644:45:1",
              "text": "@notice if use a native token"
            },
            "id": 437,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_isNativeToken",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 425,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 424,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 437,
                  "src": "6718:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 423,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "6718:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6717:15:1"
            },
            "returnParameters": {
              "id": 428,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 427,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 437,
                  "src": "6755:4:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 426,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "6755:4:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6754:6:1"
            },
            "scope": 438,
            "src": "6694:110:1",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          }
        ],
        "scope": 439,
        "src": "476:6330:1"
      }
    ],
    "src": "32:6775:1"
  },
  "legacyAST": {
    "absolutePath": "/Users/naz_dou/Documents/Projects/IovLabs/rif-marketplace-storage/contracts/Staking.sol",
    "exportedSymbols": {
      "Staking": [
        438
      ]
    },
    "id": 439,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 58,
        "literals": [
          "solidity",
          "0.6",
          ".12"
        ],
        "nodeType": "PragmaDirective",
        "src": "32:23:1"
      },
      {
        "absolutePath": "/Users/naz_dou/Documents/Projects/IovLabs/rif-marketplace-storage/contracts/StorageManager.sol",
        "file": "./StorageManager.sol",
        "id": 59,
        "nodeType": "ImportDirective",
        "scope": 439,
        "sourceUnit": 1911,
        "src": "57:30:1",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "id": 60,
        "nodeType": "ImportDirective",
        "scope": 439,
        "sourceUnit": 3334,
        "src": "88:56:1",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol",
        "id": 61,
        "nodeType": "ImportDirective",
        "scope": 439,
        "sourceUnit": 3547,
        "src": "145:59:1",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/access/Ownable.sol",
        "file": "@openzeppelin/contracts/access/Ownable.sol",
        "id": 62,
        "nodeType": "ImportDirective",
        "scope": 439,
        "sourceUnit": 2557,
        "src": "205:52:1",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 64,
              "name": "Ownable",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2556,
              "src": "496:7:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Ownable_$2556",
                "typeString": "contract Ownable"
              }
            },
            "id": 65,
            "nodeType": "InheritanceSpecifier",
            "src": "496:7:1"
          }
        ],
        "contractDependencies": [
          2447,
          2556
        ],
        "contractKind": "contract",
        "documentation": {
          "id": 63,
          "nodeType": "StructuredDocumentation",
          "src": "259:217:1",
          "text": "@title staking\n @author see ERC900 proposal\n @author Rinke Hendriksen <rinke@iovlabs.org>\n @notice implements the ERC900 interface, with some small modifications. The contract also handles native tokens."
        },
        "fullyImplemented": true,
        "id": 438,
        "linearizedBaseContracts": [
          438,
          2556,
          2447
        ],
        "name": "Staking",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 68,
            "libraryName": {
              "contractScope": null,
              "id": 66,
              "name": "SafeMath",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 2752,
              "src": "516:8:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeMath_$2752",
                "typeString": "library SafeMath"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "510:27:1",
            "typeName": {
              "id": 67,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "529:7:1",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "id": 71,
            "libraryName": {
              "contractScope": null,
              "id": 69,
              "name": "SafeERC20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 3546,
              "src": "548:9:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_SafeERC20_$3546",
                "typeString": "library SafeERC20"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "542:27:1",
            "typeName": {
              "contractScope": null,
              "id": 70,
              "name": "IERC20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 3333,
              "src": "562:6:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_IERC20_$3333",
                "typeString": "contract IERC20"
              }
            }
          },
          {
            "constant": false,
            "functionSelector": "9cf001fe",
            "id": 73,
            "mutability": "mutable",
            "name": "storageManager",
            "nodeType": "VariableDeclaration",
            "overrides": null,
            "scope": 438,
            "src": "575:36:1",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_StorageManager_$1910",
              "typeString": "contract StorageManager"
            },
            "typeName": {
              "contractScope": null,
              "id": 72,
              "name": "StorageManager",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 1910,
              "src": "575:14:1",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_StorageManager_$1910",
                "typeString": "contract StorageManager"
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "constant": false,
            "id": 79,
            "mutability": "mutable",
            "name": "_amountStaked",
            "nodeType": "VariableDeclaration",
            "overrides": null,
            "scope": 438,
            "src": "708:70:1",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
              "typeString": "mapping(address => mapping(address => uint256))"
            },
            "typeName": {
              "id": 78,
              "keyType": {
                "id": 74,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "716:7:1",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "708:47:1",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                "typeString": "mapping(address => mapping(address => uint256))"
              },
              "valueType": {
                "id": 77,
                "keyType": {
                  "id": 75,
                  "name": "address",
                  "nodeType": "ElementaryTypeName",
                  "src": "735:7:1",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  }
                },
                "nodeType": "Mapping",
                "src": "727:27:1",
                "typeDescriptions": {
                  "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                  "typeString": "mapping(address => uint256)"
                },
                "valueType": {
                  "id": 76,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "746:7:1",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                }
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 83,
            "mutability": "mutable",
            "name": "_totalStaked",
            "nodeType": "VariableDeclaration",
            "overrides": null,
            "scope": 438,
            "src": "821:49:1",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
              "typeString": "mapping(address => uint256)"
            },
            "typeName": {
              "id": 82,
              "keyType": {
                "id": 80,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "829:7:1",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "821:27:1",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                "typeString": "mapping(address => uint256)"
              },
              "valueType": {
                "id": 81,
                "name": "uint256",
                "nodeType": "ElementaryTypeName",
                "src": "840:7:1",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                }
              }
            },
            "value": null,
            "visibility": "internal"
          },
          {
            "constant": false,
            "functionSelector": "ab37f486",
            "id": 87,
            "mutability": "mutable",
            "name": "isWhitelistedToken",
            "nodeType": "VariableDeclaration",
            "overrides": null,
            "scope": 438,
            "src": "1155:50:1",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
              "typeString": "mapping(address => bool)"
            },
            "typeName": {
              "id": 86,
              "keyType": {
                "id": 84,
                "name": "address",
                "nodeType": "ElementaryTypeName",
                "src": "1163:7:1",
                "typeDescriptions": {
                  "typeIdentifier": "t_address",
                  "typeString": "address"
                }
              },
              "nodeType": "Mapping",
              "src": "1155:24:1",
              "typeDescriptions": {
                "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                "typeString": "mapping(address => bool)"
              },
              "valueType": {
                "id": 85,
                "name": "bool",
                "nodeType": "ElementaryTypeName",
                "src": "1174:4:1",
                "typeDescriptions": {
                  "typeIdentifier": "t_bool",
                  "typeString": "bool"
                }
              }
            },
            "value": null,
            "visibility": "public"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 99,
            "name": "Staked",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 98,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 89,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "user",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 99,
                  "src": "1225:20:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 88,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1225:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 91,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 99,
                  "src": "1247:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 90,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1247:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 93,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "total",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 99,
                  "src": "1263:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 92,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1263:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 95,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 99,
                  "src": "1278:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 94,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1278:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 97,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 99,
                  "src": "1293:10:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 96,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1293:5:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1224:80:1"
            },
            "src": "1212:93:1"
          },
          {
            "anonymous": false,
            "documentation": null,
            "id": 111,
            "name": "Unstaked",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 110,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 101,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "user",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 111,
                  "src": "1325:20:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 100,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1325:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 103,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 111,
                  "src": "1347:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 102,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1347:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 105,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "total",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 111,
                  "src": "1363:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 104,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1363:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 107,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 111,
                  "src": "1378:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 106,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1378:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 109,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 111,
                  "src": "1393:10:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 108,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "1393:5:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1324:80:1"
            },
            "src": "1310:95:1"
          },
          {
            "body": {
              "id": 123,
              "nodeType": "Block",
              "src": "1589:65:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 121,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 117,
                      "name": "storageManager",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 73,
                      "src": "1599:14:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_StorageManager_$1910",
                        "typeString": "contract StorageManager"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 119,
                          "name": "_storageManager",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 114,
                          "src": "1631:15:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 118,
                        "name": "StorageManager",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1910,
                        "src": "1616:14:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_StorageManager_$1910_$",
                          "typeString": "type(contract StorageManager)"
                        }
                      },
                      "id": 120,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1616:31:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_StorageManager_$1910",
                        "typeString": "contract StorageManager"
                      }
                    },
                    "src": "1599:48:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_StorageManager_$1910",
                      "typeString": "contract StorageManager"
                    }
                  },
                  "id": 122,
                  "nodeType": "ExpressionStatement",
                  "src": "1599:48:1"
                }
              ]
            },
            "documentation": {
              "id": 112,
              "nodeType": "StructuredDocumentation",
              "src": "1411:129:1",
              "text": "@notice constructor of the contract\n@param _storageManager the storageManager which uses this staking contract"
            },
            "id": 124,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 115,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 114,
                  "mutability": "mutable",
                  "name": "_storageManager",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 124,
                  "src": "1557:23:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 113,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1557:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1556:25:1"
            },
            "returnParameters": {
              "id": 116,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1589:0:1"
            },
            "scope": 438,
            "src": "1545:109:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 138,
              "nodeType": "Block",
              "src": "1868:66:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 136,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 132,
                      "name": "storageManager",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 73,
                      "src": "1878:14:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_StorageManager_$1910",
                        "typeString": "contract StorageManager"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 134,
                          "name": "_storageContract",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 127,
                          "src": "1910:16:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 133,
                        "name": "StorageManager",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 1910,
                        "src": "1895:14:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_StorageManager_$1910_$",
                          "typeString": "type(contract StorageManager)"
                        }
                      },
                      "id": 135,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "1895:32:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_StorageManager_$1910",
                        "typeString": "contract StorageManager"
                      }
                    },
                    "src": "1878:49:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_StorageManager_$1910",
                      "typeString": "contract StorageManager"
                    }
                  },
                  "id": 137,
                  "nodeType": "ExpressionStatement",
                  "src": "1878:49:1"
                }
              ]
            },
            "documentation": {
              "id": 125,
              "nodeType": "StructuredDocumentation",
              "src": "1660:131:1",
              "text": "@notice set Storage Manager contract\n@param _storageContract the storageManager which uses this staking contract"
            },
            "functionSelector": "ffc9969a",
            "id": 139,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 130,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 129,
                  "name": "onlyOwner",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2505,
                  "src": "1858:9:1",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1858:9:1"
              }
            ],
            "name": "setStorageManager",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 128,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 127,
                  "mutability": "mutable",
                  "name": "_storageContract",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 139,
                  "src": "1823:24:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 126,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1823:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1822:26:1"
            },
            "returnParameters": {
              "id": 131,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1868:0:1"
            },
            "scope": 438,
            "src": "1796:138:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 155,
              "nodeType": "Block",
              "src": "2268:58:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 153,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 149,
                        "name": "isWhitelistedToken",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 87,
                        "src": "2278:18:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                          "typeString": "mapping(address => bool)"
                        }
                      },
                      "id": 151,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 150,
                        "name": "token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 142,
                        "src": "2297:5:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "2278:25:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "id": 152,
                      "name": "isWhiteListed",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 144,
                      "src": "2306:13:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "2278:41:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 154,
                  "nodeType": "ExpressionStatement",
                  "src": "2278:41:1"
                }
              ]
            },
            "documentation": {
              "id": 140,
              "nodeType": "StructuredDocumentation",
              "src": "1940:239:1",
              "text": "@notice whitelist a token or remove the token from whitelist\n@param token the token from whom you want to set the whitelisted\n@param isWhiteListed whether you want to whitelist the token or put it from the whitelist."
            },
            "functionSelector": "39888705",
            "id": 156,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": null,
                "id": 147,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 146,
                  "name": "onlyOwner",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 2505,
                  "src": "2258:9:1",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$__$",
                    "typeString": "modifier ()"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "2258:9:1"
              }
            ],
            "name": "setWhitelistedTokens",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 145,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 142,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 156,
                  "src": "2214:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 141,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2214:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 144,
                  "mutability": "mutable",
                  "name": "isWhiteListed",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 156,
                  "src": "2229:18:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 143,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2229:4:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2213:35:1"
            },
            "returnParameters": {
              "id": 148,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2268:0:1"
            },
            "scope": 438,
            "src": "2184:142:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 174,
              "nodeType": "Block",
              "src": "2919:58:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 167,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 159,
                        "src": "2938:6:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 168,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -15,
                          "src": "2946:3:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 169,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "2946:10:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 170,
                        "name": "token",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 161,
                        "src": "2958:5:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 171,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 163,
                        "src": "2965:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 166,
                      "name": "stakeFor",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 258,
                      "src": "2929:8:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_address_$_t_address_$_t_bytes_memory_ptr_$returns$__$",
                        "typeString": "function (uint256,address,address,bytes memory)"
                      }
                    },
                    "id": 172,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2929:41:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 173,
                  "nodeType": "ExpressionStatement",
                  "src": "2929:41:1"
                }
              ]
            },
            "documentation": {
              "id": 157,
              "nodeType": "StructuredDocumentation",
              "src": "2332:470:1",
              "text": "@notice stake the token via this function.\n@dev note that when you stake a non-native token, the caller must have given approval to the contract to transact tokens\nif the caller is a contract, it must implement the functionality to call unstake\n@param amount the amount you want to stake. Can be left blank when you are staking the native currency\n@param token Token address\n@param data should be disregarded for the current deployment"
            },
            "functionSelector": "152c64e8",
            "id": 175,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "stake",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 164,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 159,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 175,
                  "src": "2831:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 158,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2831:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 161,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 175,
                  "src": "2855:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 160,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "2855:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 163,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 175,
                  "src": "2878:17:1",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 162,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "2878:5:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2821:80:1"
            },
            "returnParameters": {
              "id": 165,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2919:0:1"
            },
            "scope": 438,
            "src": "2807:170:1",
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 257,
              "nodeType": "Block",
              "src": "3699:530:1",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 191,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 182,
                        "src": "3766:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "id": 190,
                      "name": "_isNativeToken",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 437,
                      "src": "3751:14:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_bool_$",
                        "typeString": "function (address) pure returns (bool)"
                      }
                    },
                    "id": 192,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3751:28:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 199,
                  "nodeType": "IfStatement",
                  "src": "3747:77:1",
                  "trueBody": {
                    "id": 198,
                    "nodeType": "Block",
                    "src": "3781:43:1",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 196,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 193,
                            "name": "amount",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 178,
                            "src": "3795:6:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 194,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "3804:3:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 195,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "value",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "3804:9:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "3795:18:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 197,
                        "nodeType": "ExpressionStatement",
                        "src": "3795:18:1"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 213,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "id": 200,
                          "name": "_amountStaked",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 79,
                          "src": "3833:13:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                            "typeString": "mapping(address => mapping(address => uint256))"
                          }
                        },
                        "id": 203,
                        "indexExpression": {
                          "argumentTypes": null,
                          "id": 201,
                          "name": "user",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 180,
                          "src": "3847:4:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "3833:19:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                          "typeString": "mapping(address => uint256)"
                        }
                      },
                      "id": 204,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 202,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 182,
                        "src": "3853:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "3833:33:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 211,
                          "name": "amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 178,
                          "src": "3907:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 205,
                              "name": "_amountStaked",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 79,
                              "src": "3869:13:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                "typeString": "mapping(address => mapping(address => uint256))"
                              }
                            },
                            "id": 207,
                            "indexExpression": {
                              "argumentTypes": null,
                              "id": 206,
                              "name": "user",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 180,
                              "src": "3883:4:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "3869:19:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 209,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 208,
                            "name": "tokenAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 182,
                            "src": "3889:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "3869:33:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 210,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 2585,
                        "src": "3869:37:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 212,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3869:45:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3833:81:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 214,
                  "nodeType": "ExpressionStatement",
                  "src": "3833:81:1"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 224,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 215,
                        "name": "_totalStaked",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 83,
                        "src": "3924:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                          "typeString": "mapping(address => uint256)"
                        }
                      },
                      "id": 217,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 216,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 182,
                        "src": "3937:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "3924:26:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 222,
                          "name": "amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 178,
                          "src": "3984:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 218,
                            "name": "_totalStaked",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 83,
                            "src": "3953:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 220,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 219,
                            "name": "tokenAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 182,
                            "src": "3966:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "3953:26:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 221,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "add",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 2585,
                        "src": "3953:30:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 223,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "3953:38:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3924:67:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 225,
                  "nodeType": "ExpressionStatement",
                  "src": "3924:67:1"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 227,
                        "name": "user",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 180,
                        "src": "4013:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 228,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 178,
                        "src": "4019:6:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 229,
                            "name": "_amountStaked",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 79,
                            "src": "4027:13:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                              "typeString": "mapping(address => mapping(address => uint256))"
                            }
                          },
                          "id": 231,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 230,
                            "name": "user",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 180,
                            "src": "4041:4:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "4027:19:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                            "typeString": "mapping(address => uint256)"
                          }
                        },
                        "id": 233,
                        "indexExpression": {
                          "argumentTypes": null,
                          "id": 232,
                          "name": "tokenAddress",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 182,
                          "src": "4047:12:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "4027:33:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 234,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 182,
                        "src": "4062:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 235,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 184,
                        "src": "4076:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 226,
                      "name": "Staked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 99,
                      "src": "4006:6:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$",
                        "typeString": "function (address,uint256,uint256,address,bytes memory)"
                      }
                    },
                    "id": 236,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4006:75:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 237,
                  "nodeType": "EmitStatement",
                  "src": "4001:80:1"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "id": 241,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "4095:29:1",
                    "subExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 239,
                          "name": "tokenAddress",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 182,
                          "src": "4111:12:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 238,
                        "name": "_isNativeToken",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 437,
                        "src": "4096:14:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_bool_$",
                          "typeString": "function (address) pure returns (bool)"
                        }
                      },
                      "id": 240,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4096:28:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 256,
                  "nodeType": "IfStatement",
                  "src": "4091:132:1",
                  "trueBody": {
                    "id": 255,
                    "nodeType": "Block",
                    "src": "4126:97:1",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 246,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "4178:3:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 247,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "4178:10:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 250,
                                  "name": "this",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -28,
                                  "src": "4198:4:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_Staking_$438",
                                    "typeString": "contract Staking"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_contract$_Staking_$438",
                                    "typeString": "contract Staking"
                                  }
                                ],
                                "id": 249,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4190:7:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_address_$",
                                  "typeString": "type(address)"
                                },
                                "typeName": {
                                  "id": 248,
                                  "name": "address",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "4190:7:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": null,
                                    "typeString": null
                                  }
                                }
                              },
                              "id": 251,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4190:13:1",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 252,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 178,
                              "src": "4205:6:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 243,
                                  "name": "tokenAddress",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 182,
                                  "src": "4147:12:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 242,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3333,
                                "src": "4140:6:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$3333_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 244,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4140:20:1",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$3333",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 245,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "safeTransferFrom",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3392,
                            "src": "4140:37:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3333_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3333_$",
                              "typeString": "function (contract IERC20,address,address,uint256)"
                            }
                          },
                          "id": 253,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4140:72:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 254,
                        "nodeType": "ExpressionStatement",
                        "src": "4140:72:1"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 176,
              "nodeType": "StructuredDocumentation",
              "src": "2983:538:1",
              "text": "@notice stake tokens for somebody else via this function\n@dev note that when you stake a non-native token, the caller must have given approval to the contract to transact tokens\nif you are staking for a contract, the contract must be able to call unstake\n@param amount the amount you want to stake. Can be left blank when you are staking the native currency\n@param user the user for whom you are staking\n@param tokenAddress Token address\n@param data should be disregarded for the current deployment"
            },
            "functionSelector": "05357f93",
            "id": 258,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "id": 187,
                    "name": "tokenAddress",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 182,
                    "src": "3685:12:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 188,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 186,
                  "name": "whitelistedToken",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 369,
                  "src": "3668:16:1",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_address_$",
                    "typeString": "modifier (address)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "3668:30:1"
              }
            ],
            "name": "stakeFor",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 185,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 178,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 258,
                  "src": "3553:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 177,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3553:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 180,
                  "mutability": "mutable",
                  "name": "user",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 258,
                  "src": "3577:12:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 179,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3577:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 182,
                  "mutability": "mutable",
                  "name": "tokenAddress",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 258,
                  "src": "3599:20:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 181,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3599:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 184,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 258,
                  "src": "3629:17:1",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 183,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "3629:5:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3543:109:1"
            },
            "returnParameters": {
              "id": 189,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3699:0:1"
            },
            "scope": 438,
            "src": "3526:703:1",
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 353,
              "nodeType": "Block",
              "src": "4818:770:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 277,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "UnaryOperation",
                        "operator": "!",
                        "prefix": true,
                        "src": "4912:47:1",
                        "subExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 274,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "4948:3:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 275,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "4948:10:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 272,
                              "name": "storageManager",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 73,
                              "src": "4913:14:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_StorageManager_$1910",
                                "typeString": "contract StorageManager"
                              }
                            },
                            "id": 273,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "hasUtilizedCapacity",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 1526,
                            "src": "4913:34:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
                              "typeString": "function (address) view external returns (bool)"
                            }
                          },
                          "id": 276,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4913:46:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "5374616b696e673a206d7573742068617665206e6f207574696c697a656420636170616369747920696e2053746f726167654d616e61676572",
                        "id": 278,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "4973:59:1",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_74a096c83306e0c75e37fc8e62b413f704d53d59f74d871aa15721facf20c8cd",
                          "typeString": "literal_string \"Staking: must have no utilized capacity in StorageManager\""
                        },
                        "value": "Staking: must have no utilized capacity in StorageManager"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_74a096c83306e0c75e37fc8e62b413f704d53d59f74d871aa15721facf20c8cd",
                          "typeString": "literal_string \"Staking: must have no utilized capacity in StorageManager\""
                        }
                      ],
                      "id": 271,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "4891:7:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 279,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4891:151:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 280,
                  "nodeType": "ExpressionStatement",
                  "src": "4891:151:1"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 296,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "id": 281,
                          "name": "_amountStaked",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 79,
                          "src": "5052:13:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                            "typeString": "mapping(address => mapping(address => uint256))"
                          }
                        },
                        "id": 285,
                        "indexExpression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 282,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -15,
                            "src": "5066:3:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 283,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "5066:10:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "5052:25:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                          "typeString": "mapping(address => uint256)"
                        }
                      },
                      "id": 286,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 284,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 263,
                        "src": "5078:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "5052:39:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 294,
                          "name": "amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 261,
                          "src": "5138:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 287,
                              "name": "_amountStaked",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 79,
                              "src": "5094:13:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                                "typeString": "mapping(address => mapping(address => uint256))"
                              }
                            },
                            "id": 290,
                            "indexExpression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 288,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "5108:3:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 289,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "5108:10:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "IndexAccess",
                            "src": "5094:25:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 292,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 291,
                            "name": "tokenAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 263,
                            "src": "5120:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "5094:39:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 293,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 2602,
                        "src": "5094:43:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 295,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5094:51:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5052:93:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 297,
                  "nodeType": "ExpressionStatement",
                  "src": "5052:93:1"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 307,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 298,
                        "name": "_totalStaked",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 83,
                        "src": "5155:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                          "typeString": "mapping(address => uint256)"
                        }
                      },
                      "id": 300,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 299,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 263,
                        "src": "5168:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "5155:26:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 305,
                          "name": "amount",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 261,
                          "src": "5215:6:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 301,
                            "name": "_totalStaked",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 83,
                            "src": "5184:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                              "typeString": "mapping(address => uint256)"
                            }
                          },
                          "id": 303,
                          "indexExpression": {
                            "argumentTypes": null,
                            "id": 302,
                            "name": "tokenAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 263,
                            "src": "5197:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "5184:26:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 304,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sub",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 2602,
                        "src": "5184:30:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                          "typeString": "function (uint256,uint256) pure returns (uint256)"
                        }
                      },
                      "id": 306,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5184:38:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "5155:67:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 308,
                  "nodeType": "ExpressionStatement",
                  "src": "5155:67:1"
                },
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 310,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -15,
                          "src": "5246:3:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 311,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5246:10:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 312,
                        "name": "amount",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 261,
                        "src": "5258:6:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 313,
                            "name": "_amountStaked",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 79,
                            "src": "5266:13:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                              "typeString": "mapping(address => mapping(address => uint256))"
                            }
                          },
                          "id": 316,
                          "indexExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 314,
                              "name": "msg",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -15,
                              "src": "5280:3:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_message",
                                "typeString": "msg"
                              }
                            },
                            "id": 315,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "sender",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "5280:10:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address_payable",
                              "typeString": "address payable"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "5266:25:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                            "typeString": "mapping(address => uint256)"
                          }
                        },
                        "id": 318,
                        "indexExpression": {
                          "argumentTypes": null,
                          "id": 317,
                          "name": "tokenAddress",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 263,
                          "src": "5292:12:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "5266:39:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 319,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 263,
                        "src": "5307:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 320,
                        "name": "data",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 265,
                        "src": "5321:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        {
                          "typeIdentifier": "t_bytes_memory_ptr",
                          "typeString": "bytes memory"
                        }
                      ],
                      "id": 309,
                      "name": "Unstaked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 111,
                      "src": "5237:8:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$_t_address_$_t_bytes_memory_ptr_$returns$__$",
                        "typeString": "function (address,uint256,uint256,address,bytes memory)"
                      }
                    },
                    "id": 321,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5237:89:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 322,
                  "nodeType": "EmitStatement",
                  "src": "5232:94:1"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 324,
                        "name": "tokenAddress",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 263,
                        "src": "5355:12:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "id": 323,
                      "name": "_isNativeToken",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 437,
                      "src": "5340:14:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_bool_$",
                        "typeString": "function (address) pure returns (bool)"
                      }
                    },
                    "id": 325,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5340:28:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 351,
                    "nodeType": "Block",
                    "src": "5504:78:1",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 346,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "5552:3:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 347,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "5552:10:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 348,
                              "name": "amount",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 261,
                              "src": "5564:6:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address_payable",
                                "typeString": "address payable"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "id": 343,
                                  "name": "tokenAddress",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 263,
                                  "src": "5525:12:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_address",
                                    "typeString": "address"
                                  }
                                ],
                                "id": 342,
                                "name": "IERC20",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 3333,
                                "src": "5518:6:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_IERC20_$3333_$",
                                  "typeString": "type(contract IERC20)"
                                }
                              },
                              "id": 344,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "typeConversion",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5518:20:1",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IERC20_$3333",
                                "typeString": "contract IERC20"
                              }
                            },
                            "id": 345,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "safeTransfer",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 3367,
                            "src": "5518:33:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$3333_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$3333_$",
                              "typeString": "function (contract IERC20,address,uint256)"
                            }
                          },
                          "id": 349,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5518:53:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 350,
                        "nodeType": "ExpressionStatement",
                        "src": "5518:53:1"
                      }
                    ]
                  },
                  "id": 352,
                  "nodeType": "IfStatement",
                  "src": "5336:246:1",
                  "trueBody": {
                    "id": 341,
                    "nodeType": "Block",
                    "src": "5370:128:1",
                    "statements": [
                      {
                        "assignments": [
                          327,
                          null
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 327,
                            "mutability": "mutable",
                            "name": "success",
                            "nodeType": "VariableDeclaration",
                            "overrides": null,
                            "scope": 341,
                            "src": "5385:12:1",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "typeName": {
                              "id": 326,
                              "name": "bool",
                              "nodeType": "ElementaryTypeName",
                              "src": "5385:4:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          },
                          null
                        ],
                        "id": 335,
                        "initialValue": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "",
                              "id": 333,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "5434:2:1",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
                                "typeString": "literal_string \"\""
                              },
                              "value": ""
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
                                "typeString": "literal_string \"\""
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
                                  "typeString": "literal_string \"\""
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 328,
                                  "name": "msg",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -15,
                                  "src": "5403:3:1",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_message",
                                    "typeString": "msg"
                                  }
                                },
                                "id": 329,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "sender",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "5403:10:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address_payable",
                                  "typeString": "address payable"
                                }
                              },
                              "id": 330,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "call",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "5403:15: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": 332,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "names": [
                              "value"
                            ],
                            "nodeType": "FunctionCallOptions",
                            "options": [
                              {
                                "argumentTypes": null,
                                "id": 331,
                                "name": "amount",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 261,
                                "src": "5426:6:1",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "src": "5403:30: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": 334,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5403:34:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$",
                            "typeString": "tuple(bool,bytes memory)"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "5384:53:1"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 337,
                              "name": "success",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 327,
                              "src": "5459:7:1",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "hexValue": "5472616e73666572206661696c65642e",
                              "id": 338,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "string",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "5468:18:1",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_stringliteral_c81948f77ae7b56f1759fc612b6b373d090eebe7124f74c528fff8e0a139fe69",
                                "typeString": "literal_string \"Transfer failed.\""
                              },
                              "value": "Transfer failed."
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              {
                                "typeIdentifier": "t_stringliteral_c81948f77ae7b56f1759fc612b6b373d090eebe7124f74c528fff8e0a139fe69",
                                "typeString": "literal_string \"Transfer failed.\""
                              }
                            ],
                            "id": 336,
                            "name": "require",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [
                              -18,
                              -18
                            ],
                            "referencedDeclaration": -18,
                            "src": "5451:7:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                              "typeString": "function (bool,string memory) pure"
                            }
                          },
                          "id": 339,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "5451:36:1",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 340,
                        "nodeType": "ExpressionStatement",
                        "src": "5451:36:1"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 259,
              "nodeType": "StructuredDocumentation",
              "src": "4235:434:1",
              "text": "@notice unstake tokens which where previously staked via this function. Only possible when you don't have any active storage agreements\n@dev\n- if sender does not have nothing staked, the transaction will be reverted with \"substraction overflow\" error\n@param amount the total amount of tokens to unstake\n@param tokenAddress Token address\n@param data should be disregarded for the current deployment"
            },
            "functionSelector": "e1df964e",
            "id": 354,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "id": 268,
                    "name": "tokenAddress",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 263,
                    "src": "4804:12:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 269,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 267,
                  "name": "whitelistedToken",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 369,
                  "src": "4787:16:1",
                  "typeDescriptions": {
                    "typeIdentifier": "t_modifier$_t_address_$",
                    "typeString": "modifier (address)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "4787:30:1"
              }
            ],
            "name": "unstake",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 266,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 261,
                  "mutability": "mutable",
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 354,
                  "src": "4700:14:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 260,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4700:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 263,
                  "mutability": "mutable",
                  "name": "tokenAddress",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 354,
                  "src": "4724:20:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 262,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4724:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 265,
                  "mutability": "mutable",
                  "name": "data",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 354,
                  "src": "4754:17:1",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes_memory_ptr",
                    "typeString": "bytes"
                  },
                  "typeName": {
                    "id": 264,
                    "name": "bytes",
                    "nodeType": "ElementaryTypeName",
                    "src": "4754:5:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes_storage_ptr",
                      "typeString": "bytes"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4690:87:1"
            },
            "returnParameters": {
              "id": 270,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4818:0:1"
            },
            "scope": 438,
            "src": "4674:914:1",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 368,
              "nodeType": "Block",
              "src": "5701:122:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "id": 362,
                            "name": "tokenAddress",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 357,
                            "src": "5738:12:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 360,
                            "name": "this",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": -28,
                            "src": "5719:4:1",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_Staking_$438",
                              "typeString": "contract Staking"
                            }
                          },
                          "id": 361,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "isInWhiteList",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 382,
                          "src": "5719:18:1",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$",
                            "typeString": "function (address) view external returns (bool)"
                          }
                        },
                        "id": 363,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5719:32:1",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "5374616b696e673a206e6f7420706f737369626c6520746f20696e7465726163742077697468207468697320746f6b656e",
                        "id": 364,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "5753:51:1",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_13e9674a3a61d7988099791e547f8eef6b536e376639ce382aa927d1ef1e8f11",
                          "typeString": "literal_string \"Staking: not possible to interact with this token\""
                        },
                        "value": "Staking: not possible to interact with this token"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_13e9674a3a61d7988099791e547f8eef6b536e376639ce382aa927d1ef1e8f11",
                          "typeString": "literal_string \"Staking: not possible to interact with this token\""
                        }
                      ],
                      "id": 359,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "5711:7:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 365,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5711:94:1",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 366,
                  "nodeType": "ExpressionStatement",
                  "src": "5711:94:1"
                },
                {
                  "id": 367,
                  "nodeType": "PlaceholderStatement",
                  "src": "5815:1:1"
                }
              ]
            },
            "documentation": {
              "id": 355,
              "nodeType": "StructuredDocumentation",
              "src": "5594:54:1",
              "text": "@notice modifier for whitelisted token"
            },
            "id": 369,
            "name": "whitelistedToken",
            "nodeType": "ModifierDefinition",
            "overrides": null,
            "parameters": {
              "id": 358,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 357,
                  "mutability": "mutable",
                  "name": "tokenAddress",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 369,
                  "src": "5679:20:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 356,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5679:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5678:22:1"
            },
            "src": "5653:170:1",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 381,
              "nodeType": "Block",
              "src": "5957:49:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 377,
                      "name": "isWhitelistedToken",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 87,
                      "src": "5974:18:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_bool_$",
                        "typeString": "mapping(address => bool)"
                      }
                    },
                    "id": 379,
                    "indexExpression": {
                      "argumentTypes": null,
                      "id": 378,
                      "name": "token",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 372,
                      "src": "5993:5:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "5974:25:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 376,
                  "id": 380,
                  "nodeType": "Return",
                  "src": "5967:32:1"
                }
              ]
            },
            "documentation": {
              "id": 370,
              "nodeType": "StructuredDocumentation",
              "src": "5829:56:1",
              "text": "@notice return true if token whitelisted"
            },
            "functionSelector": "96bfc229",
            "id": 382,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isInWhiteList",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 373,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 372,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 382,
                  "src": "5913:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 371,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5913:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5912:15:1"
            },
            "returnParameters": {
              "id": 376,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 375,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 382,
                  "src": "5951:4:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 374,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "5951:4:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5950:6:1"
            },
            "scope": 438,
            "src": "5890:116:1",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 394,
              "nodeType": "Block",
              "src": "6156:43:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "id": 390,
                      "name": "_totalStaked",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 83,
                      "src": "6173:12:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                        "typeString": "mapping(address => uint256)"
                      }
                    },
                    "id": 392,
                    "indexExpression": {
                      "argumentTypes": null,
                      "id": 391,
                      "name": "token",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 385,
                      "src": "6186:5:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "6173:19:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 389,
                  "id": 393,
                  "nodeType": "Return",
                  "src": "6166:26:1"
                }
              ]
            },
            "documentation": {
              "id": 383,
              "nodeType": "StructuredDocumentation",
              "src": "6012:71:1",
              "text": "@notice returns the amount staked for the specific token"
            },
            "functionSelector": "9bfd8d61",
            "id": 395,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "totalStaked",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 386,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 385,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 395,
                  "src": "6109:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 384,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "6109:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6108:15:1"
            },
            "returnParameters": {
              "id": 389,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 388,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 395,
                  "src": "6147:7:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 387,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6147:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6146:9:1"
            },
            "scope": 438,
            "src": "6088:111:1",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 411,
              "nodeType": "Block",
              "src": "6376:50:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "baseExpression": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 405,
                        "name": "_amountStaked",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 79,
                        "src": "6393:13:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$",
                          "typeString": "mapping(address => mapping(address => uint256))"
                        }
                      },
                      "id": 407,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 406,
                        "name": "user",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 398,
                        "src": "6407:4:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "IndexAccess",
                      "src": "6393:19:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
                        "typeString": "mapping(address => uint256)"
                      }
                    },
                    "id": 409,
                    "indexExpression": {
                      "argumentTypes": null,
                      "id": 408,
                      "name": "token",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 400,
                      "src": "6413:5:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "IndexAccess",
                    "src": "6393:26:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 404,
                  "id": 410,
                  "nodeType": "Return",
                  "src": "6386:33:1"
                }
              ]
            },
            "documentation": {
              "id": 396,
              "nodeType": "StructuredDocumentation",
              "src": "6205:81:1",
              "text": "@notice returns the amount staked for the specific user and token"
            },
            "functionSelector": "2cc205d9",
            "id": 412,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "totalStakedFor",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 401,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 398,
                  "mutability": "mutable",
                  "name": "user",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 412,
                  "src": "6315:12:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 397,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "6315:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 400,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 412,
                  "src": "6329:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 399,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "6329:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6314:29:1"
            },
            "returnParameters": {
              "id": 404,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 403,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 412,
                  "src": "6367:7:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 402,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6367:7:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6366:9:1"
            },
            "scope": 438,
            "src": "6291:135:1",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 420,
              "nodeType": "Block",
              "src": "6609:29:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "66616c7365",
                    "id": 418,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "6626:5:1",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "false"
                  },
                  "functionReturnParameters": 417,
                  "id": 419,
                  "nodeType": "Return",
                  "src": "6619:12:1"
                }
              ]
            },
            "documentation": {
              "id": 413,
              "nodeType": "StructuredDocumentation",
              "src": "6432:116:1",
              "text": "@notice contract does not support history functions (lastStakedFor, totalStakedForAt, totalStakedAt)"
            },
            "functionSelector": "7033e4a6",
            "id": 421,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "supportsHistory",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 414,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6577:2:1"
            },
            "returnParameters": {
              "id": 417,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 416,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 421,
                  "src": "6603:4:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 415,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "6603:4:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6602:6:1"
            },
            "scope": 438,
            "src": "6553:85:1",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 436,
              "nodeType": "Block",
              "src": "6761:43:1",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 434,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 429,
                      "name": "token",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 424,
                      "src": "6778:5:1",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 432,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "6795:1:1",
                          "subdenomination": null,
                          "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": 431,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "6787:7:1",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_address_$",
                          "typeString": "type(address)"
                        },
                        "typeName": {
                          "id": 430,
                          "name": "address",
                          "nodeType": "ElementaryTypeName",
                          "src": "6787:7:1",
                          "typeDescriptions": {
                            "typeIdentifier": null,
                            "typeString": null
                          }
                        }
                      },
                      "id": 433,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "6787:10:1",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_address_payable",
                        "typeString": "address payable"
                      }
                    },
                    "src": "6778:19:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 428,
                  "id": 435,
                  "nodeType": "Return",
                  "src": "6771:26:1"
                }
              ]
            },
            "documentation": {
              "id": 422,
              "nodeType": "StructuredDocumentation",
              "src": "6644:45:1",
              "text": "@notice if use a native token"
            },
            "id": 437,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_isNativeToken",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 425,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 424,
                  "mutability": "mutable",
                  "name": "token",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 437,
                  "src": "6718:13:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 423,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "6718:7:1",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6717:15:1"
            },
            "returnParameters": {
              "id": 428,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 427,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 437,
                  "src": "6755:4:1",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 426,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "6755:4:1",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6754:6:1"
            },
            "scope": 438,
            "src": "6694:110:1",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "private"
          }
        ],
        "scope": 439,
        "src": "476:6330:1"
      }
    ],
    "src": "32:6775:1"
  },
  "compiler": {
    "name": "solc",
    "version": "0.6.12+commit.27d51765.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.3.2",
  "updatedAt": "2021-03-04T12:24:19.809Z",
  "devdoc": {
    "author": "see ERC900 proposalRinke Hendriksen <rinke@iovlabs.org>",
    "kind": "dev",
    "methods": {
      "constructor": {
        "params": {
          "_storageManager": "the storageManager which uses this staking contract"
        }
      },
      "owner()": {
        "details": "Returns the address of the current owner."
      },
      "renounceOwnership()": {
        "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
      },
      "setStorageManager(address)": {
        "params": {
          "_storageContract": "the storageManager which uses this staking contract"
        }
      },
      "setWhitelistedTokens(address,bool)": {
        "params": {
          "isWhiteListed": "whether you want to whitelist the token or put it from the whitelist.",
          "token": "the token from whom you want to set the whitelisted"
        }
      },
      "stake(uint256,address,bytes)": {
        "details": "note that when you stake a non-native token, the caller must have given approval to the contract to transact tokens if the caller is a contract, it must implement the functionality to call unstake",
        "params": {
          "amount": "the amount you want to stake. Can be left blank when you are staking the native currency",
          "data": "should be disregarded for the current deployment",
          "token": "Token address"
        }
      },
      "stakeFor(uint256,address,address,bytes)": {
        "details": "note that when you stake a non-native token, the caller must have given approval to the contract to transact tokens if you are staking for a contract, the contract must be able to call unstake",
        "params": {
          "amount": "the amount you want to stake. Can be left blank when you are staking the native currency",
          "data": "should be disregarded for the current deployment",
          "tokenAddress": "Token address",
          "user": "the user for whom you are staking"
        }
      },
      "transferOwnership(address)": {
        "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
      },
      "unstake(uint256,address,bytes)": {
        "details": "- if sender does not have nothing staked, the transaction will be reverted with \"substraction overflow\" error",
        "params": {
          "amount": "the total amount of tokens to unstake",
          "data": "should be disregarded for the current deployment",
          "tokenAddress": "Token address"
        }
      }
    },
    "title": "staking",
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {
      "constructor": "constructor of the contract",
      "isInWhiteList(address)": {
        "notice": "return true if token whitelisted"
      },
      "setStorageManager(address)": {
        "notice": "set Storage Manager contract"
      },
      "setWhitelistedTokens(address,bool)": {
        "notice": "whitelist a token or remove the token from whitelist"
      },
      "stake(uint256,address,bytes)": {
        "notice": "stake the token via this function."
      },
      "stakeFor(uint256,address,address,bytes)": {
        "notice": "stake tokens for somebody else via this function"
      },
      "supportsHistory()": {
        "notice": "contract does not support history functions (lastStakedFor, totalStakedForAt, totalStakedAt)"
      },
      "totalStaked(address)": {
        "notice": "returns the amount staked for the specific token"
      },
      "totalStakedFor(address,address)": {
        "notice": "returns the amount staked for the specific user and token"
      },
      "unstake(uint256,address,bytes)": {
        "notice": "unstake tokens which where previously staked via this function. Only possible when you don't have any active storage agreements"
      }
    },
    "notice": "implements the ERC900 interface, with some small modifications. The contract also handles native tokens.",
    "version": 1
  }
}